DataStax DevCenter架构窗口始终为空

时间:2015-09-08 11:07:53

标签: cassandra

成功连接到Cassandra后,创建了几个键空间和表,DevCenter Schema窗口突然变空。

即使在重新启动DevCenter并重新安装DevCenter(包括删除用户主目录下的.devcenter目录)几次之后,它也没有显示任何内容并保持空白。

在DevCenter default_1.cql窗口“in keyspace”下拉列表中,我可以看到下拉列表中的键空间

使用cqlsh我可以在那里看到所有的键空格和表。

环境信息:在最新的Mac OS上运行DevCenter 1.4.1,在最新的Centos7上运行Cassandra 2.2.1。

关于可能是什么原因以及如何解决它的任何想法?

感谢。

在DevCenter错误日志中找到以下堆栈跟踪(关于DevCenter - >安装详细信息 - >查看错误日志)

    !ENTRY org.eclipse.ui 4 0 2015-09-08 07:27:19.757
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalArgumentException: STATUS_ID is not a field defined in this definition
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:62)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:825)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:701)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:685)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:613)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4199)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at com.datastax.devcenter.rcp.Application.start(Application.java:22)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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:497)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.IllegalArgumentException: STATUS_ID is not a field defined in this definition
    at com.datastax.driver.core.UserType.getFieldType(UserType.java:165)
    at com.datastax.devcenter.schema.SchemaInitializer.getDataTypeMapping(SchemaInitializer.java:611)
    at com.datastax.devcenter.schema.SchemaInitializer.getDataTypeMapping(SchemaInitializer.java:587)
    at com.datastax.devcenter.schema.SchemaInitializer.loadColumnMetaData(SchemaInitializer.java:418)
    at com.datastax.devcenter.schema.SchemaInitializer.loadTableMetaData(SchemaInitializer.java:378)
    at com.datastax.devcenter.schema.SchemaInitializer.loadMetaDataFromDriver(SchemaInitializer.java:328)
    at com.datastax.devcenter.schema.SchemaInitializer.init(SchemaInitializer.java:122)
    at com.datastax.devcenter.cql.ui.wizards.ddl.DDLWizard.getActiveSchema(DDLWizard.java:211)
    at com.datastax.devcenter.cql.ui.wizards.ddl.KeyspaceWizard.createModel(KeyspaceWizard.java:61)
    at com.datastax.devcenter.cql.ui.wizards.ddl.DDLWizard.init(DDLWizard.java:128)
    at com.datastax.devcenter.cql.ui.wizards.ddl.DDLWizard.init(DDLWizard.java:111)
    at com.datastax.devcenter.cql.ui.handlers.ddl.NewKeyspaceHandler.createWizard(NewKeyspaceHandler.java:18)
    at com.datastax.devcenter.cql.ui.handlers.ddl.DDLHandler.execute(DDLHandler.java:37)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    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:497)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    ... 40 more

!ENTRY org.eclipse.ui 4 0 2015-09-08 07:27:34.940
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: -1)
    at org.eclipse.swt.SWT.error(SWT.java:4441)
    at org.eclipse.swt.SWT.error(SWT.java:4356)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3994)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3671)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at com.datastax.devcenter.rcp.Application.start(Application.java:22)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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:497)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(ArrayList.java:418)
    at java.util.ArrayList.get(ArrayList.java:431)
    at com.datastax.devcenter.cql.CqlContext.getLastSchema(CqlContext.java:116)
    at com.datastax.devcenter.cql.CqlContext.getSchema(CqlContext.java:135)
    at com.datastax.devcenter.cql.CqlContext.getDatabaseSchema(CqlContext.java:104)
    at com.datastax.devcenter.schema.ui.views.SchemaTreeViewPart.updateTreeViewerInput(SchemaTreeViewPart.java:142)
    at com.datastax.devcenter.schema.ui.views.SchemaTreeViewPart.access$2(SchemaTreeViewPart.java:135)
    at com.datastax.devcenter.schema.ui.views.SchemaTreeViewPart$1.run(SchemaTreeViewPart.java:117)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    ... 23 more

1 个答案:

答案 0 :(得分:1)

从堆栈跟踪中,看起来DevCenter用于连接到Cassandra的java驱动程序在被询问它的数据类型时无法找到用户定义的类型字段“STATUS_ID”。

Caused by: java.lang.IllegalArgumentException: STATUS_ID is not a field defined in this definition
at com.datastax.driver.core.UserType.getFieldType(UserType.java:165)
at com.datastax.devcenter.schema.SchemaInitializer.getDataTypeMapping(SchemaInitializer.java:611)

这不应该发生,因为直接从java驱动程序检索字段名称列表。

我能够重现这个问题,我认为根本原因是java驱动程序的区分大小写问题,尽管DevCenter也应该更好地处理这个问题。我为java驱动程序提交了JAVA-962

感谢您提出/报告此事。