Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BSFException in delta-push using sf.ignoreFile or sf.packageFile #244

Closed
lopezfra opened this issue Jun 13, 2017 · 3 comments
Closed

BSFException in delta-push using sf.ignoreFile or sf.packageFile #244

lopezfra opened this issue Jun 13, 2017 · 3 comments
Assignees

Comments

@lopezfra
Copy link

lopezfra commented Jun 13, 2017

When I try to use delta-push in combination with some of these properties 'sf.ignoreFile' or 'sf.packageFile' I get a BSFException. Everything is fine If I remove the property and I do the same without exclude anything.

solenopsis.properties

solenopsis.ENVIRONMENTS=testOrg local
solenopsis.env.HOME=/home/fran/.solenopsis
solenopsis.env.MASTER=local
solenopsis.env.DEPENDENT=testOrg
solenopsis.env.local.HOME=/home/fran/Documentos/workspace/src
sf.antFile=/home/fran/Documentos/workspace/build/ant/ant-salesforce.jar
#sf.ignoreFile=/home/fran/Documentos/workspace/build/ignoreFiles
sf.purgeIgnores=false
sf.ignoreWarnings=true
sf.version=34.0
sf.packageFile=/home/fran/Documentos/workspace/build/package.xml

credentials

username=******
password=*****
token=******
url=https://test.salesforce.com

package file referenced in properties

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <version>37.0</version>
</Package>

delta-push execution

solenopsis delta-push
Buildfile: /usr/share/solenopsis/ant/solenopsis.xml

info:
     [echo] 
     [echo] Solenopsis release version  [N/A]
     [echo] Solenopsis version          [1.1]
     [echo] 
     [echo] Ant version                 [Apache Ant(TM) version 1.9.6 compiled on June 29 2015]
     [echo] Java version                [1.8]
     [echo] 		

