ssm框架,无法访问数据库Could not get JDBC Connection 5C

用的德鲁伊连接池,先看applicationContext-dao.xml里的配置

 <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans-3.2.xsd 
        http://www.springframework.org/schema/mvc 
        http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd 
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-3.2.xsd 
        http://www.springframework.org/schema/aop 
        http://www.springframework.org/schema/aop/spring-aop-3.2.xsd 
        http://www.springframework.org/schema/tx 
        http://www.springframework.org/schema/tx/spring-tx-3.2.xsd ">

    <context:property-placeholder location="classpath:properties/*.properties" />

    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
        destroy-method="close">
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />
        <property name="driverClassName" value="${jdbc.driver}" />
        <property name="maxActive" value="10" />
        <property name="minIdle" value="5" />
        <!-- 
        <property name="maxWait" value="5000" /> -->

    </bean>

    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="configLocation" value="classpath:mybatis/SqlMapConfig.xml" />
    </bean>
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.demo.mapper" />
    </bean>
</beans>

这样的话,控制台输出:
2017-12-28 12:43:58,209DEBUG[org.springframework.web.servlet.DispatcherServlet] -
2017-12-28 12:43:58,214DEBUG[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] -
2017-12-28 12:43:58,221DEBUG[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] -
2017-12-28 12:43:58,221DEBUG[org.springframework.beans.factory.support.DefaultListableBeanFactory] -
2017-12-28 12:43:58,222DEBUG[org.springframework.web.servlet.DispatcherServlet] -
2017-12-28 12:43:58,317DEBUG[org.mybatis.spring.SqlSessionUtils] -
2017-12-28 12:43:58,335DEBUG[org.mybatis.spring.SqlSessionUtils] -
2017-12-28 12:43:58,366DEBUG[org.springframework.jdbc.datasource.DataSourceUtils] -
2017-12-28 12:43:58,447INFO[com.alibaba.druid.pool.DruidDataSource] - <{dataSource-1} inited>

一直显示等待,后来加了个maxWait属性,时间是5秒,然后才开始报错,如下:
2017-12-28 12:47:41,261DEBUG[org.springframework.web.servlet.DispatcherServlet] -
2017-12-28 12:47:41,264DEBUG[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] -
2017-12-28 12:47:41,269DEBUG[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] -
2017-12-28 12:47:41,269DEBUG[org.springframework.beans.factory.support.DefaultListableBeanFactory] -
2017-12-28 12:47:41,270DEBUG[org.springframework.web.servlet.DispatcherServlet] -
2017-12-28 12:47:41,338DEBUG[org.mybatis.spring.SqlSessionUtils] -
2017-12-28 12:47:41,348DEBUG[org.mybatis.spring.SqlSessionUtils] -
2017-12-28 12:47:41,378DEBUG[org.springframework.jdbc.datasource.DataSourceUtils] -
2017-12-28 12:47:41,472INFO[com.alibaba.druid.pool.DruidDataSource] - <{dataSource-1} inited>
2017-12-28 12:47:46,473WARN[com.alibaba.druid.pool.DruidDataSource] -
2017-12-28 12:47:51,476DEBUG[org.mybatis.spring.SqlSessionUtils] -
2017-12-28 12:47:51,476DEBUG[org.mybatis.spring.SqlSessionUtils] -
2017-12-28 12:47:51,476DEBUG[org.mybatis.spring.SqlSessionUtils] -
2017-12-28 12:47:51,476DEBUG[org.springframework.jdbc.datasource.DataSourceTransactionManager] -
2017-12-28 12:47:51,478DEBUG[org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver] - <Resolving exception from handler [public com.demo.pojo.TbItem com.demo.controller.TestController.getItem(java.lang.Long)]: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 5000, active 0

The error may exist in com/demo/mapper/TbItemMapper.xml

The error may involve com.demo.mapper.TbItemMapper.selectByPrimaryKey

The error occurred while executing a query

无法连接到数据库。。。。错误显示可能在/TbItemMapper.xml,这是mybatis逆向生成的,在其他项目中测试可用,所以问题应该不在这,其他配置文件啥的也感觉没问题,但就是连接不到数据库,问题出在哪???

TbItemMapper.xml:

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.demo.mapper.TbItemMapper">
  <resultMap id="BaseResultMap" type="com.demo.pojo.TbItem">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="title" jdbcType="VARCHAR" property="title" />
    <result column="sell_point" jdbcType="VARCHAR" property="sellPoint" />
    <result column="price" jdbcType="BIGINT" property="price" />
    <result column="num" jdbcType="INTEGER" property="num" />
    <result column="barcode" jdbcType="VARCHAR" property="barcode" />
    <result column="image" jdbcType="VARCHAR" property="image" />
    <result column="cid" jdbcType="BIGINT" property="cid" />
    <result column="status" jdbcType="TINYINT" property="status" />
    <result column="created" jdbcType="TIMESTAMP" property="created" />
    <result column="updated" jdbcType="TIMESTAMP" property="updated" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, title, sell_point, price, num, barcode, image, cid, status, created, updated
  </sql>
  <select id="selectByExample" parameterType="com.demo.pojo.TbItemExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tb_item
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_item
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_item
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.demo.pojo.TbItemExample">
    delete from tb_item
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.demo.pojo.TbItem">
    insert into tb_item (id, title, sell_point, 
      price, num, barcode, 
      image, cid, status, 
      created, updated)
    values (#{id,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{sellPoint,jdbcType=VARCHAR}, 
      #{price,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}, #{barcode,jdbcType=VARCHAR}, 
      #{image,jdbcType=VARCHAR}, #{cid,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, 
      #{created,jdbcType=TIMESTAMP}, #{updated,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.demo.pojo.TbItem">
    insert into tb_item
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="title != null">
        title,
      </if>
      <if test="sellPoint != null">
        sell_point,
      </if>
      <if test="price != null">
        price,
      </if>
      <if test="num != null">
        num,
      </if>
      <if test="barcode != null">
        barcode,
      </if>
      <if test="image != null">
        image,
      </if>
      <if test="cid != null">
        cid,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="created != null">
        created,
      </if>
      <if test="updated != null">
        updated,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="title != null">
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="sellPoint != null">
        #{sellPoint,jdbcType=VARCHAR},
      </if>
      <if test="price != null">
        #{price,jdbcType=BIGINT},
      </if>
      <if test="num != null">
        #{num,jdbcType=INTEGER},
      </if>
      <if test="barcode != null">
        #{barcode,jdbcType=VARCHAR},
      </if>
      <if test="image != null">
        #{image,jdbcType=VARCHAR},
      </if>
      <if test="cid != null">
        #{cid,jdbcType=BIGINT},
      </if>
      <if test="status != null">
        #{status,jdbcType=TINYINT},
      </if>
      <if test="created != null">
        #{created,jdbcType=TIMESTAMP},
      </if>
      <if test="updated != null">
        #{updated,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.demo.pojo.TbItemExample" resultType="java.lang.Long">
    select count(*) from tb_item
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tb_item
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.title != null">
        title = #{record.title,jdbcType=VARCHAR},
      </if>
      <if test="record.sellPoint != null">
        sell_point = #{record.sellPoint,jdbcType=VARCHAR},
      </if>
      <if test="record.price != null">
        price = #{record.price,jdbcType=BIGINT},
      </if>
      <if test="record.num != null">
        num = #{record.num,jdbcType=INTEGER},
      </if>
      <if test="record.barcode != null">
        barcode = #{record.barcode,jdbcType=VARCHAR},
      </if>
      <if test="record.image != null">
        image = #{record.image,jdbcType=VARCHAR},
      </if>
      <if test="record.cid != null">
        cid = #{record.cid,jdbcType=BIGINT},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=TINYINT},
      </if>
      <if test="record.created != null">
        created = #{record.created,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updated != null">
        updated = #{record.updated,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tb_item
    set id = #{record.id,jdbcType=BIGINT},
      title = #{record.title,jdbcType=VARCHAR},
      sell_point = #{record.sellPoint,jdbcType=VARCHAR},
      price = #{record.price,jdbcType=BIGINT},
      num = #{record.num,jdbcType=INTEGER},
      barcode = #{record.barcode,jdbcType=VARCHAR},
      image = #{record.image,jdbcType=VARCHAR},
      cid = #{record.cid,jdbcType=BIGINT},
      status = #{record.status,jdbcType=TINYINT},
      created = #{record.created,jdbcType=TIMESTAMP},
      updated = #{record.updated,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.demo.pojo.TbItem">
    update tb_item
    <set>
      <if test="title != null">
        title = #{title,jdbcType=VARCHAR},
      </if>
      <if test="sellPoint != null">
        sell_point = #{sellPoint,jdbcType=VARCHAR},
      </if>
      <if test="price != null">
        price = #{price,jdbcType=BIGINT},
      </if>
      <if test="num != null">
        num = #{num,jdbcType=INTEGER},
      </if>
      <if test="barcode != null">
        barcode = #{barcode,jdbcType=VARCHAR},
      </if>
      <if test="image != null">
        image = #{image,jdbcType=VARCHAR},
      </if>
      <if test="cid != null">
        cid = #{cid,jdbcType=BIGINT},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=TINYINT},
      </if>
      <if test="created != null">
        created = #{created,jdbcType=TIMESTAMP},
      </if>
      <if test="updated != null">
        updated = #{updated,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.demo.pojo.TbItem">
    update tb_item
    set title = #{title,jdbcType=VARCHAR},
      sell_point = #{sellPoint,jdbcType=VARCHAR},
      price = #{price,jdbcType=BIGINT},
      num = #{num,jdbcType=INTEGER},
      barcode = #{barcode,jdbcType=VARCHAR},
      image = #{image,jdbcType=VARCHAR},
      cid = #{cid,jdbcType=BIGINT},
      status = #{status,jdbcType=TINYINT},
      created = #{created,jdbcType=TIMESTAMP},
      updated = #{updated,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>

上面是逆向工程的mapper,后来我自己写了个TestMapper,还是出现同样的问题:

图片说明

另外navicat访问数据库没问题。我想会不会是连接池配置的问题,也许那些配置可能导致这种情况??

qq_35685189
handsome-boy 你的这个问题解决了吗?
11 个月之前 回复

7个回答

把 username 换个名字 再试试

com.demo.mapper.TbItemMapper.selectByPrimaryKey
你先把这个sql注释了再试试

1.确认数据库服务打开,并且使用工具可以连上。
2.再来看是不是代码的问题,这个提示是在Mapper文件中,把mapper贴出来看看。

Ivorybeach
王逍遥这是我们的狗 Navicat访问数据库没问题,mapper贴出来了
一年多之前 回复

destroy-method="close">






<!--
-->

</bean>

    你把这些 跟你的那个 数据库的驱动文件对比下 看看有没有问题![图片说明](https://img-ask.csdn.net/upload/201712/28/1514441848_49807.jpg)  这个是我项目的配置  你可以参考下

猜测可能是主键生成的问题,不知道那个数据库,具体不好说

Ivorybeach
王逍遥这是我们的狗 用的别人的教学视频里的.sql文件,主键应该是一个自动生成id的通用工具类生成的,类型是long
一年多之前 回复
Ivorybeach
王逍遥这是我们的狗 主键生成,可以详细说说吗?
一年多之前 回复

The error may exist in com/demo/mapper/TbItemMapper.xml
The error may involve com.demo.mapper.TbItemMapper.selectByPrimaryKey
你把这个TbItemMapper.xml贴出来,看下selectByPrimaryKey有没有问题呢。

Ivorybeach
王逍遥这是我们的狗 mapper贴出来了,感觉没啥问题
一年多之前 回复

不知道你解决没,我也遇到同样的问题,解决不了。找到你的帖子,后来我们改了 mysql 数据库的连接数(mysql 的自身的设置,和我们代码无关),由原来的 58 改到了 1000.就没有问题了。
看来是数据库连接数设置的太少,连接不够了导致获取不到数据库连接。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Could not get JDBC Connection,请教高手。
请教个问题。在myeclipse启动tomcat,工程登录时,会报错:rnorg.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create JDBC driver of class 'COM.ibm.db2.jdbc.app.DB2Driver' for connect URL 'jdbc:db2:cms'rnCaused by: java.sql.SQLException: Cannot create JDBC driver of class 'COM.ibm.db2.jdbc.app.DB2Driver' for connect URL 'jdbc:db2:cms'rn不在eclipse中启动tomcat,由tomcat-6.0.18\bin下的startup.bat启动tomcat,则没有任何错误,可以正常使用工程。rn我的环境是 jdk1.6 tomcat6 myeclipse7rnDB2是装在本机上了。在网上找了一些相关的解决方法都不管用。只好在这里请教各位了。
could not get ado.net connection
在我的机器和其他开发机器上都没有这个问题,为什么我发布后有的用户安装完报这个“Could not get ADO.net Connection”的问题,FrameWork3.5我都装了呀
Could not open JDBC Connection for transaction
我用SPRING+STRUTS整合技术rnboolean checkresult=false;rn[color=#FF0000]private ISysUserMng sysUserManager;[/color]rncheckresult = sysUserManager.checkUser(formToDao(sysUserActionForm));rn我吧ISysUserMng定义成一个接口rnpublic class SysUserMngImpl implements ISysUserMngrnrn public boolean checkUser(SysUser user) throws Exception rn rn System.out.println("-------");rn rn try rn SysUserManager userFind = user.getSysUserManager();rn userFind.setDs(getDataSource());rn result = userFind.isExisted();rn if(result==false)rn throw new Exception("error.user.login");rn rn return result;rn catch (BnetfaxException e) rn throw new BnetfaxException(e.getMessage());rn catch (Exception e) rn logUtil.error(e);rn throw new BnetfaxException(Util.getErrorMsg(e));rn rn rn我单步DEBUG时候,就跳不进checkUser这个方法里面,提示我Could not open JDBC Connection for transaction,请大大指点下!!
Could not get JDBC Connection的问题,请高手指点一下!!!
使用软件时,回车执行,提示:“Could not get JDBC Connection;nested exception is org.apache.commons.dbcp.SQLNestedException:Error preloading the connection pool”rnrn再一次执行,提示:“Could not get JDBC Connection;nested exception is org.apache.commons.dbcp.SQLNestedException:Cannot create PoolableConnectionFactory([Microsoft][SQLServer 2000 driver for JDBC]Error establishing socket.)”rn请高手给指点一下rnrn谢谢!!!
Could not get JDBC Connection的问题,请高手指点一下,谢谢!!!
使用软件时,回车执行,提示:“Could not get JDBC Connection;nested exception is org.apache.commons.dbcp.SQLNestedException:Error preloading the connection pool”rnrn再一次执行,提示:“Could not get JDBC Connection;nested exception is org.apache.commons.dbcp.SQLNestedException:Cannot create PoolableConnectionFactory([Microsoft][SQLServer 2000 driver for JDBC]Error establishing socket.)”rn请高手给指点一下rnrn谢谢!!!
Weblogic10.3用一段时间后出现could not get jdbc connection
给单位安装weblogic10.3,操作系统是winserver2003,weblogic10.3使用的产品模式,现在客户端连接数也不多,就10多个,用一段后就会出现 cound not get jdbc connection:nested exception is weblogic.jdbc.extensions.poolLimitSQLException:rnweblogic.common.resourcePool.resourcelinitException:No resources currently available in pool rnjdbc/name to allocate to applications,please increase the size of the pool and retry
Could not get JDBC Connection; myeclipse中java项目导入的问题
严重: Exception starting filter CommonFilterrnorg.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: rn### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 0, maxActive 20rn### The error may exist in file [C:\Program Files\Java\apache-tomcat-7.0.85\webapps\bbs\WEB-INF\classes\mybatis\sqlMap\InfoMapper.xml]rn### The error may involve jbbs_info.findrn### The error occurred while executing a queryrn### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 0, maxActive 20rn at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)rn at $Proxy10.selectOne(Unknown Source)rn at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)rn at cc.javaee.bbs.dao.InfoDao.find(InfoDao.java:13)rn at cc.javaee.bbs.service.InfoService.find(InfoService.java:19)rn at cc.javaee.bbs.service.InfoService$$FastClassByCGLIB$$ff4f41b5.invoke()rn at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)rn at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)rn at cc.javaee.bbs.service.InfoService$$EnhancerByCGLIB$$ee4cca10.find()rn at cc.javaee.bbs.filter.CommonFilter.init(CommonFilter.java:287)rn at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4958)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5660)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1296)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2038)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)rn at java.util.concurrent.FutureTask.run(FutureTask.java:138)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: org.apache.ibatis.exceptions.PersistenceException: rn### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 0, maxActive 20rn### The error may exist in file [C:\Program Files\Java\apache-tomcat-7.0.85\webapps\bbs\WEB-INF\classes\mybatis\sqlMap\InfoMapper.xml]rn### The error may involve jbbs_info.findrn### The error occurred while executing a queryrn### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 0, maxActive 20rn at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:95)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:59)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)rn ... 32 morernCaused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 0, maxActive 20rn at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)rn at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80)rn at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:66)rn at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)rn at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:69)rn at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:56)rn at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)rn at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:141)rn at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)rn at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:101)rn ... 39 morernCaused by: com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 0, maxActive 20rn at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1193)rn at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:1017)rn at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4544)rn at com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(StatFilter.java:662)rn at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4540)rn at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:995)rn at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:987)rn at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:103)rn at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)rn at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)rn ... 49 morernCaused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:927)rn at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1709)rn at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1252)rn at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.rnjava:2483)rn at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2516)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2301)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)rn at sun.reflect.GeneratedConstructorAccessor10.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)rn at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:148)rn at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:211)rn at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:142)rn at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1410)rn at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1464)rn at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1995)rn2018-3-1 15:41:35 org.apache.catalina.core.StandardContext startInternalrn严重: One or more Filters failed to start. Full details will be found in the appropriate container log filern2018-3-1 15:41:35 org.apache.catalina.core.StandardContext startInternalrn严重: Context [/bbs] startup failed due to previous errorsrn2018-3-1 15:41:36 org.apache.catalina.core.ApplicationContext logrn信息: Closing Spring root WebApplicationContextrn2018-3-1 15:41:36 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbcrnrn
SSM框架之JDBC配置
学习SSM框架那些事儿作者 Wwwwei转载请注明原创出处,谢谢! 前言   之前搭建SSM框架的时候我们曾经配置过jdbc.properties文件,那么这个文件主要是干什么的呢?在本文中会进行相关的讲解。 jdbc.properties 什么是JDBC?   相信JDBC对于程序员来说并不陌生,如果不太清楚具体含义的话可以看看以下JDBC的定义。   JDBC(Java Data Base
新手ssm框架问题。 JDBC Connection will not be managed by Spring
Java新手小白,按照教程搭建ssm框架,刚开始有在数据库取到东西,后来加了一个aop和添加用户的的接口,就一直报错了,在网上搜过,比对配置,好像没什么问题。求各位大神解答,下面是报错信息和一些配置文件:rn[img=https://img-bbs.csdn.net/upload/201805/24/1527153000_110587.png][/img]rnspring-mybatis.xml文件:rn[img=https://img-bbs.csdn.net/upload/201805/24/1527153710_766065.png][/img]rnspring-mvc.xml:rn[img=https://img-bbs.csdn.net/upload/201805/24/1527153760_592265.png][/img]rncontroller层:rn[img=https://img-bbs.csdn.net/upload/201805/24/1527153800_596200.png][/img]
Spring框架中配置数据库(MySQL8.0),配置不对,会出现Could not get JDBC Connection
Spring框架中配置数据库(MySQL8.0)属性文件(文件名.properties),配置不对,会出现 Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLNonTransientConne...
SSM框架 jdbc链接错误问题求解!
[code=html]严重: Servlet.service() for servlet [SpringMVC] in context with path [/yiposi] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: rn### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root '@'192.168.203.112' (using password: YES))rn### The error may exist in file [E:\eclipseWord\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\yiposi\WEB-INF\classes\com\mappers\CmsShopExpressMapper.xml]rn### The error may involve com.dao.CmsShopExpressMapper.selectByIdrn### The error occurred while executing a queryrn### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root '@'192.168.203.112' (using password: YES))] with root causernjava.sql.SQLException: Access denied for user 'root '@'192.168.203.112' (using password: YES)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)rn at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748)rn at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288)rn at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506)rn at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:832)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:526)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)rn at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)rn at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)rn at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)rn at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)rn at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)rn at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)rn at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)rn at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:81)rn at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)rn at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)rn at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)rn at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)rn at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)rn at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)rn at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)rn at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)rn at com.sun.proxy.$Proxy12.selectList(Unknown Source)rn at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)rn at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)rn at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)rn at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)rn at com.sun.proxy.$Proxy13.selectById(Unknown Source)rn at com.service.imp.CmsShopExpressImp.selectById(CmsShopExpressImp.java:21)rn at com.controller.AaaController.aaa(AaaController.java:30)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:175)rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnrn[/code]rnrnjdbc.propertiesrnrn[code=html]jdbc.driver=com.mysql.jdbc.Driverrnjdbc.url=jdbc:mysql://192.168.215.233:3306/xxxx?useUnicode=true&characterEncoding=UTF-8rnjdbc.username=root rnjdbc.password=roilandrn#定义初始连接数 rnjdbc.initialSize=0 rn#定义最大连接数 rnjdbc.maxActive=20 rn#定义最大空闲 rnjdbc.maxIdle=20 rn#定义最小空闲 rnjdbc.minIdle=1 rn#定义最长等待时间 rnjdbc.maxWait=60000 [/code]rnrnspring-mybatis.xmlrnrn[code=html] rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn [/code]rn
SSM框架的PDF,SpringBoot,Spring Could
SSM框架的PDF,SpringBoot,Spring Could
org.jboss.resource.JBossResourceException: Could not create connection;
15:50:03,410 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: nullrnorg.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection)rn at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)rn at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)rn at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)rn at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)rn at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)rn at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)rn at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)rn at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)rn at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)rn at com.newyl.crm.util.db.DBConn.getDBConnection(DBConn.java:60)rn at com.newyl.crm.util.db.DBConn.getResult(DBConn.java:290)rn at com.newyl.crm.util.db.DAOImpl.executeQuery(DAOImpl.java:37)rn at com.newyl.crm.util.comm.CommWebImpl.executeQuerySQL(CommWebImpl.java:369)rn at com.newyl.crm.util.html.Page.getCommonSelect(Page.java:503)rn at org.apache.jsp.cms.login_jsp._jspService(login_jsp.java:338)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at cms.LoginFilter.doFilter(LoginFilter.java:33)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)rn at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connectionrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)rn at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)rn at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:413)rn at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:164)rn at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)rn at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)rn at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)rn ... 41 morern15:50:03,411 INFO [STDOUT] ----------连接获取异常-------rn15:50:03,411 ERROR [[jsp]] Servlet.service() for servlet jsp threw exceptionrncom.newyl.crm.util.comm.ApplicationException: Could not create connection; - nested throwable: (java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection))rn at com.newyl.crm.util.db.DBConn.getDBConnection(DBConn.java:68)rn at com.newyl.crm.util.db.DBConn.getResult(DBConn.java:290)rn at com.newyl.crm.util.db.DAOImpl.executeQuery(DAOImpl.java:37)rn at com.newyl.crm.util.comm.CommWebImpl.executeQuerySQL(CommWebImpl.java:369)rn at com.newyl.crm.util.html.Page.getCommonSelect(Page.java:503)rn at org.apache.jsp.cms.login_jsp._jspService(login_jsp.java:338)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at cms.LoginFilter.doFilter(LoginFilter.java:33)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)rn at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)rn at java.lang.Thread.run(Thread.java:619)rn
Could not obtain connection metadata
启动Tomcat报如下错误,请教各位大神给我解决方法:rn WARN SettingsFactory:109 - Could not obtain connection metadatarnjava.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:798)rn at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3700)rn at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1203)rn at com.mysql.jdbc.Connection.createNewIO(Connection.java:2568)rn at com.mysql.jdbc.Connection.(Connection.java:1485)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
SSM框架及数据库
包含了SSM框架的各种应用场景,及详细的描述,帮助你快速上手SSM框架
ssm框架多图片上传到数据库
我上传3个不同的图片,获取到的三个是一样的图片,大神们,请问一下如何解决,在此先谢过了!rn[img=https://img-bbs.csdn.net/upload/201805/16/1526457306_858126.png][/img]
JDBC CONNECTION???????????????????????????????????????????///
我的程序段:rn Class.forName ("org.postgresql.Driver");rn mSQLcon = DriverManager.getConnection( "jdbc:postgresql:net//172.16.131.231:5432/billing" , "billing" , "" );rn平台是SUN solaris8(SPARC)rn返回的错误是:rnrnConnection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP crnonnections.rn at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:167)rn at org.postgresql.Driver.connect(Driver.java:122)rn at java.sql.DriverManager.getConnection(DriverManager.java:512)rn at java.sql.DriverManager.getConnection(DriverManager.java:172)rn at com.nec.jp.inetworx.bs.pri.filemanage.PriDatabase.getConnection(PriDatabase.java:90)rn at com.nec.jp.inetworx.bs.pri.filemanage.PriFileMain.mainControl(PriFileMain.java:128)rn at com.nec.jp.inetworx.bs.pri.filemanage.dummy.main(dummy.java:24)rn
jdbc connection
jdbc connection,
JDBC Connection
rn com.icil.xdca.db.IcilDbException: Exception caught:java.sql.SQLException: JZ0NE: Incorrect URL format. URL: jdbc:icil. Error message: java.lang.NumberFormatException: For input string: "icil"rnrnjdbc:subprotocol :subnamernurl is jdbc:icil:uoso:2095, rn当url是上面的样子,出现上面的错误,rn可是如果是rnrnurl is jdbc:icil:192.168.18.233:2095rn就可以正确连接。rnrn但是有的数据库可以用名称来连接,有的一定要用ip ,rnip和server的名称在hosts文件里有配制。rnrn怎么解决呢?rnrn盼高人来指点!rnrn
Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPe
org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersisterrnrnhibernate中many to one的映射,不知道问题出在哪 求指教! rn
could not get next sequence??
在对数据库操作时出现,这个错误,怎么回事??rnrn我在login.hhm.xml 文件中 写明是自增了,在oracle数据库中设了自增序列,到底怎么回事啊??
十分钟快速搭建SSM Demo框架技能get
快速搭建SSM demo前言搭建思路快速ssm搭建方法1)各种文件、 包创建路径2)配置文件信息(1)pom.xml(2)web.xml(3)applicationContext.xml(4)springmvc-config.xml(5)jdbc.properties(6)UserMapper.xml(7)mybatis-config.xml(8)数据库脚本3)java代码(1)UserMappe...
JDBC连接池偶尔"Io 异常: The Network Adapter could not establish the connection"
错误提示:[color=#FF6600]Io 异常: The Network Adapter could not establish the connection[/color]rn数据库服务器端环境:HPUX + Oracle9.2 (小机服务能力还是很强的,DB连接数约为300~400)rn应用服务器端环境:Windows 2003 企业版 + Tomcat5.0.28rn应用连接方式:Java JDBC + dbcprnrn现象描述:rn 程序偶尔出现上述异常提示,我的程序内建有连接池重置处理,当出现上述异常后,自动重置连接池,一般能够重新连接上数据库。rnrn排除问题:rn 1、url连接串之类的问题rn 2、网络问题rn 3、其他简单配置问题(生产环境已经运行2年)rnrn怀疑问题:rn 1、是否服务器连接数不够?(自己做过实验,当应用达到DB最大连接数时的提示为拒绝连接,与此不同)rn 2、是否其他应用消耗DB服务器资源?(有怀疑,但没有证据,如哪位仁兄遇到类似问题,望不吝赐教)rn 3、操作系统连接数?(也是怀疑,是否HPUX的连接数不够了,公司的服务保障上去看了,说没有用完,不知哪位仁兄有类似经历)rnrn此问题已经困扰我很久,虽不致使系统瘫痪,但终究是块心病,望早日去之。rnrnrnrn
Unable obtain JDBC Connection Connections could not be acquired from the underly
大佬们紧急求助啊,在学springMVC和extjs,谁知道倒在Oracle数据库面前了。网上帖子各种方法我都试了,用sql developer是可以连上数据库,最神奇是junit居然可以连上数据库并进行操作,但是Tomcat启动服务器却怎么也连不上。rn[ERROR] Unable obtain JDBC Connection (org.hibernate.hql.spi.id.IdTableHelper)(ContainerBackgroundProcessor[StandardEngine[Catalina]])(22:19:35,798)rnjava.sql.SQLException: Connections could not be acquired from the underlying database!rn at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:689)rn at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)rn at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)rn at org.hibernate.internal.SessionFactoryImpl$3.obtainConnection(SessionFactoryImpl.java:644)rn at org.hibernate.hql.spi.id.IdTableHelper.executeIdTableCreationStatements(IdTableHelper.java:67)rn at org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy.finishPreparation(GlobalTemporaryTableBulkIdStrategy.java:125)rn at org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy.finishPreparation(GlobalTemporaryTableBulkIdStrategy.java:42)rn at org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl.prepare(AbstractMultiTableBulkIdStrategyImpl.java:88)rn at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:452)rn at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:465)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:711)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:727)rn at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:511)rn at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:495)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1531)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)rn at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)rn at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)rn at javax.servlet.GenericServlet.init(GenericServlet.java:158)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4009)rn at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)rn at java.lang.Thread.run(Unknown Source)rnCaused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.rn at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1418)rn at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:606)rn at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:526)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:755)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:682)rn ... 68 morernrnhibernate配置rn……rn rn rn rn rn rn……rn rn……rn $sessionFactory.dialectrn truern $sessionFactory.show_sqlrn autorn truern 20rn 50
Could not configure JDBC connection for transaction; nested exception is java.sq
系统以前还是好的,但是现在连登录也登录不了,一直如下错误..rn应用服务器是JBoss: 系统是linux 的:rnrnorg.apache.jasper.JasperException: Could not configure JDBC connection for transaction; nested exception is java.sql.SQLException: Io 异常: Broken pipern org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:810)rn venus.frames.web.SetEncodingFilter.doFilter(SetEncodingFilter.java:33)rn org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)rnrnrnroot cause rnrnorg.springframework.transaction.CannotCreateTransactionException: Could not configure JDBC connection for transaction; nested exception is java.sql.SQLException: Io 异常: Broken pipern org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:183)rn org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:269)rn org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:200)rn org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:49)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)rn org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)rn $Proxy87.queryByCondition(Unknown Source)rn org.apache.jsp.jsp.funcTrees_jsp._jspService(org.apache.jsp.jsp.funcTrees_jsp:127)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:810)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:810)rn venus.frames.web.SetEncodingFilter.doFilter(SetEncodingFilter.java:33)rn org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)rn
eclipse jdbc连接数据库 Could not create connection to database server. Attempted reco
首先写上我的url="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false"rn实在不知道怎么改了rncom.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.rn at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)rn at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)rn at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)rn at com.mysql.jdbc.Util.getInstance(Util.java:387)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)rn at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2163)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2088)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:806)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)rn at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)rn at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)rn at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328)rn at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:678)rn at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)rn at mysql209.mysql209.main(mysql209.java:17)rnCaused by: java.lang.NullPointerExceptionrn at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:2997)rn at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1936)rn at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1865)rn at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1228)rn at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253)rn at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2104)rn ... 13 morern
Cannot get Jedis connection
本人菜鸡一枚,求大神指导。rn项目允许报错无法链接到Jedis,我现在想链接我本地的数据库,应该怎么做?我用的是mysql。rnredis.host=115.159.46.237rnredis.port=6379rnredis.password= rn这是properties里面的部分代码。
datasource get connection的问题
调用datasource.getConnection(USER, PASSWORD)时,出现如下错误:rn2005-04-15 17:05:01 StandardWrapper.Throwablernjava.lang.UnsupportedOperationExceptionrn at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:125)rn at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:329)rn at com.hrhost.common.database.ConnectionManager.getConnection(Unknown Source)rn at com.hrhost.servlet.InitializeServlet.init(Unknown Source)rn at javax.servlet.GenericServlet.init(GenericServlet.java:256)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3850)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4122)rn at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2894)rn at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4423)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1667)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1667)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1647)rn at java.lang.Thread.run(Thread.java:534)rnrn请问前辈是什么问题呢?rn我的server.xml如下:rn rn rn rn factoryrn org.apache.commons.dbcp.BasicDataSourceFactoryrn rn rn urlrn jdbc:mysql://localhost:3306/hrhost?autoReconnect=truern rn rn passwordrn rn rn rn driverClassNamern com.mysql.jdbc.Driverrn rn rn usernamern rootrn rn ...rn rnrnInitialContext()和lookup()等全部都做了。如果我把用户名和密码都写到server.xml上,调用ds.getConnection()是没问题的。但如果把密码加密后放到配置文件,然后在应用程序加载的过程中解密,调用ds.getConnection(USER, PASSWORD)去获得Connection,就不行了,出了之前的错误。rn
datasource get connection 的问题
调用datasource.getConnection(USER, PASSWORD)时,出现如下错误:rn2005-04-15 17:05:01 StandardWrapper.Throwablernjava.lang.UnsupportedOperationExceptionrn at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:125)rn at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:329)rn at com.hrhost.common.database.ConnectionManager.getConnection(Unknown Source)rn at com.hrhost.servlet.InitializeServlet.init(Unknown Source)rn at javax.servlet.GenericServlet.init(GenericServlet.java:256)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3850)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4122)rn at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2894)rn at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4423)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1667)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1667)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1647)rn at java.lang.Thread.run(Thread.java:534)rnrn请问前辈是什么问题呢?rn我的server.xml如下:rn rn rn rn factoryrn org.apache.commons.dbcp.BasicDataSourceFactoryrn rn rn urlrn jdbc:mysql://localhost:3306/hrhost?autoReconnect=truern rn rn passwordrn rn rn rn driverClassNamern com.mysql.jdbc.Driverrn rn rn usernamern rootrn rn ...rn rnrn
The Network Adapter could not establish the connection
作应用服务器tomcat装在windows操作系统上,而数据库装在unix操作系统上,现在用jsp连接数据库时,就出现The Network Adapter could not establish the connection。错误。rn如果将数据库也装在windows操作系统上,就不会出现上述错误。运行正常。rn请教是什么原因?rn谢谢!!!
org.jboss.resource.JBossResourceException: Could not create connection; - nested
大神解救啊,网上说添加classe12.jar就好了,可我添加还是这样,为什么?rnrn17:07:19,297 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: nullrn[color=#FF6600]org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:ORACLE:thin:@192.168.200.213:1521:smmc)[/color]rn at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:190)rn at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:589)rn at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)rn at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)rn at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:348)rn at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)rn at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:403)rn at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:850)rn at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:90)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)rn at $Proxy60.getConnection(Unknown Source)rn at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:112)rn at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2118)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2114)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1338)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:863)rnrn......rnrnorg.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)rn at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)rn at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)rn at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)rn at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)rn at $Proxy5.deploy(Unknown Source)rn at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)rn at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)rn at org.jboss.Main.boot(Main.java:200)rn at org.jboss.Main$1.run(Main.java:518)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:ORACLE:thin:@192.168.200.213:1521:smmcrn at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:301)rn at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)rn ... 182 more
a connection with the server could not be established
a connection with the server could not be establishedrn请高手指教,这个问题可能是什么引起的rnrn我是在使用一套客户端/服务器系统的时候发生的错误,使用的是HTTP协议rnrn我想知道,出现这种情况,是操作系统设置/配置上的问题,还是这套应用程序的问题rnrn如果是操作系统的问题,该如何解决rnrn如果是应用程序的问题,又该怎么找问题
SSM Tomcat 项目无法访问其他人数据库
在做项目时,可以访问本地的mysql数据库,却无法访问远程的数据库,原因为远程mysql为8.0版本,而本地数据库为5.0 解决方法如下 1、先查询本机数据库版本,再查询远程数据库版本 cmd语句 mysql -uroot -p123456 //-u(用户名) -p(密码) 然后查看server version 2、如果远程为8.0,需要加载library  &amp;lt;depend...
SSM框架连接两个数据库
工具类: /** * */ package com.myhope.util; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; /** * Description:&amp;lt;br/&amp;gt; * Copyright (c) , 2017, Jansonxu &amp;lt;br/&amp;gt; *...
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC
SSH删除操作的时候出现了这个错误,我也网上查了一下解决方法,但没能解决,希望得到大家的帮助,谢谢了rn[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/17.gif][/img]Hibernate: select students0_.stu_no as stu1_1_0_, students0_.col_no as col2_1_0_, students0_.class_no as class3_1_0_, students0_.dept_no as dept4_1_0_, students0_.stu_name as stu5_1_0_, students0_.stu_sex as stu6_1_0_, students0_.stu_birthday as stu7_1_0_, students0_.nativeplace as nativepl8_1_0_, students0_.telphone as telphone1_0_, students0_.mianmao as mianmao1_0_, students0_.cometime as cometime1_0_ from jrmtkq.students students0_ where students0_.stu_no=?rnHibernate: select stuusers0_.stu_no as stu1_1_, stuusers0_.stu_no as stu1_0_0_, stuusers0_.pwd as pwd0_0_ from jrmtkq.stuuser stuusers0_ where stuusers0_.stu_no=?rnHibernate: delete from jrmtkq.students where stu_no=?rn29854 [http-apr-8089-exec-4] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1451, SQLState: 23000rn29854 [http-apr-8089-exec-4] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot delete or update a parent row: a foreign key constraint fails (`jrmtkq`.`stuuser`, CONSTRAINT `user_fk2` FOREIGN KEY (`stu_no`) REFERENCES `students` (`stu_no`))rn29854 [http-apr-8089-exec-4] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with sessionrnorg.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch updatern at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)rnrn at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)rn at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)rn at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)rn at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)rn at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)rn at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)rnrn at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)rn at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)rn at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)rn at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)rnrn at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)rn at $Proxy4.delStudent(Unknown Source)rn at jrmt.service.StudentServiceImp.delStudent(StudentServiceImp.java:33)rnrn at jrmt.controller.StudentAction.delStudent(StudentAction.java:95)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rnrn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rnrn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnrn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rnrn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rnrn rnCaused by: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`jrmtkq`.`stuuser`, CONSTRAINT `user_fk2` FOREIGN KEY (`stu_no`) REFERENCES `students` (`stu_no`))rnrn at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1693)rn at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1108)rn at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)rn at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)rn ... 90 morern数据库设计部分rncreate database jrmtkq;rnuse jrmtkq;rn--学院表rncreate table colleges(rn col_no char(10) primary key,rn col_name varchar(40) not null rn)rn--专业信息表rncreate table depts(rn dept_no char(10) primary key,rn col_no char(10) not null,rn dept_name varchar(40),rn constraint dept_fk foreign key(col_no)rn references colleges(col_no)rn)rn--班级信息表rncreate table classes(rn class_no char(10) primary key,rn dept_no char(10) not null,rn col_no char(10) not null,rn class_name varchar(20) not null,rn constraint classes_fk1 foreign key(dept_no)rn references depts(dept_no),rn constraint classes_fk2 foreign key(col_no)rn references colleges(col_no)rn)rn--课程信息表rncreate table course(rn cou_no char(16) primary key,rn cou_name varchar(40) not null,rn xuefen numeric(4,1) not null,rn col_no char(10) not null,rn dept_no char(10) not null,rn constraint cou_fk1 foreign key(dept_no) rn references depts(dept_no),rn constraint cou_fk2 foreign key(col_no)rn references colleges(col_no)rn)rn--学生表rncreate table students(rn stu_no char(20) primary key,rn stu_name varchar(30) not null,rn stu_sex char(6)rn check(stu_sex='male' or stu_sex='female'),rn stu_birthday date,rn nativeplace varchar(80),rn col_no char(10) not null,rn dept_no char(10) not null,rn class_no char(10) not null,rn telphone char(16) not null,rn mianmao varchar(10) not null,rn cometime date not null,rn constraint stu_fk1 foreign key(class_no)rn references classes(class_no),rn constraint stu_fk2 foreign key(dept_no)rn references depts(dept_no),rn constraint stu_fk3 foreign key(col_no)rn references colleges(col_no)rn)rn部分省略.....
JDBC数据库驱动注册与Connection获取源码分析
源码分析: 这是Mysql 8.x版的java驱动部分源码 package com.mysql.cj.jdbc; import java.sql.SQLException; public class Driver extends NonRegisteringDriver implements java.sql.Driver { // // Register ourselves ...
使用jdbc无法访问hive数据库的问题
数据库访问的JDBC通用格式:import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; /** * 写一个工具类 * 能够连接jdbc hive支持sql语句需要...
JDBC Connection Pool org.apache.tomcat.jdbc.pool
apache出品,用来取代老旧的dbcp
jdbc connection pool
java实现的jdbc connection pool
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法