sqldeveloper - java.nio.BufferUnderflowException

时间:2017-09-21 07:49:57

标签: java oracle oracle-sqldeveloper oracle12c

在Windows 10上启动sqldeveloper然后尝试连接到12c数据库后,我们收到以下java错误堆栈跟踪。

尝试使用sqldeveloper版本4.2或17.2

时会出现此问题

任何想法?

最佳

java.nio.BufferUnderflowException
    at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:151)
    at java.nio.ByteBuffer.get(ByteBuffer.java:715)
    at oracle.net.ns.NIOAcceptPacket.readPayloadBuffer(NIOAcceptPacket.java:167)
    at oracle.net.ns.NIOPacket.readNIOPacket(NIOPacket.java:282)
    at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:118)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:317)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1438)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:518)
    at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
    at oracle.jdeveloper.db.adapter.AbstractConnectionCreator.getConnection(AbstractConnectionCreator.java:229)
    at oracle.dbtools.raptor.standalone.connection.RaptorConnectionCreator.getConnectionImpl(RaptorConnectionCreator.java:392)
    at oracle.dbtools.raptor.standalone.connection.RaptorConnectionCreator.getConnection(RaptorConnectionCreator.java:118)
    at oracle.dbtools.raptor.dialogs.conn.ConnectionPrompt.promptForPassword(ConnectionPrompt.java:67)
    at oracle.jdevimpl.db.adapter.DatabaseProviderHelper$PasswordPrompter.promptForPassword(DatabaseProviderHelper.java:422)
    at oracle.jdevimpl.db.DBConnAddin$2.promptForPassword(DBConnAddin.java:98)
    at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:434)
    at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:365)
    at oracle.jdevimpl.db.adapter.CAConnectionCreator.createConnectionImpl(CAConnectionCreator.java:68)
    at oracle.javatools.db.DatabaseFactory.createConnection(DatabaseFactory.java:838)
    at oracle.javatools.db.DatabaseFactory.createDatabase(DatabaseFactory.java:282)
    at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:837)
    at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.getDatabase(Connections.java:281)
    at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:1201)
    at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:1187)
    at oracle.dbtools.raptor.navigator.db.DatabaseConnection.openConnectionImpl(DatabaseConnection.java:146)
    at oracle.dbtools.raptor.navigator.db.DatabaseConnection.openConnectionImpl(DatabaseConnection.java:41)
    at oracle.dbtools.raptor.navigator.db.BaseConnectionNode.getConnection(BaseConnectionNode.java:46)
    at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode.getObjectFactory(DatabaseTreeNode.java:90)
    at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:145)
    at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:119)
    at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:629)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

2 个答案:

答案 0 :(得分:0)

您需要在sqldeveloper安装中升级Oracle JDBC驱动程序。找到ojdbc8.jar并将其替换为可以从OTN下载的最新版本。然后重新启动JDev,问题应该消失。

答案 1 :(得分:0)

我在SQL Developer 18中遇到了同样的错误。我将Oracle驱动程序降级为Oracle 12.1(ojdbc7.jar)提供的驱动程序。我现在可以连接得很好。