Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink 2.1 does not work together with obfuscated jar(After upgrading from 1.2 to 2.1 we get an IndexOutOfBoundsException when using our partly obfuscated jar)
EclipseLink 2.1 does not work together with obfuscated jar [message #557723] Wed, 08 September 2010 15:25 Go to next message
Hans Harz is currently offline Hans Harz
Messages: 20
Registered: July 2009
Junior Member
Hi all,

after upgrading from 1.2 to EclipseLink 2.1. we get a strange error message, when we try to start our application (see below).

We obfuscate some classes with proguard. If we replace the partly obfuscated production jar with the unobfuscated jar everything works fine.

We configured proguard to keep all persistent classes, all annotations, to do no shrinking and no optimization. So no classes that are referenced in the persistence.xml or ..-orm-xml are obfuscated. And with EclipseLink 1.x everything worked fine.

If I look into the obfuscated jar with a decompiler it looks fine. Alle the persistent classes are in place, the annotations are still there.

Does anyone have a clue what the reason for this is? We spend two complete days for hunting this issue and would have to roll back to 1.2 otherwise.

BTW: We get exactly the same (unhelpful) error message like described in case:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=324408

Maybe this problem is also related to some problems with the asm library that's used in EclipseLink

regards,
Hans

Stack Trace:
2010/09/08 17:15:20.537 | [INFO ][init] Creating persistence manager for persistence unit 'terminology-h2'
2010/09/08 17:15:25.004 | [EL Severe]: 2010-09-08 17:15:24.974--ServerSession(14995661)--Local Exception Stack:
2010/09/08 17:15:25.004 | Exception [EclipseLink-0] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.IntegrityException
2010/09/08 17:15:25.004 | Descriptor Exceptions:
2010/09/08 17:15:25.004 | ---------------------------------------------------------
2010/09/08 17:15:25.004 |
2010/09/08 17:15:25.004 | Exception [EclipseLink-93] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DescriptorException
2010/09/08 17:15:25.004 | Exception Description: The table [CUSTOMFIELDVALUEEJB] is not present in this descriptor.
2010/09/08 17:15:25.004 | Descriptor: RelationalDescriptor(com.ac.api.implementation.term.pe rsistence.TermEjb --> [DatabaseTable(TERMEJB)])
2010/09/08 17:15:25.004 |
2010/09/08 17:15:25.004 | Runtime Exceptions:
2010/09/08 17:15:25.004 | ---------------------------------------------------------
2010/09/08 17:15:25.004 |
2010/09/08 17:15:25.004 | java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
2010/09/08 17:15:25.004 |
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.initializeDescriptors(DatabaseSessionImpl.java:471)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.initializeDescriptors(DatabaseSessionImpl.java:406)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.postConnectDatasource(DatabaseSessionImpl.java:666)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.login(DatabaseSessionImpl.java:628)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.jpa.EntityManagerFactoryPro vider.login(EntityManagerFactoryProvider.java:230)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl. deploy(EntityManagerSetupImpl.java:380)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImp l.getServerSession(EntityManagerFactoryImpl.java:157)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImp l.createEntityManagerImpl(EntityManagerFactoryImpl.java:214)
2010/09/08 17:15:25.004 | at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImp l.createEntityManager(EntityManagerFactoryImpl.java:202)
2010/09/08 17:15:25.004 | at ac.WI.createEntityManager(Unknown Source)

[Updated on: Wed, 08 September 2010 15:27]

Report message to a moderator

Re: EclipseLink 2.1 does not work together with obfuscated jar [message #557962 is a reply to message #557723] Thu, 09 September 2010 15:50 Go to previous messageGo to next message
Hans Harz is currently offline Hans Harz
Messages: 20
Registered: July 2009
Junior Member
I created a very small example which reproduces the behavior.

I attached two jars, one was processed with proguard and has some differences on byte code level but looks exactly the same if it is opened with a decompiler.

The original is working, the proguard processed not...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=324862

Why doesn't EclipseLink use standard java reflection instead of this asm bytecode manipulation and analysis framework magic?
Re: EclipseLink 2.1 does not work together with obfuscated jar [message #558222 is a reply to message #557723] Fri, 10 September 2010 14:54 Go to previous message
Hans Harz is currently offline Hans Harz
Messages: 20
Registered: July 2009
Junior Member
FYI: I found a workaround patch. It is described in the bug case https://bugs.eclipse.org/bugs/show_bug.cgi?id=324862
Previous Topic:dynamic batch-writing with MySql
Next Topic:How do you select delimit-identifiers at runtime?
Goto Forum:
  


Current Time: Sat Sep 20 14:06:56 GMT 2014

Powered by FUDForum. Page generated in 0.02199 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software