<?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 Accessing Aflresco from Different VM using JNDI in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241088#M194218</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 want alfresco repository to access from different java program which is running different vm, here is what i did.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) In stalled Alfresco 3.2Ent trail version and it is up and running,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) I downloaded 3.2Community sdk set it up in eclipse, without starting tomcat from step 1 i am able to run sample program provided by sdk through eclipse.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Now i downloaded jcr-jndi adaptor and configured it in Alfresco 3.2Ent setup and the test webapp is running perfectly. Since testwebapp jcrJndiTest and alfresco are in same jvm (under tomcat) JNDI worked perfectly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now what i am trying is to access the repository present in Alfresco 3.2 Ent into Alfresci 3.2 sdk from eclipse using JNDI. I included alfresco-jcr-jndi-bridge.jar in "SDK AlfrescoEmbedded" project and trying to access jcr repository "jcr/baseRepository " using the factory "org.alfresco.jcr.jndi.JndiJcrObjectFactory" as follows, i also tried removing jcr api from "SDK AlfrescoEmbedded" (ofcourse which is dump thing). I didnt succeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hashtable env = new Hashtable(11);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.put(Context.INITIAL_CONTEXT_FACTORY,"org.alfresco.jcr.jndi.JndiJcrObjectFactory");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Context ctx = new InitialContext(env);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vNamingContext = new InitialContext(env);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vNamingContext = (Context)vNamingContext.lookup("java:comp/env");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am getting following exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;error during JNDI lookup for [jcr/baseRepository] [javax.naming.NoInitialContextException: Cannot instantiate class: org.alfresco.jcr.jndi.JndiJcrObjectFactory [Root exception is java.lang.ClassCastException: org.alfresco.jcr.jndi.JndiJcrObjectFactory]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;javax.naming.NoInitialContextException: Cannot instantiate class: org.alfresco.jcr.jndi.JndiJcrObjectFactory [Root exception is java.lang.ClassCastException: org.alfresco.jcr.jndi.JndiJcrObjectFactory]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at javax.naming.InitialContext.init(InitialContext.java:223)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at javax.naming.InitialContext.&amp;lt;init&amp;gt;(InitialContext.java:197)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.alfresco.sample.jcr.JNDITest.lookupJndiJcr(JNDITest.java:118)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.alfresco.sample.jcr.JNDITest.main(JNDITest.java:61)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: java.lang.ClassCastException: org.alfresco.jcr.jndi.JndiJcrObjectFactory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;… 5 more&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception in thread "main" java.lang.NullPointerException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.alfresco.sample.jcr.JNDITest.main(JNDITest.java:69)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sanat.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Feb 2010 09:07:14 GMT</pubDate>
    <dc:creator>sanatmastan</dc:creator>
    <dc:date>2010-02-05T09:07:14Z</dc:date>
    <item>
      <title>Accessing Aflresco from Different VM using JNDI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241088#M194218</link>
      <description>HiI want alfresco repository to access from different java program which is running different vm, here is what i did.1) In stalled Alfresco 3.2Ent trail version and it is up and running,2) I downloaded 3.2Community sdk set it up in eclipse, without starting tomcat from step 1 i am able to run sample</description>
      <pubDate>Fri, 05 Feb 2010 09:07:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241088#M194218</guid>
      <dc:creator>sanatmastan</dc:creator>
      <dc:date>2010-02-05T09:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Aflresco from Different VM using JNDI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241089#M194219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please reply for this????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:03:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241089#M194219</guid>
      <dc:creator>sanatmastan</dc:creator>
      <dc:date>2010-02-08T11:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Aflresco from Different VM using JNDI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241090#M194220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;guys any update???????&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2010 05:44:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241090#M194220</guid>
      <dc:creator>sanatmastan</dc:creator>
      <dc:date>2010-02-10T05:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Aflresco from Different VM using JNDI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241091#M194221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As far as i can tell, JCR over JNDI was only supported up to 2.0.&amp;nbsp; I never got it working in 2.2.&amp;nbsp; There doesn't seem to be much momentum in the industry behind the JCR api, so i would integrate new apps using CMIS api, or if you're still on an older alfresco a custom webscript closely following the CMIS standard.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- hitesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 23:58:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-aflresco-from-different-vm-using-jndi/m-p/241091#M194221</guid>
      <dc:creator>hiteshlad</dc:creator>
      <dc:date>2010-06-21T23:58:07Z</dc:date>
    </item>
  </channel>
</rss>

