java.lang.ClassNotFoundException while Migration 4.2.3 to 5.1 GA or 7.1
andilog Aug 9, 2013 10:33 AMHello everyone.
I am working on a Migration with a big application. It consists of two parts: one is .ear and the other is .war.
I have read a lot of postings and tried many things... this is really hard job to migrate, because I have not invented that application by myself.
The application is based on struts.
Last thing I have done is written here: https://community.jboss.org/wiki/useJBossWebClassLoaderinJBoss5
Right now I am facing following error:
14:27:53,771 ERROR [[action]] Servlet.service() for servlet action threw exception
java.lang.ClassNotFoundException: com.myCompany.exception.NotLoggedInException from
BaseClassLoader@5dcc1ef4{VFSClassLoaderPolicy@4045548
{name=vfsfile:/C:/Users/amartin/Desktop/Logisco/Webchannel/rt/jboss-5.1.0.GA/server/WebChannel51/deploy/WebChannel.war/
domain=ClassLoaderDomain@df1cbf6{
name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@58fe64b9}
roots=[MemoryContextHandler@947579911[path= context=vfsmemory://a2s11x-4bzqjl-hjr2yvcp-1-hjr2z5pf-2b
real=vfsmemory://a2s11x-4bzqjl-hjr2yvcp-1-hjr2z5pf-2b],
FileHandler@236838025[path=WebChannel.war/WEB-INF/classes
context=file:/C:/Users/amartin/Desktop/Logisco/Webchannel/rt/jboss-5.1.0.GA/server/WebChannel51/deploy/
real=file:/C:/Users/amartin/Desktop/Logisco/Webchannel/rt/jboss-5.1.0.GA/server/WebChannel51/deploy/WebChannel.war/WEB-INF/classes/],
DelegatingHandler@1249488284[path=WebChannel.war/WEB-INF/lib/antlr.jar
context=file:/C:/Users/amartin/Desktop/Logisco/Webchannel/rt/jboss-5.1.0.GA/server/WebChannel51/deploy/
...(edit: shorted quite long list...)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.usocome.client.webchannel.action.LoginAction.execute(LoginAction.java:39)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
The class .com.myCompany.exception.NotLoggedInException is placed in the .ear.
WEB-INF/jboss-classloading.xml:
<?xml version="1.0" encoding="UTF-8"?> <!-- Migration 5.1 - AMartin 2013.07.30 --> <!-- A hack to make this classloader a top-level classloader The actual value is ignored since DefaultDomain already exists. --> <classloading xmlns="urn:jboss:classloading:1.0" name="WebChannel.war" domain="DefaultDomain" parent-domain="Ignored" export-all="NON_EMPTY" import-all="true"> </classloading>
I am thinking about scope, permission and build path, but could not find any solution yet.
Hope someone can give me a hint.