ssh框架整合中出现的问题

十一月 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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值