Hello Edgar, It's a shame that you can't test the connection from the portal. This is really here we are stuck. We've looked in the BEA online doc describing how to connect a jsr170 compliant repository. We've used the configuration described by the documentation (which you also pointed out in your last e-mail).
When we make the connection this is where we receive the exception: "Object bound not of type javax.jcr.Repository: found a (org.apache.jackrabbit.jca.JCAResourceAdapter)". This is where we are stuck. I think BEA are missing documentation that describes the exact connection and configuration between the weblogic-ra.xml, ra.xml and the configuration screen in the PAC specific for jackrabbit. Also I find it disturbing that BEA haven't tested and documented connecting to jackrabbit, which is the reference implementation of jsr170. Just a personal aspect. So I believe that our problem is caused by BEA and not the jackrabbit implementation. What is your opinion on this? Med venlig hilsen / regards Jesper Klitgaard Consultant Netcompany - IT and business consulting Grønningen 19 DK-1270 København K Denmark Mobile: +45 22 28 29 73 Phone: +45 70 13 14 40 Fax: +45 70 13 14 50 E-mail: [EMAIL PROTECTED] www.netcompany.com -----Original Message----- From: Edgar Poce [mailto:[EMAIL PROTECTED] Sent: 20. september 2006 14:01 To: [email protected] Subject: Re: Error adding repository using jackrabbit snapshot 1.1: "Object bound not of type javax.jcr.Repository: found a (org.apache.jackrabbit.jca.JCAResourceAdapter)" Hi jesper, According to the doc you should deploy the resource adapter as any other application. i.e add the weblogic-ra.xml file I sent in the rar file under the folder META-INF. Just to be sure it's working as expected you can deploy the webdav server and check it connects successfully. Use the web.xml bellow. you should be able to connect to the default workspace at http://localhost:7001/jackrabbit-server/repository/default Now, the last step is to connect from the portal, I can't help you very much on this because I downloaded the free version which doesn't include the portal. But according to the doc you should configure weblogic to access the repository by setting the following properties: Name: myRepository ConnectionClass: com.day.content.spi.jsr170.JNDIRepository Username: weblogic (in case you didn't change the default installation) Password: weblogic (in case you didn't change the default installation) jsr170.workspace: default jsr170.jndi.name: jackrabbit Hope this helps, edgar ---------------------------- web.xml ------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <display-name>Jackrabbit JCR Server</display-name> <!-- ====================================================================== --> <!-- L O G G I N G S E R V L E T --> <!-- ====================================================================== --> <servlet> <servlet-name>Logging</servlet-name> <description>The logging servlet configures the Log4J logging facility.</description> <servlet-class>org.apache.jackrabbit.j2ee.LoggingServlet</servlet-class> <init-param> <param-name>log4j-config</param-name> <param-value>/WEB-INF/log4j.xml</param-value> <description>initial log4j configuration</description> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- ====================================================================== --> <!-- R E P O S I T O R Y S T A R T U P S E R V L E T --> <!-- ====================================================================== --> <!-- <servlet> <servlet-name>RepositoryStartup</servlet-name> <description> Repository servlet that starts the repository and registers it to JNDI ans RMI. If you already have the repository registered in this appservers JNDI context, or if its accessible via RMI, you do not need to use this servlet. </description> <servlet-class>org.apache.jackrabbit.j2ee.RepositoryStartupServlet</servlet-class> <init-param> <param-name>repository-config</param-name> <param-value>/WEB-INF/repository/repository.xml</param-value> <description>the repository config location</description> </init-param> <init-param> <param-name>repository-home</param-name> <param-value>jackrabbit/repository</param-value> <description>the repository home</description> </init-param> <init-param> <param-name>repository-name</param-name> <param-value>jackrabbit.repository</param-value> <description>Repository Name under which the repository is registered via JNDI/RMI</description> </init-param> --> <!-- the following 3 parameters deal with registering the repository to a RMI registry. if all parameters are omitted, the repository will not be registered. --> <!-- <init-param> <param-name>rmi-port</param-name> <param-value>0</param-value> <description> The RMI port for registering the repository in the RMI Registry. If equals 0, the default port is used. </description> </init-param> <init-param> <param-name>rmi-host</param-name> <param-value>localhost</param-value> <description> The RMI host for registering the repository in the RMI Registry. If equals "" or missing, the default host is used. </description> </init-param> <init-param> <param-name>rmi-uri</param-name> <param-value></param-value> <description> The RMI uri for registering the repository in the RMI Registry. If missing, the uri is composed using the other rmi parameters and will have the format: //{rmi-host}:{rmi-port}/{repository-name} </description> </init-param> --> <!-- JNDI environment variables for creating the initial context (all init parameters starting with java.naming.* will be added to the initial context environment). --> <!-- <init-param> <param-name>java.naming.provider.url</param-name> <param-value>http://www.apache.org/jackrabbit</param-value> </init-param> <init-param> <param-name>java.naming.factory.initial</param-name> <param-value>org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> --> <!-- ====================================================================== --> <!-- R E P O S I T O R Y S E R V L E T --> <!-- ====================================================================== --> <servlet> <servlet-name>Repository</servlet-name> <description> This servlet provides other servlets and jsps a common way to access the repository. The repository can be accessed via JNDI, RMI or Webdav. </description> <servlet-class>org.apache.jackrabbit.j2ee.RepositoryAccessServlet</servlet-class> <init-param> <param-name>repository-name</param-name> <param-value>jackrabbit</param-value> <description>Repository Name that is used to retrieve it via JNDI</description> </init-param> <!-- <init-param> <param-name>missing-auth-mapping</param-name> <param-value>anonymous:anonymous</param-value> <description> Defines how a missing authorization header should be handled. 1) If this init-param is missing, a 401 response is generated. This is suiteable for clients (eg. webdav clients) for which sending a proper authorization header is not possible if the server never sent a 401. 2) If this init-param is present with an empty value, null-credentials are returned, thus forcing an null login on the repository. 3) If this init-param has a 'user:password' value, the respective simple credentials are generated. </description> </init-param> --> <!-- JNDI environment variables for creating the initial context (all init parameters starting with java.naming.* will be added to the initial context environment). <init-param> <param-name>java.naming.provider.url</param-name> <param-value>http://www.apache.org/jackrabbit</param-value> </init-param> <init-param> <param-name>java.naming.factory.initial</param-name> <param-value>org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory</param-value> </init-param> --> <!-- RMI url, if RMI remoting is needed --> <!-- <init-param> <param-name>rmi-uri</param-name> <param-value>///jackrabbit.repository</param-value> <description>The URI for the RMI connection.</description> </init-param> --> <load-on-startup>3</load-on-startup> </servlet> <!-- ====================================================================== --> <!-- W E B D A V S E R V L E T --> <!-- ====================================================================== --> <servlet> <servlet-name>Webdav</servlet-name> <description> The webdav servlet that connects HTTP request to the repository. </description> <servlet-class>org.apache.jackrabbit.j2ee.SimpleWebdavServlet</servlet-class> <init-param> <param-name>resource-path-prefix</param-name> <param-value>/repository</param-value> <description> defines the prefix for spooling resources out of the repository. </description> </init-param> <!-- Optional parameter to define the value of the 'WWW-Authenticate' header --> <!-- <init-param> <param-name>authenticate-header</param-name> <param-value>Basic realm="Jackrabbit Webdav Server"</param-value> <description> Defines the value of the 'WWW-Authenticate' header. </description> </init-param> --> <!-- Parameter used to configure behaviour of webdav resources such as: - destinction between collections and non-collections - resource filtering --> <init-param> <param-name>resource-config</param-name> <param-value>/WEB-INF/config.xml</param-value> <description> Defines various dav-resource configuration parameters. </description> </init-param> <load-on-startup>4</load-on-startup> </servlet> <!-- ====================================================================== --> <!-- W E B D A V S E R V E R S E R V L E T --> <!-- ====================================================================== --> <servlet> <servlet-name>JCRWebdavServer</servlet-name> <description> The webdav servlet that connects HTTP request to the repository. </description> <servlet-class>org.apache.jackrabbit.j2ee.JCRWebdavServerServlet</servlet-class> <!-- Optional parameter to define the value of the 'WWW-Authenticate' header --> <!-- <init-param> <param-name>authenticate-header</param-name> <param-value>Basic realm="Jackrabbit Webdav Server"</param-value> <description> Defines the value of the 'WWW-Authenticate' header. </description> </init-param> --> <init-param> <param-name>resource-path-prefix</param-name> <param-value>/server</param-value> <description> defines the prefix for spooling resources out of the repository. </description> </init-param> <load-on-startup>5</load-on-startup> </servlet> <!-- ====================================================================== --> <!-- S E R V L E T M A P P I N G --> <!-- ====================================================================== --> <servlet-mapping> <servlet-name>Webdav</servlet-name> <url-pattern>/repository/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>JCRWebdavServer</servlet-name> <url-pattern>/server/*</url-pattern> </servlet-mapping> </web-app> On 9/20/06, Jesper Klitgaard <[EMAIL PROTECTED]> wrote: > Hello Edgar, > > It's nice to hear that someone has succeeded in connecting jackrabbit > 1.1 to weblogic. > > We changed our weblogic-ra file to match the one you provided but it's > not clear to us what values to use during the configuration in the > weblogic Portal Administration Console (when adding the repository). We > use the following: > > Name: jackrabbit *?* > Connection class: > com.day.content.spi.jsr170.JNDIRepository > username: weblogic > password: weblogic > retype password: weblogic > Enable library services: false > > The repository is then shown in the repository tree, but it says it > can't connect. Then we add the two following properties to our > repository: > > jsr170.workspace default > jsr170.jndi.name jackrabbit *?* > > *?* = we are not sure if these values are the correct ones to use > > We are using the following document from BEA to configure our > repository: > http://e-docs.bea.com/wlp/docs92/pdf/day170adapter_developers_guide.pdf > > Regards > Jesper Klitgaard > > -----Original Message----- > From: Edgar Poce [mailto:[EMAIL PROTECTED] > Sent: 19. september 2006 09:11 > To: [email protected] > Subject: Re: Error adding repository using jackrabbit snapshot 1.1: > "Object bound not of type javax.jcr.Repository: found a > (org.apache.jackrabbit.jca.JCAResourceAdapter)" > > Hi Jesper, > > I installed weblogic and after following the jca connector > instructions at [1] I found that your weblogic-ra file is wrong. Try > the descriptor bellow. It works in my environment: weblogic 9.2 in xp. > I'll add the how-to to the wiki asap. > > br, > edgar > > ps, thanks for the fast try of the 1.1-snapshot, and please let us > know how the connection leak fix worked. > > [1] http://edocs.bea.com/wls/docs92/resadapter/connect.html > > > > <?xml version="1.0" encoding="UTF-8"?> > > <weblogic-connector xmlns="http://www.bea.com/ns/weblogic/90"> > > > > <jndi-name>jackrabbitRA</jndi-name> > > <enable-access-outside-app>true</enable-access-outside-app> > > <enable-global-access-to-classes>true</enable-global-access-to-classes> > > <outbound-resource-adapter> > > <connection-definition-group> > > <connection-factory-interface>javax.jcr.Repository</connection-factory-i > nterface> > > <connection-instance> > <jndi-name>jackrabbit</jndi-name> > > <connection-properties> > > <pool-params> > <initial-capacity>2</initial-capacity> > <max-capacity>10</max-capacity> > <capacity-increment>1</capacity-increment> > <shrinking-enabled>true</shrinking-enabled> > > <shrink-frequency-seconds>60</shrink-frequency-seconds> > </pool-params> > > <properties> > <property> > <name>HomeDir</name> > > <value>/temp/jackrabbit</value> > </property> > > <property> > <name>ConfigFile</name> > > <value>/temp/jackrabbit/repository.xml</value> > </property> > > </properties> > > </connection-properties> > > </connection-instance> > > </connection-definition-group> > > </outbound-resource-adapter> > > </weblogic-connector> >
