Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic