aspose file tools*
The moose likes JBoss/WildFly and the fly likes deployment error jboss AS 6 JMS Datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "deployment error jboss AS 6 JMS Datasource" Watch "deployment error jboss AS 6 JMS Datasource" New topic
Author

deployment error jboss AS 6 JMS Datasource

Carlos G Medina A
Greenhorn

Joined: Aug 21, 2012
Posts: 3
Hi, I'm trying to deploy on JBoss As 6.1 an application that currently works on Glassfih 3.1 with no problem. I didn't know where to start, after hours of reading and trying different ways of deployin with no success I decided to deploy it gradually, beginning with the EJB Jars. This is my initial app structure:

mhzap101.ear which includes:

mhzap101-persistence.jar
mhzap101-core.jar

both projects depend of Postgres datasource and JMS resources.

I started creating my postgres-ds.xml file which is the following:

<datasources>
<local-tx-datasource>
<jndi-name>jdbc/mhzap101</jndi-name>
<jndi-name>env/jdbc/mhzap101</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:postgresql://localhost:5432/MHZDB101</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<min-pool-size>5</min-pool-size>
<max-pool-size>1000</max-pool-size>
<user-name>postgres</user-name>
<password>postgres</password>
<!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL
<new-connection-sql>select 1</new-connection-sql>
-->

<!-- sql to call on an existing pooled connection when it is obtained from pool. Can be anything, select 1 is valid for PostgreSQL
<check-valid-connection-sql>select 1</check-valid-connection-sql>
-->

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>PostgreSQL 9.1</type-mapping>
</metadata>
</local-tx-datasource>

</datasources>

Then I configured the JMS resources by using hornetq-jms.xml:

<connection-factory name="UtilityProcessMessageFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="jms/UtilityProcessMessageFactory"/>
</entries>
</connection-factory>
<connection-factory name="BusinessProcessMessageFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="jms/BusinessProcessMessageFactory"/>
</entries>
</connection-factory>
<queue name="BusinessProcessRequestMessageQueue">
<entry name="/jms/BusinessProcessRequestMessageQueue"/>
</queue>
<queue name="BusinessProcessReplyMessageQueue">
<entry name="/jms/BusinessProcessReplyMessageQueue"/>
</queue>
<queue name="BusinessProcessReturnMessageQueue">
<entry name="/jms/BusinessProcessReturnMessageQueue"/>
</queue>
<queue name="UtilityProcessRequestMessageQueue">
<entry name="/jms/UtilityProcessRequestMessageQueue"/>
</queue>
<queue name="UtilityProcessReplyMessageQueue">
<entry name="/jms/UtilityProcessReplyMessageQueue"/>
</queue>
<queue name="UtilityProcessReturnMessageQueue">
<entry name="/jms/UtilityProcessReturnMessageQueue"/>
</queue>

I also created the jboss.xml file with my resource definitions:

<jboss>
<enterprise-beans>
<session>
<ejb-name>UtilityProcessMessengerBean</ejb-name>
<resource-ref>
<res-ref-name>jms/UtilityProcessMessageFactory</res-ref-name>
<jndi-name>jms/UtilityProcessMessageFactory</jndi-name>
</resource-ref>
<message-destination-ref>
<message-destination-ref-name>jms/UtilityProcessRequestMessageQueue</message-destination-ref-name>
<jndi-name>jms/UtilityProcessRequestMessageQueue</jndi-name>
</message-destination-ref>
<message-destination-ref>
<message-destination-ref-name>jms/UtilityProcessReplyMessageQueue</message-destination-ref-name>
<jndi-name>jms/UtilityProcessReplyMessageQueue</jndi-name>
</message-destination-ref>
<message-destination-ref>
<message-destination-ref-name>jms/UtilityProcessReturnMessageQueue</message-destination-ref-name>
<jndi-name>jms/UtilityProcessReturnMessageQueue</jndi-name>
</message-destination-ref>
</session>
<message-driven>
<ejb-name>UtilityProcessRequestMessageBean</ejb-name>
<!--<bean-pool>
<pool-idle-timeout-in-seconds>300</pool-idle-timeout-in-seconds>
<resize-quantity>2</resize-quantity>
<steady-pool-size>2</steady-pool-size>
<max-pool-size>2</max-pool-size>
</bean-pool>-->
</message-driven>
</enterprise-beans>
</jboss>

When I only try to deploy the ejb-persistence project it works fine, so I theink it finds the jdbc datasource without any problem, but when I try to include the ejb-core project it desn't work. It shows the following messages:


DEPLOYMENTS IN ERROR:
Deployment "jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/ReporterBrokerBean/env/jdbc/mhzap101,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/ReporterBrokerBean/env/jdbc/mhzap101,service=DataSourceBinding',whenRequired=MapControllerStateModel$ControllerStateWrapper@180f504{Installed},dependentState=MapControllerStateModel$ControllerStateWrapper@180f504{Installed} **
Deployment "jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/SqlAgentBrokerBean/env/jdbc/mhzap101,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/SqlAgentBrokerBean/env/jdbc/mhzap101,service=DataSourceBinding',whenRequired=MapControllerStateModel$ControllerStateWrapper@180f504{Installed},dependentState=MapControllerStateModel$ControllerStateWrapper@180f504{Installed} **
Deployment "jboss.j2ee:ear=mhzap101.ear,jar=mhzap101-ejb-core.jar,name=UtilityProcessRequestMessageBean,service=EJB3" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Required config property RequiredConfigPropertyMetaData@d32028[name=destination descriptions=[DescriptionMetaData@ea0a39[language=es]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(destinationType=javax.jms.Queue), ActivationConfigProperty(acknowledgeMode=Auto-acknowledge)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
Deployment "jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/UtilityProcessRequestMessageBean/env/jdbc/mhzap101,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/UtilityProcessRequestMessageBean/env/jdbc/mhzap101,service=DataSourceBinding',whenRequired=MapControllerStateModel$ControllerStateWrapper@180f504{Installed},dependentState=MapControllerStateModel$ControllerStateWrapper@180f504{Installed} **
Deployment "jboss.j2ee:ear=mhzap101.ear,jar=mhzap101-ejb-core.jar,name=UtilityProcessReturnMessageBean,service=EJB3" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Required config property RequiredConfigPropertyMetaData@d32028[name=destination descriptions=[DescriptionMetaData@ea0a39[language=es]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(destinationType=javax.jms.Queue), ActivationConfigProperty(acknowledgeMode=Auto-acknowledge)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
Deployment "jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/MessengerBean/env/jdbc/mhzap101,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/MessengerBean/env/jdbc/mhzap101,service=DataSourceBinding',whenRequired=MapControllerStateModel$ControllerStateWrapper@180f504{Installed},dependentState=MapControllerStateModel$ControllerStateWrapper@180f504{Installed} **
Deployment "jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/ExporterBrokerBean/env/jdbc/mhzap101,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=internal/mhzap101/mhzap101-ejb-core/ExporterBrokerBean/env/jdbc/mhzap101,service=DataSourceBinding',whenRequired=MapControllerStateModel$ControllerStateWrapper@180f504{Installed},dependentState=MapControllerStateModel$ControllerStateWrapper@180f504{Installed} **
Deployment "jboss.j2ee:ear=mhzap101.ear,jar=mhzap101-ejb-core.jar,name=UtilityProcessReplyMessageBean,service=EJB3" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Required config property RequiredConfigPropertyMetaData@d32028[name=destination descriptions=[DescriptionMetaData@ea0a39[language=es]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(destinationType=javax.jms.Queue), ActivationConfigProperty(acknowledgeMode=Auto-acknowledge), ActivationConfigProperty(messageSelector=JMSCorrelationID IS NULL)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'

at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_25]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_25]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_25]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_25]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_25]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]

2012-08-20 18:38:54,105 INFO [org.jboss.system.server.jmx.JMXKernel] (Thread-29) Server exit called, exiting the JVM now!
2012-08-20 18:38:54,121 INFO [STDOUT] (Thread-1) Posting Shutdown Request to the server...

2012-08-20 18:38:54,121 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-30) Stopping: JBossAS [6.0.0.Final "Neo"]
2012-08-20 18:38:54,183 INFO [org.apache.coyote.http11.Http11Protocol] (Thread-30) Pausando Coyote HTTP/1.1 en puerto http-127.0.0.1-8080
2012-08-20 18:38:54,183 INFO [org.apache.coyote.http11.Http11Protocol] (Thread-30) Parando Coyote HTTP/1.1 en puerto http-127.0.0.1-8080
2012-08-20 18:38:54,324 INFO [org.apache.coyote.ajp.AjpProtocol] (Thread-30) Pausando Coyote AJP/1.3 en ajp-127.0.0.1-8009
2012-08-20 18:38:54,324 INFO [org.apache.coyote.ajp.AjpProtocol] (Thread-30) Parando Coyote AJP/1.3 en ajp-127.0.0.1-8009


My source code references resources by using code injection, for example this one:

@Stateless
public class ReporterBrokerBean implements ReporterBrokerLocal {


@Resource(name ="jdbc/mhzap101")
private javax.sql.DataSource ds;


@EJB
private UtilityProcessMessengerLocal messenger;

What do I have to modify? I don't know what to do.

I don't want to modify any line on my source code since it works fine on glassfish, the idea is to have the application ready for deploying in both servers, or at least without source code modifications.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deployment error jboss AS 6 JMS Datasource