当前位置: 代码迷 >> J2SE >> 远程连接数据库,该如何解决
  详细解决方案

远程连接数据库,该如何解决

热度:69   发布时间:2016-04-24 14:23:49.0
远程连接数据库,急急急!!!!!!!
我想在公司的机子上用rmi+java直接连接另外一个公司的数据库,我把数据库连接放在远程调用的方法里,运行后老出现以下错误:

java.sql.SQLException:   [Microsoft][SQLServer   2000   Driver   for   JDBC]Error   opening/loading   com.microsoft.util.transliteration.properties.
at   com.microsoft.jdbc.base.BaseExceptions.createException(Unknown   Source)
at   com.microsoft.jdbc.base.BaseExceptions.getException(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSConnection.setNonUnicodeTransliterator(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSConnection.setSQLCollation(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSRequest.processEnvChange(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.processReplyToken(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown   Source)
at   com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown   Source)
at   com.microsoft.jdbc.base.BaseConnection.open(Unknown   Source)
at   com.microsoft.jdbc.base.BaseDriver.connect(Unknown   Source)
at   java.sql.DriverManager.getConnection(DriverManager.java:525)
at   java.sql.DriverManager.getConnection(DriverManager.java:171)
at   remote.server_remote.getConnection1(server_remote.java:30)
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at   java.lang.reflect.Method.invoke(Method.java:585)
at   sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at   sun.rmi.transport.Transport$1.run(Transport.java:153)
at   java.security.AccessController.doPrivileged(Native   Method)
at   sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at   sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at   sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at   java.lang.Thread.run(Thread.java:595)

我用的是jbuilder2006,修改了java.policy文件。添加了:
permission   java.net.SocketPermission   "*:0-65535 ", "listen,connect,accept,resolve ";
数据库是sql2000,数据库的权限也设置好了,
但是还是出错,非常感谢各位的帮忙!!!!!!!!!



------解决方案--------------------
三个 jar 包都在吗
------解决方案--------------------
似乎就是找不到jar包啊

把三个jar包合成一个试试


------解决方案--------------------
貌似没找到配置文件
  相关解决方案