Reputation: 68982
In a seam-gen generated application the following exception is thrown during deployment:
ERROR [LoadMgr3] Not resheduling failed loading task, loadTask=org.jboss.mx.loading.ClassLoadingTask@8c5c9c{classname: org.jboss.seam.remoting.gwt.GWT14Service, requestingThread: Thread[ScannerThread,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@3e4532{ url=f
ile:/C:/dev/jboss-4.3.0.GA/server/default/deploy/myapp.ear/ ,addedOrder=50}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: com/google/gwt/user/server/rpc/SerializationPolicyProvider, threadTaskCount: 0, state: 1, #CCE: 1}
java.lang.NoClassDefFoundError: com/google/gwt/user/server/rpc/SerializationPolicyProvider
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
...
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
The problem (and workaround) is described here. Since I don't use gwt, my question is why do I have this dependency when I'm not using gwt at all?
Seam version 2.1.2
EDIT:
Just for the records: Until another solution is available I added gwt-servlet.jar
in the file deployed-jars-ear.list
this satisfies the deployment scanner.
Upvotes: 3
Views: 2250
Reputation: 920
As a matter of fact, checking on my seam project, the awt library is an internal dependecie for some faces modules, you just need to be sure to add gwt-servlet-2.3.0.jar to your
Project-ear.ear\Project.war\WEB-INF\lib
Upvotes: 0
Reputation: 33783
Here you can see Ant Target responsible for copying libraries used by Seam-gen
<target name="copy-lib" depends="copyseam, copyseamdependencies, copyjbossembedded, copy-icefaces-home, copy-icefaces-maven">
<echo message="Copying Seam and dependencies to the ${project.home}/lib directory..."/>
<copy todir="${project.home}/lib" overwrite="true">
<fileset dir="${seam.dir}/lib">
<exclude name="jsf-facelets.jar" if="icefaces.property"/>
<exclude name="ajax4jsf*.jar" if="icefaces.property"/>
<exclude name="richfaces*.jar" if="icefaces.property"/>
<exclude name="jboss-container.jar"/>
<exclude name="jboss-seam-wicket.jar"/>
<exclude name="jboss-seam-resteasy.jar"/>
<exclude name="test/jboss-deplyers.jar"/>
<exclude name="test/jboss-embedded-api.jar"/>
<exclude name="interop/**/*"/>
<exclude name="gen/**/*"/>
</fileset>
<fileset file="${driver.jar}"/>
</copy>
<!-- we must use an endorsed jars directory containing JAXB 2.1 for running SeamTest under Java 6 -->
<copy todir="${project.home}/lib/endorsed" file="${seam.dir}/lib/gen/jaxb-api.jar" overwrite="true"/>
<echo message="Copying JBoss Embedded configuration to the ${project.home}/bootstrap directory..."/>
<copy todir="${project.home}/bootstrap" overwrite="true">
<fileset dir="${seam.dir}/bootstrap"/>
</copy>
</target>
Notice it is not exclude GWT library. But As far i know, Seam does not depends on GWT library. So you can set up your custom exclude. Here you can see how your Seam app should looks like.
The build.xml file Seam-gen uses is located in
<SEAM_HOME>/seam-gen/build.xml
Upvotes: 1
Reputation: 114807
It looks like some part of seam just depends on classes from the gwt-servlet.jar
.
Bet you have to take it as it is and hope for a code cleanup on seam's side, because it is surprising that your're required to add 'gwt' libs to your project even if you do not use gwt.
Upvotes: 1