[
https://issues.jboss.org/browse/AS7-799?page=com.atlassian.jira.plugin.sy...
]
Benjamin Browning commented on AS7-799:
---------------------------------------
IRC log discussing this bug with stuartdouglas:
20:54 bbrowning: I'm seeing an error in the AS7 logs that confuses me - 20:51:19,770
ERROR [org.apache.catalina.session.ManagerBase] (MSC service thread 1-2)
ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException:
org.jboss.weld.context.conversation.ConversationIdGenerator from [Module
"org.jboss.as.web:main"
20:55 bbrowning: I'm interpreting that error to be that org.jboss.as.web module needs
a dependency on org.jboss.weld.core - does that sound right?
20:55 stuartdouglas: maybe, but I think there is something else going on
20:56 stuartdouglas: is this reproducable?
20:56 bbrowning: Yes, although not in an easy-to-consume test-case
20:56 bbrowning: I'm just running TorqueBox's integration tests against AS7 and
seeing these errors in server.log
20:56 dmlloyd: seems possible that it could be a TCCL issue
20:57 stuartdouglas: yea, it looks like the wrong CL is being used during deserialization
20:58 bbrowning: so nothing I can fix on my end? :D
20:58 stuartdouglas: you can try adding the dep and see what happens
20:58 stuartdouglas: it will get rid of that error for now
21:00 stuartdouglas: where is the torquebox source with AS7 integration github?
21:01 bbrowning: it's at
https://github.com/torquebox/torquebox/tree/as7
21:02 bbrowning: quite a large source tree so if you're poking for a specific piece I
can guide you :)
21:02 stuartdouglas: how do I run the integration tests?
21:03 bbrowning: "mvn -Pinteg test" from the project root, wait a long time
21:04 bbrowning: well, I usually do "mvn install" from root and then "cd
integration-tests && mvn test"
21:05 bbrowning: use the latter way since the first command may have been made-up
21:05 stuartdouglas: bbrowning: was there a stack trace to go with that exception?
21:05 bbrowning: sure, one sec
21:05 bbrowning: stuartdouglas:
https://gist.github.com/06e99827cda0568339ee
21:06 jamezp_afk: stuartdouglas: I think it's ./build.sh install -Pintegration-tests
21:07 stuartdouglas: jamezp_afk: The torquebox integrations tests :-)
21:08 jamezp_afk: stuartdouglas: I guess I should read from the top down :-)
21:09 stuartdouglas: actually adding the dep on weld to the web module is probably the
correct solution
21:10 bbrowning: stuartdouglas: is this a more general problem of having persisted
sessions that reference external classes?
21:10 stuartdouglas: although I can' t help thinking that the deployments CL should be
being used in the deserialization
21:11 stuartdouglas: yea, when it is de-serializing the persistent session it is trying to
use the web modules class loader
21:11 stuartdouglas: instead of the class loader for the deployed application
21:15 stuartdouglas: bbrowning: which project do I need to build to get
org.torquebox:gems-parent?
21:15 bbrowning: should get built as part of torquebox itself
21:15 stuartdouglas: oops, I mean rubyrems:rspec , but don't worry, I think I wound
it
21:16 bbrowning: k
21:17 stuartdouglas: or maybe not
21:19 bbrowning: 'mvn install' from the root should build and run unit tests then
'mvn test' from integration-tests. If you're running the first command I gave
you, I just tried it and it's not working at the moment
21:22 stuartdouglas: bbrowning: I think I am missing the ruby gems repo
21:22 bbrowning: hrm
21:22 bbrowning: ahh yes we have a custom settings file that I've copied to mvn home
so I always forget about it
21:22 bbrowning: mvn -s build-support/settings.xml install
21:24 bbrowning: we have a source guide at
http://torquebox.org/development/source-guide/
but have been lazy about updating it for the as7 branch
21:27 bbrowning: stuartdouglas: as expected, adding weld to the org.jboss.as.web.main
module did get rid of those errors
21:29 stuartdouglas: ok, I'm more interested in why it is using that CL to start with,
because if there are any classes from the deployment persisted in the session then it is
going to fail
21:29 bbrowning: yep
Wrong Classloader Used When Deserializing Persisted Sessions
------------------------------------------------------------
Key: AS7-799
URL:
https://issues.jboss.org/browse/AS7-799
Project: Application Server 7
Issue Type: Bug
Affects Versions: 7.0.0.Beta3
Reporter: Benjamin Browning
Assignee: Jason Greene
The org.jboss.as.web:main module's classloader is being used when deserializing
persisted sessions instead of the deployment's classloader. This leads to errors like
the one below when any classes are referenced in the session that aren't in the
dependency list of org/jboss/as/web/main/module.xml.
21:02:50,824 ERROR [org.apache.catalina.session.ManagerBase] (MSC service thread 1-1)
ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException:
org.jboss.weld.context.conversation.ConversationIdGenerator from [Module
"org.jboss.as.web:main" from local module loader @32b0bad7 (roots:
/Users/bbrowning/src/torquebox/integration-tests/target/integ-dist/jboss/modules)]:
java.lang.ClassNotFoundException:
org.jboss.weld.context.conversation.ConversationIdGenerator from [Module
"org.jboss.as.web:main" from local module loader @32b0bad7 (roots:
/Users/bbrowning/src/torquebox/integration-tests/target/integ-dist/jboss/modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:184)
[:1.0.0.Beta17]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357)
[:1.0.0.Beta17]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329)
[:1.0.0.Beta17]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306)
[:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100)
[:1.0.0.Beta17]
at java.lang.Class.forName0(Native Method) [:1.6.0_24]
at java.lang.Class.forName(Class.java:247) [:1.6.0_24]
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603) [:1.6.0_24]
at
org.apache.catalina.util.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:78)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574) [:1.6.0_24]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495) [:1.6.0_24]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731) [:1.6.0_24]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) [:1.6.0_24]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) [:1.6.0_24]
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1429)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:934)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:395)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at org.apache.catalina.session.StandardManager.load(StandardManager.java:322)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at org.apache.catalina.session.StandardManager.start(StandardManager.java:633)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:459)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3776)
[jbossweb-7.0.0.Beta11.jar:7.0.0.Beta3]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:61)
[jboss-as-web-7.0.0.Beta3.jar:7.0.0.Beta3]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira