SQuirreL Simplicit vjdbc VirtualDriver java.sql.SQLException:java.lang.NullPointerException

时间:2016-06-08 13:14:02

标签: jdbc mariadb squirrel-sql

使用SQuirreL连接/咨询分布式MariaDB,每次执行查询后都会得到java.sql.SQLException: java.lang.NullPointerException。它甚至出现在SHOW tables FROM catalog_name;SHOW columns FROM table_name;类型的查询中。这个驱动程序的常见行为是否有问题?

错误显示在自己的结果中"错误"选项卡,在选项卡后面,我想要的结果。到目前为止,这只是一个解决它的问题(Ctrl + Shift + F4),所以这是一个小麻烦,因为生成的其他结果选项卡显示了良好的数据。但是我想知道这是否是其他错误的症状(安装,版本协调,......):看到堆栈跟踪,红色,每次都会在我的脑海里冒出一些旗帜,即使我知道我的结果就在红色文本后面。

我使用Simplicit的vjdbc驱动程序de.simplicit.vjdbc.VirtualDriver.class来连接分布式MariaDB。同一SQuirreL实例中的其他驱动程序(DB2)不显示错误。 vjdbc驱动程序版本是1.6.5。 (自2007年起)并且没有更高版本,并且我无法访问此安装中的明确代码。

JVM是1.7.0_40:

C:\Users\manuelvigarcia>java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

也在SQuirreL"中列出":

sun.boot.library.path   c:\Program Files (x86)\Java\jdk1.7.0_40\jre\bin
java.vm.version         24.0-b56

和SQuirreL版本是3.6

我认为错误是在Simplicit VirtualDriver中产生的,给定了异常堆栈跟踪的顶部,但我无法访问代码。

最后,我将展示查询:

SELECT latitude, longitude, country_id FROM appartment_master.studio
WHERE appartment_id = 3000;

产生正确的结果窗格:

latitude    longitude   country_id
12.59565    38.76614    11

带有异常堆栈跟踪的错误窗格:

Error: java.sql.SQLException: java.lang.NullPointerException
    at de.simplicit.vjdbc.serial.StreamingResultSet.populate(StreamingResultSet.java:141)
    at de.simplicit.vjdbc.server.command.ConnectionEntry.handleResultSet(ConnectionEntry.java:337)
    at de.simplicit.vjdbc.server.command.ConnectionEntry.executeCommand(ConnectionEntry.java:223)
    at de.simplicit.vjdbc.server.command.CommandProcessor.process(CommandProcessor.java:169)
    at de.simplicit.vjdbc.server.rmi.CommandSinkRmiImpl.process(CommandSinkRmiImpl.java:39)
    at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    at sun.rmi.transport.Transport$2.run(Transport.java:202)
    at sun.rmi.transport.Transport$2.run(Transport.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:198)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

    at de.simplicit.vjdbc.util.SQLExceptionHelper.wrapThrowable(SQLExceptionHelper.java:59)
    at de.simplicit.vjdbc.util.SQLExceptionHelper.wrap(SQLExceptionHelper.java:17)
    at de.simplicit.vjdbc.server.command.CommandProcessor.process(CommandProcessor.java:180)
    at de.simplicit.vjdbc.server.rmi.CommandSinkRmiImpl.process(CommandSinkRmiImpl.java:39)
    at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    at sun.rmi.transport.Transport$2.run(Transport.java:202)
    at sun.rmi.transport.Transport$2.run(Transport.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:198)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
    at com.sun.proxy.$Proxy6.process(Unknown Source)
    at de.simplicit.vjdbc.rmi.CommandSinkRmiProxy.process(CommandSinkRmiProxy.java:40)
    at de.simplicit.vjdbc.command.DecoratedCommandSink.process(DecoratedCommandSink.java:69)
    at de.simplicit.vjdbc.VirtualStatement.getResultSet(VirtualStatement.java:150)
    at net.sourceforge.squirrel_sql.client.session.StatementWrapper.getResultSetWrapper(StatementWrapper.java:101)
    at net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.processQuery(SQLExecuterTask.java:398)
    at net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.run(SQLExecuterTask.java:212)
    at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
    at java.lang.Thread.run(Thread.java:724)

SQLState:  null
ErrorCode: 0

0 个答案:

没有答案