-
1. Re: EJB jar dependency in jboss 7
sfcoy Jul 18, 2012 3:09 AM (in response to vairam_sm)Hi there,
Have you read Class Loading in AS7 yet?
How is your application structured?
Are you using an EAR file deployment? More than one?
-
2. Re: EJB jar dependency in jboss 7
vairam_sm Jul 18, 2012 5:19 AM (in response to sfcoy)Ya, we are using more than one EAR file for our application. Each module has it EAR file.
-
3. Re: EJB jar dependency in jboss 7
sfcoy Jul 18, 2012 7:39 AM (in response to vairam_sm)So, put your shared jar(s) in a module and reference it as described in the article I linked above.
-
4. Re: EJB jar dependency in jboss 7
vairam_sm Aug 2, 2012 2:41 AM (in response to sfcoy)Hi,
I have solved the refrence problem. But i i'm not able to run the module due datasource problem.
ejb-jar.xml
<resource-ref>
<res-ref-name>jdbc/ClientDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jboss.xml
<jboss>
<enterprise-beans>
<session>
<ejb-name>NotificationAliasMapping</ejb-name>
<jndi-name>NotificationAliasMapping</jndi-name>
<resource-ref>
<res-ref-name>jdbc/ClientDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:jboss/datasources/MSSQLDS</jndi-name>
</resource-ref>
</session>
</enterprise-beans>
</jboss>
standalone.xml
<datasource jndi-name="java:jboss/datasources/MSSQLDS" pool-name="MSSQLDS" enabled="true" use-java-context="true">
<connection-url>jdbc:sqlserver://XX.XX.XX.XX:1433;DatabaseName=LRPTEST;DB_CLOSE_DELAY=-1</connection-url>
<driver>sqljdbc</driver>
<security>
<user-name>developer</user-name>
<password>tiger!@#</password>
</security>
</datasource>
I'm getting the following exception. Kindly help me to solve this.
12:04:27,396 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named NotificationAliasMapping in deployment unit subdeployment "NotificationAlias-ejb.jar" of deployment "NotificationAliasEar.ear" are as follows:
java:global/NotificationAliasEar/NotificationAlias-ejb/NotificationAliasMapping!lrp.settings.control.bean.NotificationAliasMappingLocalHome
java:app/NotificationAlias-ejb/NotificationAliasMapping!lrp.settings.control.bean.NotificationAliasMappingLocalHome
java:module/NotificationAliasMapping!lrp.settings.control.bean.NotificationAliasMappingLocalHome
java:global/NotificationAliasEar/NotificationAlias-ejb/NotificationAliasMapping!lrp.settings.control.bean.NotificationAliasMappingLocal
java:app/NotificationAlias-ejb/NotificationAliasMapping!lrp.settings.control.bean.NotificationAliasMappingLocal
java:module/NotificationAliasMapping!lrp.settings.control.bean.NotificationAliasMappingLocal
12:04:27,642 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990
12:04:27,643 ERROR [org.jboss.as] (MSC service thread 1-2) JBAS015875: JBoss AS7.1.1.Final "Brontes" started (with errors) in 25688ms - Started 202 of 291 serv
ices (6 services failed or missing dependencies, 80 services are passive or on-demand)12:04:27,843 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015
870: Deploy of deployment "NotificationAliasEar.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jbo
ss.naming.context.java.comp.NotificationAliasEar.NotificationAlias-ejb.NotificationAliasMapping.env.jdbc.ClientDBjboss.naming.context.java.jboss.resources.jdbc.
ClientDBMissing[jboss.naming.context.java.comp.NotificationAliasEar.NotificationAlias-ejb.NotificationAliasMapping.env.jdbc.ClientDBjboss.naming.context.java.jboss.resources.jdbc.ClientDB]"]}
12:04:27,873 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment NotificationAlias-ejb.jar in 28ms
12:04:27,882 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment NotificationAlias-war.war in 37ms
12:04:27,888 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment NotificationAliasEar.ear in 43ms
12:04:27,891 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies: service jboss.naming.context.java.jboss.resources.jdbc.ClientDB (missing)
dependents: [service jboss.naming.context.java.comp.NotificationAliasEar.NotificationAlias-ejb.NotificationAliasMapping.env.jdbc.ClientDB]
12:04:27,900 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps
that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.NotificationAliasEar.NotificationAlias-ejb.NotificationAliasMapping.env.jdbc.ClientDBjboss.naming.context.java.jboss.resources.jdbc.ClientDBMissing[jboss.naming.context.java.comp.NotificationAliasEar.NotificationAlias-ejb.NotificationAliasMapping.env.jdbc.ClientDBjboss.naming.context.java.jboss.resources.jdbc.ClientDB]"]}}}
-
server.log.zip 8.2 KB
-
-
5. Re: EJB jar dependency in jboss 7
sfcoy Aug 2, 2012 7:11 AM (in response to vairam_sm)I think you may have to migrate your jboss.xml file to jboss-ejb3.xml as described on https://docs.jboss.org/author/display/AS71/jboss-ejb3.xml+Reference.