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