webtier@glassfish.java.net

Problem with EJB references when deploying Eclipse-generated EAR Project

From: <forums_at_java.net>
Date: Tue, 4 Dec 2012 22:12:39 -0600 (CST)

Hello everyone, I'm having troubles with Glassfish when I try to deploy my
EAR application on my server. I'm trying to learn as much as possible about
J2EE and I use Eclipse as IDE to train on basic projects. I created an EAR
project which has an EJB module and a WAR module. My purpose is to display a
simple HTML page created from a servlet in the WAR module, containing a
string returned by a Session EJB in the EJB module. It works fine when
"hot-deployed" in Eclipse but I can't manage to get it working when deploying
it directly from the Glassfish admin page, from a .ear file exported from
Eclipse. I get the following error : Exception while deploying the app :
java.lang.RuntimeException: Cannot resolve reference Local ejb-ref
name=ServletTest/test,Local 3.x interface
=sessionBeans.TestEJB1Local,ejb-link=null,lookup=null,mappedName=,jndi-name=,refType=Session
because there are 2 ejbs in the application with interface
sessionBeans.TestEJB1Local It seems that after scanning the /lib of the EAR
project, Glassfish copies the EJB-JAR in the /lib of the WAR module, and
doing so finds two references for my EJB, thus not working. That's what I
understood from searching on the web. Is this correct? I had this problem on
Eclipse first, but I corrected it by adding a reference to the EJB-JAR in the
MANIFEST instead of the Deployment Assembly of the WEB Project. It doesn't
solve the same exact problem I get when I deploy directly from Glassfish
admin page though. I get this error no matter what I do... I'd really like to
deploy my application directly from Glassfish. I searched the web for hours
but I can't find the way to make it work. For your information, I'm using :
Glassfish 3.0.1 Eclipse Juno It seems to be a deployment problem so I don't
think you need me to display the source code, tell me if you need it, I'll
post it asap. Same if you need other pieces of information. Thanks for you
help! NB : I'm sorry if i'm unclear sometimes, I'm french so my english is
quite basic...

--
[Message sent by forum member 'Irios']
View Post: http://forums.java.net/node/892947