aspose file tools*
The moose likes JBoss/WildFly and the fly likes Ejb deployment issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Ejb deployment issue" Watch "Ejb deployment issue" New topic
Author

Ejb deployment issue

Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
Hi I am trying to deploy an application on jboss which was already running on weblogic server.

I am facing some issue in deploying the ejb which is bundled in an ear file.


there is this application.ear which has three components.

application.jar which bundles all the ejbs.

one.war

two.war

I am pasting the application.xml file here.




application.jar has the ejb-jar.xml

one element of it i will put here




I have added the jboss.xml in the jar file with the following input.




It cribs with the following error while deploying on jboss.


15:50:20,113 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/C:/Test/4.3.0/server/citistreet.jms/tmp/deploy/tmp64688application.ear-contents/application.jar
org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/tpaServices_com_ing_tpa_services_UserServiceHome, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml)
at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:175)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
Jeremy Whiting
Greenhorn

Joined: Mar 05, 2008
Posts: 10
Hi Arun,
The application server is having difficulty creating an Environment Naming Context (ENC) JNDI services associated with your application.

Arun Kumar wrote:
15:50:20,113 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/C:/Test/4.3.0/server/citistreet.jms/tmp/deploy/tmp64688application.ear-contents/application.jar
org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/tpaServices_com_ing_tpa_services_UserServiceHome, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml)
at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:175)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)


The JBoss server is expecting your enterprise application EAR file to include a file called "jboss-app.xml" bundled inside the META-INF directory. The jboss-app.xml file contains deployment meta data.
In your situation it looks very straight forward and a simple xml file will suffice.

I recommend you take a look at the documentation on the JBoss EJB3 Reference guide, depending on which version of AS you using 4/5 to understand what goes into the meta data file. Additionally the JBoss Application Server reference documentation.

EJB3 AS4, Chapter 7 "JBoss EJB 3.0 jboss.xml deployment descriptor"
http://www.jboss.org/ejb3/docs/reference/build/reference/en/html/

Here is the reference documentation explains the packaging of Enterprise Applications
http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html/Sample_JSF_EJB3_Application.html#Sample_JSF_EJB3_Application-Configuration_and_Packaging

Regards,
Jeremy

SCJP, SCWCD
Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
Thanks Jeremy,

I added the jboss-app.xml


but it still give the problem I believe the problem is this application is also the client of all the jar that it is deploying using the home interfaces.

Therefore this has an application-client.xml one entry of it is as below.



I believe this is the problem if I delete the application-client.xml then the errors stop.


Jeremy Whiting
Greenhorn

Joined: Mar 05, 2008
Posts: 10
Hi Arun,
Yes the application-client.xml was not necessary. The web application is a "client" of the EJB beans and because the WARs and EJB jars are packaged in the same EAR file the server considers automatically the web WAR applications as clients.

Regards,
Jeremy
Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
Thanks Jeremy, I left the application-client.xml and added the jboss-client.xml and that fixes the issue. Now I am able to deploy the applicaiton without any issue.

Now I am getting the issue in resolving the jndi name for the ejb.

I have the following code in the ejb-jar.xml



and I have the following entry for this in the jboss-client.xml





I have opened the jmx console and see the following entry in the jmx console.




I tried all the permutation combination of the JNDI name to resolve it but could not.


Jeremy Whiting
Greenhorn

Joined: Mar 05, 2008
Posts: 10
Hi Arun,
Paste the exception stack trace please.

Regards,
Jeremy
Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
Thanks Jeremy for your continued help. I am pasting the stack trace here.

Application is using the properietry framework to loolup the ejb. The jndi name that I specified was "mainservlet/ejb/tpaServices_com_ing_tpa_services_ApplicationServiceHome"

I have also used all the below combinations.

"ejb/tpaServices_com_ing_tpa_services_ApplicationServiceHome"
"java:comp/env/ejb/tpaServices_com_ing_tpa_services_ApplicationServiceHome"
"java:comp/env/mainservlet/ejb/tpaServices_com_ing_tpa_services_ApplicationServiceHome"

Nothing worked till now.









Jeremy Whiting
Greenhorn

Joined: Mar 05, 2008
Posts: 10
Hi Arun,
Afraid I cannot explain what is happening. You mentioned you are using a proprietary framework to obtain the object from JNDI.
Have you contacted the vendor for support ?

Regards,
Jeremy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ejb deployment issue
 
Similar Threads
JBoss Deployment Error
JBoss 4.0 and MSSQL Server 2000
Not able to excute EJB ClassCastException
EJB references
How to get the datasource from Bean through deployment descriptor