<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem accessing JCR via JNDI in Alfresco 2.1 in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problem-accessing-jcr-via-jndi-in-alfresco-2-1/m-p/93464#M63965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've followed the article &lt;/SPAN&gt;&lt;A href="http://issues.alfresco.com/browse/AR-1131" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com/browse/AR-1131&lt;/A&gt;&lt;SPAN&gt; in order to access JCR via JNDI. It works in Alfresco 2.0, but when I've tried the same in Alfresco 2.1, it doesn't work. I've gotten the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:525)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:349)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:255)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:102)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Proxy29.authenticate(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:217)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:246)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone could help me?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Saul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jul 2007 08:14:17 GMT</pubDate>
    <dc:creator>snavarrob</dc:creator>
    <dc:date>2007-07-24T08:14:17Z</dc:date>
    <item>
      <title>Problem accessing JCR via JNDI in Alfresco 2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-accessing-jcr-via-jndi-in-alfresco-2-1/m-p/93464#M63965</link>
      <description>Hi,I've followed the article http://issues.alfresco.com/browse/AR-1131 in order to access JCR via JNDI. It works in Alfresco 2.0, but when I've tried the same in Alfresco 2.1, it doesn't work. I've gotten the following error&lt;IMG id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;rg.springframework.transaction.CannotCreateTransactionException: Could not</description>
      <pubDate>Tue, 24 Jul 2007 08:14:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-accessing-jcr-via-jndi-in-alfresco-2-1/m-p/93464#M63965</guid>
      <dc:creator>snavarrob</dc:creator>
      <dc:date>2007-07-24T08:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem accessing JCR via JNDI in Alfresco 2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-accessing-jcr-via-jndi-in-alfresco-2-1/m-p/93465#M63966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem with Alfresco 2.1 is the result of an update made by Steve Ebersole to Hibernate 3 in November of 2006:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Author: steve.ebersole at jboss.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Date: 2006-11-03 11:23:21 -0500 (Fri, 03 Nov 2006)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;New Revision: 10715&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The change added a new ConnectionWrapper interface and modified the BorrowedConnectionProxy class to include the new interface in its list of proxied interfaces. Unfortunately, this change breaks Russ Danner's JCR JNDI bridge since Hibernate attempts to load the ConnectionWrapper interface from the calling thread's ContextClassLoader. The interface, of course, is not accessible since it lives in the Hibernate jar within the classloader for the Alfresco web application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One workaround for this issue is to remove the ConnectionWrapper class from the PROXY_INTERFACES array in BorrowedConnectionProxy. I have tested this solution on Tomcat by placing the modified class into the classes directory within the Alfresco WEB-INF directory to override the original hibernate class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While the above solution works, it might cause issues if the ConnectionWrapper interface is being used somewhere within Alfresco to access the underlying JDBC connection. This impact of this change is not clear since I do not fully understand the reasoning behind Steve Ebersole's change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another possible solution might be to extract the ConnectionWrapper interface from the Hibernate jar and place it into a class loader visible across applications. I have not tested this solution but expect it would also work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The final solution that comes to mind would be to swap out the Thread ContectClassloader before calling the Alfresco JCR interface. This seems like the better solution but I have not worked through the details of how this might be implemented.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 05:01:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-accessing-jcr-via-jndi-in-alfresco-2-1/m-p/93465#M63966</guid>
      <dc:creator>davidtaylor</dc:creator>
      <dc:date>2007-08-16T05:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem accessing JCR via JNDI in Alfresco 2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-accessing-jcr-via-jndi-in-alfresco-2-1/m-p/93466#M63967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Has anyone done any further research into this matter?&amp;nbsp; We're using JCR through JNDI right now with version 2.0.1E, and we're stuck trying to upgrade to 2.1.2E until we can get around this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently implementing one of Mr. Taylor's solutions:&amp;nbsp; I've removed the org/hibernate/jdbc/ConnectionWrapper.class file from hibernate-3.2.1.jar and added it to $CATALINA_HOME/common/classes/org/hibernate/jdbc, and it seems to be working.&amp;nbsp; This is fairly gross (for lack of a better description), and I worry about our ability to upgrade in the future.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What are other people doing for this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 22:57:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-accessing-jcr-via-jndi-in-alfresco-2-1/m-p/93466#M63967</guid>
      <dc:creator>daniel_robert</dc:creator>
      <dc:date>2008-04-09T22:57:07Z</dc:date>
    </item>
  </channel>
</rss>

