Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CMP bean does not deploy -- need your advice

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • 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 ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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 ]
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Yes. My bad, this is specific to weblogic server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic