<?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 Re: How to acess repository using JCR and a Session Bean in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86072#M58132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the prompt reply David, that has helped but I am still a bit confused about accessing it via spring.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It sounds like I need to bootstrap an instance of JCR.Repository via spring, rather than hook into the existing instance in the Alfresco spring context. Does that sound correct? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I do need to bootstrap it myself, I will obviously need to copy the application-context.xml into my classpath. I guess I will also need my config files from "default\conf\alfresco\extension" in my class path for the session bean. Do I need any other spring config files?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I on the right track here? I have a feeling I have lost the plot somewhere along the line…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2007 20:52:49 GMT</pubDate>
    <dc:creator>pinkman</dc:creator>
    <dc:date>2007-08-01T20:52:49Z</dc:date>
    <item>
      <title>How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86070#M58130</link>
      <description>In a nutshell, I want to connect to an Alfresco repository from a session bean. It will be running on the same JBoss instance as Alfresco (tho that could change in the future).I would prefer JCR as I am a standards freak, tho I can't get my head around how to connect to a pre-existing repository. Th</description>
      <pubDate>Wed, 01 Aug 2007 04:11:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86070#M58130</guid>
      <dc:creator>pinkman</dc:creator>
      <dc:date>2007-08-01T04:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86071#M58131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not (yet) familiar with the jcr jndi project, but I can tell you about the canonical (in-process) way to get a reference to the Alfresco JCR Repository interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alfresco's JCR Repository is a Spring Bean called 'JCR.Repository'.&amp;nbsp; So, you write:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Repository repository = (Repository)context.getBean("JCR.Repository");&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;where context is the Spring Application Context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How to the get the Spring context?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either create explicitly using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ApplicationContext context = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;or hook into a web application configured one:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a) web.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp; &amp;lt;listener&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;listener-class&amp;gt;org.springframework.web.context.ContextLoaderListener&amp;lt;/listener-class&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/listener&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;context-param&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-name&amp;gt;contextConfigLocation&amp;lt;/param-name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; classpath:alfresco/application-context.xml &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/param-value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;Spring config file locations&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/context-param&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b) Accessed using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;WebApplicationContextUtils.getWebApplicationContext(ServletContext sc);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 10:13:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86071#M58131</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-08-01T10:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86072#M58132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the prompt reply David, that has helped but I am still a bit confused about accessing it via spring.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It sounds like I need to bootstrap an instance of JCR.Repository via spring, rather than hook into the existing instance in the Alfresco spring context. Does that sound correct? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I do need to bootstrap it myself, I will obviously need to copy the application-context.xml into my classpath. I guess I will also need my config files from "default\conf\alfresco\extension" in my class path for the session bean. Do I need any other spring config files?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I on the right track here? I have a feeling I have lost the plot somewhere along the line…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 20:52:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86072#M58132</guid>
      <dc:creator>pinkman</dc:creator>
      <dc:date>2007-08-01T20:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86073#M58133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure of how you've deployed Alfresco - you say its running in the same instance as JBoss.&amp;nbsp; In that case, I'd go for option b), rather than instantiate a new repository.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 09:43:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86073#M58133</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-08-02T09:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86074#M58134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Alfresco is deployed as a war on JBoss. I have manually configured it, ie its not the pre bundled version. It is connecting to a Oracle database. Not sure if that helps, but it's a bit of background at least.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How would I go about connecting to the pre-existing repository bean? doesn't it exist in a different Spring application context?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I run:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ApplicationContext context = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Won't it startup it's own context, and need all of the Alfresco XML files?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, the lightbulb hasn't quite gone off above my head yet &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 20:22:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86074#M58134</guid>
      <dc:creator>pinkman</dc:creator>
      <dc:date>2007-08-02T20:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86075#M58135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The JCR examples use an embedded Alfresco instance, and bind to that URL using RMI. However, Starting an embedded Alfresco instance is pretty heavy weight, and I would need to connect to it over RMI even though it is on the same JBoss instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The other options are to grab the JCR instance from Spring, or to manually create another JCR connection using a JCR implementation (JackRabbit or Alfresco).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesn't look like I can inject the spring bean into my project, or at least I can't figure out how to do it and can't find any examples of this for the JCR. So I guess I need to create another JCR connection?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sure lots of people have done this before, I just wish it was clearer in the wiki. We will be using a plain file system for a large project if I can't get this to work soon &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 04:06:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86075#M58135</guid>
      <dc:creator>pinkman</dc:creator>
      <dc:date>2007-09-04T04:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86076#M58136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've run into the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use, from my Tomcat webapp,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ApplicationContext context = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;on a Tomcat installation with Alfresco &amp;amp; Web Client running next to by webapp, then I get&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;WARN http-8080-Processor25 org.alfresco.repo.content.RoutingContentService - Property 'transactionService' has been replaced by 'retryingTransactionHelper'.&lt;BR /&gt;Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand this as follows: When Alfresco starts up, it creates the beans in its Spring application context. In my webapp, I tell it to create the context again but now of course, it cannot bind once more.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We need a way to get a handle to the spring context without recreating it, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This &lt;/SPAN&gt;&lt;A href="http://springtips.blogspot.com/2007/06/using-shared-parent-application-context.html" rel="nofollow noopener noreferrer"&gt;article&lt;/A&gt;&lt;SPAN&gt; points into this direction but I cannot get it to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can an Alfresco engineer help here, please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This issue has popped up several times in the past (this thread, &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/viewtopic.php?t=9718&amp;amp;highlight=" rel="nofollow noopener noreferrer"&gt;this post&lt;/A&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;A href="http://www.nabble.com/Sakai-and-alfresco-tf4495995.html" rel="nofollow noopener noreferrer"&gt;this one on the Sakai forum&lt;/A&gt;&lt;SPAN&gt; with a recent &lt;/SPAN&gt;&lt;A href="http://www.nabble.com/Re%3A-Sakai-and-alfresco-tf4843683.html" rel="nofollow noopener noreferrer"&gt;follow up&lt;/A&gt;&lt;SPAN&gt;, and &lt;/SPAN&gt;&lt;A href="http://forum.springframework.org/archive/index.php/t-40829.html" rel="nofollow noopener noreferrer"&gt;this one on the Spring forum&lt;/A&gt;&lt;SPAN&gt;) and no solution seems to be publicly available. If we find a solution, I volunter to document it on the Alfresco wiki.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 22:36:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86076#M58136</guid>
      <dc:creator>hbf</dc:creator>
      <dc:date>2007-11-22T22:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86077#M58137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Alfresco_and_Tapestry_on_the_Same_Tomcat_Installation" rel="nofollow noopener noreferrer"&gt;detailed&lt;/A&gt;&lt;SPAN&gt; the steps proposed in this thred on Alfresco's wiki.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps others that need to do a similar thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding the errors that show up in my log (see previous post), I think they are always output but not shown due to a different logging level configuration (I might be wrong, though).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 12:18:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86077#M58137</guid>
      <dc:creator>hbf</dc:creator>
      <dc:date>2007-11-26T12:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86078#M58138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i want to know that how to use oracle for alfresco…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 12:08:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86078#M58138</guid>
      <dc:creator>srikanth</dc:creator>
      <dc:date>2008-04-16T12:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86079#M58139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes the same old story, but i also can´t get the App context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I wrote an Junit test to figure out what it could be. And also added the dependcy to the AlfrescoEmbedded Project, so all things needed should be there , right&amp;nbsp; ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But when i´m&amp;nbsp; running the test im getting this Exception &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [opt/alfresco/tomcat/webapps/WEB-INF/classes/alfresco/application-context.xml]; nested exception is java.io.FileNotFoundException: class path resource [opt/alfresco/tomcat/webapps/WEB-INF/classes/alfresco/application-context.xml] cannot be opened because it does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: java.io.FileNotFoundException: class path resource [opt/alfresco/tomcat/webapps/WEB-INF/classes/alfresco/application-context.xml] cannot be opened because it does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked the location and there is an application-context.xml file. So did ich forget configurating an varible ? Where/Which&amp;nbsp; ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code of the Test&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void testGettingSpringApplicationContext(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Setup Spring&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplicationContext context = new ClassPathXmlApplicationContext("/opt/alfresco/tomcat/webapps/WEB-INF/classes/alfresco/application-context.xml");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertNotNull(context);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 10:39:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86079#M58139</guid>
      <dc:creator>morpheus</dc:creator>
      <dc:date>2008-07-21T10:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86080#M58140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ok , let me correct me own things: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i must appreciate, that this was my failure:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;because in the test. i&amp;nbsp; called the context by an complete path as the parameter! But the class ClassPathXmlApplicationContext searches in the class path for the location "classpath + parameter". so it has go wrong!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but now i got something new. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the following code returns that Exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But now ich checked, that jcr-api-context.xml is in the directory,where it should be !&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Repository repository = (Repository)context.getBean("JCR.Repository");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'JCR.Repository' is defined&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:340)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:906)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:642)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at de.tarent.momeLearnClient.JCRTest.testGettingRepository(JCRTest.java:49)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at java.lang.reflect.Method.invoke(Method.java:597)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2008 10:47:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86080#M58140</guid>
      <dc:creator>morpheus</dc:creator>
      <dc:date>2008-07-22T10:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86081#M58141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello morpheus , &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'JCR.Repository' is defined&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the error that I am also getting, how us solved this problem ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to run the SimpleExample.java program given by the Alfresco in sample programs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ravi Sharma&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 11:25:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86081#M58141</guid>
      <dc:creator>rv_a_sharma</dc:creator>
      <dc:date>2009-03-03T11:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86082#M58142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;But I don't understand if I am just trying the SampleExample.java file distributed along with the Alfresco content. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Its a plain java file and trying to get the Application context. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can get it like . &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CODE: SELECT ALL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Setup Spring and Transaction Service&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:alfresco/application-context.xml");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now using this context I want to get he handle on Repository . This is done in the sample code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But how come its not accepting it . At compile time i have defined that this is going to be the dependency. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But how can i define at the run time that one has to use a class which is available in the package &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CODE: SELECT ALL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class RepositoryImpl implements Repository&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont understand now what should i do to make this standalone sample java run ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ravi Sharma&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 11:49:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86082#M58142</guid>
      <dc:creator>rv_a_sharma</dc:creator>
      <dc:date>2009-03-03T11:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to acess repository using JCR and a Session Bean</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86083#M58143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For more information :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Introducing_the_Alfresco_Java_Content_Repository_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Introducing_the_Alfresco_Java_Content_Repository_API&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.opensourceecm.fr/2008/06/la-jsr-170-ou-content-repository-for.html" rel="nofollow noopener noreferrer"&gt;http://www.opensourceecm.fr/2008/06/la-jsr-170-ou-content-repository-for.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2009 09:36:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-acess-repository-using-jcr-and-a-session-bean/m-p/86083#M58143</guid>
      <dc:creator>wassim</dc:creator>
      <dc:date>2009-03-04T09:36:31Z</dc:date>
    </item>
  </channel>
</rss>

