Jump to content
Excelsior Forums
Sign in to follow this  

Hibernate 3.2.6 and Excelsior Jet 6.5

Recommended Posts

Hello dear readers,

I just tried the Excelsior JET compiler on our application which uses Hibernate and Serialization of Hibernate objects. When I deserialize uninitialized Hibernate objects on my Client (works like a Charm with Suns JDK 1.5.0_18), I receive the following Exception:

java.lang.ClassFormatError: de/ikoffice/app/core/model/Configuration_$$_javassist_0

at java.lang.Class.getDeclaredFields0(Unknown Source)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)

at java.lang.Class.getField0(Unknown Source)

at java.lang.Class.getField(Unknown Source)

at javassist.util.proxy.ProxyFactory.setField(Unknown Source)

at javassist.util.proxy.ProxyFactory.createClass3(Unknown Source)

at javassist.util.proxy.ProxyFactory.createClass2(Unknown Source)

at javassist.util.proxy.ProxyFactory.createClass(Unknown Source)

at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(Unknown Source)

at org.hibernate.proxy.pojo.javassist.SerializableProxy.readResolve(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)

at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)

at java.io.ObjectInputStream.readObject0(Unknown Source)

at java.io.ObjectInputStream.defaultReadFields(Unknown Source)

at java.io.ObjectInputStream.readSerialData(Unknown Source)

at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)


        unimportant stuff here...

This error comes during the Test Run and when running the compiled .exe!

Do you know how to resolve this problem? It might be of interest, that I precompile my classes with the AspectJ compiler v1.5.4, which generated classes for which hibernate creates proxies. I hope this is not to much for JET to handle?

Share this post

Link to post
Share on other sites

Just for information, on the lower level the following happens to my class files:

On the server:

* The class file gets enhanced by AspectJ 1.5.4, using the iajc-ant-Task

* Hibernate creates a Proxy from the class file using Javassist.

* An object of this class is serialized and send to the client

On the client (which i compiled with Excelsior)

* The class file gets enhanced by AspectJ 1.5.4, using the iajc-ant-Task

* The class file is compiled by Excelsior Jet

* Hibernate deserializes the object from the server, and creates a Proxy from the required class file using Javassist.

Now we have an invalid class file.

Might there be a possibility to resolve this?

Share this post

Link to post
Share on other sites

We need an example to reproduce this misbehavior.

Can you provide us it?

You may contact "java at excelsior-usa.com" with the subject.

Share this post

Link to post
Share on other sites

Same on 1.6!

I will try to create a minimal non-working application for you showing the same behaviour, soon, and upload it to your ftp. I just checked if I have access, but since I am just an evaluating customer, I miss a valid username. Can you provide me with one?

Share this post

Link to post
Share on other sites

We have fixed the problem -- thanx to dmigowski's example.

Anyone who suffers from the same problem may contact support team (java at execelsior-usa.com) to get the hotfix.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this