Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

deployment problem in entity beans having bean manage persistence in jboss

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic