[jboss-user] [Management, JMX/JBoss] - Class loader problem!

Doug.Palmer do-not-reply at jboss.com
Mon Sep 4 14:21:11 EDT 2006


Hi

I'm running into a class loading problem with a service that I'm developing.  The service builds war files from data in an xml document and then deploys asks the main deployer to deploy the war file.

The following works in the create method my deployment MBean:


  | ....code to generate warfile....
  | mainDeployer.deploy(warFile.getPath());
  | 

However, this does not establish a connection between the original xml deployment and the war file deployment.  So I tried the following:


  | ....code to generate warfile....
  | DeploymentInfo subDi = new DeploymentInfo(new URL("file://" + outFile.getPath()), di, server);
  | mainDeployer.deploy(subDi);
  | 

Now, when I try to connect to the newly create web service I get the following exception:


  | java.lang.ClassCastException: decs2.pi.ProcessInitiatorImpl
  | 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
  | 	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | 	at java.lang.Thread.run(Thread.java:613)
  | 

Where decs2.pi.ProcessInitiatorImpl is the code the implements my service.  The class file for decs2.pi.ProcessInitiatorImpl resides in the jar file with my MBean.

Does anyone know how to solve this class loading issue?

Regards
Doug

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969278#3969278

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969278



More information about the jboss-user mailing list