You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Martin Vysny <mv...@whitestein.com> on 2007/10/12 11:41:29 UTC

OpenEJB and Hibernate

Hi guys,
  I tried to use Hibernate in OpenEJB (our application unfortunately
still does not use JPA - it uses Hibernate directly instead). However,
it seems there is a version clash: OpenEJB requires ASM 2.2.3 while
Hibernate 3.2.4 requires ASM 1.5.3 and they seem to be incompatible:

2007-10-12 11:35:59,222 - ERROR - The bean instances business method
encountered a system exception:
org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
java.lang.NoSuchMethodError:
org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
	at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
	at net.sf.cglib.core.KeyFactory
$Generator.generateClass(KeyFactory.java:173)
	at
net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
	at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
	at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
	at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
	at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
	at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
	at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
	at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
	at
org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
	at
org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
	at
org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
	at
org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
	at 

...

Have you guys tried to use OpenEJB with Hibernate? Can you please
provide me with some hints? Which one is harder: modify Hibernate
to use 2.2.3 or OpenEJB to use 1.5.3? :-)
Many thanks!
Martin


-- 
Mgr. Martin Vysny | mvy@whitestein.com
Software Engineer
Whitestein Technologies s.r.o | www.whitestein.com
Panenska 28 | 811 03 Bratislava | Slovak Republic
Main +421 2 5443-5502 | Direct +421 2 5930-0717


Re: OpenEJB and Hibernate

Posted by Martin Vysny <mv...@whitestein.com>.
On Fri, 2007-10-12 at 12:09 +0200, Jacek Laskowski wrote:
> On 10/12/07, Martin Vysny <mv...@whitestein.com> wrote:
> > Hi guys,
> >   I tried to use Hibernate in OpenEJB (our application unfortunately
> > still does not use JPA - it uses Hibernate directly instead).
> 
> Hi Marin,
> 
> I think it wouldn't change much as far as the issue's concerned.
> 
> >However,
> > it seems there is a version clash: OpenEJB requires ASM 2.2.3 while
> > Hibernate 3.2.4 requires ASM 1.5.3 and they seem to be incompatible:
> 
> Could you describe how you use hibernate and openejb together. It's a
> standalone application that uses openejb embedded or...that's the
> missing puzzle to me to fully understand the scenario. If you could
> send the entire app here, it'd be even better (provided it's not a
> huge app).
> 

Hi Jacek,
  thanks for reply ;) Well, we are moving our application to a JEE
environment. The application uses Hibernate (through the
org.hibernate.Session, not through JPA API) so I have to package
Hibernate along with the application (and make it to play well with JTA
and container-managed transactions). So, because of compatibility
reasons, it has to be Hibernate.

> > Have you guys tried to use OpenEJB with Hibernate?
> 
> I'm not. OpenEJB 3 uses OpenJPA underneath and although it's
> technically possible to run with other JPA provider noone I heard of
> have tried it.
> 
> > Can you please provide me with some hints? Which one is harder: modify Hibernate
> > to use 2.2.3 or OpenEJB to use 1.5.3? :-)
> 
> I'd go for removing the older asm library in hibernate, but it's a
> shot in the dark that might not bring anything workable.
> 

Yeah, that's probably the way to go. We'll try something and I'll post
here later.

-- 
Mgr. Martin Vysny | mvy@whitestein.com
Software Engineer
Whitestein Technologies s.r.o | www.whitestein.com
Panenska 28 | 811 03 Bratislava | Slovak Republic
Main +421 2 5443-5502 | Direct +421 2 5930-0717


Re: OpenEJB and Hibernate

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/12/07, Martin Vysny <mv...@whitestein.com> wrote:
> Hi guys,
>   I tried to use Hibernate in OpenEJB (our application unfortunately
> still does not use JPA - it uses Hibernate directly instead).

Hi Marin,

I think it wouldn't change much as far as the issue's concerned.

>However,
> it seems there is a version clash: OpenEJB requires ASM 2.2.3 while
> Hibernate 3.2.4 requires ASM 1.5.3 and they seem to be incompatible:

Could you describe how you use hibernate and openejb together. It's a
standalone application that uses openejb embedded or...that's the
missing puzzle to me to fully understand the scenario. If you could
send the entire app here, it'd be even better (provided it's not a
huge app).

> Have you guys tried to use OpenEJB with Hibernate?

I'm not. OpenEJB 3 uses OpenJPA underneath and although it's
technically possible to run with other JPA provider noone I heard of
have tried it.

> Can you please provide me with some hints? Which one is harder: modify Hibernate
> to use 2.2.3 or OpenEJB to use 1.5.3? :-)

I'd go for removing the older asm library in hibernate, but it's a
shot in the dark that might not bring anything workable.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Repackaging ASM (was: Fwd: OpenEJB and Hibernate)

Posted by David Blevins <da...@visi.com>.
Looks like Martin got passed the ASM issues for Hibernate use, but we  
should definitely get our ASM usage repackaged so no one else has to  
go to so much hassle.

I'll try to look into this (still catching up on email).

-David


Begin forwarded message:

> From: Martin Vysny <mv...@whitestein.com>
> Date: October 15, 2007 2:06:42 AM PDT
> To: users@openejb.apache.org
> Subject: Re: OpenEJB and Hibernate
> Reply-To: users@openejb.apache.org
>
>
> On Fri, 2007-10-12 at 13:54 -0700, Dain Sundstrom wrote:
>> On Oct 12, 2007, at 2:41 AM, Martin Vysny wrote:
>>
>>> Hi guys,
>>>   I tried to use Hibernate in OpenEJB (our application unfortunately
>>> still does not use JPA - it uses Hibernate directly instead).  
>>> However,
>>> it seems there is a version clash: OpenEJB requires ASM 2.2.3 while
>>> Hibernate 3.2.4 requires ASM 1.5.3 and they seem to be incompatible:
>>>
>>> ...
>>>
>>> Have you guys tried to use OpenEJB with Hibernate? Can you please
>>> provide me with some hints? Which one is harder: modify Hibernate
>>> to use 2.2.3 or OpenEJB to use 1.5.3? :-)
>>
>> I wouldn't try to modify either; I'd repackage.  Most projects seem
>> to repackage asm to avoid such conflicts, and I'd guess they do it
>> because Hibernate is not repackaging :)
>>
>> The ASM FAQ suggests (http://asm.objectweb.org/doc/faq.html) jarjar.
>> If you can figure out how to do this, that would be awesome.  We can
>> simply add the repackaged jar to our svn repository.
>>
>> -dain
>>
>
> Thanks very much for the idea, but we found an easier way to resolve
> this issue: [1]. Now can you help us where to look for
> TransactionManager in JNDI? Hibernate requires it when using CMP
> persistency. Thanks!
> Martin
>
>
> [1]
> http://andersnoras.com/blogs/anoras/archive/2007/09/04/resolving- 
> asm-dependency-conflicts.aspx
>
>>
>>
>>
>>
> -- 
> Mgr. Martin Vysny | mvy@whitestein.com
> Software Engineer
> Whitestein Technologies s.r.o | www.whitestein.com
> Panenska 28 | 811 03 Bratislava | Slovak Republic
> Main +421 2 5443-5502 | Direct +421 2 5930-0717
>


Re: OpenEJB and Hibernate

Posted by Dain Sundstrom <da...@iq80.com>.
On Oct 18, 2007, at 7:28 AM, Martin Vysny wrote:

> On Thu, 2007-10-18 at 16:09 +0200, Jacek Laskowski wrote:
>> On 10/18/07, Martin Vysny <mv...@whitestein.com> wrote:
>>
>>> The project's not that unusual - simply we can't use JPA nor EJB3.0,
>>> because our product will finally be deployed on WebSphere6.1  
>>> (without
>>> EJB3.0 patches). OpenEJB is a great platform for development of J2EE
>>> application - we are trying simply to get a rapid development of JEE
>>> application on Eclipse. So, the only really interesting point is:  
>>> how
>>> one can integrate Hibernate (or JPA Hibernate aspect) with CMP on
>>> OpenEJB.
>>
>> Where is Hibernate being used? Is it part of MDB or SLSB? Is BMP with
>> Hibernate not an option as far as ejb2.1's concerned? Where would
>> hibernate help openejb3 to mimic the target websphere 6.1 server?
>>
>> Jacek
>
> Thanks for your concern! ;) Our legacy application is using  
> Hibernate as
> the persistence provider - JEE Entity Beans are not used at all. So we
> had to embed Hibernate into our EAR and deploy it on target AS. BMP  
> is a
> valid option but we wanted CMP (descriptive transactions). So, if you
> are building normal JEE application with entity beans or JPA you'll
> probably never need to embed Hibernate.

JPA has a design very similar to Hibernate, and you can bundle a JPA  
implementation, such as OpenJPA, with your application.  As long as  
you are on Java5+ in WepSphere, OpenJPA should run fine.  Of course,  
your application is already written so, I doubt you'll want to switch  
to JPA right now.

-dain


Re: OpenEJB and Hibernate

Posted by Martin Vysny <mv...@whitestein.com>.
On Thu, 2007-10-18 at 16:09 +0200, Jacek Laskowski wrote:
> On 10/18/07, Martin Vysny <mv...@whitestein.com> wrote:
> 
> > The project's not that unusual - simply we can't use JPA nor EJB3.0,
> > because our product will finally be deployed on WebSphere6.1 (without
> > EJB3.0 patches). OpenEJB is a great platform for development of J2EE
> > application - we are trying simply to get a rapid development of JEE
> > application on Eclipse. So, the only really interesting point is: how
> > one can integrate Hibernate (or JPA Hibernate aspect) with CMP on
> > OpenEJB.
> 
> Where is Hibernate being used? Is it part of MDB or SLSB? Is BMP with
> Hibernate not an option as far as ejb2.1's concerned? Where would
> hibernate help openejb3 to mimic the target websphere 6.1 server?
> 
> Jacek

Thanks for your concern! ;) Our legacy application is using Hibernate as
the persistence provider - JEE Entity Beans are not used at all. So we
had to embed Hibernate into our EAR and deploy it on target AS. BMP is a
valid option but we wanted CMP (descriptive transactions). So, if you
are building normal JEE application with entity beans or JPA you'll
probably never need to embed Hibernate.

Martin
PS: It's part of SLSB


Re: OpenEJB and Hibernate

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/18/07, Martin Vysny <mv...@whitestein.com> wrote:

> The project's not that unusual - simply we can't use JPA nor EJB3.0,
> because our product will finally be deployed on WebSphere6.1 (without
> EJB3.0 patches). OpenEJB is a great platform for development of J2EE
> application - we are trying simply to get a rapid development of JEE
> application on Eclipse. So, the only really interesting point is: how
> one can integrate Hibernate (or JPA Hibernate aspect) with CMP on
> OpenEJB.

Where is Hibernate being used? Is it part of MDB or SLSB? Is BMP with
Hibernate not an option as far as ejb2.1's concerned? Where would
hibernate help openejb3 to mimic the target websphere 6.1 server?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: OpenEJB and Hibernate

Posted by Martin Vysny <mv...@whitestein.com>.
On Wed, 2007-10-17 at 10:02 +0200, Jacek Laskowski wrote:
> On 10/17/07, Martin Vysny <mv...@whitestein.com> wrote:
> 
> > Sure, I'll try to prepare a sample project based on OpenEJB example
> > projects. It will take time though - please be patient ;)
> 
> Just write some major points and we try to figure it out ourselves if
> you're swamped with other tasks. It's such an unsual example that only
> if I see this as an fully working application I'd be able to get the
> gist of it.
> 
> Jacek
> 

The project's not that unusual - simply we can't use JPA nor EJB3.0,
because our product will finally be deployed on WebSphere6.1 (without
EJB3.0 patches). OpenEJB is a great platform for development of J2EE
application - we are trying simply to get a rapid development of JEE
application on Eclipse. So, the only really interesting point is: how
one can integrate Hibernate (or JPA Hibernate aspect) with CMP on
OpenEJB. I can put up a small example of EJB2.1 application (a single
stateless bean and a mdb bean, plus a Hibernate bean) if you are
interested though.
Martin


Re: OpenEJB and Hibernate

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/17/07, Martin Vysny <mv...@whitestein.com> wrote:

