• Post Reply Bookmark Topic Watch Topic
  • New Topic

not bound?

 
Graham King
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm a total newbie to EJB and i'm try to do some simple stuff. Add a student to a database, find him by primary key and remove him. I'm try to do the adding bit atm, but i'm getting a error.

I'm not really sure what this means or how to fix it, I'm willing to post any code that people want to see.

Thanks in advance
 
Graham King
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just noticed that the exception is being thrown by this line:



I have this in my ejb.jar-xml:


and this in my jboss.xml
 
bksella sella
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If you are getting the following exception : javax.naming.NameNotFoundException. It means that the ejb jar file did not deploy properly in server. Check if you have build the ejb jar and that all the required classes are there in path in server.

bksella
 
Graham King
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just examined the contents of the jar file which is producded my doing "ant" and i've noticed that only the manifest, ejb-jar and jboss files are in there, and no beans.

Obviously this is the cause of the issue, but any idea how i solve it? Could it be something wrong with the descriptor?
 
Graham King
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, I've sorted out this issue, I had the path to the .class files wrong.

Still getting the javax.naming.NameNotFoundException: cs02gkStudentHomeRemote not bound problem though.

Any help is really really would appreciate!
 
Peter Rooke
Ranch Hand
Posts: 852
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you tell us a bit more, It sounds like you are using Xdoclet (a plugin for ANT) - are you? Are you using an IDE that is calling ANT?
From what you have said: Within Xdoclet, I would check that you have the correct <ejbdoclet> tasks defined: <session>, <entitycmp> (etc).
 
Graham King
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using ant on the command line, just as it comes out of the box, except that i've added ANT_HOME to my env. variablies.

My application server is jBoss, with JAVA_HOME and JBOSS_HOME added to env. variables as well.
 
Peter Rooke
Ranch Hand
Posts: 852
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That�s fine, but you will have to write a lot of code, and make synchronize your changes in several places. I started learning this way, but found it painful. You may be interested in having a look at XDoclet, in particular ejbdoclet.
and @ejb Tag Reference.

As for your problem it sounds like the client (if the error is from here) is
unable to find the home object stub (generated by the server, from the interface you wrote).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!