-
1. Re: ClassNotFoundException while deploying ear
wdfink Aug 8, 2014 6:26 AM (in response to bpbhat77)Could you provide a bit more details?
Where is the class located and how your descriptor and EAR look like?
-
2. Re: ClassNotFoundException while deploying ear
bpbhat77 Aug 9, 2014 3:08 AM (in response to wdfink)wfink Thanks for reply
my ear structure is
myapps.ear
-----myapp.jar(contains ejb)-->META-INF->ejb-jar.xml
-----myapp1.jar(contains ejb)
-----myapp2.jar(contains ejb)
-----myapp.war
-----META-INF/application.xml
-----META-INF/MANIFEST.MF
All modules dependent on each other
i have third party jar also inside ear.
my application.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<application id="Application_ID" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="6"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
<application-name>myapp</application-name>
<initialize-in-order>true</initialize-in-order>
<module>
<ejb>ficutils.jar</ejb>
</module>
.......
</application>
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_ID" version="2.1"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<enterprise-beans>
<message-driven>
<ejb-name>FICCustomMessageMDB</ejb-name>
<ejb-class>com.firstapex.fic.utils.logger.ejb.FICCustomMessageMDB</ejb-class>
<transaction-type>Container</transaction-type>
<!-- To work with JBoss7+ -->
<!-- <acknowledge-mode>Auto-acknowledge</acknowledge-mode> -->
<activation-config>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>
</activation-config>
<!-- To work with JBoss7+ -->
<!-- To work with JBoss7+ -->
<!--<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>-->
<message-destination-type>javax.jms.Queue</message-destination-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
</activation-config>
<!-- To work with JBoss7+ -->
<env-entry>
<env-entry-name>BeanFactoryPath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>classpath:com/firstapex/fic/resource/applicationContext-utils.xml</env-entry-value>
</env-entry>
</message-driven>
<session id="FICBatchMonitor">
<ejb-name>FICBatchMonitor</ejb-name>
<home>com.firstapex.fic.utils.batchframework.ejb.BatchMonitorRemoteHome</home>
<remote>com.firstapex.fic.utils.batchframework.ejb.BatchMonitorRemote</remote>
<ejb-class>com.firstapex.fic.utils.batchframework.ejb.BatchMonitorBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>FICCustomMessageMDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>FICBatchMonitor</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</ejb-jar>
the 'class not found' class is located in myapp.jar.
Class Path entry castor-0.9.5.2-xml.jar in /D:/wildfly-8.1.0.Final/standalone/deployments/FirstGen20140802_121633.ear/ficauthorization.jar does not point to a valid jar for a Class-Path reference.
this warning is coming
some times its deploying myapp1 first sometimes myapp2 first.
I was also getting class path entry does not point to a valid jar for a Class-Path reference so i removed entries from menifest.mf of each app.jar
I have updated dtd of ejb-jar.xml from 2.0 to 2.1 to remove errors unexpected element 'acknowledge-mode' encountered
-
3. Re: ClassNotFoundException while deploying ear
bpbhat77 Aug 9, 2014 7:52 AM (in response to bpbhat77)I have solved issue by changing all menifest.mf
Now i am able to deploy my ear . without WAR file
when i try to add war and deploy i am getting
2014-08-09 15:49:11,977 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "FirstGen20140802_121633.ear")]) - failure description: {
"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"FirstGen20140802_121633.ear\".\"FirstGen.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"FirstGen20140802_121633.ear\".\"FirstGen.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment \"FirstGen.war\" of deployment \"FirstGen20140802_121633.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: com.firstapex.fic.claims.servicecontroller.DFClaimPreviewServlet from [Module \"deployment.FirstGen20140802_121633.ear.FirstGen.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: com.firstapex.fic.claims.servicecontroller.DFClaimPreviewServlet from [Module \"deployment.FirstGen20140802_121633.ear.FirstGen.war:main\" from Service Module Loader]"},
"JBAS014771: Services with missing/unavailable dependencies" => []
com.firstapex.fic.claims.servicecontroller.DFClaimPreviewServlet this class is inside jar
the war file is getting deployed before jars in ear. any idea?
-
4. Re: ClassNotFoundException while deploying ear
bpbhat77 Aug 12, 2014 7:01 AM (in response to bpbhat77)I am getting
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/jee]
Offending resource: class path resource [com/firstapex/fic/resource/applicationContext-FICC-web.xml]
this xml contains
bean and
remote bean
<jee:remote-slsb id="setupBeanService"
jndi-name="setupBeanService"
business-interface="com.firstapex.fic.claims.claimsservice.ISetupBeanService"
home-interface="com.firstapex.fic.claims.ejb.SetupBeanHome"
cache-home="true" lookup-home-on-startup="false">
<jee:environment>
java.naming.factory.initial=${EJB_INITFACTORY.FICC}
java.naming.factory.url.pkgs=${EJB_URL_PKG.FICC}
java.naming.factory.state=${EJB_FACTORY_STATE.FICC}
java.naming.provider.url=${EJB_URL.FICC}
org.omg.CORBA.ORBInitialHost=${EJB_HOST.FICC}
org.omg.CORBA.ORBInitialPort=${EJB_GLASSFISH_PORT.FICC}
</jee:environment>
</jee:remote-slsb>