GeeCON Prague 2014*
The moose likes EJB and other Java EE Technologies and the fly likes deployment problem in entity beans having bean manage persistence in jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "deployment problem in entity beans having bean manage persistence in jboss" Watch "deployment problem in entity beans having bean manage persistence in jboss" New topic
Author

deployment problem in entity beans having bean manage persistence in jboss

Veer Bhardwaj
Greenhorn

Joined: Aug 25, 2008
Posts: 3
Greetings

I am trying to deploy a entity bean having bean managed persistence in jboss. After proper compilation and packaging of the entity bean into a jar file, I am copying it to the default\deploy directory. The bean fails at the deployment stage and I get the following error :


:56:57,046 ERROR [MainDeployer] could not create deployment: file:/C:/jboss/jb
s-4.0.1sp1/server/default/deploy/sample2_bmp.jar
g.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed
see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at


My ejb-jar.xml file is
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

<ejb-jar>

<display-name>bmpapp</display-name>

<description>
An EJB app containing only one Bean Managed Persistence Entity Bean
</description>

<enterprise-beans>
<entity>
<description>bmpdemo</description>
<display-name>TemplateBean</display-name>
<ejb-name>TemplateBean</ejb-name>
<home>apps.TemplateHome</home>
<remote>apps.Template</remote>
<ejb-class>apps.TemplateBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>apps.TemplatePK</prim-key-class>
<reentrant>False</reentrant>
<resource-ref>
<res-ref-name>jdbc/DefaultDS</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>

</ejb-jar>

My jboss.xml file is
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<entity>
<ejb-name>TemplateBean</ejb-name>
<jndi-name>apps/TemplateBean</jndi-name>

<resource-ref>
<res-ref-name>jdbc/DefaultDS</res-ref-name>
<jndi-name>java:jdbc/DefaultDS</jndi-name>
</resource-ref>

</entity>


</enterprise-beans>




</jboss>


Please let me know what mistake I am making. Please help me as I am struggling on this topic for the past 3-4 days.

Thanks for your help
Veer Bhardwaj
Greenhorn

Joined: Aug 25, 2008
Posts: 3
Can somebody please help me out? I have not recieved any replies.

Thanks for your help

Regards
Veer
Veer Bhardwaj
Greenhorn

Joined: Aug 25, 2008
Posts: 3
techies

Finally I have solved this problem. The bean class was having a private method which was causing this exception. I always suspected problem with ejb-jar.xml or jboss.xml but chaning the access modifier of this method to public from private did the real magic. ;-)

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deployment problem in entity beans having bean manage persistence in jboss