I'm trying to deploy a message bean from the Visual Administrator and got the following error:
#1.5#000347B22B6600730000003100000A940003ECE67BC0BE40#1104899593023#com.sap.engine.services.deploy##com.sap.engine.services.deploy#######SAPEngine_System_Thread[impl:5]_70##0#0#Error#1#/System/Server#Java#deploy_5082##Exception while preparing start of application sap.com/myEar.#1#preparing start of application sap.com/myEar#
#1.5#000347B22B6600730000003200000A940003ECE67BC0BF66#1104899593023#com.sap.engine.services.deploy##com.sap.engine.services.deploy#######SAPEngine_System_Thread[impl:5]_70##0#0#Error#1#/System/Audit#Java###Exception #1#com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception while preparing start of application sap.com/myEar.
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:359)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:313)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:303)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.run(ParallelAdapter.java:73)
at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:73)
at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:134)
Caused by: com.sap.security.core.server.userstore.UserstoreException: Could not get user null
at com.sap.security.core.server.userstore.UserContextUME.engineGetUserInfo(UserContextUME.java:187)
at com.sap.engine.services.security.userstore.context.UserContext.getUserInfo(UserContext.java:87)
at com.sap.engine.services.ejb.message.MessageContainer.initSecurityRunAs(MessageContainer.java:285)
at com.sap.engine.services.ejb.message.MessageContainer.init(MessageContainer.java:131)
at com.sap.engine.services.ejb.message.MessageContainerFP.init(MessageContainerFP.java:53)
at com.sap.engine.services.ejb.EJBAdmin.prepareLoad(EJBAdmin.java:972)
at com.sap.engine.services.ejb.EJBAdmin.prepareStart(EJBAdmin.java:2405)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:349)
... 6 more
Caused by: com.sap.security.api.NoSuchUserAccountException: Cannot find user when logonid is null!
at com.sap.security.core.imp.UserAccountFactory.getUserAccountByLogonId(UserAccountFactory.java:290)
at com.sap.security.core.imp.UserAccountFactory.getUserAccountByLogonId(UserAccountFactory.java:277)
at com.sap.security.core.imp.UserAccountFactory.getUserAccountByLogonId(UserAccountFactory.java:371)
at com.sap.security.core.imp.UserAccountFactory.getUserAccountByLogonId(UserAccountFactory.java:366)
at com.sap.security.core.server.userstore.UserContextUME.engineGetUserInfo(UserContextUME.java:183)
... 13 more
============
The ejb.xml is configured as
<message-driven>
<description>Executes the executeEvent method of an EventExecutor
</description>
<display-name>Event Executor MDB</display-name>
<ejb-name>EventExecutorMDBean</ejb-name>
<ejb-class>com.system.events.ejb.EventExecutorMDBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>eventname='ExecuteEvent'</message-selector>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durability>NonDurable</subscription-durability>
</message-driven-destination>
<security-identity>
<run-as>
<role-name>admin</role-name>
</run-as>
</security-identity>
<resource-ref>
<res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>jms/MyJMSTopic</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
</resource-env-ref>
</message-driven>
=========jms-factories.xml===========
<jms-factories>
<application-name>myEar</application-name>
<connection-factory>
<factory-name>
jms/myTopicConnectionFactory
</factory-name>
<context-factory-type>
<link-factory-name>
jmsfactory/default/XATopicConnectionFactory
</link-factory-name>
<initial-context-factory>
com.sap.engine.services.jndi.InitialContextFactoryImpl
</initial-context-factory>
</context-factory-type>
</connection-factory>
<connection-factory>
<factory-name>
jms/myQueueConnectionFactory
</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>
</context-factory-type>
</connection-factory>
</jms-factories>
========== jms-destinations.xml=====
<jms-destinations>
<destination>
<connection-factory>jms/myTopicConnectionFactory</connection-factory>
<destination-name>topic/myJMSTopic</destination-name>
</destination>
<destination>
<connection-factory>jms/myQueueConnectionFactory</connection-factory>
<destination-name>queue/myEventHistory</destination-name>
</destination>
<destination>
<connection-factory>jms/myQueueConnectionFactory</connection-factory>
<destination-name>queue/myLog</destination-name>
</destination>
</jms-destinations>
I thought JMS would use the same logon as what I use to logon to the J2EE engine when using Visual Administrator. I'm not sure that the error message is really about. Any help will be much appreciated!
Thank you.
Hi Wenjie,
Try defining the <security-identity> in your ejb-jar.xml as the following:
<security-identity>
<description>SecurityIdentity</description>
<use-caller-identity/>
</security-identity>
BTW, I suggest that you should use NW Developer Studio to edit your descriptors.
Regards,
Mustafa.
Add a comment