on 03-09-2006 2:18 PM
I have a problem deploying an application using JMS on WAS.
The first time I deploy the application, specifying a ConnectionFactory name in the ejb-j2ee-engine.xml file, everything goes fine. When, however, I try deploying it a second time, Netweaver DS tells me that there is no Factory with that name active. When I create a new factory in VisualAdmin and use that new factory in ejb-j2ee-engine.xml, it works again.
What might be the problem here / What configuration needs to be changed?
I would greatly appreciate any help.
Thanks alot,
Katrin.
Caught exception during application deployment from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Error occurred while starting application sap.com/RHL and wait. Reason: Clusterwide exception: server ID 8225250:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application sap.com/RHL cannot be started. Reason: it has hard reference to resource RhlFactory with type javax.jms.QueueConnectionFactory, which is not active on the server.
at com.sap.engine.services.deploy.server.ReferenceResolver.processUsageOfComponent(ReferenceResolver.java:519)
at com.sap.engine.services.deploy.server.ReferenceResolver.beforeStartingApplication(ReferenceResolver.java:348)
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)
Hi Katrin,
can you post the xml file (ejb-j2ee-engine.xml) and explain how exactly you create the factory in the VisualAdmin ?
Btw, the recommended way of creating factory is by adding jms-factories.xml in your project and deploying with it.
Pls see :
http://help.sap.com/saphelp_webas630/helpdata/en/e8/48ef3d5e10af5ee10000000a114084/frameset.htm
Best Regards
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 help.
In VisualAdmin, I go to Server > Services > JMS Provider, and there, under the server instance, create Connection factories and queues in the respective tabs. As Startup-Mode I have specified ALWAYS.
I will try the deployment with jms-factories.xml, which you recommended.
The ejb-j2ee-engine.xml looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
<ejb-j2ee-engine>
<enterprise-beans>
...
<enterprise-bean>
<ejb-name>RequestListenerBean</ejb-name>
<jndi-name>ejb/requestListener</jndi-name>
<message-props>
<destination-name>requestQueue</destination-name>
<connection-factory-name>QueueConnectionFactory</connection-factory-name>
</message-props>
</enterprise-bean>
<enterprise-bean>
<ejb-name>ResultListenerBean</ejb-name>
<jndi-name>ejb/resultListener</jndi-name>
<message-props>
<destination-name>resultQueue</destination-name>
<connection-factory-name>QueueConnectionFactory</connection-factory-name>
</message-props>
</enterprise-bean>
<enterprise-bean>
<ejb-name>NotificationListenerBean</ejb-name>
<message-props>
<destination-name>notificationQueue</destination-name>
<connection-factory-name>QueueConnectionFactory</connection-factory-name>
</message-props>
</enterprise-bean>
</enterprise-beans>
</ejb-j2ee-engine>
Best Regards,
Katrin.
Just to avoid confusion, I have changed the <connection-factory-name>QueueConnectionFactory</connection-factory-name> in the xml file to
<connection-factory-name>jmsfactory/default/QueueConnectionFactory</connection-factory-name>, but still I get this exception.
When I deploy it manually in Visual Administrator, it is deployed alright, but the exception comes when I try to start the application.
Error occurred on server during startApp sap.com/RHL : com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application sap.com/RHL cannot be started. Reason: it has hard reference to resource jmsfactory/default/QueueConnectionFactory with type javax.jms.QueueConnectionFactory, which is not active on the server.
_____
I have tried to use the jms-factories for deployment now, like this:
<jms-factories>
<connection-factory>
<alias>QueueConnectionFactory</alias>
<connection-factory-type>QueueConnectionFactory</connection-factory-type >
<factory-name>
QueueConnectionFactory
</factory-name>
<context-factory-type>
<link-factory-name>
jmsfactory/default/QueueConnectionFactory
</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>
When I deploy the application, all seems to go fine, this is, there is no error message in Visual Admin
(in the deploy bar in the lower part of the screen, the Deploy sign is green and the deployment information includes:
XAQueueConnectionFactory - JMSCONNECTOR
...
RequestListenerBean - EJB
ResultListenerBean - EJB
NotificationListenerBean - EJB
)
However, in the deploy view the EJB-Comtainer and the JMS-Connector are marked with a red cross, and the Factory Type of the factory is specified as UNKNOWN.
Is there something wrong with the jms-factories.xml, or am I missing something?
Thanks alot for any help,
Katrin.
Message was edited by: Katrin Eisenreich
Hi Katrin,
I think we are getting too much QueueConnectionFactories
let's try to rename some to avoid confusion. You can use the following xml :
<jms-factories>
<application-name>KatrinApplication</application-name>
<connection-factory>
<factory-name>KatrinFactory</factory-name>
<context-factory-type>
<link-factory-name>jmsfactory/default/QueueConnectionFactory</link-factory-name>
<initial-context-factory>com.sap.engine.services.jndi.InitialContextFactoryImpl</initial-context-factory>
<provider-url>localhost</provider-url>
<security-principal></security-principal>
<security-credentials></security-credentials>
</context-factory-type>
</connection-factory>
</jms-factories>
And then in your ejb-j2ee-engine.xml you use
<connection-factory-name>KatrinFactory</connection-factory-name>
btw, the server comes with a predefined MDB sample, perhaps you can look at it and see the descriptors and xml. It should be available at
http://<myhost>:<myport>/examples/mdb/mdb.html
HTH
Peter
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.