-
1. Re: problem with entity bean
mikebe Apr 5, 2002 1:18 AM (in response to kirklee)This is my wild guess, but I think the Container is keeping track of the Primary Key field. It may have not added the data in your DB table, but JBoss thinks it did and keeps tracks of the primary key sequence. Restart the JBoss server and see if you can re-add the data.
-
2. Re: problem with entity bean
rockinryan Sep 17, 2002 4:36 PM (in response to kirklee)I know this is an old topic, but just incase someone hits it while searching like I did:
This pattern can happen if your deployer (or you) forget to specify the datasource and datasource-mapping in the appropriate file. As most people know JBuilder doesn't have native support for JBoss, though it should - I thought it would specify the datasource in ejb-jars.xml. As it turned out I had to add it (by way of a JBuilder addin or manually) to jbosscmp-jdbc.xml like this:
<jbosscmp-jdbc>
java:MySqlDS
<datasource-mapping>mySQL</datasource-mapping>
<create-table>true</create-table>
<remove-table>false</remove-table>
<enterprise-beans>
...
Prior to adding these two settings I was hitting the default datasource. Didn't take long to catch, but it could at 3 am...
Maybe that will help someone else down the road?
Ryan