运行gremlin console 连接hbase+elastricseach 测试操作titan,titan运行的环境是jdk1.8,linux环境有安装了jdk1.8.0_11环境,符合titan所需的jdk1.8环境,运行./bin/gremlin.sh 报错了,运行不起来。
[root@Master titan-1.0.0-hadoop2]# ./bin/gremlin.sh /,,,/ (o o)-----oOOo-(3)-oOOo-----plugin activated: aurelius.titanplugin activated: tinkerpop.serverplugin activated: tinkerpop.utilitiesplugin activated: tinkerpop.tinkergraphjava.lang.VerifyError: Bad <init> method call from inside of a branchException Details: Location: org/codehaus/groovy/tools/shell/util/SimpleCompletor.<init>()V @59: invokespecial Reason: Error exists in the bytecode Bytecode: 0000000: 04bd 0004 5903 03c5 0031 0153 5910 ff12 0000010: 02b8 0037 2a5f ab00 0000 004e 0000 0003 0000020: 0000 9b75 0000 0022 3231 c38a 0000 002b 0000030: 64df 9bb1 0000 003c 5f5a 57b7 003a a700 0000040: 305f 5a03 1231 b800 40c0 0031 b700 42a7 0000050: 001f 5f5a 5903 32ba 0049 0000 5f57 b700 0000060: 4ca7 000d bb00 4e59 1250 b700 53bf 57b1 0000070: Stackmap Table: full_frame(@56,{UninitializedThis},{Object[#57],UninitializedThis}) full_frame(@65,{UninitializedThis},{Object[#57],UninitializedThis}) full_frame(@82,{UninitializedThis},{Object[#57],UninitializedThis}) full_frame(@100,{UninitializedThis},{Object[#57],UninitializedThis}) full_frame(@110,{Object[#2]},{Object[#57]}) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.PRivateGetDeclaredConstructors(Class.java:2658) at java.lang.Class.getDeclaredConstructors(Class.java:2007) at org.codehaus.groovy.reflection.CachedClass$2$1.run(CachedClass.java:71) at java.security.accessController.doPrivileged(Native Method) at org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:68) at org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:66) at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46) at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33) at org.codehaus.groovy.reflection.CachedClass.getConstructors(CachedClass.java:265) at groovy.lang.MetaClassImpl.<init>(MetaClassImpl.java:215) at groovy.lang.MetaClassImpl.<init>(MetaClassImpl.java:225) at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createNormalMetaClass(MetaClassRegistry.java:168) at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createWithCustomLookup(MetaClassRegistry.java:158) at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.create(MetaClassRegistry.java:141) at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:250) at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:282) at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:255) at org.codehaus.groovy.vmplugin.v7.Selector$InitSelector.getMetaClass(Selector.java:365) at org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.setCallSiteTarget(Selector.java:947) at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:211) at org.codehaus.groovy.tools.shell.commands.HelpCommand.createCompleters(HelpCommand.groovy:45) at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215) at org.codehaus.groovy.tools.shell.CommandSupport.getCompleter(CommandSupport.groovy:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1844) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3734) at org.codehaus.groovy.tools.shell.CommandSupport.getProperty(CommandSupport.groovy) at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215) at org.codehaus.groovy.tools.shell.CommandsMultiCompleter.add(InteractiveShellRunner.groovy:167) at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215) at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:74) at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215) at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:144) at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215) at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
三、分析
原先以为是titan的jar冲突了,排查了很久,看到了jdk1.8.0_11 的bug 只要升级最新的jdk版本1.8.0_121版本就可以正常运行起来。
[root@Master titan-1.0.0-hadoop2]# ./bin/gremlin.sh /,,,/ (o o)-----oOOo-(3)-oOOo-----plugin activated: aurelius.titanplugin activated: tinkerpop.serverplugin activated: tinkerpop.utilitiesplugin activated: tinkerpop.tinkergraphgremlin>接下来,开始对titan进行深入的了解,可以互相学习
新闻热点
疑难解答