You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Marcel Dullaart <ma...@gmail.com> on 2007/04/20 08:40:15 UTC

RMI connection

Hi all,

I have setup a JBoss server instance and placed the
jackrabbit-jca-1.2.3.rar and jackrabbit-jcr-rmi-1.2.3.jar in its
deploy directory. From the, I removed the jcr-1.0.jar from
jackrabbit-jca-1.2.3.rar and placed it in the server's lib diretory,
also have I created a datasource connector (*-ds.xml) file and placed
that in the deploy directory as well.
JBoss start fine without errors.

Then I tried to connect to it using the jcrClient (contrib), using
jndi jcrServer, which succeeded.
But I need an RMI connection so in the jcrClient I tried connect
rmi://localhost:1099/jcrServer. This failed with the message:
exception: java.rmi.ConnectIOException
message: non-JRMP server at remote endpoint

When using the jcrBrowser plugin from eclipse I get the same results.

Can someone please explain to me what is wrong here?


Thanks in advance,
Marcel

Re: RMI connection

Posted by Marcel Dullaart <ma...@gmail.com>.
No I gave up for th emoment, because of shifting priorities. I
instructed teh developer to use JNDI for now.

On 4/25/07, Thierry Lach <th...@gmail.com> wrote:
> Did you ever get this resolved?  I've found indications that JBoss also uses
> port 1098 (and I've tried that and have gotten the same results - no such
> object in table).
>
> On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> >
> > Hi David,m Thanks for your reply. In my original post I mentioned that
> > I was able to connect remotely using JNDI, but I need to skip th JNDI
> > step and connect directly using RMI.
> > Thanks to David N, I found that JBoss runs its JRMP connector on port
> > 4444, but that gives me an No such object in table.
> > Therefore have I downloaded the jackrabbit sources to check the name
> > used to register the repository as RMI object.
> >
> > I'll let all of you know the results.
> > Marcel
> >
>

Re: RMI connection

Posted by Thierry Lach <th...@gmail.com>.
Did you ever get this resolved?  I've found indications that JBoss also uses
port 1098 (and I've tried that and have gotten the same results - no such
object in table).

On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
>
> Hi David,m Thanks for your reply. In my original post I mentioned that
> I was able to connect remotely using JNDI, but I need to skip th JNDI
> step and connect directly using RMI.
> Thanks to David N, I found that JBoss runs its JRMP connector on port
> 4444, but that gives me an No such object in table.
> Therefore have I downloaded the jackrabbit sources to check the name
> used to register the repository as RMI object.
>
> I'll let all of you know the results.
> Marcel
>

Re: RMI connection

Posted by David Johnson <db...@gmail.com>.
Hi Marcel,

I am certainly no RMI expert.  Although if I am understanding the code
snippet from above, JNDI is only used to retrieve (lookup) the RMI object
(the RemoteRepository) - from there I believe that all access to the
repository is going over RMI.

Do you need to lookup the object using java.rmi.Naming.lookup(...)?  In that
case, yes - that was the same problem that I had before switching to JNDI
lookup for the remote repository object.

Let me know what you find out.

-Dave

On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
>
> Hi David,m Thanks for your reply. In my original post I mentioned that
> I was able to connect remotely using JNDI, but I need to skip th JNDI
> step and connect directly using RMI.
> Thanks to David N, I found that JBoss runs its JRMP connector on port
> 4444, but that gives me an No such object in table.
> Therefore have I downloaded the jackrabbit sources to check the name
> used to register the repository as RMI object.
>
> I'll let all of you know the results.
> Marcel
>

Re: RMI connection

Posted by Marcel Dullaart <ma...@gmail.com>.
Hi David,m Thanks for your reply. In my original post I mentioned that
I was able to connect remotely using JNDI, but I need to skip th JNDI
step and connect directly using RMI.
Thanks to David N, I found that JBoss runs its JRMP connector on port
4444, but that gives me an No such object in table.
Therefore have I downloaded the jackrabbit sources to check the name
used to register the repository as RMI object.

I'll let all of you know the results.
Marcel

Re: RMI connection

Posted by David Johnson <db...@gmail.com>.
Hi Marcel,

