oracle数据库连接出错

图片说明!
java.lang.NoSuchMethodError: oracle.jdbc.OracleCallableStatement.setStringAtName(Ljava/lang/String;Ljava/lang/String;)V
at oracle.dbtools.db.OracleUtil.checkAccess(OracleUtil.java:411)
at oracle.dbtools.db.DBUtil.hasAccess(DBUtil.java:1898)
at oracle.dbtools.raptor.query.QueryUtils.checkNonOracleAccess(QueryUtils.java:589)
at oracle.dbtools.raptor.query.QueryUtils.getQuery(QueryUtils.java:399)
at oracle.dbtools.raptor.query.QueryUtils.getQuery(QueryUtils.java:250)
at oracle.dbtools.raptor.query.ObjectQueries.getQuery(ObjectQueries.java:43)
at oracle.dbtools.raptor.navigator.db.xml.XmlObjectFactory.createFolderInstance(XmlObjectFactory.java:60)
at oracle.dbtools.raptor.navigator.db.xml.XmlTypeOwnerInstance.listTypeFolders(XmlTypeOwnerInstance.java:93)
at oracle.dbtools.raptor.navigator.db.impl.TypeContainerTreeNode.loadTypeFolders(TypeContainerTreeNode.java:111)
at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:183)
at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:112)
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:621)
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:745)

图片说明
oracle.jdbc.OracleCallableStatement.setStringAtName(Ljava/lang/String;Ljava/lang/String;)V

3个回答

看下驱动包版本,还有检查下方法是否使用正确

好像用ojdbc14.jar 訪問oracle11g會出現這個問題。
請確認下sql developer是否使用正確的驅動包。

refer url:
https://www.eehelp.com/question/oracle-database-11g-xe-and-oraclient10g-home1/

