• 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
  • Tim Cooke
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst
  • Peter Rooke
  • Mikalai Zaikin
Bartenders:
  • Himai Minh

CMP bean does not deploy -- need your advice

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends,

I am trying to deploy a very simple CMP bean on JBoss with Hypersonic SQL database.

But it does not deploy. JBoss does not even give error messages, simply nothing. What am I missing?

Here is the jar file that I am trying to deploy.

Here is a zip file of the code.

Here is the code:

Catalog.java




CatalogHome.java




CatalogBean.java



ejb-jar.xml




jboss.xml




jbosscmp-jdbc.xml


[ July 02, 2007: Message edited by: Joseph Sweet ]
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That jar does not have the correct packaging. This is what the jar contains:


META-INF/
META-INF/MANIFEST.MF
production/com/
production/com/ejb/
production/com/ejb/Catalog.class
production/com/ejb/CatalogBean.class
production/com/ejb/CatalogHome.class
production/META-INF/
production/META-INF/ejb-jar.xml
production/META-INF/jboss.xml
production/META-INF/jbosscmp-jdbc.xml



Notice that a META-INF folder has been created *inside* the "production" folder and all the xml files (which are necessary for recognizing the jar as an ejb jar) are placed here.

The correct packaging should look like:



This will help JBoss to identify this as an ejb jar and then process it for deploying.
[ July 02, 2007: Message edited by: Jaikiran Pai ]
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Jaikiran is right.

Also your jar has a production folder, but your package name is "com.ejb" so I doubt if Jboss can find the classes

Why don't you create an EAR and have proper packaging as specified in the specs. Have APP-INF/Class and all your classes inside it.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you guys, you were right.

JBoss did not identify the ejb-jar.xml thus did not start the deployment. I also had a little mistake with the Home interface's create() method signature but I could see it by the error output once the deployment occurred.

BTW, what is APP-INF directory? I have never heard of something like that.

Is it vendor-specific?


[ July 02, 2007: Message edited by: Joseph Sweet ]
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. My bad, this is specific to weblogic server.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic