I have encountered more problems in starting Jini services. I had been
using the old jini2_1 version and when the logging problem arose I updated
the existing jar files with the patched version of the logging/Levels
classes and that seemed to fix the problem. However, I then discovered
that things worked on some machines (macs and linuxes) and not on others,
although they were using the same jarfiles, OS versions, and Java
versions.
So, I have decided to convert everything to River2.2.1, that I downloaded
over the weekend. I am using the bin version with Java version 1.6.0_45
on Mac OS X 10.8.3. I tried to run the hello example on this single mac
w/o any network connection (to isolate things as much as possible) and got
problems similar to those I had previously. The specifics are the
following:
ClassServer:
scripts/httpd.sh -verbose
+ java -jar ../../lib/classserver.jar -port 8080 -dir lib:../../lib-dl
-verbose
May 13, 2013 12:20:56 PM com.sun.jini.tool.ClassServer run
INFO: ClassServer started [[lib/, ../../lib-dl/], port 8080]
reggie-dl.jar requested from localhost:49434
jsk-dl.jar requested from localhost:49435
reggie-dl.jar requested from localhost:49442
jsk-dl.jar requested from localhost:49443
reggie-dl.jar probed from localhost:49450
reggie-dl.jar requested from localhost:49451
jsk-dl.jar requested from localhost:49452
server-dl.jar probed from localhost:49454
server-dl.jar requested from localhost:49455
reggie-dl.jar requested from localhost:49462
jsk-dl.jar requested from localhost:49463
server-dl.jar requested from localhost:49465
JRMP-REGGIE:
scripts/jrmp-reggie.sh
+ java -Djava.security.policy=config/start.policy
-Djava.ext.dirs=../../lib-ext/ -jar ../../lib/start.jar
config/start-reggie.config
May 13, 2013 12:21:00 PM com.sun.jini.reggie.RegistrarImpl init
INFO: started Reggie: cb64f7f1-07f8-4bb9-be73-9652a5ce6afb,
[nonsecure.hello.example.jini.sun.com], jini://localhost/
May 13, 2013 12:21:00 PM com.sun.jini.start.ServiceStarter
checkResultFailures
WARNING: Exception creating service.
java.lang.ClassNotFoundException: com.sun.jini.reggie.RegistrarProxy
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at
net.jini.loader.pref.PreferredClassProvider.loadClass(PreferredClassProvider.java:615)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
at
sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:201)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
at
com.sun.jini.start.NonActivatableServiceDescriptor.create(NonActivatableServiceDescriptor.java:689)
at com.sun.jini.start.ServiceStarter.create(ServiceStarter.java:287)
at
com.sun.jini.start.ServiceStarter.processServiceDescriptors(ServiceStarter.java:445)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:476)
May 13, 2013 12:21:00 PM com.sun.jini.start.ServiceStarter
checkResultFailures
WARNING: Associated service descriptor [0]:
[http://localhost:8080/reggie-dl.jar http://localhost:8080/jsk-dl.jar,
config/reggie.policy, ../../lib/reggie.jar,
com.sun.jini.reggie.TransientRegistrarImpl, [config/jrmp-reggie.config],
com.sun.jini.start.NonActivatableServiceDescriptor$1@36b60b93,
BasicProxyPreparer[]]
JRMP SERVER:
scripts/jrmp-server.sh
+ java -Djava.security.manager=
-Djava.security.policy=config/server.policy -Djava.ext.dirs=../../lib-ext/
'-Djava.rmi.server.codebase=http://nrlmac.local:8080/server-dl.jar
http://nrlmac.local:8080/jsk-dl.jar' -jar lib/server.jar
config/jrmp-server.config
Hello server is ready
CLIENT:
scripts/client.sh
+ java -Djava.security.manager=
-Djava.security.policy=config/client.policy
-Djava.security.properties=config/dynamic-policy.security-properties
-Djava.ext.dirs=../../lib-ext/
-Djava.rmi.server.codebase=http://nrlmac.local:8080/jsk-dl.jar -jar
lib/client.jar config/client.config
Calling sayHello in smart proxy
Server says: Hello, world!
As you can see the example worked, but I got a ClassNotFoundException when
I started Reggie. I started a Service Browser and the two services
ServiceRegistrar and Hello were found by the browser. The output of the
class server shows that the reggie.jar containing
com.sun.jini.reggie.RegistrarProxy was served up when reggie was started,
but I still got the exception.
I don't really know why this is happening. Is this a problem with the
ServiceStarter? the ClassServer?
I have previously gotten a ClassNotFoundException for the other Jini
services in my distributed simulation system:
LookupRegistrar: com.sun.jini.reggie.RegistrarImpl_Stub
TransactionManager: com.sun.jini.mahalo.TxnManagerImpl_Stub
JavaSpace: com.sun.jini.outrigger.OutriggerServerWrapper_Stub
LeaseRenewal: com.sun.jini.norm.NormServerBaseImpl_Stub
And again all these services were listed in the browser. However, my
system that uses these services fails because it cannot get proxies for
the services that it needs.
I have been trying to discover what the problem is without much success.
Any help you can give me to locate and fix the issue is greatly
appreciated.
Cheers,
Bob Daley