cancel
Showing results for 
Search instead for 
Did you mean: 

Problem deploying Message Driven Bean

Former Member
0 Kudos

I'm trying to deploy j2e app. with MDB and getting the following error message:

Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application vip30.nrx.com/j2e_app cannot be started. Reason: it has hard reference to resource TopicConnectionFactory with type javax.jms.TopicConnectionFactory, which is not active on the server.

That's how ejb-j2ee-engine.xml looks like:

<enterprise-bean>

<ejb-name>ConfigUpdateListenerBean</ejb-name>

<jndi-name>java:comp/env/ejb/ConfigUpdateListener</jndi-name>

<message-props>

<destination-name>com.nrx.ConfigUpdateTopic

</destination-name>

<connection-factory-name>

TopicConnectionFactory

</connection-factory-name>

</message-props>

</enterprise-bean>

Here is ejb-jar.xml

<message-driven>

<ejb-name>

ConfigUpdateListenerBean

</ejb-name>

<ejb-class>

com.nrx.xvip.ejb.configsync.ConfigUpdateListenerBean

</ejb-class>

<transaction-type>Container</transaction-type>

<message-driven-destination>

<destination-type>javax.jms.Topic</destination-type>

</message-driven-destination>

</message-driven>

Any ideas what I'm doing wrong? I have Topic created for default JMS provider.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Andrei,

The problem is not as Rahul suggested. You have to register the JMS resources (factories and destinations) in the JMS connector service. Check these two documents:

http://help.sap.com/saphelp_nw04/helpdata/en/d1/259a53c73ab043a413e096e0523d54/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/fd/2a56a0bafff44e9efd21216ef6b9f7/frameset.htm

It also won't be harmful to go through the rest of the topics in that context as they may be of interest to you too.

And one more tip: You can delete the <jndi-name> in the ejb-j2ee-engine.xml as it is useless for MDBs.

HTH,

Vladimir

Former Member
0 Kudos

Hi,

I solved my problem by placing jms-destination.xml and jms-factories.xml in the META-INF folder of my j2ee application project.

Thanks a lot for the help.

Andrei

Former Member
0 Kudos

Hi Vladimir,

Just a quick question - If i am using the Default connection factory provided by SAP WAS i.e. QueueConnectionFactory, do I still need to create my own Factory and deploy it inside jms-factories.xml file??

former_member187702
Active Participant
0 Kudos

Vladimir , I am getting the following errors

I have already configured the connection factories and topic/queue factories.

Can u plz provide some help.

Result

=> deployed with warning : file:/C:/DOCUME1/SHILPA1/LOCALS~1/Temp/temp25374MessageEAR.ear

Finished with warnings: development component 'MessageEAR'/'sap.com'/'localhost'/'2007.01.17.09.43.36':

Caught exception during application startup from SAP J2EE Engine's deploy service:

java.rmi.RemoteException: Error occurred while starting application sap.com/MessageEAR and wait. Reason: Clusterwide exception: server ID 4380950:com.sap.engine.services.jmsconnector.exceptions.BaseDeploymentException: Naming error.

at com.sap.engine.services.jmsconnector.deploy.ContainerImpl.loadFactory(ContainerImpl.java:1902)

at com.sap.engine.services.jmsconnector.deploy.ContainerImpl.prepareStart(ContainerImpl.java:715)

at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:231)

at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:179)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)

at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:327)

at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:111)

at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:230)

at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4680)

at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4585)

at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4558)

at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1163)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

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:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: [Root exception is java.lang.ClassNotFoundException: ]

at com.sap.engine.system.naming.provider.ResolverManager.findInitialContextFactory(ResolverManager.java:489)

at com.sap.engine.system.naming.provider.DefaultInitialContext._getDefaultInitCtxt(DefaultInitialContext.java:60)

at com.sap.engine.system.naming.provider.DefaultInitialContext.<init>(DefaultInitialContext.java:46)

at com.sap.engine.system.naming.provider.DefaultInitialContextFactory.getInitialContext(DefaultInitialContextFactory.java:41)

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)

at javax.naming.InitialContext.init(InitialContext.java:219)

at javax.naming.InitialContext.<init>(InitialContext.java:195)

at com.sap.engine.services.jmsconnector.deploy.ContainerImpl.loadFactory(ContainerImpl.java:1899)

... 20 more

Caused by: java.lang.ClassNotFoundException:

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:219)

at com.sap.engine.system.naming.provider.ResolverManager.findInitialContextFactory(ResolverManager.java:472)

... 28 more

(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)

Deployment exception : Got problems during deployment

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Andrei,

You can do the following:

Check if you have the (ejb20.jar and jms.jar) deployed correctly, as it contains javax.jms.TopicConnectionFactory interface.

If not then deploy this along with your ear.

Regards,

Rahul

Message was edited by: Rahul Tongia