ssh框架整合中出现的问题

原创 2015年11月19日 09:01:30
十一月 19, 2015 9:01:07 上午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@5679c6c6: startup date [Thu Nov 19 09:01:07 CST 2015]; root of context hierarchy
十一月 19, 2015 9:01:08 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
十一月 19, 2015 9:01:08 上午 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
十一月 19, 2015 9:01:08 上午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.2.1 [built 20-March-2013 10:47:27 +0000; debug? true; trace: 10]
十一月 19, 2015 9:01:09 上午 org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
十一月 19, 2015 9:01:09 上午 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.7.Final}
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration configure
INFO: HHH000044: Configuring from URL: file:/G:/eclipse-jee-luna-SR2-win32-x86_64/project/myPerPage/build/classes/hibernate.cfg.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/pzy/model/PerInfornation.hbm.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/pzy/model/PerNotice.hbm.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/pzy/model/PerUser.hbm.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/pzy/model/RArticle.hbm.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/pzy/model/RType.hbm.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/pzy/model/UMenu.hbm.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/pzy/model/UMessage.hbm.xml
十一月 19, 2015 9:01:09 上午 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
十一月 19, 2015 9:01:09 上午 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> vmjw5r9d849gyws0bke8|1df82230, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.gjt.mm.mysql.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> vmjw5r9d849gyws0bke8|1df82230, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3308/myperroom, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 60, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 10, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
十一月 19, 2015 9:01:10 上午 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
十一月 19, 2015 9:01:10 上午 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
十一月 19, 2015 9:01:10 上午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
十一月 19, 2015 9:01:10 上午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000228: Running hbm2ddl schema update
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000102: Fetching database metadata
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000396: Updating schema
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: myperroom.per_infornation
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [i_id, i_birthday, i_address, p_id]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: [fk_joe7tjygjeb2j5164rcpj18s, fk_详细信息2]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [fk_joe7tjygjeb2j5164rcpj18s, primary]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: myperroom.per_notice
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [p_nroom, p_ntitle, p_nid, p_id]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: [fk_发布]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [fk_发布, primary]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: myperroom.per_user
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [i_id, p_power, p_name, p_pass, p_id]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: [fk_详细信息]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [fk_详细信息, primary]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: myperroom.r_article
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [r_room, r_tid, r_time, r_dealtime, r_aid, p_id, r_name, r_type]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: [fk_per_id, fk_rtype]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [fk_per_id, fk_rtype, primary]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: myperroom.r_type
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [r_tid, r_type]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: []
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [primary]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: myperroom.u_menu
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [u_mid, u_mname, u_murl]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: []
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [primary]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: myperroom.u_message
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [u_other, u_mroom, u_mtitle, u_meid, r_aid]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: [fk_回帖]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [fk_回帖, primary]
十一月 19, 2015 9:01:10 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000232: Schema update complete
十一月 19, 2015 9:01:10 上午 org.springframework.orm.hibernate4.HibernateTransactionManager afterPropertiesSet
信息: Using DataSource [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> vmjw5r9d849gyws0bke8|1df82230, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.gjt.mm.mysql.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> vmjw5r9d849gyws0bke8|1df82230, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3308/myperroom, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 60, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 10, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]] of Hibernate SessionFactory for HibernateTransactionManager
Hibernate: select perinforna0_.I_id as I_id1_0_, perinforna0_.P_id as P_id2_0_, perinforna0_.I_birthday as I_birthd3_0_, perinforna0_.I_address as I_addres4_0_ from myperroom.per_infornation perinforna0_
十一月 19, 2015 9:01:11 上午 org.hibernate.property.BasicPropertyAccessor$BasicSetter set
ERROR: HHH000123: IllegalArgumentException in class: com.pzy.model.PerInfornation, setter method of property: perUser
十一月 19, 2015 9:01:11 上午 org.hibernate.property.BasicPropertyAccessor$BasicSetter set

ERROR: HHH000091: Expected type: com.pzy.model.PerUser, actual value: com.pzy.model.PerInfornation



出现这个问题,实际是类型不匹配报错,在处理问题的时候,应该关注hbm.XML文件的配置

错误为


      <class name="com.pzy.model.PerInfornation" table="per_infornation" catalog="myperroom" optimistic-lock="version">
        <id name="IId" type="int">
            <column name="I_id" />
            <generator class="increment" />
        </id>

//错误在本行   改为 <many-to-one name="perUser" class="com.pzy.model.PerUser" fetch="join">
            <column name="P_id" />
        </many-to-one>
        <many-to-one name="perUser" class="com.pzy.model.PerInfornation" fetch="join">
            <column name="P_id" />
        </many-to-one>
        <property name="IBirthday" type="string">
            <column name="I_birthday" length="20" />
        </property>
        <property name="IAddress" type="string">
            <column name="I_address" length="20" />
        </property>
        <set name="perUsers" table="per_user" lazy="true" fetch="join">
            <key>
                <column name="I_id" />
            </key>
            <one-to-many class="com.pzy.model.PerUser" />
        </set>
    </class>

版权声明:本文为博主原创文章,未经博主允许不得转载。

SSH框架整合常见异常错误

1.java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor 缺少asm-3.3.jar 2.java.lang.NoC...

java初级开发面试题全集(上)

2013年年底的时候,我看到了网上流传的一个叫做《Java面试题大全》的东西,认真的阅读了以后发现里面的很多题目是重复且没有价值的题目,还有不少的参考答案也是错误的,于是我花了半个月时间对这个所谓的《...
  • tga130
  • tga130
  • 2017年07月24日 17:43
  • 262

整合SSH框架及常见问题解决

如何快速的搭建javaweb应用框架是每一个java程序员必做的事情,通过自己的学习也是初步的可以搭建好ssh框架。下面是详细搭建过程及一些途中遇到的问题和解决方案,博主使用的是myeclipse,方...

ssh框架整合的jar包冲突问题

Apache Tomcat/7.0.59 - Error report
  • jurlon
  • jurlon
  • 2015年10月01日 18:38
  • 1156

SSH三框架的整合开发问题

给你详细讲一下SSH框架的事物管理,希望对你有帮助。 Struts+hibernate+spring整合开发web应用是相当流行的,只需要简单的配置就能轻松的对数据库进行crud操作,下面就hiber...

J2EE进阶(十一)SSH框架整合常见问题汇总(二)

J2EE进阶(十一)SSH框架整合常见问题汇总(二)问题8      java.lang.ClassCastException: java.lang.String cannot be cast to ...

SSH框架整合时遇到的找不到action bean的问题

昨天在整合SSH框架的时候,出现了找不到Action的Bean的问题,然后我仔细的回顾了一下Struts和Spring的整合过程 Struts和Spring的整合就是将Action交给Spr...

SSH框架整合数据库连接遇到的问题

Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://localhost:3306/ssh' java.sql.SQL...

J2EE进阶(十)SSH框架整合常见问题汇总(一)

SSH框架整合常见问题汇总前言     以下所列问题具有针对性,但是遇到同类型问题时均可按照此思路进行解决。问题1     class "org.apache.commons.dbcp.BasicDa...

J2EE进阶(十二)SSH框架整合常见问题汇总(三)

J2EE进阶(十二)SSH框架整合常见问题汇总(三)问题16      在挂失用户时,发现userid值为空,但是在前台输入处理账号22时,通过后台输出可以看出,后台根据前端输入在数据库中查询到结果对...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:ssh框架整合中出现的问题
举报原因:
原因补充:

(最多只允许输入30个字)