The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jean.pierobom (3) [Avatar] Offline
#1
I'm beginner to EJB and have a issue to run the Chapter1 example of EJB3 in Action book.

When run the example, the exception "javax.naming.NameNotFoundException: chapter1 not bound" is thrown. However, JBoss web-console show the chapter1 in JMX MBeans list.

Have any idea?
jean.pierobom (3) [Avatar] Offline
#2
Re: Chapter1 - NameNotFoundException
help me, please smilie
reza_rahman (456) [Avatar] Offline
#3
Re: Chapter1 - NameNotFoundException
Jean,

If you are using our ANT scripts exactly, the likely cause is that you are running the client before the server has actually had a chance to deploy the application. To make absolutely sure, run the client ANT script after checking the JMX console.

Hope it helps,
Reza
jean.pierobom (3) [Avatar] Offline
#4
Re: Chapter1 - NameNotFoundException
Hi Reza!

Thank's for your reply.

First I did deploy the application. Then, i checked the web-console and the lastest time run the client.

I have a doubt... In the ejb3inaction-destinations-service.xml does not have a reference to this EJB (chapter1). It's correct?

<?xml version="1.0" encoding="UTF-8"?>
<server>
	<mbean code="org.jboss.mq.server.jmx.Queue"
>
		name="jboss.mq.destination:service=Queue,name=OrderBillingQueue">
		<attribute name="JNDIName">jms/OrderBillingQueue</attribute>
		<use-java-context>false</use-java-context>
		<depends optional-attribute-name="DestinationManager">
			jboss.mq:service=DestinationManager
		</depends>
	</mbean>
	<mbean code="org.jboss.mq.server.jmx.Queue"
>
		name="jboss.mq.destination:service=Queue,name=ShippingRequestQueue">
		<attribute name="JNDIName">jms/ShippingRequestQueue</attribute>
		<use-java-context>false</use-java-context>
		<depends optional-attribute-name="DestinationManager">
			jboss.mq:service=DestinationManager
		</depends>
	</mbean>
</server>



I think continue reading the book, particularly Chapter 11. Then, try again.

Regard's
Jean