使用java 7在osx 10.6.8中启动roo shell时出错

时间:2013-11-12 23:28:17

标签: macos shell java-7 spring-roo

我正在使用mac 10.6.8(雪豹)。我用JDK 7替换了原来的JDK 6安装(顺便说一句,在我的操作系统中不能以完全干净的方式完成)所以现在" java"命令指向7中的jre,JAVA_HOME也设置为7安装。然后我安装了maven 3.0.5,最后通过自制软件运行。当我尝试启动roo shell时,我收到以下错误消息。我不知道问题的性质。

有没有办法将参数传递给roo以使用差异jre,例如?

  

$ roo   2013年11月12日下午10:38:53 org.springframework.roo.felix.JdkDelegatingLogListener logNow   严重:[org.springframework.roo.uaa [71]] [org.springframework.roo.uaa.UaaRelatedComponentRegistrationHelper] activate方法抛出异常   java.lang.UnsatisfiedLinkError:/ Library / Java / JavaVirtualMachines / jdk1.7.0_40.jdk / Constate / Home / jre / lib / libsx.dylib:dlopen Home / jre / lib / libosx.dylib,1):找不到符号:_JNFRunLoopDidStartNotification     参考自:/ Library / Java / JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/./libosxapp.dylib     预期在:/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation    在/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/./libosxapp.dylib       at java.lang.ClassLoader $ NativeLibrary.load(Native Method)       at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1957)       at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882)       在java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)       在java.lang.Runtime.loadLibrary0(Runtime.java:849)       在java.lang.System.loadLibrary(System.java:1087)       at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)       at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)       at java.security.AccessController.doPrivileged(Native Method)       在java.util.prefs.MacOSXPreferencesFile。(MacOSXPreferencesFile.java:82)       at java.util.prefs.MacOSXPreferences.cfFileForNode(MacOSXPreferences.java:137)       在java.util.prefs.MacOSXPreferences。(MacOSXPreferences.java:103)       在java.util.prefs.MacOSXPreferences。(MacOSXPreferences.java:77)       at java.util.prefs.MacOSXPreferences.getUserRoot(MacOSXPreferences.java:58)       at java.util.prefs.MacOSXPreferencesFactory.userRoot(MacOSXPreferencesFactory.java:30)       at java.util.prefs.Preferences.userRoot(Preferences.java:457)       at java.util.prefs.Preferences.userNodeForPackage(Preferences.java:371)       在org.springframework.uaa.client.util.PreferencesUtils.getPreferencesFor(PreferencesUtils.java:34)       在org.springframework.uaa.client.internal.UaaServiceImpl。(UaaServiceImpl.java:71)       在org.springframework.uaa.client.UaaServiceFactory.getUaaService(UaaServiceFactory.java:61)       在org.springframework.uaa.client.UaaServiceFactory.getUaaService(UaaServiceFactory.java:42)       在org.springframework.roo.uaa.UaaRelatedComponentRegistrationHelper.activate(UaaRelatedComponentRegistrationHelper.java:28)       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       at java.lang.reflect.Method.invoke(Method.java:606)       在org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227)       在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)       在org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472)       在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.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.AbstractComponentManager.enable(AbstractComponentManager.java:157)       在org.apache.felix.scr.impl.config.ConfiguredComponentHolder.enableComponents(ConfiguredComponentHolder.java:256)       at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253)       在org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)       在org.apache.felix.scr.impl.BundleComponentActivator。(BundleComponentActivator.java:111)       在org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285)       在org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:203)       在org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)       在org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)       在org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)       在org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3879)       在org.apache.felix.framework.Felix.startBundle(Felix.java:1850)       在org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)       在org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)       在java.lang.Thread.run(Thread.java:724)

2013年11月12日下午10:38:53 org.springframework.roo.felix.JdkDelegatingLogListener logNow 严重:[org.springframework.roo.uaa [71]] [org.springframework.roo.uaa.UaaRelatedComponentRegistrationHelper]无法创建组件实例,激活失败

1 个答案:

答案 0 :(得分:1)

我找不到JDK 7的真正解决方案,所以我最终简单地将我的JAVA_HOME变量指向java 6并且现在可以正常工作了。

我无法理解JDK 7安装和OSX雪豹之间的交互必须具备的一些特殊性。