我目前正在Windows 7、64位上工作。我用spring roo安装了一个干净的sts 2.7.2版本,起初一切工作都很正常。后来,我尝试安装独立版本的spring roo 1.1.5。键入roo后,我立即开始获取以下堆栈跟踪:[org.springframework.roo.felix [44]] [org.springframework.roo.felix.pgp.PgpServiceImpl] The activate method has thrown an exceptionorg.apache.felix.log.LogException: java.lang.IllegalArgumentException: java.io.IOException: unknown object in stream: 7 at org.springframework.roo.felix.pgp.PgpServiceImpl.getTrustedKeys(PgpServiceImpl.java:152) at org.springframework.roo.felix.pgp.PgpServiceImpl.trust(PgpServiceImpl.java:168) at org.springframework.roo.felix.pgp.PgpServiceImpl.trustDefaultKeys(PgpServiceImpl.java:110) at org.springframework.roo.felix.pgp.PgpServiceImpl.trustDefaultKeysIfRequired(PgpServiceImpl.java:93) at org.springframework.roo.felix.pgp.PgpServiceImpl.activate(PgpServiceImpl.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227) at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38) at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591) at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472) at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:146) at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:226) at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118) at org.apache.felix.scr.impl.manager.DelayedComponentManager.createRealComponent(DelayedComponentManager.java:95) at org.apache.felix.scr.impl.manager.AbstractComponentManager$Registered.getService(AbstractComponentManager.java:1148) at org.apache.felix.scr.impl.manager.DelayedComponentManager.getService(DelayedComponentManager.java:88) at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:310) at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:221) at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:297) at org.apache.felix.framework.Felix.getService(Felix.java:3139) at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:411) at org.apache.felix.scr.impl.manager.DependencyManager.getService(DependencyManager.java:785) at org.apache.felix.scr.impl.manager.DependencyManager$1.getInstance(DependencyManager.java:1039) at org.apache.felix.scr.impl.helper.BindMethod.getParameters(BindMethod.java:564) at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:226) at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38) at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591) at org.apache.felix.scr.impl.helper.BaseMethod$NotResolved.invoke(BaseMethod.java:548) at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472) at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1028) at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:944) at org.apache.felix.scr.impl.manager.DependencyManager.open(DependencyManager.java:868) at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:200) at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118) at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:997) at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333) at org.apache.felix.scr.impl.manager.DependencyManager.serviceAdded(DependencyManager.java:283) at org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(DependencyManager.java:170) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3890) at org.apache.felix.framework.Felix.access$000(Felix.java:79) at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:728) at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107) at org.apache.felix.framework.Felix.registerService(Felix.java:2979) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:313) at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449) at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460) at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1009) at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333) at org.apache.felix.scr.impl.manager.DependencyManager.serviceAdded(DependencyManager.java:283) at org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(DependencyManager.java:170) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3890) at org.apache.felix.framework.Felix.access$000(Felix.java:79) at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:728) at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107) at org.apache.felix.framework.Felix.registerService(Felix.java:2979) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:313) at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449) at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460) at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1009) at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333) at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:157) at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.enableComponents(ConfiguredComponentHolder.java:256) at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253) at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147) at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111) at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285) at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:203) at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729) at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3879) at org.apache.felix.framework.Felix.startBundle(Felix.java:1850) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) at java.lang.Thread.run(Unknown Source)Caused by: java.io.IOException: unknown object in stream: 7 at org.bouncycastle.openpgp.PGPObjectFactory.nextObject(Unknown Source) at org.bouncycastle.openpgp.PGPPublicKeyRingCollection.<init>(Unknown Source) at org.springframework.roo.felix.pgp.PgpServiceImpl.getTrustedKeys(PgpServiceImpl.java:142) ... 83 more
我尝试搜索此内容,但找不到任何内容,因此我安装了1.2.0M1版本,但遇到了同样的问题。一段时间后,我放弃了,并尝试继续使用生活在以前工作的ide中的roo shell。但是,我的想法似乎不再起作用。当我尝试在现有的roo项目上执行任何命令或尝试创建一个新项目时,它将永远挂起。
为了修复它,我尝试删除sts,再次安装它,重新启动我的电脑,清理注册表,安装其他版本(如1.7.1),将我的jdk从1.6_22更改为1.6_27,但是现在我总是遇到相同的问题。
我在spring roo上已经读了很多书,真的很期待开始使用它,但是我没办法了。
我能做些什么才能使其恢复正常工作?
在此先感谢您的帮助。
最佳答案
我找到了解决方案,我被STS-1931击中。删除〜/ .spring_roo_pgp.bpg可以解决此问题。
关于spring-roo - Spring Roo不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7717177/