pull-full:
   [delete] Deleting directory /tmp/fran/solenopsis/1.1/testOrg/folder-pull
    [mkdir] Created dir: /tmp/fran/solenopsis/1.1/testOrg/folder-pull
     [echo] User defined package file being used [/home/fran/Documentos/workspace/build/package.xml]
     [echo] 
     [echo] 
     [echo] 				Processing:  [testOrg]
     [echo] 
     [echo] 				URL:         [https://test.salesforce.com]
     [echo] 				API:         [34.0]
     [echo] 
     [echo] 				Jar:         [/home/fran/Documentos/workspace/build/ant/ant-salesforce.jar]
     [echo] 
     [echo] 			
   [delete] Deleting directory /home/fran/.solenopsis/env/testOrg
    [mkdir] Created dir: /home/fran/.solenopsis/env/testOrg
[sf:retrieve] Request for a retrieve submitted successfully.
[sf:retrieve] Request ID for the current retrieve task: 09S3E000000YwwQUAS
[sf:retrieve] Waiting for server to finish processing the request...
[sf:retrieve] Request Status: InProgress
[sf:retrieve] Request Status: Succeeded
[sf:retrieve] Finished request 09S3E000000YwwQUAS successfully.
   [delete] Deleting: /tmp/fran/solenopsis/1.1/testOrg/folder-pull/folder-pull.package.xml
      [zip] Building zip: /tmp/fran/solenopsis/1.1/testOrg/folder-pull/folder-pull.zip
    [unzip] Expanding: /tmp/fran/solenopsis/1.1/testOrg/folder-pull/folder-pull.zip into /home/fran/.solenopsis/env/testOrg
[rh-sfdc:transformFiles] WARNING:  directory is an empty string
[rh-sfdc:transformFiles] WARNING:  No xsl directory found for []
     [echo] 
     [echo]                         Purging ignores is set to [false] - therefore it is skipped!
     [echo] 
     [echo]                         If you want it enabled, ensure the value is not [false].  This
     [echo]                         can be done by defining the environment variable sf.purgeIgnores to true
     [echo]                         or any other value.
     [echo]                     

cached-delta-push:
[rh-sfdc:computeFieldDiffs] jun 12, 2017 5:52:48 PM org.apache.bsf.BSFManager exec
[rh-sfdc:computeFieldDiffs] GRAVE: Exception :
[rh-sfdc:computeFieldDiffs] java.security.PrivilegedActionException: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : The collection, array, map, iterator, or enumeration portion of a for statement cannot be null. : at Line: 193 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : for ( File dir : dirContents ) { 
[rh-sfdc:computeFieldDiffs] 
[rh-sfdc:computeFieldDiffs] Called from method: applyXpath : at Line: 211 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpath ( new FileFilter ( applyXpath ) , xpath , sb , dir , compareDir , applyXpath ) 
[rh-sfdc:computeFieldDiffs] Called from method: applyXpath : at Line: 218 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpath ( XPathFactory .newInstance ( ) .newXPath ( ) , sb , dir , compareDir , applyXpath ) 
[rh-sfdc:computeFieldDiffs] Called from method: applyXpaths : at Line: 230 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpaths ( attributes .get ( "dir" ) , attributes .get ( "comparedir" ) , getApplyXpaths ( ) )  BSF info: scriptdef_http://www.redhat.com/sfdc:computeFieldDiffs at line: 0 column: columnNo
[rh-sfdc:computeFieldDiffs] 	at java.security.AccessController.doPrivileged(Native Method)
[rh-sfdc:computeFieldDiffs] 	at org.apache.bsf.BSFManager.exec(BSFManager.java:491)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner.java:98)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:349)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:51)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
[rh-sfdc:computeFieldDiffs] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[rh-sfdc:computeFieldDiffs] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rh-sfdc:computeFieldDiffs] 	at java.lang.reflect.Method.invoke(Method.java:498)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
[rh-sfdc:computeFieldDiffs] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[rh-sfdc:computeFieldDiffs] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rh-sfdc:computeFieldDiffs] 	at java.lang.reflect.Method.invoke(Method.java:498)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
[rh-sfdc:computeFieldDiffs] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[rh-sfdc:computeFieldDiffs] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rh-sfdc:computeFieldDiffs] 	at java.lang.reflect.Method.invoke(Method.java:498)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Target.execute(Target.java:435)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Target.performTasks(Target.java:456)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Main.runBuild(Main.java:853)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Main.startAnt(Main.java:235)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Main.start(Main.java:198)
[rh-sfdc:computeFieldDiffs] 	at org.apache.tools.ant.Main.main(Main.java:286)
[rh-sfdc:computeFieldDiffs] Caused by: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : The collection, array, map, iterator, or enumeration portion of a for statement cannot be null. : at Line: 193 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : for ( File dir : dirContents ) { 
[rh-sfdc:computeFieldDiffs] 
[rh-sfdc:computeFieldDiffs] Called from method: applyXpath : at Line: 211 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpath ( new FileFilter ( applyXpath ) , xpath , sb , dir , compareDir , applyXpath ) 
[rh-sfdc:computeFieldDiffs] Called from method: applyXpath : at Line: 218 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpath ( XPathFactory .newInstance ( ) .newXPath ( ) , sb , dir , compareDir , applyXpath ) 
[rh-sfdc:computeFieldDiffs] Called from method: applyXpaths : at Line: 230 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpaths ( attributes .get ( "dir" ) , attributes .get ( "comparedir" ) , getApplyXpaths ( ) )  BSF info: scriptdef_http://www.redhat.com/sfdc:computeFieldDiffs at line: 0 column: columnNo
[rh-sfdc:computeFieldDiffs] 	at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
[rh-sfdc:computeFieldDiffs] 	at bsh.util.BeanShellBSFEngine.exec(Unknown Source)
[rh-sfdc:computeFieldDiffs] 	at org.apache.bsf.BSFManager$6.run(BSFManager.java:493)
[rh-sfdc:computeFieldDiffs] 	... 35 more
[rh-sfdc:computeFieldDiffs] 

BUILD FAILED
/usr/share/solenopsis/ant/1.1/solenopsis-build.xml:226: The following error occurred while executing this line:
/usr/share/solenopsis/ant/1.1/util/sfdc-util.xml:2998: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : The collection, array, map, iterator, or enumeration portion of a for statement cannot be null. : at Line: 193 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : for ( File dir : dirContents ) { 

Called from method: applyXpath : at Line: 211 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpath ( new FileFilter ( applyXpath ) , xpath , sb , dir , compareDir , applyXpath ) 
Called from method: applyXpath : at Line: 218 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpath ( XPathFactory .newInstance ( ) .newXPath ( ) , sb , dir , compareDir , applyXpath ) 
Called from method: applyXpaths : at Line: 230 : in file: inline evaluation of: ``                                       		             import java.io.FilenameFil . . . '' : applyXpaths ( attributes .get ( "dir" ) , attributes .get ( "comparedir" ) , getApplyXpaths ( ) )  BSF info: scriptdef_http://www.redhat.com/sfdc:computeFieldDiffs at line: 0 column: columnNo
	at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
	at bsh.util.BeanShellBSFEngine.exec(Unknown Source)
	at org.apache.bsf.BSFManager$6.run(BSFManager.java:493)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.bsf.BSFManager.exec(BSFManager.java:491)
	at org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner.java:98)
	at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:349)
	at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:51)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
	at org.apache.tools.ant.Main.runBuild(Main.java:853)
	at org.apache.tools.ant.Main.startAnt(Main.java:235)
	at org.apache.tools.ant.Main.start(Main.java:198)
	at org.apache.tools.ant.Main.main(Main.java:286)

Total time: 13 seconds
@pcon
Copy link
Member

pcon commented Jun 13, 2017

I moved the files out of pastebin since they have a habit of disappearing

@sfloess Could this be because the build.xml only has ApexClass in it. I'm thinking that the beanshell script is trying to operate on folders (like CustomObject) that do not exist because only ApexClass is in the XML file.

@sfloess
Copy link
Member

sfloess commented Jun 13, 2017

@pcon - yeah that is probably a safe assumption... I'll try to look at this sooner than later...

@sfloess sfloess closed this as completed in 1b6b736 Jul 4, 2017
@sfloess
Copy link
Member

sfloess commented Jul 4, 2017

@LopezRegaladoFj - give this a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants