jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesper Klitgaard" <...@netcompany.com>
Subject Error adding repository using jackrabbit snapshot 1.1: "Object bound not of type javax.jcr.Repository: found a (org.apache.jackrabbit.jca.JCAResourceAdapter)"
Date Mon, 18 Sep 2006 09:51:26 GMT
Hello,

 

We've recieved the following fix for the connection leak issue described
here :

http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200609.mbox/%3
c158181F2D023A0418EDA9EF394BBC01501643C0F@exchange.netcompany.com%3e

 

Link for the fix:
http://issues.apache.org/jira/browse/JCR-463

 

The fix is for the latest snapshot version 1.1 of Jackrabbit. So far we
have been working with version 1.0.l of Jackrabbit, so therefore we
started using the latest 1.1. snapshot version. We have applied the fix
but are not able to test if it works. We now encounter a problem when we
try to add a repository using the Portal Administration Console. Here's
a description.

 

Before we can test the connection leak fix we need to deploy the 1.1
snapshot version and add a repository using the Portal Administration
Console. We can deploy the JCA contribution, that follows the 1.5 Java
Connector Architecture specification. When we add the repository with
the following configuration:

 

########################################################################
#####

Name:                                  jackrabbit

Connection class:
com.day.content.spi.jsr170.JNDIRepository

Username:                            weblogic

Password:                             weblogic

Retype password:                  weblogic

Enable library services:          false

########################################################################
#####

 

We recieve the error seen in the attached file "1.1 console_output.txt".

 

We are using these versions of ra.xml and weblogic-ra.xml to support the
new snapshot version 1.1 of jackrabbit.

 

weblogic-ra-xml

########################################################################
#####

<?xml version="1.0" encoding="UTF-8"?>

<weblogic-connector xmlns="http://www.bea.com/ns/weblogic/90">

 

 <jndi-name>jackrabbit</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>

   <default-connection-properties>

 

     <pool-params>

       <initial-capacity>10</initial-capacity>

       <max-capacity>100</max-capacity>

       <capacity-increment>1</capacity-increment>

       <shrinking-enabled>true</shrinking-enabled>

       <shrink-frequency-seconds>5</shrink-frequency-seconds>

       <highest-num-waiters>2147483647</highest-num-waiters>

       <highest-num-unavailable>0</highest-num-unavailable>

 
<connection-creation-retry-frequency-seconds>1</connection-creation-retr
y-frequency-seconds>

 
<connection-reserve-timeout-seconds>10</connection-reserve-timeout-secon
ds>

       <test-frequency-seconds>0</test-frequency-seconds>

       <match-connections-supported>true</match-connections-supported>

     </pool-params>

 

     <logging>

 
<log-filename>C:/bea3/user_projects/jackfixed/jackrabbit-jca-1.1-SNAPSHO
T/logs/log.txt</log-filename>

       <logging-enabled>true</logging-enabled>

     </logging>

 

   </default-connection-properties>

 </outbound-resource-adapter>

</weblogic-connector>

########################################################################
#####

 

ra.xml:

########################################################################
#####

<?xml version="1.0" encoding="UTF-8"?>

<connector xmlns="http://java.sun.com/xml/ns/j2ee"

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

          http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"

 version="1.5">

 

 <display-name>Jackrabbit JCR Adapter</display-name>

 <vendor-name>Apache.org</vendor-name>

 <eis-type>JCR Adapter</eis-type>

 <resourceadapter-version>1.0</resourceadapter-version>

 

 <resourceadapter>

 
<resourceadapter-class>org.apache.jackrabbit.jca.JCAResourceAdapter</res
ourceadapter-class>

   <outbound-resourceadapter>

 

     <connection-definition>

 

 
<managedconnectionfactory-class>org.apache.jackrabbit.jca.JCAManagedConn
ectionFactory</managedconnectionfactory-class>

 

       <config-property>

         <config-property-name>HomeDir</config-property-name>

         <config-property-type>java.lang.String</config-property-type>

 
<config-property-value>C:/home/tku/Skat/poc/dapjcr/src21</config-propert
y-value>

       </config-property>

 

       <config-property>

         <config-property-name>ConfigFile</config-property-name>

         <config-property-type>java.lang.String</config-property-type>

 
<config-property-value>C:/home/tku/Skat/poc/dapjcr/src21/repository.xml<
/config-property-value>

       </config-property>

 

 
<connectionfactory-interface>javax.jcr.Repository</connectionfactory-int
erface>

 
<connectionfactory-impl-class>org.apache.jackrabbit.jca.JCARepositoryHan
dle</connectionfactory-impl-class>

 

       <connection-interface>javax.jcr.Session</connection-interface>

 
<connection-impl-class>org.apache.jackrabbit.jca.JCASessionHandle</conne
ction-impl-class>

 

     </connection-definition>

 

     <transaction-support>XATransaction</transaction-support>

     <reauthentication-support>false</reauthentication-support>

   </outbound-resourceadapter>

 </resourceadapter>

</connector>

########################################################################
#####

 

We print out our JNDI tree after deployment and can see our
resourceadapter is bound to the name "jackrabbit". Next to the JNDI name
is listed the object's class for the jackrabbit JNDI name. The name of
the class is: "org.apache.jackrabbit.jca.JCAResourceAdapter". We check
the code and find that this class does not implement the jcr.Repository
class as wanted by weblogic (hence the "Object bound not of type
javax.jcr.Repository: found a
(org.apache.jackrabbit.jca.JCAResourceAdapter)" exception in the "1.1
console _output.txt"). When we used version 1.0.1 of jackrabbit the
object's class was "org.apache.jackrabbit.jca.JCARepositoryHandle" and
this class does implement jcr.Repository.

 

So it seems that the wrong class is being bound to the JNDI tree. Why,
is still unclear to us and we can't really find any problems in our
new_ra.xml and new_weblogic-ra.xml

 

Regards

Jesper Klitgaard


Mime
View raw message