views:

145

answers:

2

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.

+1  A: 

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.

Andreas_D
@Andreas_D thanks for your response, that's what I was afraid of.
stacker
We can still hope for another answer with a solution how to get rid of this dependency ;)
Andreas_D
+1  A: 
Arthur Ronald F D Garcia
Thanks, but there is no other jar in the lib dir but gwt-servlet.jar which name indicates that it could be involved in this issue.
stacker
@stacker Have you seen Chris Bauer comment: http://seamframework.org/Community/NoClassDefFoundExceptionOnGoogleSerializationPolicyProvider#comment72922
Arthur Ronald F D Garcia
@arthur-ronald-f-d-garcia thanks he says it's logged as DEBUG (including the exception) and user shouldn't worry. Now I'm relaxed and if I have time I'm going to find out why this appears as error.
stacker
For the records I excluded gwt-servlet.jar and jboss-seam-remoting.jar
stacker