To test Orion I built the address book application from the "Orion CMP
Primer". Since this went quite well I decided to add a single attribute to
the AddressEntry bean, namely a String attribute called email, containing a
persons e-mail address. Unfortunately I forgot to add the
<cmp-field><field-name>email</field-name></cmp-field> to the ejb-jar.xml, so
when launching Orion it failed. "Nothing to worry about - I'll just shutdown
orion and add the cmp-field, and everything will be fine" - I presumed that
Orion would detect the changes and automatically update the default database
to reflect my changes.
When launching the server again I got the following exception:
========
Caught "com.evermind.server.rmi.OrionRemoteException" while attempting to
find all AddressBook entries.
com.evermind.server.rmi.OrionRemoteException: Database error: Column not
found: EMAIL in statement [select addressbook_ejb_AddressEntry.name,
addressbook_ejb_AddressEntry.address, addressbook_ejb_AddressEntry.city,
addressbook_ejb_AddressEntry.email from addressbook_ejb_AddressEntry];
nested exception is: java.sql.SQLException: Column not found: EMAIL in
statement [select addressbook_ejb_AddressEntry.name,
addressbook_ejb_AddressEntry.address, addressbook_ejb_AddressEntry.city,
addressbook_ejb_AddressEntry.email from addressbook_ejb_AddressEntry]
========
Contradicting my expectations it seems Orion does NOT detect my changes to
ejb-jar.xml. Do I really need to add the new "EMAIL" column to the database
myself (I hope not...) - or is there a way to tell Orion that it needs to
update the database for me.
Thanks
Randahl