I'm working on the Persistence examples for the Java EE 5 Tutorial, and
am running into an exception for which I can't find the cause. The
example is a port of the 1.4 cmporder example.
I'm getting a "Can not PERSIST detatched object" exception when adding a
LineItem to an Order. It happens when I attempt to add a second LineItem
to an Order.
The example is for AppServer 9 PE beta (build b32g), so that's what I'm
running the app on. The beta is next week, so any help is greatly
appreciated.
I've attached a tar.gz file containing the source, with the necessary
build files. To build the example:
1. Set javaee.home in common/build.properties.
2. Set the admin password in common/admin-password.txt.
3. Create the tables in Derby by running:
% cd ejb/order
% ant create-db_common
The SQL source is in common/sql/derby/tutorial.sql.
4. Run the 'all' target to build, package, and deploy the app.
% ant all
I've also attached the EAR.
The exception is thrown when the lineItem is added to order in
order.request.RequestBean.addLineItem().
-i
--
Ian Evans
ian dot evans at sun dot com
Java Enterprise Edition technical documentation