不学习就淘汰QQ号2338372606
2017-09-02 04:27
采纳率: 100%
浏览 1.7k
已采纳

tomcat启动时, 无法创建xxx, 无法将 Unicode 字符串转换为 Ebcdic

麻烦各位大神,帮我看一下这个问题,我也在网上找了很久实在没有找到解决办法
首先我确保,连接DB2数据库的地址,用户名密码,都正确(因为我已经在客户端尝试过了,可以连上,但是到了myeclipse里面启动tomcat的时候就链接不上了,报如下错误!!)谢谢各位啦
图片说明
12:00:45.444 [main] ERROR org.hibernate.util.JDBCExceptionReporter
[78] -Cannot create PoolableConnectionFactory ([jcc][10402][11146][3.64.106] 无法将 Unicode 字符串转换为 Ebcdic 字符串。 ERRORCODE=-4220, SQLSTATE=null)
12:00:45.444 [main] WARN org.hibernate.cfg.SettingsFactory
[121] -Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([jcc][10402][11146][3.64.106] 无法将 Unicode 字符串转换为 Ebcdic 字符串。 ERRORCODE=-4220, SQLSTATE=null)
at strap.jar:na]
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10402][11146][3.64.106] 无法将 Unicode 字符串转换为 Ebcdic 字符串。 ERRORCODE=-4220, SQLSTATE=null
at com.ibm.db2.jcc.am.bd.a(bd.java:663) [db2jcc.jar:na]
at com.ibm.db2.jcc.am.bd.a(bd.java:60) [db2jcc.jar:na]
at com.ibm.db2.jcc.am.bd.a(bd.java:94) [db2jcc.jar:na]
at com.ibm.db2.jcc.am.w.a(w.java:98) [db2jcc.jar:na]

//----------------------------------------------------------------------------------
12:00:45.962 [main] ERROR org.hibernate.util.JDBCExceptionReporter
[78] -Cannot create PoolableConnectionFactory ([jcc][10402][11146][3.64.106] 无法将 Unicode 字符串转换为 Ebcdic 字符串。 ERRORCODE=-4220, SQLSTATE=null)
12:00:45.962 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate
[134] -could not get database metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([jcc][10402][11146][3.64.106] 无法将 Unicode 字符串转换为 Ebcdic 字符串。 ERRORCODE=-4220, SQLSTATE=null)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855) [commons-dbcp-1.2.jar:1.2]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) [commons-dbcp-1.2.jar:1.2]
at org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:148) [org.springframework.jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) [org.springframework.orm-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:27) [hibernate3.jar:na]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:127) [hibernate3.jar:na]
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:323) [hibernate3.jar:na]
//------------------------------------------------------------------

at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_13]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) [bootstrap.jar:na]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) [bootstrap.jar:na]

Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10402][11146][3.64.106] 无法将 Unicode 字符串转换为 Ebcdic 字符串。 ERRORCODE=-4220, SQLSTATE=null
at com.ibm.db2.jcc.am.bd.a(bd.java:663) [db2jcc.jar:na]
at com.ibm.db2.jcc.am.bd.a(bd.java:60) [db2jcc.jar:na]
at com.ibm.db2.jcc.am.bd.a(bd.java:94) [db2jcc.jar:na]
at com.ibm.db2.jcc.am.w.a(w.java:98) [db2jcc.jar:na]
at com.ibm.db2.jcc.t4.db.a(db.java:1513) [db2jcc.jar:na]
at com.ibm.db2.jcc.t4.eb.a(eb.java:671) [db2jcc.jar:na]
at com.ibm.db2.jcc.t4.eb.b(eb.java:237) [db2jcc.jar:na]
at com.ibm.db2.jcc.t4.eb.a(eb.java:42) [db2jcc.jar:na]
at

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • 崔伟 2017-09-02 06:36
    已采纳

    检查设定的MyEclipse的字符集,查查环境变量,检查是否是中文名引起的?

    打赏 评论
  • 淡漠Vip 2017-09-02 06:21

    应该是你数据库配置文件中有非法字符集 !! 最好截图看下配置文件

    打赏 评论
  • 请问,怎么查看这个,错误呢!

    配置文件中有非法字符集????//----------------下面是我大概的配置文件里面的信息!

    <?xml version="1.0" encoding="UTF-8"?>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
    http://www.springframework.org/schema/jdbc
    http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-3.0.xsd">

    <!-- 
    <bean id="propertyConfigurer"  class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>jdbc.properties</value>
            </list>
        </property>
    </bean> -->
    
    <!-- 数据源  -->
    <!-- jdbc方式  -->
    <bean id="branchDataSource" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName" value="com.ibm.db2.jcc.DB2Driver" /> 
        <!--property name="url" value="jdbc:informix-sqli://192.168.1.35:8588/branchdb:INFORMIXSERVER=xynode1;NEWLOCALE=zh_cn,en_us;NEWCODESET=UTF-8,8859-1,819" /-->
    
    
         <!-- <property name="url" value="jdbc:db2://22.236.180.225:50000/BRANCH:currentSchema=BRANCH;"/>
         <property name="username" value="branch" /> 
         <property name="password" value="87921065" />  -->
         <!-- UAT环境 -->
    
        <property name="url" value="jdbc:db2://22.237.192.45:50000/BRANCH:currentSchema=BRANCH;"/>
        <property name="username" value="branch" />
        <property name="password" value="cap12345" />
        <!-- SIT环境 -->
    
        <!-- <property name="url" value="jdbc:db2://192.168.233.235:50000/CAPDB:currentSchema=BRANCH;"/>
        <property name="username" value="administrator" />
        <property name="password" value="password" /> -->
        <!-- DEV环境 -->
    
        <!-- 自动重连设置 -->
        <!-- property name="validationQuery" value="select 1 from dual" /-->
    
         <!-- 连接池启动时的初始值 -->   
         <property name="initialSize" value="1"/>   
         <!-- 连接池的最大值 -->   
         <property name="maxActive" value="200"/>   
         <!-- 最大空闲值.当经过一个高峰时间后,连接池可以慢慢将已经用不到的连接慢慢释放一部分,一直减少到maxIdle为止 -->   
         <property name="maxIdle" value="2"/>   
         <!--  最小空闲值.当空闲的连接数少于阀值时,连接池就会预申请去一些连接,以免洪峰来时来不及申请 -->   
         <property name="minIdle" value="1"/>   
    </bean> 
    
    <bean id="wfDataSource" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <property name="url" value="jdbc:mysql://192.168.236.90:3306/jbpmdb" />
        <property name="username" value="root" />
        <property name="password" value="mysql" />
         <!-- 连接池启动时的初始值 -->   
         <property name="initialSize" value="1"/>   
         <!-- 连接池的最大值 -->   
         <property name="maxActive" value="500"/>   
         <!-- 最大空闲值.当经过一个高峰时间后,连接池可以慢慢将已经用不到的连接慢慢释放一部分,一直减少到maxIdle为止 -->   
         <property name="maxIdle" value="2"/>   
         <!--  最小空闲值.当空闲的连接数少于阀值时,连接池就会预申请去一些连接,以免洪峰来时来不及申请 -->   
         <property name="minIdle" value="1"/>   
    </bean> 
    
    打赏 评论

相关推荐 更多相似问题