This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 145589 - module hibernatelibs in Netbeans contain older version of asm*, cglib-2.1.3 jars
Summary: module hibernatelibs in Netbeans contain older version of asm*, cglib-2.1.3 jars
Status: RESOLVED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: Hibernate (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks: 144016
  Show dependency tree
 
Reported: 2008-08-29 15:11 UTC by Ayub Khan
Modified: 2013-08-07 13:28 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ayub Khan 2008-08-29 15:11:36 UTC
Module hibernatelibs in Netbeans contain standard (older) Hibernate dependencies:
asm-attrs.jar
asm.jar
cglib-2.1.3.jar

Jersey use ASM library which is 3.1 version and is not compatible with version from hibernate.

I think, that best solution is remove asm-attrs.jar, asm.jar and cglib-2.1.3.jar from Hibernate class library and use 
cglib-nodep-2.1_3.jar from (make sure to check for license)

http://mirrors.ibiblio.org/pub/mirrors/maven2/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar

Another reason that I think is a blocker is because GlassFish 3 will contain compatible libs from jersey, so I am
assuming there will be conflict in GF3 also.
Comment 1 Peter Liu 2008-09-04 18:58:42 UTC
Reassigning this to j2ee/persistence.

Comment 2 Peter Liu 2008-09-04 19:01:10 UTC
Note that libs.cglib module contains the latest version, 2.2 of cglib.

Comment 3 Jayashri Visvanathan 2008-09-04 22:57:08 UTC
Ayub,
   why is this a P1 ? Have you run into any issues because  of these dependencies ? If so, what are they ? With 1 week
to go before code freeze, we should be careful about updating libraries. They may or may not be work well with Hibernate
framework.  So please provide more details.
Comment 4 Ayub Khan 2008-09-05 01:30:17 UTC
hibernate.lib contain older version of asm.jar, conflicts with asm-3.1.jar found in (standard distro of) websvc.restlib
(shown below)

Macintosh:main ayubkhan$ unzip -l websvc.restlib/external/rest.zip 
Archive:  websvc.restlib/external/rest.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
    43035  08-25-08 14:52   asm-3.1.jar

Any web developer who wants to use NB 6.5 web app with hibernate framework & RESTful web services, will find it hard to
workaround (involves modifying too many files in the web app) this issue. So I think this is a P1. If you cannot fix
this for 6.5 for some reason, you can lower this to P2, if you can provide a workaround.
Comment 5 Jayashri Visvanathan 2008-09-05 16:53:23 UTC
can you explain the issues in terms of how it affects users ? Is the issue that NetBeans users cannot use Hibernate and
Rest based services together ? Are there any other issues you know of ?  Also, how common is this use case. i.e, using
Rest + Hibernate ?

I think the jars you referred to are part of Hibernate framework zip and weren't added by us,so we need to evaluate if
Hibernate framework works with later versions. I am not comfortable doing these changes so late unless the user impact
is significant.

thanks
Comment 6 Vadiraj Deshpande 2008-09-05 19:25:58 UTC
+1 to Jayashri's comments. Also changing jar version involves legal approval which might not be possible given the 
short time. If you could provide me the exact causes (exceptions or build related errors), we can think of a possible 
work around. 
Comment 7 Peter Liu 2008-09-05 21:39:08 UTC
I am able to get things to work with cglib-2.2 and asm-3.1. I've done very extensive testing using the combination of
Spring, Hibernate and Jersey and it works flawlessly. So I think it should be safe to switch to cglib-2.2.

It seems to me that the proper solution to this issue is that we need to create a separate asm-3.1 library module (which
by the way doesn't use any of the open source licenses.) and have spring (which by the way contains cglib without asm
which is a bug and I'll file an issue on that), hibernate and rest framework library modules all reference it. In
addition, we remove the asm-attrs.jar, asm.jar and cglib-2.3.1.jar from the hibernate library and change it to reference
cglib-2.2 library instead in addition to asm-3.1 library.

Anyway, I agree it is too late for 6.5.  I am ok with lowering the priority for this issue since it is not really a
showstopper.

Comment 8 Jayashri Visvanathan 2008-09-05 21:58:08 UTC
Hi Peter,
 Thanks for evaluation. Your proposal makes sense and we'll plan it for post 6.5. Does this mean that users won't be
able to use REST + Hibernate in NetBeans 6.5? You mentioned you got it to work, is that a work around that users could
apply ?

thanks.
Comment 9 Peter Liu 2008-09-05 22:10:29 UTC
I got things to work by building my own version of hibernate library that uses cglib-2.2 and asm-3.1. 

I haven't figured out a workaround, thought.

Comment 10 Jayashri Visvanathan 2008-09-06 00:31:26 UTC
Lowering this to a P3, since we are too close to code freeze to make the changes suggested by Peter.
Comment 11 tprochazka 2008-09-12 16:02:53 UTC
I tested my suggestion and it work. cglib-nodep-2.1_3.jar is the same as 
asm-attrs.jar
asm.jar
cglib-2.1.3.jar

but use another package name for asm which isn't conflict with ASM from Jersey
Comment 12 Vadiraj Deshpande 2008-11-20 09:21:37 UTC
Will re-look in 7.0. But I doubt there could be any agreeable solution to this. There's a tested work-around exists.
Comment 13 ooscarr 2010-02-09 19:05:53 UTC
If you speak Spanish, this tutorial teaches how to update Hibernate library included in Netbeans 6.8 http://javatutoriales.blogspot.com/2009/05/hibernate-parte-2-persistiendo-objetos.html
Comment 14 Milan Kuchtiak 2013-07-31 14:47:04 UTC
May be this is not the issue anymore.
The IDE bundled Hibernate JPA 2.0 contains cglib-2.2 and no asm jars.

Please evaluate.
Comment 15 Sergey Petrov 2013-08-07 13:28:02 UTC
ok, anyway it need to be reevaluated, 3.6.10 contain asm 3.3.1 but it may not be added to classpath by default, and as mentioned cglib have 2.2 version, so if there are any possible issue it need to be reevaluated and filed with more up to date data. Also I hope to change hibernate in next release once again.
regarding removal of some jars, in case of maven some dependencies just can't be removed (as far as I know or it's hard may be), and the library will be used solid with all jars with any aplication deployed on any server.
Close as invalid for 7.4, feel free to file new or reopen with new data.