> Sure, I'll try to prepare a sample project based on OpenEJB example
> projects. It will take time though - please be patient ;)

Just write some major points and we try to figure it out ourselves if
you're swamped with other tasks. It's such an unsual example that only
if I see this as an fully working application I'd be able to get the
gist of it.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: OpenEJB and Hibernate

Posted by Martin Vysny <mv...@whitestein.com>.
On Tue, 2007-10-16 at 21:57 +0200, Jacek Laskowski wrote:
> On 10/16/07, Martin Vysny <mv...@whitestein.com> wrote:
> 
> > Okay, it's java:comp/TransactionManager from within a bean, or
> > java:openejb/TransactionManager from outside a bean ;) We are using
> > Hibernate via the JPA interface as follows:
> >
> > package com.whitestein.fe.impl.config;
> >
> > import org.hibernate.transaction.JNDITransactionManagerLookup;
> >
> > /**
> >  * Hibernate Transaction manager lookup strategy for OpenEJB.
> >  *
> >  * @author mvy
> >  */
> > public class OpenEJBTransactionManagerLookup extends
> >                 JNDITransactionManagerLookup {
> >
> >         @Override
> >         protected String getName() {
> >                 return "java:comp/TransactionManager"; //$NON-NLS-1$
> >         }
> >
> >         public String getUserTransactionName() {
> >                 return "java:comp/UserTransaction"; //$NON-NLS-1$
> >         }
> >
> > }
> >
> >
> > properties.put(Environment.DIALECT, dbDialect);
> > properties.put(Environment.TRANSACTION_MANAGER_STRATEGY,
> > OpenEJBTransactionManagerLookup.class.getName());
> > properties.put(Environment.TRANSACTION_STRATEGY,
> > CMTTransactionFactory.class.getName());
> > properties.put(Environment.JNDI_CLASS,
> > "org.apache.openejb.client.LocalInitialContextFactory");
> > entityManagerFactory = Persistence.createEntityManagerFactory(
> > persistenceUnitName, properties);
> >
> > This way, Hibernate joins the container transactions.
> 
> Awesome. I wouldn't imagine such stuff is possible in/with OpenEJB.
> Even after so long with openejb I can learn new stuff. It'd be great
> if you could share the app or better yet write a doc how to work with
> hibernate and openejb together. Would you mind? ;-)
> 
> Jacek
> 

Sure, I'll try to prepare a sample project based on OpenEJB example
projects. It will take time though - please be patient ;)
Martin


Re: OpenEJB and Hibernate

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/16/07, Martin Vysny <mv...@whitestein.com> wrote:

> Okay, it's java:comp/TransactionManager from within a bean, or
> java:openejb/TransactionManager from outside a bean ;) We are using
> Hibernate via the JPA interface as follows:
>
> package com.whitestein.fe.impl.config;
>
> import org.hibernate.transaction.JNDITransactionManagerLookup;
>
> /**
>  * Hibernate Transaction manager lookup strategy for OpenEJB.
>  *
>  * @author mvy
>  */
> public class OpenEJBTransactionManagerLookup extends
>                 JNDITransactionManagerLookup {
>
>         @Override
>         protected String getName() {
>                 return "java:comp/TransactionManager"; //$NON-NLS-1$
>         }
>
>         public String getUserTransactionName() {
>                 return "java:comp/UserTransaction"; //$NON-NLS-1$
>         }
>
> }
>
>
> properties.put(Environment.DIALECT, dbDialect);
> properties.put(Environment.TRANSACTION_MANAGER_STRATEGY,
> OpenEJBTransactionManagerLookup.class.getName());
> properties.put(Environment.TRANSACTION_STRATEGY,
> CMTTransactionFactory.class.getName());
> properties.put(Environment.JNDI_CLASS,
> "org.apache.openejb.client.LocalInitialContextFactory");
> entityManagerFactory = Persistence.createEntityManagerFactory(
> persistenceUnitName, properties);
>
> This way, Hibernate joins the container transactions.

Awesome. I wouldn't imagine such stuff is possible in/with OpenEJB.
Even after so long with openejb I can learn new stuff. It'd be great
if you could share the app or better yet write a doc how to work with
hibernate and openejb together. Would you mind? ;-)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: OpenEJB and Hibernate

