[Installation, Configuration & Deployment] - After clean deploy, No Classloaders Found For: is thrown
by dlibke
After a clean server start and EAR deployment, when I request the servlet its get method call a delegate factory to get a delegate and then the delegate to get a service. The delegate object throws a ClassNotFoundException because No Classloaders Found For: class. The three classes are in the same package, which is named in the War's META-INF/MANIFEST.MF class-path.
The following is the message on the returned page:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: TimerMgr; doGet(); Error: Caught com.aroundtoit.common.exception.BusinessDelegateException, message = BusDelegate; getServiceObj(int); Error: Caught java.lang.ClassNotFoundException, message = No ClassLoaders found for: com.aroundtoit.delegate.TimerMgmtBDImp, cause = null, cause = null
com.aroundtoit.web.TimerMgr.doGet(TimerMgr.java:53)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
Apache Tomcat/5.5.17
The end of the deployment log, some print statements to show the classloaders used to load the factory and delegate along with the servlet followed by the stack trace for the exception:
03:25:53,873 INFO [ProxyFactory] Bound EJB Home 'personMgmtBean' to jndi 'ejb/personMgmt'
03:25:53,966 INFO [ProxyFactory] Bound EJB Home 'organizationMgmtBean' to jndi 'ejb/organizationMgmt'
03:25:53,974 INFO [EJBDeployer] Deployed: file:/Users/dlibke/Applications/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22949framework.ear-contents/framework-EJBModule.jar
03:25:54,404 INFO [TomcatDeployer] deploy, ctxPath=/framework-WebModule, warUrl=.../tmp/deploy/tmp22949framework.ear-contents/framework-WebModule-exp.war/
03:25:56,488 INFO [EARDeployer] Started J2EE application: file:/Users/dlibke/Applications/jboss-4.0.4.GA/server/default/deploy/framework.ear
03:26:14,147 INFO [STDOUT]
BusDelegateFactory classloader = org.jboss.mx.loading.UnifiedClassLoader3@e662ee{ url=file:/Users/dlibke/Applications/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22949framework.ear ,addedOrder=43}
03:26:14,147 INFO [STDOUT]
Servlet classloader = WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
java.net.FactoryURLClassLoader@2e712
03:26:14,207 INFO [STDOUT]
BusDelegate; getServiceObj(int); Business Delegate ClassLoader = org.jboss.mx.loading.UnifiedClassLoader3@e662ee{ url=file:/Users/dlibke/Applications/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22949framework.ear ,addedOrder=43}
03:26:14,212 ERROR [STDERR] java.lang.ClassNotFoundException: No ClassLoaders found for: com.aroundtoit.delegate.TimerMgmtBDImp
03:26:14,213 ERROR [STDERR] at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
03:26:14,215 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
03:26:14,215 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
03:26:14,215 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
03:26:14,215 ERROR [STDERR] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
03:26:14,215 ERROR [STDERR] at java.lang.Class.forName0(Native Method)
03:26:14,215 ERROR [STDERR] at java.lang.Class.forName(Class.java:242)
03:26:14,215 ERROR [STDERR] at com.aroundtoit.delegate.BusDelegate.getServiceObj(BusDelegate.java:209)
03:26:14,215 ERROR [STDERR] at com.aroundtoit.delegate.BusDelegate.getService(BusDelegate.java:100)
03:26:14,216 ERROR [STDERR] at com.aroundtoit.web.TimerMgr.doGet(TimerMgr.java:41)
03:26:14,216 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
03:26:14,216 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
03:26:14,216 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
03:26:14,216 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
03:26:14,216 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
03:26:14,216 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
03:26:14,216 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
03:26:14,217 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
03:26:14,217 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
03:26:14,217 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
03:26:14,217 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
03:26:14,217 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
03:26:14,218 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
03:26:14,218 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
03:26:14,218 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
03:26:14,218 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
03:26:14,220 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
03:26:14,220 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
03:26:18,052 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
03:26:18,053 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
I am baffled, I have had ClassNotFoundExceptions due to classpath issues generally solved with the inclusion of the jars in the Manifest file. This is my first issue with a classloader not found. But to make matters worst, this code ran on JBoss 3.2.5 without this exception.
Any help would be appreciated.
Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967686#3967686
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967686
19 years, 8 months
[JBoss jBPM] - counter-intuitive behavior persisting domain objects?
by stibrian
Good evening,
I've been working with 3.1.2, and was in love with the concept of transparently persisting "hibernatable" domain objects within a process.
There is a slight, what I would call counterintuitive problem with the default variable mapping config file related to this though... objects that are Serializable even though they are "hibernatable" will be, by default, persisted in the process via serialization rather than hibernate. This is due to the sequence of matcher/converter declarations in the default config file.
As the engine is trying to figure out how to save a process variable to the DB, it will encounter the serializable converter PRIOR to the HibernateLongVariableInstance... (as they're checked sequentially) so when a user attempts to utilize the default behavior with their domain object (and it happens to be serializable), they'll be in for a big surprise as it won't actually utilize the hibernate variable instances OOTB. This can be fixed by providing your own config file in the root of the classpath - blah blah blah. As far as I'm concerned though the default behavior should be a bit more intuitive and attempt to use the hibernate variable instances prior to the serializable variable instance.
simply changing the ordering in the default file makes things work as one would expect (IMHO).
Also on this subject - there's a bit of code in the match() (name?) method of the hibernateLongID variable instance impl that is a bit odd - the class metadata for an object's class is fetched (if possible). If it exists, the identifier type's class is compared == to LongType.class... this caused me no end of problem. The question is - why is it comparing the identifier's class == rather than using instanceof or assignable from to determine if the object can use that particular variableInstance implementation.
Please pardon the ramblingness of this post - it's late and I've been wrestling with this, trying to get the most intuitive behavior in our app all day.
Thanks.
Thoughts?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967680#3967680
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967680
19 years, 8 months