I have successfully deployed an EJB 3 module and a JSF WEB app which calls the EJB module's beans using netbeans IDE locally. Now when I try to deploy this in staging environment, i get the following error:
root cause
javax.servlet.ServletException: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.store.managedbeans.CustomerManagedBean/customerService#jndi: com.store.service.CustomerRemote#null#com.store.service.CustomerRemote#Session#null into class com.store.managedbeans.CustomerManagedBean
root cause
javax.naming.NameNotFoundException: com.store.service.CustomerRemote#com.store.service.CustomerRemote not found
I have deployed the EJB module and Web application in glassfish v2 (in the staging environment).The jar of the EJB Module is inside WEB-INF/lib folder of web application. It looks like the web app cannot find the EJB module. The classes are annotated with #Remote. And I am calling interfaces and not the bean by using #EJB. And of course, this worked find when I deployed it under Netbeans.
From the comments:
The EJB Module was referencing a JMS Queue Connection Factory. The resource hadn't been created in the staging glassfish server. Although the EJB module was allowed to be deployed, the JNDI Log from the console reveals that none of the EJBs were bound to any names because of a problem in deploying the module.
Related
Hi I am new to Weblogic and I am trying to figure out how to deploy a MDB properly. I have an EAR project that contains my Beans and config files, am I able to export that as a JAR and deploy that onto the Weblogic server?
EJB's can be deployed as JARs (see oracle docs section "Using Archived Files")
and the jar should contain the deployment descriptor xml / Annotations (e.g. #MessageDriven ) that configures the MDB.
My project consists of 2 modules webapp + jar(ejb module), when I tried to run this app from jdeveloper 12c deployed to integrated weblogic server, the server is identifying all ejb beans as twice, one from war and other from jar. Any guess how this happens?
If your application is deployed as EAR, the EAR probably contains the EJB JARs within the WAR and the EAR.
If not, you are probably deploying the WAR with the EJB JARs inside AND the EJB JARs at the same time as multiple deployment.
I am working on a Java EE project with
jdk 1.8
wildfly 10.1.0 final
intellij idea 2016.3
The project has a web application module and an ejb module, and the structure is as follows:
And the two modules have already been deployed successfully
But when I tried to call the session bean, the ejb project went wrong and threw an error
Caused by: java.lang.NoClassDefFoundError: org/json/JSONArray
I use JSON in class DAOHelperImpl in the ejb module, and I've already add the dependency. I tried to put the jar in various packages such as /ejb/lib or /web/web/lib, but none of them are working.
What's wrong?
Move the jars libraries from /web/web/lib into
/web/web/WEB-INF/lib
By Convention the general folder for auto included jars is:
web-project-name/webContent/WEB-INF/lib
Read more here: https://blogs.oracle.com/alexismp/entry/web_inf_lib_jar_meta
I am not aware how IntelliJ handles Java EE projects.
In Eclipse the EAR and WAR are in separate projects and can be assigned to each other.
I think this error is raised due to my bad understanding of how this web application together with the ejb module works: I deploy the web module and the ejb module separately, and it seems that wildfly can only link to the lib of the web module.
The solution is to deploy only the web application to the server and add the ejb module to the web application.
I m trying to deploy a WAR application on my server using Tomcat 8.
I put the WAR file in the webapps directory, modified the server.xml but I can't access the application.
I connect to the Tomcat manager and I can see my application but when I try to start it I got the message
FAIL - Application at context path /bo could not be started
In the Tomcat logs there's the following error:
28-Apr-2016 10:16:01.060 SEVERE [localhost-startStop-3] org.apache.catalina.core.StandardContext.loadOnStartup Servlet [cxf] in web application [/bo] threw load() exce$
java.lang.StackOverflowError
Can you help me?
How debug ejb module in Netbeans. I have created Enterprise Application. Then I made client of enterprise application. This client uses ejb module with #Remote interface. How can I debug it Netbeans?
When I start debug client app starts but breakpoints dont work in code of EJB module?