Friday, March 2, 2012

Azzyzt JEE Tools 1.3.1 are available

This is a release with neither functional changes nor bug fixes. I just wanted to bring Azzyzt JEE Tools to the current versions of GlassFish and Eclipse.

Built and tested with Eclipse Indigo SR2, GlassFish 3.1.2 and Java 1.6.0_31

9 comments:

  1. Hi Andreas, I followed your excellent tutorial on JEE/GlassFish. And then as I was working through the tutorial "Using Azzyzt Tools", I ran into the following problem:

    The EAR was properly deployed on GlassFish, the PostgreSQL tables were set up, and I was trying to run the countryById(1) method from the browser (http://localhost:8080/cookbook/CountryFullBean?Tester"). This is a snapshot of stack trace from server.log:

    ...
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
    at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
    at com.manessinger.cookbook.meta.EJBInterceptor.aroundBeanInvocation(EJBInterceptor.java:47)
    ... 85 more
    Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean
    at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:4975)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4810)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
    ... 102 more
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.Database
    xception
    Internal Exception: org.postgresql.util.PSQLException: ERROR: column "modification_timestamp" does not exist
    Position: 12
    Error Code: 0
    Call: SELECT ID, modification_timestamp, create_timestamp, create_user, NAME, modification_user FROM COUNTRY WHERE (ID = ?)
    bind => [1]
    Query: ReadObjectQuery(referenceClass=Country sql="SELECT ID, modification_timestamp, create_timestamp, create_user, NAME, modification_use
    FROM COUNTRY WHERE (ID = ?)")
    at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:687)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:530)

    ... and so on.


    I'm still pretty new at this, so any help would be greatly appreciated.

    ReplyDelete
  2. Hi Andreas, I figured out the problem. Basically it was user error on my part! Turns out, when I ran the JPA tools on the cookbookEJB project, Eclipse was connected to the postgres database, not the cookbookdb database, and therefore, all the 5 tables got created under postgres. No wonder, at runtime, the bean container was not able to find the correct tables.

    Sorry about the confusion.

    ReplyDelete
  3. OK, great :)

    Sorry that I didn't react any earlier, but then, it's always comforting to know that people are able to figure it out themselves. Do you feel that something in the docs is missing? Something that could have prevented you from stumbling over that issue?

    ReplyDelete
  4. Hi Andreas, thanks for responding! I think the documentation is excellent, and in this case, it was just my oversight. But I still need to re-read the two tutorials at least a couple more times to reinforce the whole pattern (and concepts) in my head. If I find any holes, I'll let you know.

    I look forward to reading more tutorials (on any development topic) from you.

    ReplyDelete
  5. Hi Andreas, I was wondering if you are going to provide any write-up, or tutorial on the class design for the code generator, so that we can customize it to suit our own environment?

    ReplyDelete
    Replies
    1. Hmm ... I should, huh? The problem is, I severely lack time. I suggest you just ask me questions, I answer them, and then later I can distill it into a tutorial or maybe FAQ. OK?

      Delete
    2. That would work. :-)

      Thanks for all your help.

      Delete
  6. Hi Andreas, just wanted to alert you to a bug in the GlassFish/JEE tutorial I just came across:

    In the section "Testing and a NotSerializableException", in the TestCookbookBean class definition, you are defining the serviceBean field like so:
    "private CookbookInterface serviceBean;"

    This should really be:
    "private CookbookBeanRemote serviceBean;"

    Thanks
    Manju

    ReplyDelete
  7. Same comment in this block in the same method mentioned above:
    " serviceBean =
    (CookbookInterface) new InitialContext(Util.getInitProperties())
    .lookup("java:global/cookbookEAR/cookbookEJB/CookbookBean"
    +"!com.manessinger.cookbook.service.CookbookInterface");"

    Thanks

    ReplyDelete