cancel
Showing results for 
Search instead for 
Did you mean: 

Build fails because ant script tag not setup correctly in al

binduwavell
Star Contributor
Star Contributor
I created a JIRA ticket at: http://issues.alfresco.com/jira/browse/ALF-10344

I have had this issue with community svn/trunk for the last couple of weeks.

On line 146 of the root build.xml file there is a <script> target that attempts to run some javascript. On my dev image which is centos 6 with tomcat 6 and java 6 the build fails as follows:

—-
ant incremental-tomcat
Buildfile: build.xml

init:
     [echo] user.home = /home/binduwavell
     [echo] version.number = 4.0.a

BUILD FAILED
java.lang.ClassNotFoundException: org.apache.bsf.engines.javascript.JavaScriptEngine
   at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
   at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
   at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:696)
   at org.apache.bsf.BSFManager.exec(BSFManager.java:485)
   at org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner.java:100)
   at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
   at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   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:357)
   at org.apache.tools.ant.Target.performTasks(Target.java:385)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
   at org.apache.tools.ant.Main.runBuild(Main.java:758)
   at org.apache.tools.ant.Main.startAnt(Main.java:217)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds
—-

This failure is because ant can't find the script execution engine if I add the attribute declaration manager="javax" to this target the build completes without issue.

I'm certain there are other ways of resolving this issue, however I believe that this is a bug.

My issue was marked as not a bug.

Is this a known configuration problem?

Have others had this issue?

What would the rational be for not attempting to resolve this?

Thanks in advance!
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Its not a bug because the problem is due to your development environment.

Unfortunately I haven't a clue what is causing your error however I do know that alfresco compiles fine for me on the Sun SDK.     I think your first port of call would be to make sure you have a Sun JDK; from memory there was a problem with some of the other java 6 JVMs which were missing Rhino which is why alfresco 3.3 had a fairly specific set of JDK/JREs to run on.

binduwavell
Star Contributor
Star Contributor
I have the latest release of sun java 6. I wonder if you have some environment setup that is not documented?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.