Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment problem in entity beans having bean manage persistence in jboss

 
Veer Bhardwaj
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody please help me out? I have not recieved any replies.

Thanks for your help

Regards
Veer
 
Veer Bhardwaj
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic