This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT Script Error in JAX-WS and XMLBeans Facet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT Script Error in JAX-WS and XMLBeans Facet" Watch "ANT Script Error in JAX-WS and XMLBeans Facet" New topic
Author

ANT Script Error in JAX-WS and XMLBeans Facet

Haq Yunus
Ranch Hand

Joined: Apr 08, 2009
Posts: 42
I am having a strange problem. I have a web service project created in Eclipse BEA Weblogic 9.2 Workshop IDE. The structure is:

-EAR...which consitutues
-JAX-WS WAR project
-EJB Project

The JAX-WS WAR has XMLBeans/XMLBuilder facets enabled to be used for compiling my XSD schemas being used in my web service.

When I build the project and export the ear through the IDE it works fine. I wanted to generate ANT scripts for all these projects so I can build and export the EAR through the command prompt. I was able to that. Now I wanted to check-in the project code in a source control management tool. Naturally I shouldn't check-in the .xbean_bin and .xbean_src folders generated by the the JAXB API against my schemas. The problem happens that when I delete these folders and then run my ANT build script through command prompt I get the following error:


assembly: [mkdir] Created dir: C:\Projects\kc\kces2\kcesWs\build\assembly\.src
[assemble] Input fileset contained no files, nothing to do. init.env: init.typedefs: init: generated.root.init: webservice.build:
[jwsc] JWS: processing module weboutput
[jwsc] Parsing source files
[jwsc] Parsing source files
[jwsc] 1 JWS files being processed for module weboutput [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\Syunus\LOCALS~1\Temp\_5l950r10

BUILD FAILED
C:\Projects\KEYCOM~1\kces2\kcesEar\build.xml:184: The following error occurred while executing this line: jar:file:/C:/bea/WEBLOG%7e2/workshop/lib/wlw-antlib.jar!/com/bea/wlw/antlib/antlib.xml:91:
The following error occurred while executing this line: C:\Projects\KEYCOM~1\kces2\kcesEar\build.xml:196:
The following error occurred while executing this line: C:\Projects\kc\kces2\kcesWs\build.xml:401:
The following error occurred while executing this line: C:\Projects\kc\kces2\kcesWs\build.xml:293:
The following error occurred while executing this line: C:\Projects\kc\kces2\kcesWs\build.xml:490: java.lang.RuntimeException: java.lang.ExceptionInInitializerError

Total time: 13 seconds


The above mentioned XMLBean folders are created, my schemas are compiled but the build process terminates at that point when trying to compile the web service code file i.e. the jwsc task fails. Right after that, if I again initiate the build everything goes fine. Apparently the build script expects these 2 XMLBean folders to be present before hand?

The ANT build chain goes like this:

-ANT build script for the EAR project -> which calls child ANT build scripts for all referenced sub projects, which are the WAR (here it fails on the first run) and the EJB projects in my case.

Any idea why it is happening? Thanks a lot.

cross-posted at:
http://forums.oracle.com/forums/thread.jspa?threadID=1039222&tstart=0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ANT Script Error in JAX-WS and XMLBeans Facet
 
Similar Threads
org.apache.tools.ant.ProjectHelper.addLocationToBuildException (ProjectHelper.java:541)
xmlBean Problem
[xmlbean] scomp giving me an exception: java.io.IOException: CreateProcess
help me regarding ExceptionInInitializerError while build
Error running javac.exe compiler