Discussions
EJB programming & troubleshooting: How to deploy Custom PK class with WebLogic Bean Deployer
-
How to deploy Custom PK class with WebLogic Bean Deployer (3 messages)
- Posted by: T H
- Posted on: July 25 2000 12:03 EDT
Hi, all
I am writing an entity bean(CMP) which has a custom defined
primary key class. Up until now, I don't think to have any luck with this with either J2EE app server or WebLogic app server. The reason I think this has something to do with my custom primary key class is that I have another similar CMP entity bean which doesn't have a custom primary key class and it works fine. Though the problems I got from these two are different.
I started with J2EE app server. I was able to deploy my bean as documented:
1. Provide the custom class name in the deployer as the primary key class name.
2. And leave the primary key field empty in the deployment tool.
However, when I run my client that use this bean, I got an error when calling one of my finder method, The error looks like this:
javax.ejb.FinderException: ERROR in database SELECT for find: java.lang.StringIn
dexOutOfBoundsException: String index out of range: 77
<
Since I got no luck with J2EE app server, I moved onto Weblogic. However, I couldn't even go any further because I just don't seem to able to specify my custom primary key class with the WebLogic Deployer at all.
I am sure I am missing something here. But can anybody gives me some hints.
Following is my code snippet:
In my home interface, the problematic finder method is:
public Collection findByUserID(String strUserID)
throws FinderException, RemoteException;
Threaded Messages (3)
- How to deploy Custom PK class with WebLogic Bean Deployer by iqbal ahmad on July 25 2000 19:40 EDT
- How to deploy Custom PK class with WebLogic Bean Deployer by T H on July 26 2000 19:40 EDT
- How to deploy Custom PK class with WebLogic Bean Deployer by Mike Sprague on July 28 2000 02:09 EDT
- How to deploy Custom PK class with WebLogic Bean Deployer by T H on July 26 2000 19:40 EDT
-
How to deploy Custom PK class with WebLogic Bean Deployer[ Go to top ]
- Posted by: iqbal ahmad
- Posted on: July 25 2000 19:40 EDT
- in response to T H
is your bean ejb1.1 compliant? use weblogic's compliance check in deploytool to help u find out -
How to deploy Custom PK class with WebLogic Bean Deployer[ Go to top ]
- Posted by: T H
- Posted on: July 26 2000 19:40 EDT
- in response to iqbal ahmad
Yes, it is. -
How to deploy Custom PK class with WebLogic Bean Deployer[ Go to top ]
- Posted by: Mike Sprague
- Posted on: July 28 2000 02:09 EDT
- in response to T H
For WLS5.1 using the deployer tool. Enter your
fully qualified PK class under persistence->Primary Key
Type. Don't fill in the Primary Key Field - it should
remain none. If you don't have at least Service pack
2 AND you enter a value in the Primary Key Field your
hosed. It seems to want to remember that fact and
your'll just need to fix the XML yourself or start over.
The PK class already defined the field. If you use
java.lang.Sring as a PK then you do need to enter
a field as you probably already know.