Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null pointer exception deploying message bean

Status
Not open for further replies.

EvanneShanley

Programmer
May 24, 2005
1
US
I am using WebLogic version 8.1 and am trying to deploy a message-driven EJB. I am using xdoclet to format the ejb-jar.xml and weblogic-ejb-jar.xml files. I have successfully deployed session and entity beans.

Specifically, I have defined a topic on the web server as follows: topic name: RacingResultsTopic; jndi-name: ejb/RacingResTopic.

In my ejb-jar.xml file, I have the following:

<message-driven >
<ejb-name>RaceMessage</ejb-name>
<ejb-class>message.RaceMessageBean</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durability>NonDurable</subscription-durability>
</message-driven-destination>

<ejb-local-ref >
<ejb-ref-name>ejb/RaceLocal</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>entity.RaceLocalHome</local-home>
<local>entity.RaceLocal</local>
<ejb-link>Race</ejb-link>
</ejb-local-ref>
<ejb-local-ref >
<ejb-ref-name>ejb/HorseLocal</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>entity.HorseLocalHome</local-home>
<local>entity.HorseLocal</local>
<ejb-link>Horse</ejb-link>
</ejb-local-ref>

</message-driven>

In the weblogic-ejb-jar.xml, I have the following defined for the message bean (ejb-name: RaceMessage; class-name: RaceMessageBean):

<weblogic-enterprise-bean>
<ejb-name>RaceMessage</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>3</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>ejb/RacingResTopic</destination-jndi-name>
</message-driven-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>ejb/RaceMessage</jndi-name>
<local-jndi-name>RaceMessageLocal</local-jndi-name>
</weblogic-enterprise-bean>

I include both these jar files in my ".ear" and when I try to deploy the application, I get the following error:

[Deployer:149033]preparing application RacingMgrEJBAdmin on myserver
[Deployer:149033]failed application RacingMgrEJBAdmin on myserver
[Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application RacingMgrEJBAdmin on myserver.:
Exception:weblogic.management.ApplicationException: prepare failed for RacingMgrEJB.jar
Module: RacingMgrEJB.jar Error: Exception preparing module: EJBModule(RacingMgrEJB.jar,status=NEW)
Unable to deploy EJB: RaceMessage from RacingMgrEJB.jar:
java.lang.NullPointerException
at weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.jmsServer_Contains_DestJNDIName(MessageDrivenBeanInfoImpl.java:757)
at weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.setupMigrationTarget(MessageDrivenBeanInfoImpl.java:667)
at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:973)
at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

From the error, it almost looks as if it can't find the destination topic on the server, maybe? I have been searching and searching for help on this and have been coming up empty. Any help would be appreciated.

Thanks!

Evanne Shanley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top