2009-06-16 08:49:41,281 INFO [com.wgm.common.filter.SessionFilter] - Creating SessionFilter 2009年06月16日 08时49分41秒 星期二
2009-6-16 8:49:41 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
2009-6-16 8:49:42 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
2009-6-16 8:49:44 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2009-6-16 8:49:47 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/spring-core.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: (com/fit/pojo/TBdExcereportId) bad major version at offset=6
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(AccessController.java:214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.UnsupportedClassVersionError: (com/fit/pojo/TBdExcereportId) bad major version at offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:222)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:101)
at org.hibernate.mapping.Component.getComponentClass(Component.java:102)
at org.hibernate.tuple.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:155)
at org.hibernate.tuple.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:40)
at org.hibernate.tuple.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:43)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:126)
at org.hibernate.mapping.Component.getType(Component.java:160)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.RootClass.validate(RootClass.java:193)
at org.hibernate.cfg.Configuration.validate(Configuration.java:984)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1169)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
... 39 more
2009-6-16 8:49:47 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
2009-6-16 8:49:47 org.apache.catalina.core.StandardContext start
SEVERE: Context [/fit_rep] startup failed due to previous errors
2009-6-16 8:49:47 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
2009-6-16 8:49:48 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8088
2009-6-16 8:49:48 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2009-6-16 8:49:48 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/78 config=null
2009-6-16 8:49:48 org.apache.catalina.startup.Catalina start
INFO: Server startup in 22610 ms
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.fit.pojo.TBdExcereport" table="T_BD_EXCEREPORT" schema="FIT_REP">
<composite-id name="id" class="com.fit.pojo.TBdExcereportId">
<key-property name="childrepid" type="java.lang.String">
<column name="CHILDREPID" length="6" />
</key-property>
<key-property name="version" type="java.lang.String">
<column name="VERSION" length="4" />
</key-property>
</composite-id>
<property name="filename" type="java.lang.String">
<column name="FILENAME" length="100" not-null="true" />
</property>
<property name="tablename" type="java.lang.String">
<column name="TABLENAME" length="30" not-null="true" />
</property>
<property name="dateofexpifrom" type="java.util.Date">
<column name="DATEOFEXPIFROM" length="7" not-null="true" />
</property>
<property name="dateofexpito" type="java.util.Date">
<column name="DATEOFEXPITO" length="7" not-null="true" />
</property>
<property name="recdtime" type="java.util.Date">
<column name="RECDTIME" length="7" not-null="true" />
</property>
<set name="TBdExcereportAffixfiles" inverse="true">
<key>
<column name="CHILDREPID" length="6" not-null="true" />
<column name="VERSIONID" length="4" not-null="true" />
</key>
<one-to-many class="com.fit.pojo.TBdExcereportAffixfile" />
</set>
</class>
</hibernate-mapping>
package com.fit.pojo;import java.util.Date;
import java.util.HashSet;
import java.util.Set;/**
* TBdExcereport entity.
*
* @author MyEclipse Persistence Tools
*/public class TBdExcereport implements java.io.Serializable { // Fields private TBdExcereportId id;
private String filename;
private String tablename;
private Date dateofexpifrom;
private Date dateofexpito;
private Date recdtime;
private Set TBdExcereportAffixfiles = new HashSet(0); // Constructors /** default constructor */
public TBdExcereport() {
} /** minimal constructor */
public TBdExcereport(TBdExcereportId id, String filename, String tablename,
Date dateofexpifrom, Date dateofexpito, Date recdtime) {
this.id = id;
this.filename = filename;
this.tablename = tablename;
this.dateofexpifrom = dateofexpifrom;
this.dateofexpito = dateofexpito;
this.recdtime = recdtime;
} /** full constructor */
public TBdExcereport(TBdExcereportId id, String filename, String tablename,
Date dateofexpifrom, Date dateofexpito, Date recdtime,
Set TBdExcereportAffixfiles) {
this.id = id;
this.filename = filename;
this.tablename = tablename;
this.dateofexpifrom = dateofexpifrom;
this.dateofexpito = dateofexpito;
this.recdtime = recdtime;
this.TBdExcereportAffixfiles = TBdExcereportAffixfiles;
} // Property accessors public TBdExcereportId getId() {
return this.id;
} public void setId(TBdExcereportId id) {
this.id = id;
} public String getFilename() {
return this.filename;
} public void setFilename(String filename) {
this.filename = filename;
} public String getTablename() {
return this.tablename;
} public void setTablename(String tablename) {
this.tablename = tablename;
} public Date getDateofexpifrom() {
return this.dateofexpifrom;
} public void setDateofexpifrom(Date dateofexpifrom) {
this.dateofexpifrom = dateofexpifrom;
} public Date getDateofexpito() {
return this.dateofexpito;
} public void setDateofexpito(Date dateofexpito) {
this.dateofexpito = dateofexpito;
} public Date getRecdtime() {
return this.recdtime;
} public void setRecdtime(Date recdtime) {
this.recdtime = recdtime;
} public Set getTBdExcereportAffixfiles() {
return this.TBdExcereportAffixfiles;
} public void setTBdExcereportAffixfiles(Set TBdExcereportAffixfiles) {
this.TBdExcereportAffixfiles = TBdExcereportAffixfiles;
}}
package com.fit.pojo;/**
* TBdExcereportId entity.
*
* @author MyEclipse Persistence Tools
*/public class TBdExcereportId implements java.io.Serializable { // Fields private String childrepid;
private String version; // Constructors /** default constructor */
public TBdExcereportId() {
} /** full constructor */
public TBdExcereportId(String childrepid, String version) {
this.childrepid = childrepid;
this.version = version;
} // Property accessors public String getChildrepid() {
return this.childrepid;
} public void setChildrepid(String childrepid) {
this.childrepid = childrepid;
} public String getVersion() {
return this.version;
} public void setVersion(String version) {
this.version = version;
} public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof TBdExcereportId))
return false;
TBdExcereportId castOther = (TBdExcereportId) other; return ((this.getChildrepid() == castOther.getChildrepid()) || (this
.getChildrepid() != null
&& castOther.getChildrepid() != null && this.getChildrepid()
.equals(castOther.getChildrepid())))
&& ((this.getVersion() == castOther.getVersion()) || (this
.getVersion() != null
&& castOther.getVersion() != null && this.getVersion()
.equals(castOther.getVersion())));
} public int hashCode() {
int result = 17; result = 37
* result
+ (getChildrepid() == null ? 0 : this.getChildrepid()
.hashCode());
result = 37 * result
+ (getVersion() == null ? 0 : this.getVersion().hashCode());
return result;
}}大哥帮我看看啊 主键生成assigned
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>net/csdn/Person.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.hbm2ddl.auto=update
hibernate.show_sql=true
hibernate.format_sql=true
</value>
</property>
</bean>
楼主你参考下