users@glassfish.java.net

Re: NullPointerException In EclipseLink During EAR Deployment

From: <glassfish_at_javadesktop.org>
Date: Wed, 17 Feb 2010 13:57:06 PST

We have hundreds of classes in our ORM. To home in on this NullPointerException which provides no idea of the culprit, I tried guessing which of the entries it might be, and finally had to give up. I removed them all, and the problem went away, so I knew where we stood. I guess it would be instructive to wrap an exception handler around that area which mentions what is being processed in order to provide a clue next time around.

I have since wimped out on EclipseLink (temporarily) and installed Hibernate in GF, which works fine. It was not this NullPointerException which got me in the end, but even getting past this by temporarily accepting a configuration which did not depend on the ORM entries, the one thing I did need in the ORM, which is why I upgraded from TopLink, was to get past a problem related to bytea being used for <lob> with PostgreSQL, when we want OID columns in the database. EclipseLink promised <type-converter> might do the job. But I found that even using the EclipseLink namespace suggestions for <entity-mappings> as suggested by the docs, EclispeLink is not reading the the <type-converter> tag at all. My understanding is that I should be able to add that tag to an entity, and have bytea converted to ID before being passed to the database. But nothing. I even intenationally left off the required "name" attribute of the tag to be sure, and EclipseLink just ignored it. Without the ability to have OIDs stored for bytea, we can't use EclipseLink...Hibernate happens to do this automatically, and is doing now even in GlassFish.

However due to JPA configuration, it would not be difficult to swap back once the NullPOinterExceptions are sorted out, and in particular the <type-converter> tag works (assuming of course I didn't misconfigure something along the way :-). And no, I didn't try the @TypeConverter annotation to see if that works, because I don't want to use annotations in this case.

Thanks

Joe
[Message sent by forum member 'teknomad' (joe.isaac_at_tolven.org)]

http://forums.java.net/jive/thread.jspa?messageID=387262