Jini(Apache River)无法初始化Reggie(Lookup Service)脚本

时间:2013-06-14 18:23:11

标签: java jini

我知道Jini(Apache River)是一种相当陈旧且过时的技术,但我需要它用于大学项目。

问题是我甚至无法启动查找服务脚本(jrmp-reggie.sh)。执行httpd.sh效果很好。

有什么建议吗?感谢。

顺便说一句,这是我得到的输出:

+ java -Djava.security.policy=config/start.policy -Djava.ext.dirs=../../lib-ext/ -jar ../../lib/start.jar config/start-reggie.config
Jun 14, 2013 8:19:51 PM com.sun.jini.reggie.RegistrarImpl <init>
SEVERE: Reggie initialization failed
java.lang.ExceptionInInitializerError
    at net.jini.config.AbstractConfiguration.getEntryInternal(AbstractConfiguration.java:371)
    at net.jini.config.AbstractConfiguration.getEntry(AbstractConfiguration.java:193)
    at com.sun.jini.reggie.RegistrarImpl.init(RegistrarImpl.java:4554)
    at com.sun.jini.reggie.RegistrarImpl.access$000(RegistrarImpl.java:143)
    at com.sun.jini.reggie.RegistrarImpl$1.run(RegistrarImpl.java:448)
    at com.sun.jini.reggie.RegistrarImpl.loginAndRun(RegistrarImpl.java:461)
    at com.sun.jini.reggie.RegistrarImpl.<init>(RegistrarImpl.java:396)
    at com.sun.jini.reggie.TransientRegistrarImpl.<init>(TransientRegistrarImpl.java:39)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at com.sun.jini.start.NonActivatableServiceDescriptor.create(NonActivatableServiceDescriptor.java:674)
    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)
Caused by: java.lang.RuntimeException: Unexpected exception
    at com.sun.jini.logging.Levels.createLevel(Levels.java:142)
    at com.sun.jini.logging.Levels.<clinit>(Levels.java:52)
    ... 16 more
Caused by: java.io.EOFException
    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2596)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
    at com.sun.jini.logging.Levels.createLevel(Levels.java:138)
    ... 17 more

Jun 14, 2013 8:19:51 PM com.sun.jini.start.ServiceStarter checkResultFailures
WARNING: Exception creating service.
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at com.sun.jini.start.NonActivatableServiceDescriptor.create(NonActivatableServiceDescriptor.java:674)
    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)
Caused by: java.lang.ExceptionInInitializerError
    at net.jini.config.AbstractConfiguration.getEntryInternal(AbstractConfiguration.java:371)
    at net.jini.config.AbstractConfiguration.getEntry(AbstractConfiguration.java:193)
    at com.sun.jini.reggie.RegistrarImpl.init(RegistrarImpl.java:4554)
    at com.sun.jini.reggie.RegistrarImpl.access$000(RegistrarImpl.java:143)
    at com.sun.jini.reggie.RegistrarImpl$1.run(RegistrarImpl.java:448)
    at com.sun.jini.reggie.RegistrarImpl.loginAndRun(RegistrarImpl.java:461)
    at com.sun.jini.reggie.RegistrarImpl.<init>(RegistrarImpl.java:396)
    at com.sun.jini.reggie.TransientRegistrarImpl.<init>(TransientRegistrarImpl.java:39)
    ... 8 more
Caused by: java.lang.RuntimeException: Unexpected exception
    at com.sun.jini.logging.Levels.createLevel(Levels.java:142)
    at com.sun.jini.logging.Levels.<clinit>(Levels.java:52)
    ... 16 more
Caused by: java.io.EOFException
    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2596)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
    at com.sun.jini.logging.Levels.createLevel(Levels.java:138)
    ... 17 more

Jun 14, 2013 8:19:51 PM com.sun.jini.start.ServiceStarter checkResultFailures
WARNING: Associated service descriptor [0]: [http://t420:8080/reggie-dl.jar http://t420: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@c27ce4, BasicProxyPreparer[]]

3 个答案:

答案 0 :(得分:1)

这看起来与我在升级JDK时看到的错误相同。试试JDK 1.6.0_38(如果您使用的是更高版本)。此外,Apache River项目确实遇到了这个问题,似乎有一个解决方法,涉及更改Levels.java

https://issues.apache.org/jira/browse/RIVER-415

此致

答案 1 :(得分:0)

听起来你可能没有开始rmid。

答案 2 :(得分:0)

我猜Reggie脚本试图访问配置文件,但它不能! 如果脚本位于:river / examples / hello / scripts中 将其复制到更高的文件夹。我的意思是河/例子/你好/ 然后,运行它。请告诉我您的输出。您正在使用'sh'文件。但是,不要使用'bat'文件。让我知道结果。