Wednesday, June 1, 2011

Upgrading to 1.2.0

Upgrading Azzyzt JEE Tools themselves is just a matter of upgrading an Eclipse feature from the update site, but if you already have created an azzyzted project with an earlier version, you will encounter a problem after the upgrade.

Azzyzt installs two runtime components into the lib directory of the EAR project, but it runs the code generator from the plugin itself. Unfortunately the code generated by the plugin depends on a particular version of the runtime components, and after the upgrade, code generator and runtime don't match.

If you generate code with 1.2.0 from an azzyzted project created with an earlier version, you will get "Azzyztant" created in the wrong package, and the code will not compile because of two missing interfaces.

This will be fixed in release 1.2.1 due in a few days, but until then, here are two possible temporary solutions:

  1. If the only code supplied by you are the entities and your persistence.xml, you can just save them, delete the four projects, create the azzyzted project anew, copy the saved entities and persistence.xml into the new projects, refresh the projects, clean all projects, and then you can safely generate code.
  2. The other solution is to create a second azzyzted project (call it "dummy" or whatever you like), and then copy the contents of "dummyEAR/lib" over to the lib directory in your EAR project. Refresh your own EAR project, delete the dummy projects, create a sub-package "meta" parallel to "entity" in your EJB project's "ejbModule" source folder, and then you're done.

Sorry for the inconvenience, next time there will be an automatic solution.

No comments:

Post a Comment