This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am having a strange problem. I have a web service project created in Eclipse BEA Weblogic 9.2 Workshop IDE. The structure is:
-JAX-WS WAR 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
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.