• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help with Websphere CMP development

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to Websphere. Trying to get some idea of the environment. At this moment however I need some help. I can't create CPM beans successfully. I have very little idea how to map the bean to a DB table and the fields to the columns. I can do it at weblogic and jboss but at WAS I an running short of ideas. Can anybody please help me out. I need information how to accomplish these mapings.

I am running WAS 6.0 Express
Using Eclipse WTP 1.0
No access to Websphere Studio
Familier with EJB, but new to WAS


Thanke for your time.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kaustabh,
Welcome to JavaRanch!

The development should be the same for any application server if you don't use application server extensions. So you would create the CMPs the same way you did when deploying from Eclipse to WebLogic.

Is there a specific step you are stuck on?
 
Kaustabh Singha Roy
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help. I think I should have supplied more information of the problem.
I am trying a ear with an ejb module and a web module to demonstrate the use of the beans. I use Eclipse to generate the EAR file for me and then deploy it from the WAS admin console manually. I am creating the CMPs in Eclipse with XDoclet generation. The final JAR files contains the ejb-jar.xml file and it appears complete to me. But there are no other files like the weblogic-cmp-rdbms-jar.xml or jbosscmp-jdbc.xml. The application is getting deployed and even started without any complain, but none of the CMP beans getting instantiated during the run. I think the CMP fileld to rdbms mapping should be either in some supplied file on should be provided during the deployment. But exactly where ?? ?? I am sure the problem is not with my datasource, the test connection always came successfull. As it is a old MySQL database there are very little chance of any permission issue. My session beans are working properly.
I think these are all I can supply now. Hope this will be helpful.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kaustabh,
WebSphere provides a tool for setting up the mapping. It used to be called the Application Assembly Tool.

I haven't used that tool in a while. I'm not sure if it is still a separate tool or now part of the admin console. It's a lead for you to check in the manual though.
 
Kaustabh Singha Roy
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Jeanne, I cant see that tool with WAS 6. Perhaps it is no longer there as a saperate tool.

Perhaps now after investing few more hours on WAS, I can be more specific to the problem. I have now moved to WAS 6.1 with an embedded "Derby", as WAS 6.0 was creating problem with JDK 5. I can see the .ddl files being generated at the deployed code for my application. But at runtime I am getting the error...

RemoteException occurred in server thread; nested exception is: com.ibm.ejs.container.CreateFailureException: ; nested exception is: com.ibm.ws.exception.WsEJBException

something that I think may be important is the three wornings that I got at the time of deployment...

ejbModule/kaustabh/websphere_deploy/DB2UDBNT_V82_1/PersonBeanFunctionSet_2db2a135.java(362): The method initializeUpdateTemplates() from the type PersonBeanFunctionSet_2db2a135 is never used locally

ejbModule/kaustabh/websphere_deploy/DB2UDBNT_V82_1/PersonBeanFunctionSet_2db2a135.java(365): The field PersonBeanFunctionSet_2db2a135.updateTemplateList is never read locally

ejbModule/kaustabh/ConcretePerson_2db2a135.java(78): The method getInjector() from the type ConcretePerson_2db2a135 is never used locally


Can anybody suggest something?

I have two other question.

1. In most of the sample EJBs supplied with WAS6.1 I can see the files ibm-ejb-jar-bnd.xmi, ibm-ejb-jar-ext.xmi, and Table.ddl are present already. Are these file need to be created by the developer or they are meant to be generated by the deployment tool?

2. I am confused with the "DB2UDBNT_V82_1" in the wornings. I am using derby JDBC provider. Why DB2 is there? is it normal? I can see a line at the log that says

[7/18/06 14:21:05:984 IST] 00000024 WSRelationalR I DSRA8210I: The database product name Apache Derby may not exactly match with the database represented by the backend ID (DB2UDBNT).

again the ground cause of the problem is, according to logs

Caused by: java.sql.SQLException: Table 'PERSON' does not exist.DSRA0010E: SQL State = 42X05, Error Code = 20,000

the table 'PERSON' is no doubt present. I have created it manually as it wasn't created automatically.
[ January 03, 2007: Message edited by: kaustabh singha roy ]
 
Kaustabh Singha Roy
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all the support and help. I finally got my first ever CMP in WAS. I hope my path is going to be a little smoother now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic