Questions Tagged With ivyhttps://answers.axonivy.com/tags/ivy/?type=rss&user=Alexisquestions tagged <span class="tag">ivy</span>enTue, 09 Sep 2014 14:41:36 -0400Not visible Interface on persistence queryhttps://answers.axonivy.com/questions/945/not-visible-interface-on-persistence-query<p>Calling a query on a table with BLOBs (Files in Tables) using the jTDS-Driver I get a class-loader error:</p> <p><code>java.lang.IllegalArgumentException: interface org.hibernate.engine.jdbc.WrappedBlob is not visible from class loader</code></p> <p>My Solution was to switch to an other classloader:</p> <pre><code> public synchronized void method() { Thread thread = Thread.currentThread(); ClassLoader tempLoader = thread.getContextClassLoader(); thread.setContextClassLoader(null); entityManager.createNativeQuery("select * from TSRPTBLB where TSBID = 1 ") .getSingleResult(); thread.setContextClassLoader(tempLoader); } </code></pre> <p>Will there be any other, cleaner way than switsching the classloader?</p> <p>Thank you in advance</p>AlexisTue, 09 Sep 2014 14:41:36 -0400https://answers.axonivy.com/questions/945/not-visible-interface-on-persistence-queryjavaivypersistence