Look at my last reply in my problem. I have tried to descripe how to make it work.
What is assign to the myEntityName string ?
I have looked at your solution but my problem is a bit different from yours because my beans are deployed in the same ejb-jar file. So, I don't think I need to use a .ear file.
Here is the entity's descriptor with the entity's name declaration:
Have you insert an ejb-ref entry within your ejb session in DD ? I think this may be the problem ...
As you can see above, I have inserted an ejb-ref in my descriptor.
Thanks for your encouragement.
Sorry, I have not specified the value of the string myEntityName in my previous answer:
I hava made a mistake:
You have specified the ejb-ref-name entity/MyEntity the deployment descriptor and are using entity/myEntity in the code when the lowercase 'm' is not a typo in the post then that could be your problem.
It worked for me.
I also think you need to specified
Note: In <ejb-ref-name> it has to be ejb/MyEntity not entity/MyEntity
I think it has something to do with the java:comp/env/ejb where alle EJB's are placed and has to be looked up from no matter its JNDI name.
You also have to create a jboss.xml as well also including <ejb-ref> tags to deploy correctly.
Thinks for all your advices, but nothing solves my problem. The exception "no protocole" is always raised when my session bean try to look up for the entity bean.
I avoid the trouble by setting the classpath to my classes's directory so that JBoss doesn't need to find the file generated in the temp directory. But it is just a temporary solution.
So I ask myself whether my local variables like JBOSS_CLASSPATH or CLASSPATH was rightly setting up or not.
My question is: must the CLASSPATH or the JBOSS_CLASSPATH point a specific sub-directory (like 'deploy') of the jboss's main directory ?
I am very grateful for your help.
Try moving your jboss installation to a directory that does not have a space in it and see if that works.