`

[JBossManagedConnectionPool] Throwable while attempting to get a new connection:

阅读更多
问题:[JBossManagedConnectionPool] Throwable while attempting to get a new connection: null

解答:\jboss-4.2.2\server\default\lib中缺少mysql-connector-java-3.1.12-bin.jar驱动
分享到:
评论
1 楼 buger 2010-11-07  
可能是你的数据源配置时,相关文件没有放到相应的位置即:
mysql-connector-java-3.1.12-bin.jarMysql驱动程序放置在\jboss4.0.5\server\default\lib中,而mysql-ds.xml文件放置在\jboss4.0.5\server\default\deploy中。
mysql-ds.xml文件配置位于D:\jboss4.0.5\docs\examples\jca目录中。
还有,在放置文件后要修改相关信息:
<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml 41016 2006-02-07 14:23:00Z acoliver $ -->
<!--  Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->

<datasources>
  <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password>root</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <!-- should only be used on drivers after 3.22.1 with "ping" support
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
    -->
    <!-- sql to call when connection is created
    <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->
    <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->

    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
    <metadata>
       <type-mapping>mySQL</type-mapping>
    </metadata>
  </local-tx-datasource>
</datasources>





相关推荐

    java 后台实现get post 提交访问其他网站

    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String inputLine; StringBuilder content = new StringBuilder(); while ((inputLine = in.readLine()) != null) {...

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

    Jboss启动报Failed to parse WEB-INF/web.xml; - nested throwable错误解决方案 在Jboss应用服务器中,启动报错Failed to parse WEB-INF/web.xml; - nested throwable是一种常见的错误,本文将对此错误进行深入分析...

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

    System.out.println("捕获到了Throwable: " + e.getMessage()); } } } // 测试捕获Exception new TestClass().testFunction(); // 测试捕获Throwable new TestClass().testFunction(); ``` 在上面的示例中,...

    Android总GET/POST请求服务器

    public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { // 处理失败情况 } }); // POST请求 RequestParams params = new RequestParams(); params.put("param1", ...

    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 ...

    数据连接池

    private Vector&lt;Connection&gt; freeConnections = new Vector&lt;Connection&gt;(); private int maxConn; private String name; private String password; private String URL; private String user; /** * 创建新...

    throwable 和 exception区别

    java Exception中Throwable和Exception之间的区别

    android应用访问服务器端

    HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String input...

    Androi的http请求

    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null)...

    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

    Retrofit网络请求GET请求POST请求

    本教程将深入探讨Retrofit在处理GET和POST请求时的关键知识点。 首先,我们需要理解Retrofit的核心概念:接口(Interface)。在Java编程中,接口定义了方法的签名,而在Retrofit中,这些接口则代表了HTTP请求。例如...

    使用GET方式实例.rar

    在这个实例中,我们关注的是"使用GET方式实例.rar",它是一个针对Android开发者的教学资源,旨在教授如何通过GET方法发送网络请求,以发表和显示微博信息。GET是HTTP协议中最常见的一种请求方法,用于从服务器获取...

    android 异步访问网络

    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String inputLine; StringBuilder content = new StringBuilder(); while ((inputLine = in.readLine()) != ...

    JAVA必备英文单词.pdf

    * Throwable: 可抛出的,所有异常类的祖先类 三、集合框架 * Collection: 集合 * ArrayList: 动态数组 * HashMap: 散列表(哈希表) 四、swing * Swing: 轻巧的 * Awt: 抽象窗口工具包 * Frame: 窗体 * Panel: ...

    retrofit GET方法demo

    本示例"retrofit GET方法demo"将详细介绍如何利用Retrofit库执行GET请求,获取并解析JSON数据。以下是你需要了解的关键知识点: 1. **Retrofit简介** Retrofit是由Square公司开发的一款强大的HTTP客户端,它允许...

    AsyncHttpClient(get和post提交)

    File file = new File("/path/to/your/file"); RequestParams params = new RequestParams(); params.put("file", file); AsyncHttpClient client = new AsyncHttpClient(); client.post(...

    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 ...

    android通过http获取json源码【史上最全】

    throw new IOException("Failed to connect with server. Response code: " + connection.getResponseCode()); } } ``` 这段代码会发送一个HTTP GET请求到指定的URL,然后读取并返回服务器响应的JSON字符串。 ...

    Android-retrofit简单封装实现公共参数get和post统一处理

    public void onFailure(Call&lt;ResponseBody&gt; call, Throwable t) { // 处理失败 } }); ``` 最后,对于同时提交图片和文本数据,Retrofit支持多部分表单(Multipart)上传。创建一个包含文本和图片的模型类`...

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

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

Global site tag (gtag.js) - Google Analytics