应该是驱动包有问题 建议把用的什么驱动说明下 还有数据库的版本

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
oracle数据库连接 出错
出错信息rnHit uncaught exception java.lang.NullPointerExceptionrnerror creating connection:rnException in thread "main" java.lang.NullPointerExceptionrn at oracledatabase.DatabaseJdbc.getResultsByColumnNamern at oracledatabase.DatabaseJdbc.mainrn代码如下:rnpackage oracledatabase;rnrnimport java.sql.ResultSet;rnimport java.sql.DriverManager;rnimport java.sql.SQLException;rnimport java.sql.Connection;rnimport java.sql.Statement;rnimport java.sql.ResultSetMetaData;rnrnpublic class DatabaseJdbcrnrn public static void main(String[] args) rn DatabaseJdbc databasejdbc = new DatabaseJdbc();rn databasejdbc.getResultsByColumnName();rn databasejdbc.getResultsByColumnPosition();rn databasejdbc.getAllColumn();rn databasejdbc.closeConnection();rn rn public DatabaseJdbc()rn try rn Class.forName("oracle.jdbc.driver.OracleDriver");rn connection = DriverManager.getConnection(sourceURL);rn statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);rn catch (SQLException sqle) rn System.err.println("error creating connection:");rn catch (ClassNotFoundException ex) rn /** @todo Handle this exception */rn System.err.println(ex.toString());rn rn rn void getResultsByColumnName() rn try rn ResultSet resultSet = statement.executeQuery(allName);rn int row = 0;rn while(resultSet.next()) rn System.out.println("Row " + (++row) + ") " +rn resultSet.getString("name") + " " +rn resultSet.getString("id"));rn rn resultSet.close();rn catch (SQLException sqle) rn System.out.println("\nSQLException: \n--- ");rn System.out.println("SQL state: " + sqle.getSQLState());rn// System.out.println("Exception deal: " + sqle.getNextException());rn System.out.println("Message: " + sqle.getMessage());rnrn rn rn void getResultsByColumnPosition() rn try rn ResultSet resultSet = statement.executeQuery(allName);rn int row = 0;rn while(resultSet.next()) rn System.out.println("\nRow " + (++row) + ")");rn for(int i=0; i<=2;i++)rn System.out.println((i>1?", ":" ") + resultSet.getString(i));rn rn rn resultSet.close();rn catch (SQLException sqle) rn System.out.println("SQLException: \n--- ");rn System.out.println("SQL state: " + sqle.getSQLState());rn// System.out.println("Exception deal: " + sqle.getNextException());rn System.out.println("Message: " + sqle.getMessage());rn rn rn void getAllColumn() rn try rn ResultSet resultSet = statement.executeQuery(allName);rn ResultSetMetaData metadata = resultSet.getMetaData();rn// Column countrn int column = metadata.getColumnCount();rn int row = 0;rn while(resultSet.next()) rn System.out.println("\nRow " + (++row) + ")");rn for(int i=0; i<=2;i++)rn System.out.println((i>1?", ":" ") + resultSet.getString(i));rn rn rn resultSet.close();rn catch (Exception ex) rnrn rn rn void closeConnection() rn if (connection != null) rn try rn connection.close();rn connection = null;rn catch (SQLException ex) rn System.out.println("SQLException: \n--- ");rn System.out.println("SQL state: " + ex.getSQLState());rn// System.out.println("Exception deal: " + ex.getNextException());rn System.out.println("Message: " + ex.getMessage());rn rn rn rn Connection connection;rn Statement statement;rn String sourceURL = "jdbc:oracle:thin:@localhost:1521:system";rn String userNameAndID = "select name,id from SYS_WORKER";rn String allName = "select * from SYS_WORKER";rnrn
oracle 数据库连接出错
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connectionrnrn请问原因是什么?怎么解决?rn谢谢!rn
数据库连接出错
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)rnODBC 驱动程序不支持所需的属性。rn运行时出错 rn但把数据库文件换成另外一个就不出现这样的问题了rn
数据库连接出错!!
我用dbexpress 连数据库,在点击测试后提示rnrn Unable to load libsqlsyb.sornrn 可是我的这个文件在/home/local/kylix3/bin 下是存在的啊~ . . rnrn 其它的数据库都不会出这问题,就只有我装的dbexpress driver for sybase 会这样~!?? rn 可能是我不太会装它,请问有哪位大哥装过 dbExpress Driver for Sybase (Linux version) 1.2 啊? 请帮帮我好吗? . .rn
数据库连接出错!!!!
Private Sub Command1_Click()rnOpenConnectionrnIf Err.Number = 0 ThenrnMsgBox "数据连接成功", vbOKOnly, "数据库连接成功"rnEnd IfrnEnd Subrn'以上是一个窗体,窗体上有一个按钮控件,Command1,caption为测试数据库连接!rnrn这是我连接SQLServer数据库的一个模块!rnPublic rsNew As ADODB.RecordsetrnPublic cnNew As ADODB.ConnectionrnPublic addFlag As Booleanrn'*****************************************rn'*名称:OpenConnectionrn'*功能:打开数据库连接rn'*****************************************rnrnPublic Function OpenConnection() As BooleanrnDim sMsg As StringrnOn Error GoTo strErrHandlernSet cnNew = New ADODB.ConnectionrncnNew.ConnectionTimeout = 25rncnNew.Provider = "sqloledb"rn'cnNew.Properties("data source").Value = "MYSERVER" '服务器名 ★★★★★rncnNew.Properties("initial catalog").Value = "gzgl" '库名rncnNew.Properties("integrated security").Value = "SSPI" '登陆类型rncnNew.Properties("user id").Value = "sa"rncnNew.Properties("password").Value = "sa"rncnNew.OpenrnrnOpenConnection = TruernaddFlag = TruernExit FunctionrnrnstrErrHandle:rnsMsg = "数据库连接失败,请检查数据库是否存在!"rnMsgBox sMsg, vbCritical + vbOKOnly, "数据库连接失败"rnaddFlag = FalsernEndrnrnEnd FunctionrnrnPublic Sub CloseConnection()rn'关闭数据库rnOn Error Resume NextrnIf cnNew.State <> adStateClosed Then cnNew.ClosernSet cnNew = NothingrnEnd Subrn'*****************************************rn'*名称:GetRecordsetrn'*功能:连接数据库记录集rn'*****************************************rnPublic Function GetRecordset(ByVal strSQL As String) As BooleanrnDim strMsg As StringrnDim bReturn As BooleanrnOn Error GoTo strErrHandlernSet rsNew = New ADODB.RecordsetrnIf addFlag = False Then bReturn = OpenConnectionrnrnWith rsNewrn.ActiveConnection = cnNewrn.CursorLocation = adUseClientrn.CursorType = adOpenKeysetrn.LockType = adLockOptimisticrn.Open strSQLrnEnd WithrnaddFlag = TruernGetRecordset = TruernExit FunctionrnrnstrErrHandle:rnstrMsg = "数据库生成结果出错!"rnMsgBox strMsg, vbCritical + vbOKCancel, "数据库连接失败"rnGetRecordset = FalsernEndrnrnEnd FunctionrnPublic Sub CloseRecordset()rn'关闭数据集rnOn Error Resume NextrnIf rsNew.State <> adStateClosed Then rsNew.ClosernSet rsNew = NothingrnEnd Subrnrn问题:1、我的SQL Server服务器是MYSERVER,我想通过代码自动获得本机SQL Server服务器名,同时想实现如果我的程序在没有安装SQL Server数据库的时候,提示安装!rn 2、我以上给出的代码是完全正确的,为了进行测试我把服务器名改为Server1,然后调试,程序无法响应也不报错,照理来说应该提示:数据库连接失败,请检查数据库是否存在!"的啊,改了一个当前不存在的服务器名,就程序中断,不知道各位有没有遇到过这个问题!急切地想解决这个问题!问题解决即结贴!rnrnrnrn
数据库连接出错?
[color=#FF0000]这是我的代码:[/color]rn<%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*,java.util.Date" errorPage="" %>rnrn <%rn boolean foundeer=false;rn String user_name,user_pass;rn if(!foundeer)rnrn if (session.getAttribute("user_name")==null)rn user_name=request.getParameter("user_name");rn user_pass=request.getParameter("user_pass");rnrn if(user_name==null || user_pass==null)rn out.print("用户名和用户密码不能为空!");rn foundeer=true;rn rnrn String sql="select * from member where user_name='"+user_name+"'";rn ResultSet rs;rn rs=mdb.executeQuery(sql);rnrn if(!rs.next()) [color=#FF0000] //这是报错的地方,[/color] rn out.print("你输入的用户不存在!");rn foundeer=true;rn rn elsern if(user_pass.equals(rs.getString("user_pass")))rn session.setAttribute("user_name",""+rs.getString("user_name")+"");rn session.setAttribute("user_type","yes");rn String sql1="update member set user_lasttime='"+((new java.util.Date()).toLocaleString())+"',user_lastip='"+(String)request.getRemoteHost()+"' where user_name='"+user_name+"'";rn mdb.executeUpdate(sql1);rn response.sendRedirect("index.jsp");rn rn elsern out.print("你输入的密码错误!");rn foundeer=true;rn rn rnrnrn else response.sendRedirect("index.jsp");rnrn if(foundeer)rn %> 重新登陆<%rn rnrn%>rnrnrnrn[color=#FF0000]出错的报告:[/color]rn18: ResultSet rs;rn19: rs=mdb.executeQuery(sql);rn20: rn21: if(!rs.next())rn22: out.print("你输入的用户不存在!");rn23: foundeer=true;rn24: rnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rnrnrnroot cause rnrnjava.lang.NullPointerExceptionrn org.apache.jsp.login_jsp._jspService(login_jsp.java:85)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.rnrnrn--------------------------------------------------------------------------------rnrnrn
数据库连接出错!!!!!
在Dreamweaver中进行动态网页开发的时候,必须要与数据库连接.首先建立一个"asp vbscript"文件.然后在"应用程序"工作面版→"数据库"→单击"+"→"自定义连接字符串""→"选自定义连接字符窜"在出现的对话框中进行连接设置时.在连接名中填入:con连接字符串中填入: Driver=Microsoft Access Driver(*.mdb);dbq=f:\web\web.mdb 在Dreamweaver应连接中选择:使用本地计算机上的驱动程序.在测试时出现连接失败提示."[Microsoft][ODBC 驱动程序管理器]未发现数据源名称并且未指定默认驱动程序" 把Driver=Microsoft Access Driver(*.mdb);dbq=f:\web\web.mdb 改为Driver=Microsoft Access Driver(*.mdb);dbq="server.mappath("web.mdb")和Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("web.mdb")rn时.问题一样存在.这是什么原因呢.请高手指教!!
数据库连接出错!!!
我新建了一个ASA数据库,连接时出现错误提示:rn Unable to initialize Client Library Contextrn这是什么原因?
数据库连接出错?
要连接文章和用户的两个表,用文章表的用户名username和用户表的用户名username做查询条件,却出错!错在哪?rn<%dim rs1rnset rs1=server.CreateObject("adodb.recordset")rnrs1.open"select yc.ycid,yc.username,user.username from yc inner join user on yc.username=user.username where yc.ycid="&ycid,conn,1,1rn%>
数据库连接出错!
在运行(run)的时候没有问题,数据库可以连接上,但是编译之后(产生可执行文件),却不能连接上数据库(不存在缺少其他文件的原因)!这是什么原因?(我用的是odbc接口)
oracle enterprise manager数据库连接用户密码出错
我安装时的密码记得很清楚,不可能会录错的,可我用sys/密码和system/密码,身份连接也sysdba了,错误信息:ORA-01017:invalid username/password; logon denied,有谁知道这是怎么回事吗?我用的是oracle9
oracle数据库连接
导入数据库连接包:http://pan.baidu.com/s/1ge6GbNP try { String driver = "oracle.jdbc.driver.OracleDriver"; String url = "jdbc:oracle:thin:@127.0.0.1:1521:orcl"; String user = “scott"; String password =
Oracle数据库连接
package p5.com.byd.mes.dev.tool; import java.sql.Connection; import java.sql.SQLException; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import j...
Oracle 数据库连接
我想问一下,Oracle数据库能用OleDb来连接吗,谢谢。
数据库连接(Oracle)
一、表之间的连接(左、右、内、外连接) 左连接(右表只显示两个表中都具有相同a.emp_id = s.hjempid,左表全部列出) select * from employeehj a  left join employeehj1 s on a.emp_id = s.hjempid select * from employeehj a, employeehj1 s where  a.e
数据库连接ORACLE
数据库连接字符串
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件