`

Throwable while attempting to get a new connection: null 连接DB2数据库已经解决

 
阅读更多
错误:Throwable while attempting to get a new connection: null
数据库:DB2
原因:使用DB2自带的驱动db2java.zip文件中的type2类型的驱动访问DB2,总是报错: java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path或者: java.lang.ClassNotFoundException:COM.ibm.db2.jdbc.app.DB2Driver      
要么就报:没有合适的驱动。

解决:本地硬盘搜索一个 db2jdbc.dll 文件把它拷到Java_Home/bin 重启服务就OK了.


感谢原作者-冷面阎罗:
http://www.blogjava.net/soddabao/archive/2008/04/22/194878.html



分享到:
评论

相关推荐

    数据连接池

    * @return Connection 可用连接或null */ public Connection getConnection(String name) { DBConnectionPool pool = (DBConnectionPool) pools.get(name); if (pool != null) { return pool.getConnection();...

    Java自定义异常案例--ExceptionManager(java源码)

    * Constructs a new instance with the specified detail message and cause. The * concrete handler is its super class. This constructor always used to construct * an exception wrapping the exist ...

    php-json-throwable:JSON编码和解码throwables和异常

    composer require wyrihaximus/json-throwable用法该软件包具有四个功能: throwable_json_encode将所有Throwable编码为JSON字符串throwable_encode将任何Throwable编码为数组throwable_json_decode将格式为...

    Jboss启动报Failed to parse WEB-INFweb.xml; - nested throwable错误

    Jboss启动报Failed to parse WEB-INFweb.xml; - nested throwable错误

    throwable 和 exception区别

    java Exception中Throwable和Exception之间的区别

    跨数据库数据迁移

    * 源数据库库连接池配置 * */ ConnPoolConfig config = new ConnPoolConfig(); config.setMaxPoolSize(30); config.setInitialPoolSize(20); config.setUrl("jdbc:sqlserver://192.168.0.222;database...

    软件测试用例方法总结

    比如说:应该要提示:“单据编码不允许为空”,却提示:“错误信息:Server Component wrap a Throwable. Exception Type is [javax.ejb.TransactionRolledbackLocalException]” 2、 记录的错误与实际遇到的错误不...

    throwable-http-errors:节点api的Throwable HTTP错误

    节点API的Throwable HTTP错误。 安装 npm i throwable-http-errors ... throw new Errors . BadRequest ( ) } const pet = await PetsController . create ( req . body ) res . send ( { status : t

    java经典面试2010集锦100题(不看你后悔)

    题目8:a 程序如下: public class Demo extends Base { private int count; public Demo() {  System.out.println("A Demo object has been created"); } protected void addOne() { count++; } } 有关类...

    fastjson-bypass-autotype-1.2.68:fastjson使用Throwable和AutoCloseable绕过自动类型1.2.68

    fastjson-bypass-autotype-1.2.68 fastjson因为exceptClass期望类的特性导致可以通过AutoCloseable和Throwable绕过自动类型。复现运行org.chabug.fastjson.DemoApplication ,访问 自动关闭绕过POST /parseObject ...

    捕获Throwable和捕获Exception的区别验证

    捕获Exception时,不会捕获error,像out of memory这种问题会在中间件的日志...捕获Throwable时,会捕获Exception和Error,像out of memory这种问题也会被捕获到,而程序对于这种Error没法进行处理,没有捕获的必要性。

    JSP Simple Examples

    It allows you to define a general class, and later more specialized classes by simply adding some new details. Constructor inheritance Constructors are used to create objects from the class. ...

    JAVAssd3选择题答案全

    (b) println appends a new line to the end of its output, but print does not (c) println inserts a new line at the beginning of its output, but print does not (d) print appends a new line to the end...

    带注释的Bootstrap.java

    * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ...

    A modified integral sliding mode control

    sliding mode control

    servlet2.4doc

    Called by the server (via the service method) to allow a servlet to handle a GET request. doHead(HttpServletRequest, HttpServletResponse) - Method in class javax.servlet.http.HttpServlet Receives an...

    springmybatis

    1.Configuration.xml 是 mybatis 用来建立 sessionFactory 用的,里面主要包含了数据库连接相关东西,还有 java 类所对应的别名,比如 <typeAlias alias="User" type="com.yihaomen.mybatis.model.User"/> 这个别名...

    node-throwable:从 Error 继承而没有性能损失,instanceof 的行为符合预期并且错误堆栈是正确的

    用法从javascript中的Error继承的许多解决方案容易出错(双关语)和棘手。 使用这个库,你可以继承Error就像你从任何其他 javascript 对象/类继承一样。 这是使用库的示例。 var Throwable = require ( 'throwable' ...

    jquery.throwable:使HTML元素可抛出的JQuery插件

    jquery.throwable:使HTML元素可抛出的JQuery插件

    仿QQ登录窗体,拉伸展开!

    import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.swing.BorderFactory; import javax.swing....

Global site tag (gtag.js) - Google Analytics