-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: createClob on Weblogic
PostPosted: Sat Jun 22, 2013 2:08 pm 
Newbie

Joined: Sat Jun 22, 2013 11:57 am
Posts: 1
The following code (4.2.2.Final) works fine in a standalone test:
Clob clob = (Clob)NonContextualLobCreator.INSTANCE.createClob( text );

But running in Weblogic 12c:
IllegalArgumentException: interface org.hibernate.engine.jdbc.ClobImplementer is not visible from class loader

Any suggestions?


Top
 Profile  
 
 Post subject: Re: createClob on Weblogic
PostPosted: Fri Jun 28, 2013 8:20 am 
Newbie

Joined: Fri Jun 28, 2013 8:15 am
Posts: 1
We are getting the exact same exception, with a different environment.
JBoss AS7 7.2.0.Final, Windows, JDK 1.7.0_13, Hibernate 4.2.2.Final, Postgres 9.1

We are using Hibernate JPA in the JBoss OSGi container.
When one of our services attempts to persist an entity with a field marked as @Lob the persistence fails with the exception message mentioned above.

This appears to be an issue with the way the ClobProxy is creating its Proxy instance over interfaces Clob and ClobImplementer.

The class loader that is used to initialise the PROXY_INTERFACES array may not be the same as the one returned by the ClassLoaderHelper.

Does anyone know why the ClassLoaderHelper is being used ?

It seems that just using the classloader assigned to Clob (and ClobImplementer) would be the right choice to use.

Code:
  private static final Class[] PROXY_INTERFACES = { Clob.class, ClobImplementer.class };

. . .

public static Clob generateProxy(String string)
  {
    return (Clob)Proxy.newProxyInstance(getProxyClassLoader(), PROXY_INTERFACES, new ClobProxy(string));
  }

. . .
protected static ClassLoader getProxyClassLoader()
  {
    ClassLoader cl = ClassLoaderHelper.getContextClassLoader();
    if (cl == null) {
      cl = ClobImplementer.class.getClassLoader();
    }
    return cl;
  }


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.