Posted by Martin Vysny <mv...@whitestein.com>.
On Mon, 2007-10-15 at 11:06 +0200, Martin Vysny wrote:
> On Fri, 2007-10-12 at 13:54 -0700, Dain Sundstrom wrote:
> > On Oct 12, 2007, at 2:41 AM, Martin Vysny wrote:
> > 
> > > Hi guys,
> > >   I tried to use Hibernate in OpenEJB (our application unfortunately
> > > still does not use JPA - it uses Hibernate directly instead). However,
> > > it seems there is a version clash: OpenEJB requires ASM 2.2.3 while
> > > Hibernate 3.2.4 requires ASM 1.5.3 and they seem to be incompatible:
> > >
> > > ...
> > >
> > > Have you guys tried to use OpenEJB with Hibernate? Can you please
> > > provide me with some hints? Which one is harder: modify Hibernate
> > > to use 2.2.3 or OpenEJB to use 1.5.3? :-)
> > 
> > I wouldn't try to modify either; I'd repackage.  Most projects seem  
> > to repackage asm to avoid such conflicts, and I'd guess they do it  
> > because Hibernate is not repackaging :)
> > 
> > The ASM FAQ suggests (http://asm.objectweb.org/doc/faq.html) jarjar.   
> > If you can figure out how to do this, that would be awesome.  We can  
> > simply add the repackaged jar to our svn repository.
> > 
> > -dain
> > 
> 
> Thanks very much for the idea, but we found an easier way to resolve
> this issue: [1]. Now can you help us where to look for
> TransactionManager in JNDI? Hibernate requires it when using CMP
> persistency. Thanks!

Okay, it's java:comp/TransactionManager from within a bean, or
java:openejb/TransactionManager from outside a bean ;) We are using
Hibernate via the JPA interface as follows:

package com.whitestein.fe.impl.config;

import org.hibernate.transaction.JNDITransactionManagerLookup;

/**
 * Hibernate Transaction manager lookup strategy for OpenEJB.
 * 
 * @author mvy
 */
public class OpenEJBTransactionManagerLookup extends
		JNDITransactionManagerLookup {

	@Override
	protected String getName() {
		return "java:comp/TransactionManager"; //$NON-NLS-1$
	}

	public String getUserTransactionName() {
		return "java:comp/UserTransaction"; //$NON-NLS-1$
	}

}


properties.put(Environment.DIALECT, dbDialect);
properties.put(Environment.TRANSACTION_MANAGER_STRATEGY,
OpenEJBTransactionManagerLookup.class.getName());
properties.put(Environment.TRANSACTION_STRATEGY,
CMTTransactionFactory.class.getName());
properties.put(Environment.JNDI_CLASS,
"org.apache.openejb.client.LocalInitialContextFactory");
entityManagerFactory = Persistence.createEntityManagerFactory(
persistenceUnitName, properties);

This way, Hibernate joins the container transactions.

Martin Vysny


Re: OpenEJB and Hibernate

Posted by Martin Vysny <mv...@whitestein.com>.
On Fri, 2007-10-12 at 13:54 -0700, Dain Sundstrom wrote:
> On Oct 12, 2007, at 2:41 AM, Martin Vysny wrote:
> 
> > Hi guys,
> >   I tried to use Hibernate in OpenEJB (our application unfortunately
> > still does not use JPA - it uses Hibernate directly instead). However,
> > it seems there is a version clash: OpenEJB requires ASM 2.2.3 while
> > Hibernate 3.2.4 requires ASM 1.5.3 and they seem to be incompatible:
> >
> > ...
> >
> > Have you guys tried to use OpenEJB with Hibernate? Can you please
> > provide me with some hints? Which one is harder: modify Hibernate
> > to use 2.2.3 or OpenEJB to use 1.5.3? :-)
> 
> I wouldn't try to modify either; I'd repackage.  Most projects seem  
> to repackage asm to avoid such conflicts, and I'd guess they do it  
> because Hibernate is not repackaging :)
> 
> The ASM FAQ suggests (http://asm.objectweb.org/doc/faq.html) jarjar.   
> If you can figure out how to do this, that would be awesome.  We can  
> simply add the repackaged jar to our svn repository.
> 
> -dain
> 

Thanks very much for the idea, but we found an easier way to resolve
this issue: [1]. Now can you help us where to look for
TransactionManager in JNDI? Hibernate requires it when using CMP
persistency. Thanks!
Martin


[1]
http://andersnoras.com/blogs/anoras/archive/2007/09/04/resolving-asm-dependency-conflicts.aspx

> 
> 
> 
> 
-- 
Mgr. Martin Vysny | mvy@whitestein.com
Software Engineer
Whitestein Technologies s.r.o | www.whitestein.com
Panenska 28 | 811 03 Bratislava | Slovak Republic
Main +421 2 5443-5502 | Direct +421 2 5930-0717


Re: OpenEJB and Hibernate

Posted by Dain Sundstrom <da...@iq80.com>.
On Oct 13, 2007, at 11:01 AM, Jacek Laskowski wrote:

> On 10/13/07, Dain Sundstrom <da...@iq80.com> wrote:
>
>> When you jarjar ASM, you'll get a new jar with all the code in new
>> packages.
>
> Ah, that makes sense, but begs a question about legal issues
> associated with such a repackaging. Could we ship openejb3 with these
> repackaged asm packages?

Yes, ASM is licensed under ASL... it's a fairly common practice.

-dain

Re: OpenEJB and Hibernate

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/13/07, Dain Sundstrom <da...@iq80.com> wrote:

> When you jarjar ASM, you'll get a new jar with all the code in new
> packages.

Ah, that makes sense, but begs a question about legal issues
associated with such a repackaging. Could we ship openejb3 with these
repackaged asm packages?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: OpenEJB and Hibernate

Posted by Dain Sundstrom <da...@iq80.com>.
On Oct 12, 2007, at 2:59 PM, Jacek Laskowski wrote:

> On 10/12/07, Dain Sundstrom <da...@iq80.com> wrote:
>
>> The ASM FAQ suggests (http://asm.objectweb.org/doc/faq.html) jarjar.
>> If you can figure out how to do this, that would be awesome.  We can
>> simply add the repackaged jar to our svn repository.
>
> That's what I can't understand - what jar are you thinking about?
> Could you elaborate?

When you jarjar ASM, you'll get a new jar with all the code in new  
packages.

-dain

Re: OpenEJB and Hibernate

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/12/07, Dain Sundstrom <da...@iq80.com> wrote:

> I wouldn't try to modify either; I'd repackage.  Most projects seem
> to repackage asm to avoid such conflicts, and I'd guess they do it
> because Hibernate is not repackaging :)

Awesome! I have read about jarjar, but it appears I misunderstood its
purpose. Now, it's clearer.

> The ASM FAQ suggests (http://asm.objectweb.org/doc/faq.html) jarjar.
> If you can figure out how to do this, that would be awesome.  We can
> simply add the repackaged jar to our svn repository.

That's what I can't understand - what jar are you thinking about?
Could you elaborate?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: OpenEJB and Hibernate

Posted by Dain Sundstrom <da...@iq80.com>.
On Oct 12, 2007, at 2:41 AM, Martin Vysny wrote:

> Hi guys,
>   I tried to use Hibernate in OpenEJB (our application unfortunately
> still does not use JPA - it uses Hibernate directly instead). However,
> it seems there is a version clash: OpenEJB requires ASM 2.2.3 while
> Hibernate 3.2.4 requires ASM 1.5.3 and they seem to be incompatible:
>
> ...
>
> Have you guys tried to use OpenEJB with Hibernate? Can you please
> provide me with some hints? Which one is harder: modify Hibernate
> to use 2.2.3 or OpenEJB to use 1.5.3? :-)

I wouldn't try to modify either; I'd repackage.  Most projects seem  
to repackage asm to avoid such conflicts, and I'd guess they do it  
because Hibernate is not repackaging :)

The ASM FAQ suggests (http://asm.objectweb.org/doc/faq.html) jarjar.   
If you can figure out how to do this, that would be awesome.  We can  
simply add the repackaged jar to our svn repository.

-dain