users@glassfish.java.net

Re: Running embedded test with multimodule project

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Fri, 18 Jun 2010 13:33:33 -0700

Major Péter wrote:
>> The instance.root property is mentioned in
>> http://docs.sun.com/app/docs/doc/821-1208/gjldt?a=view but not the
>> install.root. This is because the supported configuration for 3.0 was
>> not a maven setup that you use, but running using a plain classpath with
>> the pre-installed GF.
>>
>> Feel free to file a docs RFE for 3.1 ;).
>>
>
> done, https://glassfish.dev.java.net/issues/show_bug.cgi?id=12292 ;)
>

Thanks.
> I now have an another issue with Hibernate. From my standalone GlassFish
> I have copied the necessary jar's to my install.root/lib folder and the
> Hibernate is working for compiling my namedqueries and such, but when it
> comes to javassist, then I got:
> 2010.06.18. 21:40:30
> org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer getProxyFactory
> SEVERE: Javassist Enhancement failed: hu.sch.domain.Valuation
> java.lang.RuntimeException: by java.lang.NoClassDefFoundError:
> org/hibernate/proxy/HibernateProxy
>
> with a really long stacktrace for all of my entities. The funny part is
> that the test runs flawlessly with correct result. Is this some kind of
> class-loading issue?
>

Kind-of. It's your entities classloading that Hibernate wants to
participate in, but because there are no fancy classloader support in
embedded mode, they fail. If you do not rely on lazy loading or any
special detection of changes, your test will go through.

For EclipseLink we disable weaving in embedded mode. Check if there is a
setting in Hibernate to disable it to, and see if the error goes away.
(If it does, let us know and we might be able to encode the setting).

You can file another RFE (this one under entity-persistence), but it
won't be as easy to implement as making changes to the doc...
> When I direct the EJBContainer to my standalone configuration then the
> query-compiling will fail with noclassdeffounderror. :/
> The hibernate was installed with updatetool.
>

Check the classpath...

Best,
-marina
> Thanks,
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>