You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Kooper <se...@list.ru> on 2009/08/19 12:14:39 UTC

rmi issue

Hi I have issue with regestring node via rmi. I ve read posts about how to
register node through rmi and it worked for me
To get repository use:
JackrabbitClientAdapterFactory jrFactory = new
JackrabbitClientAdapterFactory();
            ClientRepositoryFactory factory = new
ClientRepositoryFactory(jrFactory);
            repository = factory.getRepository(repositoryHome);

to register node types use:
JackrabbitNodeTypeManager ntTypeMgr = (JackrabbitNodeTypeManager)
ws.getNodeTypeManager();

but then we updated repository to 1.6.0 and it fails now, throws classcast
exeption:
//localhost:1099/jackrabbit.repository java.lang.ClassCastException?:
org.apache.jackrabbit.rmi.client.ClientNodeTypeManager? cannot be cast to
org.apache.jackrabbit.api.JackrabbitNodeTypeManagerjava?.lang.ClassCastException?:
org.apache.jackrabbit.rmi.client.ClientNodeTypeManager? cannot be cast to
org.apache.jackrabbit.api.JackrabbitNodeTypeManager? at
com.jackrabbit.tool.JackRabbitImport?.importNodeType(JackRabbitImport?.java:86)

Can any one explain what could be wrong here? 

Also we are using spring modules on server side. Could it be the reason?
here is regestring in spring:
 <bean id="localRepositoryClient"
class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
      <property name="configuration"
value="${repository.jr.local.configFile}"/>
      <property name="homeDir" value="${repository.jr.local.homeDir}"/>
    </bean>

    <!-- use Spring's RMI classes to retrieve the RMI registry -->
    <bean id="rmiRegistry"
class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"/>
    <bean id="rmiServer"
class="org.springmodules.jcr.jackrabbit.RmiServerRepositoryFactoryBean">
        <property name="repository" ref="localRepositoryClient"/>
        <property name="remoteAdapterFactory">
            <bean
class="org.apache.jackrabbit.rmi.server.ServerAdapterFactory"/>
        </property>
        <property name="registry" ref="rmiRegistry"/>
        <property name="rmiName" value="jackrabbit.repository"/>
    </bean>

Thanks

-- 
View this message in context: http://www.nabble.com/rmi-issue-tp25041418p25041418.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: rmi issue

Posted by Kooper <se...@list.ru>.


Jukka Zitting wrote:
> 
> Hi,
> 
> On Wed, Aug 19, 2009 at 12:14 PM, Kooper<se...@list.ru> wrote:
>> class="org.apache.jackrabbit.rmi.server.ServerAdapterFactory"/>
> 
> Try using the JackrabbitServerAdapterFactory class instead. The normal
> ServerAdapterFactory knows nothing about the Jackrabbit API
> extensions.
> 
> BR,
> 
> Jukka Zitting
> 
> 
Thank you very much. It works:)
-- 
View this message in context: http://www.nabble.com/rmi-issue-tp25041418p25041555.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: rmi issue

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Aug 19, 2009 at 12:14 PM, Kooper<se...@list.ru> wrote:
> class="org.apache.jackrabbit.rmi.server.ServerAdapterFactory"/>

Try using the JackrabbitServerAdapterFactory class instead. The normal
ServerAdapterFactory knows nothing about the Jackrabbit API
extensions.

BR,

Jukka Zitting