Re: Unmarshalled Exception : ClassnotfoundException

glenngmail <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
 Hey Thomas,

Thanks for all your help! It works well I found that I was unexporting
further down the code. Your help was totally appreciated and invaluable!


I'm holding a strong reference to it now and I'm really glad that you have
eluded me to some very good points, they being (for those that may benefit
from my experiences so far):

1 Debugging the service using the class
net.jini.loader.pref.PreferredClassLoaderProvider.
2 Programmatically setting the codebase is required.
3 Server that starts the service/target must have a strong reference to the
service/target.
4 Not to unexport unless you really need too.


Thanks once again

G

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, 23 May 2007 11:46 PM
To: [email protected]
Subject: Re: Unmarshalled Exception : ClassnotfoundException

glenngmail wrote:
> I removed the command line codebase value and it still worked.
>
> I found that the 'Impl' (in the start-service.config ) was the
> culprit. It was class that was trying to load the server that loads
> the service via Spring framework. When I removed it all seems to be as
normal.
>
> Though Rio can see it when I run my client I get this, is this
> something that is related, if not thanks for all your help !!!!!  :)
>
>
Ok - we're off to a start now. The error you see below may be because you
have exported your service but then do not hold a strong reference to the
service implementation anymore. In this case the JERI runtime could unexport
your service spontaneously. See the javadoc for BasicJeriExporter.

> G
>
> java.rmi.ConnectException: connection refused or timed out to
>
BasicObjectEndpoint[983939ff-6ee8-4f50-99ca-417a6c43af92,TcpEndpoint[192.168
> .2.3:1110]]; nested exception is:
>       java.net.ConnectException: Connection refused: connect
>       at
>
net.jini.jeri.BasicInvocationHandler.wrapSafeIOException(BasicInvocationHand
> ler.java:890)
>       at
>
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocationH
> andler.java:711)
>       at
>
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHandl
> er.java:659)
>       at
>
net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.java:528)
>       at $Proxy2.f(Unknown Source)
>       at com.common.jini.service.client.Client.<init>(Client.java:80)
>       at com.common.jini.service.client.Client.main(Client.java:21)
> Caused by: java.net.ConnectException: Connection refused: connect
>       at java.net.PlainSocketImpl.socketConnect(Native Method)
>       at java.net.PlainSocketImpl.doConnect(Unknown Source)
>       at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
>       at java.net.PlainSocketImpl.connect(Unknown Source)
>       at java.net.SocksSocketImpl.connect(Unknown Source)
>       at java.net.Socket.connect(Unknown Source)
>       at
>
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketAddress(
> TcpEndpoint.java:678)
>       at
>
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(TcpEndpoi
> nt.java:608)
>       at
>
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpoint.jav
> a:543)
>       at
>
net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.java:22
> 8)
>       at
>
net.jini.jeri.connection.ConnectionManager$ReqIterator.next(ConnectionManage
> r.java:629)
>       at
> net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371)
>       at
>
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocationH
> andler.java:708)
>       ... 5 more
>
>
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: Wednesday, 23 May 2007 10:19 PM
> To: Glenn
> Cc: [email protected]
> Subject: Re: Unmarshalled Exception : ClassnotfoundException
>
> Glenn wrote:
>
>> Oh ok I did set this on the command line and seemed to solve that
>> problem, however, your saying to me that I shouldn't do this.
>>
>>   I'm not sure why the codebase is not getting set so I'll trace
>> through again and see where I'm losing this codebase.
>>
>> If you have any 'off-the-top-of your head' suggestions, I'd would be
>> interested in them :)
>>
>>
> As I'd mentioned earlier it will be useful to see how exactly you are
> exporting/registering your service proxy. Also you may want to double
check
> the start-service.config you are using and turn on FINEST logging for
> com.sun.jini.start.service.starter
> (at least as a start) when you launch your service.
> ||
>
>> Regards
>> G
>>
>> On 23/05/07, *Vinod Johnson - Sun Microsystems*
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>>     glenngmail wrote:
>>     > Hey Thomas
>>     >
>>     > It seemed to work and RIO even picked it up on it diagram too.
>>     Thanks a
>>     > million.
>>     >
>>     > I needed to add the Codebase to either the command line or in
>>     the during
>>     >
>>     your mean rmi.server.codebase?
>>     > startup.
>>     >
>>     >
>>     So I'm not completely sure what you did to get this to work. The
>>     codebase that you set up in start-server.config's
>>     NonActivatableServiceDescriptor should have been enough to get your
>>     correct codebase annotation - i.e. under a normal JTSK
>>     installation you
>>     shouldn't have to populate rmi.server.codebase.
>>     > Regards
>>     > Glenn
>>     >
>>     > -
>>
>>
>>     --
>>     - vinod
>>
>>
>> ----------------------------------------------------------------------
>> ---- Getting Started:
>> http://www.jini.org/wiki/Category:Getting_Started
>> Community Web Site: http://jini.org jini-users Archive:
>> http://archives.java.sun.com/archives/jini-users.html Unsubscribing:
>> email "signoff JINI-USERS" to [email protected]
>>
>
>
> --
> - vinod
>
>


--
- vinod

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.