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
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.
author & internet detective
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
Joined: Oct 04, 2005
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
Joined: Oct 04, 2005
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.