• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

error delploying ear file on JBOSS 3.0.8

 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting following error( which I think is the main one out of lots of other errors) while deploying ear file on Jboss :
Caused by: java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm

I am using Eclipse,JBoss,Struts for this application. and I don't get this error when I run my program from eclipse. I mean when I start JBoss from Eclipse and deploy my project from Eclipse. I get this error only when I made ear file and copy ear file in JBoss deploy directory to deploy this file. I have all this struts.jar file which has these classes , copied in war file lib directory.

Can anyone please help me with it.

thanks in advance
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you deploying anything outside the war, like an ejb, that relies on form beans?
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, nothing outside, but I am using Struts where a class inherits struts ActionForm class. and this class is in a struts.jar file which I have put in war file.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok yes I have a session Bean which interacts with entity beans and pass on the results to the jsp forms which is using Struts. and these entity & session beans are in jar file. In my ear file I have the jar and war files. To make this ear file, I created a ear module in Eclipse and made changes in Application.xml file like following :
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">

<application>
<display-name>MyEWS</display-name>
<description>A lomboz generated ear file</description>
<module>
<web>
<web-uri>OnLineDistance.war</web-uri>
<context-root>/OnLineDistance</context-root>
</web>
</module>

<module>
<ejb>MyEWSModule.jar</ejb>
</module>

</application>

this file is in ear module's META-INF directory along with other build files.
I copied the jar and war file into ear Module's directory and then using Ant with build file created ear file. I don't know If I should mention somewhere about the classpaths for external libraries like Struts which I am using in war file.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Further to my above points, While deploying ear file the jar file is successfuly deployed, I get the above mentioned error of "No class def found" only when deploying war file from ear file.
 
Jeff Shelley
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran into something like this in the past. It's a real pain getting things working right the first time with the way the classloaders work.

If you have an ejb method that has a method like
public hi( somethingThatExtendsActionForm )..., this might explain your error. if struts.jar is in your war, then the ejb jar won't see it. There are two ways I can think of that helped me, assuming you've got the same problem...

1.) Make the parm implement an interface that is in a jar at the ear level, and only use the struts implementation in the war.

2.) Use an ear scoped loader, and put struts at the ear level. to configure this, you'll need jboss-app.xml.

Hope this helps!

--Jeff
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeff,

Thanks a lot!! I solved my problem. I used jboss-app.xml to specify classloader at ear level. You were right, the classes in jar file were not able to find classes in war file. However, I don't have to put struts library files in my ejb jar file. It remains in war file.

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ,
can u pls tell me how to config the classloader in jboss-app? or can u
share ur jboss-app with me?
thanks a lot.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes sure!!

Here is my application.xml file:

<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">

<application>
<display-name>MyEWS</display-name>
<description>A lomboz generated ear file</description>
<module>
<web>
<web-uri>OnLineDistance.war</web-uri>
<context-root>/OnLineDistance</context-root>
</web>
</module>

<module>
<ejb>MyEWSModule.jar</ejb>
</module>

</application>



and MANIFEST.MF file in META-INF directory of ear :

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2_04-b05 (Sun Microsystems Inc.)
Class-Path: MyEWSModule.jar


and the main thing which actually solved my problem, i.e. the jboss-app.xml file :

<jboss-app>
<loader-repository>EWSEAR:loader=MyEWS.ear</loader-repository>
</jboss-app>
 
Patrick Cheung
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Damanjit,
i have add a jboss-app.xml to my ear package. but i got some error messages as below when the ear was deployed during the server starting.

2004-11-19 14:14:19,508 ERROR [org.jboss.ejb.EntityContainer] Starting failed jboss.j2ee:jndiName=ejb/uidgen/Counter,service=EJB
org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.ClassCastException)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:316)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:247)
at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:219)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:203)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:64)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:721)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:409)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:155)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:337)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy18.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy128.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:367)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy18.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy15.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:570)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:821)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:588)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
at org.jboss.Main.boot(Main.java:145)
at org.jboss.Main$1.run(Main.java:399)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassCastException
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:93)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:283)
... 127 more
2004-11-19 14:14:19,515 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=ejb/uidgen/Counter,service=EJB
MBeanException: org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.ClassCastException)
Cause: org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.ClassCastException)
at org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:91)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:64)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy18.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy128.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:367)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy18.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy15.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:570)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:821)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:588)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
at org.jboss.Main.boot(Main.java:145)
at org.jboss.Main$1.run(Main.java:399)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.ClassCastException)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:316)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:247)
at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:219)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:203)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:64)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:721)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:409)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:155)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:337)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
... 112 more
Caused by: java.lang.ClassCastException
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:93)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:283)
... 127 more


2004-11-19 14:14:19,676 ERROR [org.jboss.web.WebModule] Starting failed jboss.web.deployment:war=calendarWeb.war,id=452878994
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (ReflectionException: Cannot find setter method setDocBase null
Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String))
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:329)
at org.jboss.web.WebModule.startModule(WebModule.java:62)
at org.jboss.web.WebModule.startService(WebModule.java:40)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy18.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy35.start(Unknown Source)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:363)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:821)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:588)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
at org.jboss.Main.boot(Main.java:145)
at org.jboss.Main$1.run(Main.java:399)
at java.lang.Thread.run(Thread.java:534)
Caused by: ReflectionException: Cannot find setter method setDocBase null
Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String)
at org.apache.commons.modeler.BaseModelMBean.setAttribute(BaseModelMBean.java:662)
at org.jboss.mx.server.RawDynamicInvoker.setAttribute(RawDynamicInvoker.java:55)
at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java:455)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:186)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:76)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:320)
... 94 more
Caused by: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String)
at java.lang.Class.getMethod(Class.java:986)
at org.apache.commons.modeler.BaseModelMBean.setAttribute(BaseModelMBean.java:646)
... 99 more


But if i remove the jboss-app.xml from the ear, the server starts sucessfully. However, i really need all the sub components, including all jars and wars, in the same class loader. so can u give me some suggestion? thanks in advance.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

If you can write down the whole directory structure of ear file. I mean when you created ear file where you placed jar and war file and the contents of manifest file of ear directory.

Then may be I can help. It seems to be classpath/classloader problem.
 
Patrick Cheung
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Damanjit,
my ear's file name is 4goaApp.ear, which includes 11 jars(built by ourselves), 3 ejb jars, 17 wars and 52 third-party jars(in a sub dir named package, includes some jakarta common jars, struts jars and xml parser jars). the directory structure is as below.

4goaApp.ear--
+ 11 jars
+ 3 ejb jars
+ 17 wars
+ package(dir)
--+ 52 third-party jars
+ META-INF(dir)
--+ application.xml
--+ jboss-app.xml
--+ MANIFEST.MF

and the jboss-app.xml is as below:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-app>
<loader-repository>4GOAAPPEAR:loader=4goaApp.ear</loader-repository>
</jboss-app>

and only 3 ejb jars and 17 wars are in my application.xml file.

the MANIFEST.MF is as below:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2-b28 (Sun Microsystems Inc.)

do u think i should put all the jars into the application.xml file? and can u give some some advice? thanks a lot.
[ November 23, 2004: Message edited by: Patrick Cheung ]
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

No you don't have to put all jar file in application.xml just the ejb modules and web modules.

but in your manifest file of ear, you have to mention classpath(like I have mentioned in ear file in my post earlier, for all 3 ejb jar,11 jar files and other 52 package directory jar files too.

I am not sure if you should include the 11 jar files too in this class path. but you can try by including and then excluding it.

Here are some links which may be helpful to you for creating ear file and classloader problems:

http://www.ideas2work.com/ear-file-deploy-jboss.html
http://ramya.bhaavana.net/chaitanya/archives/000021.html

Hope this works...
 
Patrick Cheung
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Damanjit,
After i added classpath to the MENIFEST.MF file in dir of META-INF in my ear, it's getting worse. a message is shown when deploying the ear as below:

org.jboss.deployment.DeploymentException: No META-INF/application.xml found

Woo... maybe the classpath cann't be changed in this file. because if i remove the classpath information, it was deployed successfully.



what do u think the problem is? thanks in advance.
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

org.jboss.deployment.DeploymentException: No META-INF/application.xml found



Does your ear file contain application.xml?
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

you can specify classpath in manifest file. There must be some error while specifying that classpath in your manifest file and so you might be getting the present error for application.xml file. To make available, all common jar files which are referenced by your application(ejb or web module), these have to be specified at ear level(I mean in classpath of manifest files of ear).

Here is another link for writing manifest file.
http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html

In case you solve this problem by finding some other cause, Please share that.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Patrick

Here is another very good link for specifying classpath in ear(manifest file) in different cases. As I am not very clear about how the interaction is being done in your application across different jar,war files. So I think This link should provide you a good help.

http://java.sun.com/j2ee/j2ee-1_4-fr-spec.pdf

Good Luck

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Damanjit Kaur ,

i have developed Web application which is having simple jsp'susing WSAD and

deployed on JBOSS.
THE .war and .ear files are deployed sucessfully.
But while running that jsp it's not deploying the actual contenet .
Instead of that displays small boxes like opening a bin file.


how to solve this issue.

i'm having both jboss-app.xml and jboss-web.xml


Thanks
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to deploy a ear file which contains war and jar files
in jboss server
what are the jboss specific files to be added.
what are the steps to be followed.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Hello Rakesh,I didn't understood your problem .

deployed on JBOSS.
THE .war and .ear files are deployed sucessfully.
But while running that jsp it's not deploying the actual contenet .
Instead of that displays small boxes like opening a bin file.



Have you deployed ear file and war file separately or ear file has war file in it. and when you run jsp , not deploying the actual content but opening a bin file. Do you mean its not showing the acutal content as described by html or script in jsp. Do you get some error, if yes then can you post that error here in detail.

Hello Siva , There is a link on this very post for your question.


 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Damanjit,

Can u please tell me the specification of the names that u have mentioned in the jboss-app.xml.
For eg what is the EWSEAR ???
Is it a dummy name or what ?
 
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic