on 02-27-2006 3:52 PM
Hi All,
I have a MDB which is accessing a Queue.While Deployming I am getting a error saying that the QueueConnectionFactory is hard referenced .
-
java.rmi.RemoteException: Error occurred while starting application sap.com/test_ear and wait.
Reason: Clusterwide exception: server ID 9008450:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application sap.com/test_ear cannot be started. Reason: it has hard reference to resource QueueConnectionFactory with type javax.jms.QueueConnectionFactory, which is not active on the server.
at com.sap.engine.services.deploy.server.ReferenceResolver.processUsageOfComponent(ReferenceResolver.java:512)
at com.sap.engine.services.deploy.server.ReferenceResolver.beforeStartingApplication(ReferenceResolver.java:341)
at com.sap.engine.services.deploy.server.application.StartTransaction.beginCommon(StartTransaction.java:161)
at com.sap.engine.services.deploy.server.application.StartTransaction.begin(StartTransaction.java:130)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:110)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:212)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4605)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4512)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4485)
at com.sap.engine.services.deploy.server.DeployServiceImpl.deployApplicationDuringUpdate(DeployServiceImpl.java:626)
at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:577)
at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4520)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4485)
at com.sap.engine.services.deploy.server.DeployServiceImpl.deployApplicationDuringUpdate(DeployServiceImpl.java:626)
at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:577)
at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
For detailed information see the log file of the Deploy Service.
06/02/27 21:10:06 - ***********************************************************
Feb 27, 2006 9:10:06 PM Info: End of log messages of the target system.
Feb 27, 2006 9:10:06 PM Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
Feb 27, 2006 9:10:06 PM Error: Aborted: development component 'test_ear'/'sap.com'/'localhost'/'2006.02.27.17.01.44':
Caught exception during application deployment from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Error occurred while starting application sap.com/test_ear and wait.
Reason: Clusterwide exception: server ID 9008450:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application sap.com/test_ear cannot be started. Reason: it has hard reference to resource QueueConnectionFactory with type javax.jms.QueueConnectionFactory, which is not active on the server.
at com.sap.engine.services.deploy.server.ReferenceResolver.processUsageOfComponent(ReferenceResolver.java:512)
at com.sap.engine.services.deploy.server.ReferenceResolver.beforeStartingApplication(ReferenceResolver.java:341)
at com.sap.engine.services.deploy.server.application.StartTransaction.beginCommon(StartTransaction.java:161)
at com.sap.engine.services.deploy.server.application.StartTransaction.begin(StartTransaction.java:130)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:110)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:212)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4605)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4512)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4485)
at com.sap.engine.services.deploy.server.DeployServiceImpl.deployApplicationDuringUpdate(DeployServiceImpl.java:626)
at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:577)
at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
-
The MDb enrty in the ejb-j2ee-engine.xml is :
<enterprise-bean>
<ejb-name>SchBulkInsertMDB</ejb-name>
<message-props>
<destination-name>jmsqueues/default/SchBulkInsertQueue</destination-name>
<connection-factory-name>QueueConnectionFactory</connection-factory-name>
</message-props>
</enterprise-bean>
regards
rajesh
Hi Rajesh,
The exception thrown by the deployment indicated that the server cannot find the referenced JMS resource.
Please, double check that you have correct description of the JMS factory for the MDB. That description should be in the file jms-factories.xml as part of the EAR.
It should have something like the following lines :
<connection-factory>
<factory-name>QueueConnectionFactory</factory-name>
<context-factory-type>
<link-factory-name><b>jmsfactory/default/QueueConnectionFactory</b>
</link-factory-name>
...
where the bold one is the path to the real factory that should be already present in the naming. The value of the tag <factory-name> is the one that is provided in your ejb-j2ee-engine.xml extract in your post.
The value that I added (jmsfactory/default/QueueConnectionFactory/) is one of the predefined and already existing factory. You may create your own (actually that is recommended) so that you do not rely on the server ones.
You may create new factory via Visual Administrator and the service JMS Provider, you may check whate is already present in the naming by having a look at the service JNDI naming.
For more information about the structure of jms-factories.xml please have a look at :
http://help.sap.com/saphelp_webas630/helpdata/en/e8/48ef3d5e10af5ee10000000a114084/frameset.htm
Hope That Helps
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi peter
Thanks for your reply .Actually i have created a connection factory through the visual admin which is not a part of EAR, since i am not aware of creation of jms-factories.xml through NWDS.
I tried deploying one MDB with a Topic which is working fine , but for a queue its not.below is the MDb entry with a Topic connection factory which is getting deployed
<enterprise-bean>
<ejb-name>TradeHistoryMDB</ejb-name>
<message-props>
<destination-name>jmstopics/default/TRD_HEADER_HIST</destination-name>
<connection-factory-name>TopicConnectionFactory</connection-factory-name>
</message-props>
</enterprise-bean>
regards
rajesh
Hi Rajesh,
That file - jms-factories.xml is about creating a connection factory in the JMS connector.
This connector factory will link the name declared in your descriptor :
<connection-factory-name>TopicConnectionFactory</connection-factory-name>
with the JMS provider factory that is present in the server.
The file should be present in the META_INF directory of the ear, not of the jar file with the MDB.
In case you want to avoid such file, you can create a JMS factory in the JMS connector and verify that it is working and can be found in the naming.
However, It will be simpler if you create it via the xml file :
<jms-factories>
<connection-factory>
<factory-name>
QueueConnectionFactory
</factory-name>
<context-factory-type>
<link-factory-name>
jmsfactory/default/XAQueueConnectionFactory
</link-factory-name>
<initial-context-factory> com.sap.engine.services.jndi.InitialContextFactoryImpl
</initial-context-factory>
<provider-url>
</provider-url>
<security-principal>
</security-principal>
<security-credentials>
</security-credentials>
</context-factory-type>
</connection-factory>
</jms-factories>
Best regards
Peter
Hi Peter,
Thanks very much it is working. But the problem here is that when i deploy my appication all the MDB's ( as i have associated the topics/queue and the corresponding factories in the ejb-j2ee-engine.xml for each bean ) creates the queues and topics in the JMS default provider which has JNDI name as jmsqueues/default/Queuename
Since i have some queues and topics which are used outside the MDB's also ,due to which when i try importing JMS.destinations.xml through the Visual Admin it also creates the Queues and topics under the JMS Connector and JMS provider of the visual admin. Because of this now there are 2 JNDI names coming up one under the jmsqueues/default/TopicName and other in jmsQueues/default/Queuename .
Is there any way in which i could avoid this ,as I wanted all the Queues and Topics to be created in the JMS Connector and not in JMS provider of the visual admin.
regards
rajesh kr
Hi peter
Just to add to when i add the jms-factories.xml in the meta-inf manually and deploy .it does not create the JMS factories . I have to always import it through the Visual Admin . I am using SP 11 of SAP Web AS.
But if i dont import it and try deplying it fails saying that the TopicConnectionFactory is not defined
regards
rajesh
Hi peter
I am using SAP Web AS sp 11 .I am facing same problems with respect to creation of JMS topics and queue on deployment of the EAR using NWDS.
when i deploy my appication all the the Queues and topics are created under the JMS Connector and JMS provider of the visual admin. Because of this now there are 2 JNDI names coming up one under the jmsqueues/default/TopicName and other in jmsQueues/Queuename .
Is there any way in which i could avoid this ,as I wanted all the Queues and Topics to be created in the JMS Connector and not in JMS provider of the visual admin.
regards
rajesh
Message was edited by: Rajesh K. R.
Message was edited by: Rajesh K. R.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.