I am connecting to a Jackrabbit instance running inside JBoss using jca and
the RMI jar file.  I had some initial trouble getting my RMI client code
too.  As a start, here is the "lookup" code that I use:

    static public Session getJackrabbitSession() throws RepositoryException
{
        Properties env = new Properties();
        env.put(Context.INITIAL_CONTEXT_FACTORY, "
org.jnp.interfaces.NamingContextFactory");
        env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
        env.put(Context.URL_PKG_PREFIXES, "
org.jboss.naming:org.jnp.interfaces");

        try {
            InitialContext ctx = new InitialContext(env);
            ClientAdapterFactory adapter = new ClientAdapterFactory();
            RemoteRepository rr;
            rr = (RemoteRepository) ctx.lookup
("jnp://localhost:1099/jcrServer");
            Repository repository = adapter.getRepository(rr);
            Credentials credJBoss = new SimpleCredentials("username",
"password"
                    .toCharArray());
            return repository.login(credJBoss);
        } catch (NamingException ex) {
            ex.printStackTrace();
        }
        return null;
    }

Let me know if that helps at all.

-Dave

On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
>
> Thank you David, I know for sure that is it not a JDK version issue, I
> am currently testing this on my dev machine running teh same JDK/JVM,
> but I think your other remark could make sense, so I'll investigate
> what service is bound to 1099 port on my JBoss instance.
>
> One question comes to mind though is why the JNDI connect does work. I
> suppose the connection uses RMI/JRMP as well.
>
> Enjoy the weekend,
> Marcel
>
> On 4/20/07, David Nuescheler <da...@gmail.com> wrote:
> > hi marcel,
> >
> > not being an rmi expert at all, i would guess that there is
> > some incompatibility between what your rmi protocol that the
> > client expects (apparently jrmp) and what the process bound
> > to 1099 responds with.
> >
> > i could envision that there is for example another process
> > bound to port 1099 already that is not even an rmi (jrmp) listener,
> > or that there maybe a disconnect between different jdk's that you
> > are using on the client vs. the server (ibm vs. sun).
> >
> > these are all wild guesses but i think it is safe to say that
> > it is probably an issue with rmi and not with jackrabbit per se.
> >
> > regards,
> > david
> >
> > On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> > > Hi,
> > >
> > > Isn't there anyone at all that knows the answer? Or am I a complete
> > > idiot that should have known this?
> > > In that case please let me know, I am stuck with this.
> > >
> > > Thanks again,
> > > Marcel
> > >
> > > On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> > > > Hi all,
> > > >
> > > > I have setup a JBoss server instance and placed the
> > > > jackrabbit-jca-1.2.3.rar and jackrabbit-jcr-rmi-1.2.3.jar in its
> > > > deploy directory. From the, I removed the jcr-1.0.jar from
> > > > jackrabbit-jca-1.2.3.rar and placed it in the server's lib diretory,
> > > > also have I created a datasource connector (*-ds.xml) file and
> placed
> > > > that in the deploy directory as well.
> > > > JBoss start fine without errors.
> > > >
> > > > Then I tried to connect to it using the jcrClient (contrib), using
> > > > jndi jcrServer, which succeeded.
> > > > But I need an RMI connection so in the jcrClient I tried connect
> > > > rmi://localhost:1099/jcrServer. This failed with the message:
> > > > exception: java.rmi.ConnectIOException
> > > > message: non-JRMP server at remote endpoint
> > > >
> > > > When using the jcrBrowser plugin from eclipse I get the same
> results.
> > > >
> > > > Can someone please explain to me what is wrong here?
> > > >
> > > >
> > > > Thanks in advance,
> > > > Marcel
> > > >
> > >
> >
>

Re: RMI connection

Posted by Marcel Dullaart <ma...@gmail.com>.
Thank you David, I know for sure that is it not a JDK version issue, I
am currently testing this on my dev machine running teh same JDK/JVM,
but I think your other remark could make sense, so I'll investigate
what service is bound to 1099 port on my JBoss instance.

One question comes to mind though is why the JNDI connect does work. I
suppose the connection uses RMI/JRMP as well.

Enjoy the weekend,
Marcel

On 4/20/07, David Nuescheler <da...@gmail.com> wrote:
> hi marcel,
>
> not being an rmi expert at all, i would guess that there is
> some incompatibility between what your rmi protocol that the
> client expects (apparently jrmp) and what the process bound
> to 1099 responds with.
>
> i could envision that there is for example another process
> bound to port 1099 already that is not even an rmi (jrmp) listener,
> or that there maybe a disconnect between different jdk's that you
> are using on the client vs. the server (ibm vs. sun).
>
> these are all wild guesses but i think it is safe to say that
> it is probably an issue with rmi and not with jackrabbit per se.
>
> regards,
> david
>
> On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> > Hi,
> >
> > Isn't there anyone at all that knows the answer? Or am I a complete
> > idiot that should have known this?
> > In that case please let me know, I am stuck with this.
> >
> > Thanks again,
> > Marcel
> >
> > On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> > > Hi all,
> > >
> > > I have setup a JBoss server instance and placed the
> > > jackrabbit-jca-1.2.3.rar and jackrabbit-jcr-rmi-1.2.3.jar in its
> > > deploy directory. From the, I removed the jcr-1.0.jar from
> > > jackrabbit-jca-1.2.3.rar and placed it in the server's lib diretory,
> > > also have I created a datasource connector (*-ds.xml) file and placed
> > > that in the deploy directory as well.
> > > JBoss start fine without errors.
> > >
> > > Then I tried to connect to it using the jcrClient (contrib), using
> > > jndi jcrServer, which succeeded.
> > > But I need an RMI connection so in the jcrClient I tried connect
> > > rmi://localhost:1099/jcrServer. This failed with the message:
> > > exception: java.rmi.ConnectIOException
> > > message: non-JRMP server at remote endpoint
> > >
> > > When using the jcrBrowser plugin from eclipse I get the same results.
> > >
> > > Can someone please explain to me what is wrong here?
> > >
> > >
> > > Thanks in advance,
> > > Marcel
> > >
> >
>

Re: RMI connection

Posted by David Nuescheler <da...@gmail.com>.
hi marcel,

not being an rmi expert at all, i would guess that there is
some incompatibility between what your rmi protocol that the
client expects (apparently jrmp) and what the process bound
to 1099 responds with.

i could envision that there is for example another process
bound to port 1099 already that is not even an rmi (jrmp) listener,
or that there maybe a disconnect between different jdk's that you
are using on the client vs. the server (ibm vs. sun).

these are all wild guesses but i think it is safe to say that
it is probably an issue with rmi and not with jackrabbit per se.

regards,
david

On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> Hi,
>
> Isn't there anyone at all that knows the answer? Or am I a complete
> idiot that should have known this?
> In that case please let me know, I am stuck with this.
>
> Thanks again,
> Marcel
>
> On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> > Hi all,
> >
> > I have setup a JBoss server instance and placed the
> > jackrabbit-jca-1.2.3.rar and jackrabbit-jcr-rmi-1.2.3.jar in its
> > deploy directory. From the, I removed the jcr-1.0.jar from
> > jackrabbit-jca-1.2.3.rar and placed it in the server's lib diretory,
> > also have I created a datasource connector (*-ds.xml) file and placed
> > that in the deploy directory as well.
> > JBoss start fine without errors.
> >
> > Then I tried to connect to it using the jcrClient (contrib), using
> > jndi jcrServer, which succeeded.
> > But I need an RMI connection so in the jcrClient I tried connect
> > rmi://localhost:1099/jcrServer. This failed with the message:
> > exception: java.rmi.ConnectIOException
> > message: non-JRMP server at remote endpoint
> >
> > When using the jcrBrowser plugin from eclipse I get the same results.
> >
> > Can someone please explain to me what is wrong here?
> >
> >
> > Thanks in advance,
> > Marcel
> >
>

Re: RMI connection

Posted by Marcel Dullaart <ma...@gmail.com>.
Hi,

Isn't there anyone at all that knows the answer? Or am I a complete
idiot that should have known this?
In that case please let me know, I am stuck with this.

Thanks again,
Marcel

On 4/20/07, Marcel Dullaart <ma...@gmail.com> wrote:
> Hi all,
>
> I have setup a JBoss server instance and placed the
> jackrabbit-jca-1.2.3.rar and jackrabbit-jcr-rmi-1.2.3.jar in its
> deploy directory. From the, I removed the jcr-1.0.jar from
> jackrabbit-jca-1.2.3.rar and placed it in the server's lib diretory,
> also have I created a datasource connector (*-ds.xml) file and placed
> that in the deploy directory as well.
> JBoss start fine without errors.
>
> Then I tried to connect to it using the jcrClient (contrib), using
> jndi jcrServer, which succeeded.
> But I need an RMI connection so in the jcrClient I tried connect
> rmi://localhost:1099/jcrServer. This failed with the message:
> exception: java.rmi.ConnectIOException
> message: non-JRMP server at remote endpoint
>
> When using the jcrBrowser plugin from eclipse I get the same results.
>
> Can someone please explain to me what is wrong here?
>
>
> Thanks in advance,
> Marcel
>

Re: RMI connection

Posted by stefan81 <st...@process-relations.com>.
Hi,

as it seems, I face the same problems like Marcel. I also get the following
exception when trying to access the repository on JBoss via RMI by
rmi://localhost:1099/jcrServer:

non-JRMP server at remote endpoint

Are there any new insights which might help me with the problem? 


Marcel Dullaart-2 wrote:
> 
> Hi all,
> 
> I have setup a JBoss server instance and placed the
> jackrabbit-jca-1.2.3.rar and jackrabbit-jcr-rmi-1.2.3.jar in its
> deploy directory. From the, I removed the jcr-1.0.jar from
> jackrabbit-jca-1.2.3.rar and placed it in the server's lib diretory,
> also have I created a datasource connector (*-ds.xml) file and placed
> that in the deploy directory as well.
> JBoss start fine without errors.
> 
> Then I tried to connect to it using the jcrClient (contrib), using
> jndi jcrServer, which succeeded.
> But I need an RMI connection so in the jcrClient I tried connect
> rmi://localhost:1099/jcrServer. This failed with the message:
> exception: java.rmi.ConnectIOException
> message: non-JRMP server at remote endpoint
> 
> When using the jcrBrowser plugin from eclipse I get the same results.
> 
> Can someone please explain to me what is wrong here?
> 
> 
> Thanks in advance,
> Marcel
> 
> 

-- 
View this message in context: http://www.nabble.com/RMI-connection-tf3611478.html#a12498460
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.