java.lang.ClassCastException

Hibernate JIRA | Aron sogor | 1 decade ago
  1. 0

    I get an exception doing: factory = new Configuration().configure().buildSessionFactory(); In the stack trace it boils down to: 15:02:37,702 INFO [ReflectHelper] reflection optimizer disabled for: net.theatlantis.moses.data.Invite, ClassCastException: null ...bla-bla java.lang.ClassCastException at net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:92) at net.sf.cglib.reflect.FastClass.create(FastClass.java:74) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:763) at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:699) at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:739) THIS ONLY HAPPENDS ON HOT-REDEPLOY: -if the server was started without ear it is fine at the first time. -if the server started with ear it deploys(during startup). -second time deployment fails either way. I would love to dig more but where do I look. It seems like something is not clearing out. Here is the initialization first and then the redeploy: 15:02:36,895 INFO [Configuration] configuring from resource: /hibernate.cfg.xml 15:02:36,896 INFO [Configuration] Configuration resource: /hibernate.cfg.xml 15:02:36,948 DEBUG [DTDEntityResolver] trying to locate http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in classpath under net/sf/hibernate/ 15:02:36,950 DEBUG [DTDEntityResolver] found http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in classpath 15:02:36,966 DEBUG [Configuration] connection.datasource=java:/MosesDataSource 15:02:36,967 DEBUG [Configuration] hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider 15:02:36,968 DEBUG [Configuration] dialect=net.sf.hibernate.dialect.PostgreSQLDialect 15:02:36,969 DEBUG [Configuration] hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup 15:02:36,970 DEBUG [Configuration] show_sql=true 15:02:36,970 DEBUG [Configuration] use_outer_join=true 15:02:36,971 DEBUG [Configuration] null<-org.dom4j.tree.DefaultAttribute@15c0c91 [Attribute: name resource value "mapping.hbm.xml"] 15:02:36,972 INFO [Configuration] Mapping resource: mapping.hbm.xml 15:02:36,977 DEBUG [DTDEntityResolver] trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/ 15:02:36,979 DEBUG [DTDEntityResolver] found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath 15:02:37,172 INFO [Binder] Mapping class: net.theatlantis.moses.data.User -> mosesuser 15:02:37,173 DEBUG [Binder] Mapped property: userId -> userId, type: long 15:02:37,174 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,175 DEBUG [Binder] Mapped property: externalId -> externalId, type: string 15:02:37,177 DEBUG [Binder] Mapped property: addresses, type: java.util.Set 15:02:37,178 DEBUG [Binder] Mapped property: invites, type: java.util.Set 15:02:37,181 DEBUG [Binder] Mapped property: views, type: java.util.Set 15:02:37,182 INFO [Binder] Mapping class: net.theatlantis.moses.data.Address -> address 15:02:37,183 DEBUG [Binder] Mapped property: recordId -> recordId, type: long 15:02:37,184 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,187 DEBUG [Binder] Mapped property: owner -> userId, type: net.theatlantis.moses.data.User 15:02:37,188 DEBUG [Binder] Mapped property: createDate -> createDate, type: timestamp 15:02:37,189 DEBUG [Binder] Mapped property: isUserAddress -> isUserAddress, type: boolean 15:02:37,190 DEBUG [Binder] Mapped property: fullName -> fullName, type: string 15:02:37,191 DEBUG [Binder] Mapped property: nickName -> nickName, type: string 15:02:37,192 DEBUG [Binder] Mapped property: webURL -> webURL, type: string 15:02:37,193 DEBUG [Binder] Mapped property: organization -> organization, type: string 15:02:37,194 DEBUG [Binder] Mapped property: homePhone -> homePhone, type: string 15:02:37,195 DEBUG [Binder] Mapped property: mobilePhone -> mobilePhone, type: string 15:02:37,196 DEBUG [Binder] Mapped property: officePhone -> officePhone, type: string 15:02:37,197 DEBUG [Binder] Mapped property: fax -> fax, type: string 15:02:37,197 DEBUG [Binder] Mapped property: emailAddress -> emailAddress, type: string 15:02:37,199 INFO [Binder] Mapping class: net.theatlantis.moses.data.Invite -> invite 15:02:37,199 DEBUG [Binder] Mapped property: inviteId -> inviteId, type: long 15:02:37,200 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,202 DEBUG [Binder] Mapped property: user -> userId, type: net.theatlantis.moses.data.User 15:02:37,203 DEBUG [Binder] Mapped property: event -> recordId, type: net.theatlantis.moses.data.CalendarEvent 15:02:37,204 DEBUG [Binder] Mapped property: status -> status, type: integer 15:02:37,205 INFO [Binder] Mapping class: net.theatlantis.moses.data.CalendarEvent -> calendarevent 15:02:37,206 DEBUG [Binder] Mapped property: recordId -> recordId, type: long 15:02:37,207 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,208 DEBUG [Binder] Mapped property: createDate -> createDate, type: timestamp 15:02:37,209 DEBUG [Binder] Mapped property: title -> title, type: string 15:02:37,210 DEBUG [Binder] Mapped property: location -> location, type: string 15:02:37,211 DEBUG [Binder] Mapped property: seeURL -> seeURL, type: string 15:02:37,212 DEBUG [Binder] Mapped property: startDate -> startDate, type: timestamp 15:02:37,213 DEBUG [Binder] Mapped property: endDate -> endDate, type: timestamp 15:02:37,245 DEBUG [Binder] Mapped property: note -> note, type: string 15:02:37,246 DEBUG [Binder] Mapped property: invites, type: java.util.Set 15:02:37,247 INFO [Binder] Mapping collection: net.theatlantis.moses.data.CalendarEvent.organizer -> event_organizer 15:02:37,248 DEBUG [Binder] Mapped property: organizer, type: java.util.Set 15:02:37,249 INFO [Binder] Mapping class: net.theatlantis.moses.data.View -> view 15:02:37,250 DEBUG [Binder] Mapped property: viewId -> viewId, type: long 15:02:37,251 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,252 DEBUG [Binder] Mapped property: deviceId -> deviceId, type: string 15:02:37,255 DEBUG [Binder] Mapped property: userId -> userId, type: long 15:02:37,261 DEBUG [Binder] Mapped property: records, type: java.util.Set 15:02:37,262 INFO [Binder] Mapping class: net.theatlantis.moses.data.ViewRecord -> viewrecord 15:02:37,263 DEBUG [Binder] Mapped property: viewrecordId -> viewrecordId, type: long 15:02:37,264 DEBUG [Binder] Mapped property: lastChangeDate -> lastChangeDate, type: timestamp 15:02:37,265 DEBUG [Binder] Mapped property: viewId -> viewId, type: long 15:02:37,266 DEBUG [Binder] Mapped property: recordId -> recordId, type: long 15:02:37,267 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,268 INFO [Configuration] Configured SessionFactory: null 15:02:37,270 DEBUG [Configuration] properties: {show_sql=true, java.vendor=Sun Microsystems Inc., catalina.base=/opt/jboss/jboss-3.2.3/server/default, connection.datasource=java:/MosesDataSource, catalina.useNaming=false, os.name=Linux, sun.boot.class.path=/usr/lib/j2sdk1.4.2/jre/lib/rt.jar:/usr/lib/j2sdk1.4.2/jre/lib/i18n.jar:/usr/lib/j2sdk1.4.2/jre/lib/sunrsasign.jar:/usr/lib/j2sdk1.4.2/jre/lib/jsse.jar:/usr/lib/j2sdk1.4.2/jre/lib/jce.jar:/usr/lib/j2sdk1.4.2/jre/lib/charsets.jar:/usr/lib/j2sdk1.4.2/jre/classes, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.4.2-b28, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, user.name=aron, jboss.bind.address=0.0.0.0, jboss.home.dir=/opt/jboss/jboss-3.2.3, user.language=en, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, sun.boot.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386, dialect=net.sf.hibernate.dialect.PostgreSQLDialect, jboss.home.url=file:/opt/jboss/jboss-3.2.3/, java.version=1.4.2, version=2.4.1, user.timezone=US/Pacific, jboss.server.home.dir=/opt/jboss/jboss-3.2.3/server/default, sun.arch.data.model=32, hibernate.use_outer_join=true, java.endorsed.dirs=/usr/lib/j2sdk1.4.2/jre/lib/endorsed, jboss.server.home.url=file:/opt/jboss/jboss-3.2.3/server/default/, sun.cpu.isalist=, file.encoding.pkg=sun.io, file.separator=/, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, jboss.server.config.url=file:/opt/jboss/jboss-3.2.3/server/default/conf/, user.country=US, java.home=/usr/lib/j2sdk1.4.2/jre, java.vm.info=mixed mode, jboss.lib.url=file:/opt/jboss/jboss-3.2.3/lib/, os.version=2.4.19-4GB, hibernate.connection.datasource=java:/MosesDataSource, path.separator=:, java.vm.version=1.4.2-b28, java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory, vendor-url=http://xml.apache.org/xalan-j, java.protocol.handler.pkgs=org.jboss.net.protocol, java.awt.printerjob=sun.print.PSPrinterJob, vendor=Apache Software Foundation, sun.io.unicode.encoding=UnicodeLittle, jboss.server.temp.dir=/opt/jboss/jboss-3.2.3/server/default/tmp, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, user.home=/home/aron, java.rmi.server.RMIClassLoaderSpi=org.jboss.system.JBossRMIClassLoader, java.specification.vendor=Sun Microsystems Inc., org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl, java.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386/server:/usr/lib/j2sdk1.4.2/jre/lib/i386:/usr/lib/j2sdk1.4.2/jre/../lib/i386:/home/oracle/OraHome1/lib, java.vendor.url=http://java.sun.com/, program.name=run.sh, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=/opt/jboss/jboss-3.2.3/bin/run.jar:/usr/lib/java/lib/tools.jar, use_outer_join=true, jbossmx.loader.repository.class=org.jboss.mx.loading.UnifiedLoaderRepository3, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, catalina.home=/opt/jboss/jboss-3.2.3/server/default, sun.cpu.endian=little, sun.os.patch.level=unknown, jboss.server.lib.url=file:/opt/jboss/jboss-3.2.3/server/default/lib/, java.rmi.server.codebase=http://linux:8083/, java.io.tmpdir=/tmp, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, jboss.server.data.dir=/opt/jboss/jboss-3.2.3/server/default/data, os.arch=i386, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.ext.dirs=/usr/lib/j2sdk1.4.2/jre/lib/ext, user.dir=/opt/jboss/jboss-3.2.3/bin, line.separator= , java.vm.name=Java HotSpot(TM) Server VM, jboss.server.base.dir=/opt/jboss/jboss-3.2.3/server, jboss.server.base.url=file:/opt/jboss/jboss-3.2.3/server/, file.encoding=ISO-8859-1, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup, java.specification.version=1.4, jboss.server.name=default, hibernate.show_sql=true} 15:02:37,279 INFO [Configuration] processing one-to-many association mappings 15:02:37,280 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.User.addresses 15:02:37,281 INFO [Binder] Mapping collection: net.theatlantis.moses.data.User.addresses -> address 15:02:37,282 DEBUG [Binder] Mapped collection key: userId, one-to-many: net.theatlantis.moses.data.Address 15:02:37,283 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.User.invites 15:02:37,283 INFO [Binder] Mapping collection: net.theatlantis.moses.data.User.invites -> invite 15:02:37,284 DEBUG [Binder] Mapped collection key: userId, one-to-many: net.theatlantis.moses.data.Invite 15:02:37,284 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.User.views 15:02:37,284 INFO [Binder] Mapping collection: net.theatlantis.moses.data.User.views -> view 15:02:37,285 DEBUG [Binder] Mapped collection key: userId, one-to-many: net.theatlantis.moses.data.View 15:02:37,285 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.CalendarEvent.invites 15:02:37,285 INFO [Binder] Mapping collection: net.theatlantis.moses.data.CalendarEvent.invites -> invite 15:02:37,286 DEBUG [Binder] Mapped collection key: recordId, one-to-many: net.theatlantis.moses.data.Invite 15:02:37,286 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.CalendarEvent.organizer 15:02:37,286 DEBUG [Binder] Mapped collection key: recordId, element: userId, type: net.theatlantis.moses.data.User 15:02:37,287 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.View.records 15:02:37,287 INFO [Binder] Mapping collection: net.theatlantis.moses.data.View.records -> viewrecord 15:02:37,287 DEBUG [Binder] Mapped collection key: viewId, one-to-many: net.theatlantis.moses.data.ViewRecord 15:02:37,288 INFO [Configuration] processing one-to-one association property references 15:02:37,288 INFO [Configuration] processing foreign key constraints 15:02:37,288 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,288 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.CalendarEvent 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.View 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.CalendarEvent 15:02:37,290 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,291 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect 15:02:37,292 INFO [SettingsFactory] Use outer join fetching: true 15:02:37,292 INFO [NamingHelper] JNDI InitialContext properties:{} 15:02:37,293 INFO [DatasourceConnectionProvider] Using datasource: java:/MosesDataSource 15:02:37,294 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup 15:02:37,294 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup 15:02:37,295 INFO [SettingsFactory] Use scrollable result sets: true 15:02:37,295 INFO [SettingsFactory] JDBC 2 max batch size: 15 15:02:37,295 INFO [SettingsFactory] echoing all SQL to stdout 15:02:37,296 INFO [SettingsFactory] Query language substitutions: {} 15:02:37,296 INFO [SettingsFactory] cache provider: net.sf.hibernate.cache.HashtableCacheProvider 15:02:37,296 INFO [Configuration] instantiating and configuring caches 15:02:37,296 INFO [SessionFactoryImpl] building session factory 15:02:37,298 DEBUG [SessionFactoryImpl] instantiating session factory with properties: {show_sql=true, java.vendor=Sun Microsystems Inc., catalina.base=/opt/jboss/jboss-3.2.3/server/default, connection.datasource=java:/MosesDataSource, catalina.useNaming=false, os.name=Linux, sun.boot.class.path=/usr/lib/j2sdk1.4.2/jre/lib/rt.jar:/usr/lib/j2sdk1.4.2/jre/lib/i18n.jar:/usr/lib/j2sdk1.4.2/jre/lib/sunrsasign.jar:/usr/lib/j2sdk1.4.2/jre/lib/jsse.jar:/usr/lib/j2sdk1.4.2/jre/lib/jce.jar:/usr/lib/j2sdk1.4.2/jre/lib/charsets.jar:/usr/lib/j2sdk1.4.2/jre/classes, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.4.2-b28, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, user.name=aron, jboss.bind.address=0.0.0.0, jboss.home.dir=/opt/jboss/jboss-3.2.3, user.language=en, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, sun.boot.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386, dialect=net.sf.hibernate.dialect.PostgreSQLDialect, jboss.home.url=file:/opt/jboss/jboss-3.2.3/, java.version=1.4.2, version=2.4.1, user.timezone=US/Pacific, jboss.server.home.dir=/opt/jboss/jboss-3.2.3/server/default, sun.arch.data.model=32, hibernate.use_outer_join=true, java.endorsed.dirs=/usr/lib/j2sdk1.4.2/jre/lib/endorsed, jboss.server.home.url=file:/opt/jboss/jboss-3.2.3/server/default/, sun.cpu.isalist=, file.encoding.pkg=sun.io, file.separator=/, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, jboss.server.config.url=file:/opt/jboss/jboss-3.2.3/server/default/conf/, user.country=US, java.home=/usr/lib/j2sdk1.4.2/jre, java.vm.info=mixed mode, jboss.lib.url=file:/opt/jboss/jboss-3.2.3/lib/, os.version=2.4.19-4GB, hibernate.connection.datasource=java:/MosesDataSource, path.separator=:, java.vm.version=1.4.2-b28, java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory, vendor-url=http://xml.apache.org/xalan-j, java.protocol.handler.pkgs=org.jboss.net.protocol, java.awt.printerjob=sun.print.PSPrinterJob, vendor=Apache Software Foundation, sun.io.unicode.encoding=UnicodeLittle, jboss.server.temp.dir=/opt/jboss/jboss-3.2.3/server/default/tmp, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, user.home=/home/aron, java.rmi.server.RMIClassLoaderSpi=org.jboss.system.JBossRMIClassLoader, java.specification.vendor=Sun Microsystems Inc., org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl, java.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386/server:/usr/lib/j2sdk1.4.2/jre/lib/i386:/usr/lib/j2sdk1.4.2/jre/../lib/i386:/home/oracle/OraHome1/lib, java.vendor.url=http://java.sun.com/, program.name=run.sh, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=/opt/jboss/jboss-3.2.3/bin/run.jar:/usr/lib/java/lib/tools.jar, use_outer_join=true, jbossmx.loader.repository.class=org.jboss.mx.loading.UnifiedLoaderRepository3, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, catalina.home=/opt/jboss/jboss-3.2.3/server/default, sun.cpu.endian=little, sun.os.patch.level=unknown, jboss.server.lib.url=file:/opt/jboss/jboss-3.2.3/server/default/lib/, java.rmi.server.codebase=http://linux:8083/, java.io.tmpdir=/tmp, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, jboss.server.data.dir=/opt/jboss/jboss-3.2.3/server/default/data, os.arch=i386, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.ext.dirs=/usr/lib/j2sdk1.4.2/jre/lib/ext, user.dir=/opt/jboss/jboss-3.2.3/bin, line.separator= , java.vm.name=Java HotSpot(TM) Server VM, jboss.server.base.dir=/opt/jboss/jboss-3.2.3/server, jboss.server.base.url=file:/opt/jboss/jboss-3.2.3/server/, file.encoding=ISO-8859-1, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup, java.specification.version=1.4, jboss.server.name=default, hibernate.show_sql=true} 15:02:37,702 INFO [ReflectHelper] reflection optimizer disabled for: net.theatlantis.moses.data.Invite, ClassCastException: null

    Hibernate JIRA | 1 decade ago | Aron sogor
    java.lang.ClassCastException
  2. 0

    I get an exception doing: factory = new Configuration().configure().buildSessionFactory(); In the stack trace it boils down to: 15:02:37,702 INFO [ReflectHelper] reflection optimizer disabled for: net.theatlantis.moses.data.Invite, ClassCastException: null ...bla-bla java.lang.ClassCastException at net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:92) at net.sf.cglib.reflect.FastClass.create(FastClass.java:74) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:763) at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:699) at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:739) THIS ONLY HAPPENDS ON HOT-REDEPLOY: -if the server was started without ear it is fine at the first time. -if the server started with ear it deploys(during startup). -second time deployment fails either way. I would love to dig more but where do I look. It seems like something is not clearing out. Here is the initialization first and then the redeploy: 15:02:36,895 INFO [Configuration] configuring from resource: /hibernate.cfg.xml 15:02:36,896 INFO [Configuration] Configuration resource: /hibernate.cfg.xml 15:02:36,948 DEBUG [DTDEntityResolver] trying to locate http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in classpath under net/sf/hibernate/ 15:02:36,950 DEBUG [DTDEntityResolver] found http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in classpath 15:02:36,966 DEBUG [Configuration] connection.datasource=java:/MosesDataSource 15:02:36,967 DEBUG [Configuration] hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider 15:02:36,968 DEBUG [Configuration] dialect=net.sf.hibernate.dialect.PostgreSQLDialect 15:02:36,969 DEBUG [Configuration] hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup 15:02:36,970 DEBUG [Configuration] show_sql=true 15:02:36,970 DEBUG [Configuration] use_outer_join=true 15:02:36,971 DEBUG [Configuration] null<-org.dom4j.tree.DefaultAttribute@15c0c91 [Attribute: name resource value "mapping.hbm.xml"] 15:02:36,972 INFO [Configuration] Mapping resource: mapping.hbm.xml 15:02:36,977 DEBUG [DTDEntityResolver] trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/ 15:02:36,979 DEBUG [DTDEntityResolver] found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath 15:02:37,172 INFO [Binder] Mapping class: net.theatlantis.moses.data.User -> mosesuser 15:02:37,173 DEBUG [Binder] Mapped property: userId -> userId, type: long 15:02:37,174 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,175 DEBUG [Binder] Mapped property: externalId -> externalId, type: string 15:02:37,177 DEBUG [Binder] Mapped property: addresses, type: java.util.Set 15:02:37,178 DEBUG [Binder] Mapped property: invites, type: java.util.Set 15:02:37,181 DEBUG [Binder] Mapped property: views, type: java.util.Set 15:02:37,182 INFO [Binder] Mapping class: net.theatlantis.moses.data.Address -> address 15:02:37,183 DEBUG [Binder] Mapped property: recordId -> recordId, type: long 15:02:37,184 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,187 DEBUG [Binder] Mapped property: owner -> userId, type: net.theatlantis.moses.data.User 15:02:37,188 DEBUG [Binder] Mapped property: createDate -> createDate, type: timestamp 15:02:37,189 DEBUG [Binder] Mapped property: isUserAddress -> isUserAddress, type: boolean 15:02:37,190 DEBUG [Binder] Mapped property: fullName -> fullName, type: string 15:02:37,191 DEBUG [Binder] Mapped property: nickName -> nickName, type: string 15:02:37,192 DEBUG [Binder] Mapped property: webURL -> webURL, type: string 15:02:37,193 DEBUG [Binder] Mapped property: organization -> organization, type: string 15:02:37,194 DEBUG [Binder] Mapped property: homePhone -> homePhone, type: string 15:02:37,195 DEBUG [Binder] Mapped property: mobilePhone -> mobilePhone, type: string 15:02:37,196 DEBUG [Binder] Mapped property: officePhone -> officePhone, type: string 15:02:37,197 DEBUG [Binder] Mapped property: fax -> fax, type: string 15:02:37,197 DEBUG [Binder] Mapped property: emailAddress -> emailAddress, type: string 15:02:37,199 INFO [Binder] Mapping class: net.theatlantis.moses.data.Invite -> invite 15:02:37,199 DEBUG [Binder] Mapped property: inviteId -> inviteId, type: long 15:02:37,200 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,202 DEBUG [Binder] Mapped property: user -> userId, type: net.theatlantis.moses.data.User 15:02:37,203 DEBUG [Binder] Mapped property: event -> recordId, type: net.theatlantis.moses.data.CalendarEvent 15:02:37,204 DEBUG [Binder] Mapped property: status -> status, type: integer 15:02:37,205 INFO [Binder] Mapping class: net.theatlantis.moses.data.CalendarEvent -> calendarevent 15:02:37,206 DEBUG [Binder] Mapped property: recordId -> recordId, type: long 15:02:37,207 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,208 DEBUG [Binder] Mapped property: createDate -> createDate, type: timestamp 15:02:37,209 DEBUG [Binder] Mapped property: title -> title, type: string 15:02:37,210 DEBUG [Binder] Mapped property: location -> location, type: string 15:02:37,211 DEBUG [Binder] Mapped property: seeURL -> seeURL, type: string 15:02:37,212 DEBUG [Binder] Mapped property: startDate -> startDate, type: timestamp 15:02:37,213 DEBUG [Binder] Mapped property: endDate -> endDate, type: timestamp 15:02:37,245 DEBUG [Binder] Mapped property: note -> note, type: string 15:02:37,246 DEBUG [Binder] Mapped property: invites, type: java.util.Set 15:02:37,247 INFO [Binder] Mapping collection: net.theatlantis.moses.data.CalendarEvent.organizer -> event_organizer 15:02:37,248 DEBUG [Binder] Mapped property: organizer, type: java.util.Set 15:02:37,249 INFO [Binder] Mapping class: net.theatlantis.moses.data.View -> view 15:02:37,250 DEBUG [Binder] Mapped property: viewId -> viewId, type: long 15:02:37,251 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,252 DEBUG [Binder] Mapped property: deviceId -> deviceId, type: string 15:02:37,255 DEBUG [Binder] Mapped property: userId -> userId, type: long 15:02:37,261 DEBUG [Binder] Mapped property: records, type: java.util.Set 15:02:37,262 INFO [Binder] Mapping class: net.theatlantis.moses.data.ViewRecord -> viewrecord 15:02:37,263 DEBUG [Binder] Mapped property: viewrecordId -> viewrecordId, type: long 15:02:37,264 DEBUG [Binder] Mapped property: lastChangeDate -> lastChangeDate, type: timestamp 15:02:37,265 DEBUG [Binder] Mapped property: viewId -> viewId, type: long 15:02:37,266 DEBUG [Binder] Mapped property: recordId -> recordId, type: long 15:02:37,267 DEBUG [Binder] Mapped property: version -> version, type: integer 15:02:37,268 INFO [Configuration] Configured SessionFactory: null 15:02:37,270 DEBUG [Configuration] properties: {show_sql=true, java.vendor=Sun Microsystems Inc., catalina.base=/opt/jboss/jboss-3.2.3/server/default, connection.datasource=java:/MosesDataSource, catalina.useNaming=false, os.name=Linux, sun.boot.class.path=/usr/lib/j2sdk1.4.2/jre/lib/rt.jar:/usr/lib/j2sdk1.4.2/jre/lib/i18n.jar:/usr/lib/j2sdk1.4.2/jre/lib/sunrsasign.jar:/usr/lib/j2sdk1.4.2/jre/lib/jsse.jar:/usr/lib/j2sdk1.4.2/jre/lib/jce.jar:/usr/lib/j2sdk1.4.2/jre/lib/charsets.jar:/usr/lib/j2sdk1.4.2/jre/classes, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.4.2-b28, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, user.name=aron, jboss.bind.address=0.0.0.0, jboss.home.dir=/opt/jboss/jboss-3.2.3, user.language=en, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, sun.boot.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386, dialect=net.sf.hibernate.dialect.PostgreSQLDialect, jboss.home.url=file:/opt/jboss/jboss-3.2.3/, java.version=1.4.2, version=2.4.1, user.timezone=US/Pacific, jboss.server.home.dir=/opt/jboss/jboss-3.2.3/server/default, sun.arch.data.model=32, hibernate.use_outer_join=true, java.endorsed.dirs=/usr/lib/j2sdk1.4.2/jre/lib/endorsed, jboss.server.home.url=file:/opt/jboss/jboss-3.2.3/server/default/, sun.cpu.isalist=, file.encoding.pkg=sun.io, file.separator=/, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, jboss.server.config.url=file:/opt/jboss/jboss-3.2.3/server/default/conf/, user.country=US, java.home=/usr/lib/j2sdk1.4.2/jre, java.vm.info=mixed mode, jboss.lib.url=file:/opt/jboss/jboss-3.2.3/lib/, os.version=2.4.19-4GB, hibernate.connection.datasource=java:/MosesDataSource, path.separator=:, java.vm.version=1.4.2-b28, java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory, vendor-url=http://xml.apache.org/xalan-j, java.protocol.handler.pkgs=org.jboss.net.protocol, java.awt.printerjob=sun.print.PSPrinterJob, vendor=Apache Software Foundation, sun.io.unicode.encoding=UnicodeLittle, jboss.server.temp.dir=/opt/jboss/jboss-3.2.3/server/default/tmp, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, user.home=/home/aron, java.rmi.server.RMIClassLoaderSpi=org.jboss.system.JBossRMIClassLoader, java.specification.vendor=Sun Microsystems Inc., org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl, java.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386/server:/usr/lib/j2sdk1.4.2/jre/lib/i386:/usr/lib/j2sdk1.4.2/jre/../lib/i386:/home/oracle/OraHome1/lib, java.vendor.url=http://java.sun.com/, program.name=run.sh, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=/opt/jboss/jboss-3.2.3/bin/run.jar:/usr/lib/java/lib/tools.jar, use_outer_join=true, jbossmx.loader.repository.class=org.jboss.mx.loading.UnifiedLoaderRepository3, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, catalina.home=/opt/jboss/jboss-3.2.3/server/default, sun.cpu.endian=little, sun.os.patch.level=unknown, jboss.server.lib.url=file:/opt/jboss/jboss-3.2.3/server/default/lib/, java.rmi.server.codebase=http://linux:8083/, java.io.tmpdir=/tmp, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, jboss.server.data.dir=/opt/jboss/jboss-3.2.3/server/default/data, os.arch=i386, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.ext.dirs=/usr/lib/j2sdk1.4.2/jre/lib/ext, user.dir=/opt/jboss/jboss-3.2.3/bin, line.separator= , java.vm.name=Java HotSpot(TM) Server VM, jboss.server.base.dir=/opt/jboss/jboss-3.2.3/server, jboss.server.base.url=file:/opt/jboss/jboss-3.2.3/server/, file.encoding=ISO-8859-1, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup, java.specification.version=1.4, jboss.server.name=default, hibernate.show_sql=true} 15:02:37,279 INFO [Configuration] processing one-to-many association mappings 15:02:37,280 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.User.addresses 15:02:37,281 INFO [Binder] Mapping collection: net.theatlantis.moses.data.User.addresses -> address 15:02:37,282 DEBUG [Binder] Mapped collection key: userId, one-to-many: net.theatlantis.moses.data.Address 15:02:37,283 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.User.invites 15:02:37,283 INFO [Binder] Mapping collection: net.theatlantis.moses.data.User.invites -> invite 15:02:37,284 DEBUG [Binder] Mapped collection key: userId, one-to-many: net.theatlantis.moses.data.Invite 15:02:37,284 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.User.views 15:02:37,284 INFO [Binder] Mapping collection: net.theatlantis.moses.data.User.views -> view 15:02:37,285 DEBUG [Binder] Mapped collection key: userId, one-to-many: net.theatlantis.moses.data.View 15:02:37,285 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.CalendarEvent.invites 15:02:37,285 INFO [Binder] Mapping collection: net.theatlantis.moses.data.CalendarEvent.invites -> invite 15:02:37,286 DEBUG [Binder] Mapped collection key: recordId, one-to-many: net.theatlantis.moses.data.Invite 15:02:37,286 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.CalendarEvent.organizer 15:02:37,286 DEBUG [Binder] Mapped collection key: recordId, element: userId, type: net.theatlantis.moses.data.User 15:02:37,287 DEBUG [Binder] Second pass for collection: net.theatlantis.moses.data.View.records 15:02:37,287 INFO [Binder] Mapping collection: net.theatlantis.moses.data.View.records -> viewrecord 15:02:37,287 DEBUG [Binder] Mapped collection key: viewId, one-to-many: net.theatlantis.moses.data.ViewRecord 15:02:37,288 INFO [Configuration] processing one-to-one association property references 15:02:37,288 INFO [Configuration] processing foreign key constraints 15:02:37,288 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,288 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.CalendarEvent 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.View 15:02:37,289 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.CalendarEvent 15:02:37,290 DEBUG [Configuration] resolving reference to class: net.theatlantis.moses.data.User 15:02:37,291 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect 15:02:37,292 INFO [SettingsFactory] Use outer join fetching: true 15:02:37,292 INFO [NamingHelper] JNDI InitialContext properties:{} 15:02:37,293 INFO [DatasourceConnectionProvider] Using datasource: java:/MosesDataSource 15:02:37,294 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup 15:02:37,294 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup 15:02:37,295 INFO [SettingsFactory] Use scrollable result sets: true 15:02:37,295 INFO [SettingsFactory] JDBC 2 max batch size: 15 15:02:37,295 INFO [SettingsFactory] echoing all SQL to stdout 15:02:37,296 INFO [SettingsFactory] Query language substitutions: {} 15:02:37,296 INFO [SettingsFactory] cache provider: net.sf.hibernate.cache.HashtableCacheProvider 15:02:37,296 INFO [Configuration] instantiating and configuring caches 15:02:37,296 INFO [SessionFactoryImpl] building session factory 15:02:37,298 DEBUG [SessionFactoryImpl] instantiating session factory with properties: {show_sql=true, java.vendor=Sun Microsystems Inc., catalina.base=/opt/jboss/jboss-3.2.3/server/default, connection.datasource=java:/MosesDataSource, catalina.useNaming=false, os.name=Linux, sun.boot.class.path=/usr/lib/j2sdk1.4.2/jre/lib/rt.jar:/usr/lib/j2sdk1.4.2/jre/lib/i18n.jar:/usr/lib/j2sdk1.4.2/jre/lib/sunrsasign.jar:/usr/lib/j2sdk1.4.2/jre/lib/jsse.jar:/usr/lib/j2sdk1.4.2/jre/lib/jce.jar:/usr/lib/j2sdk1.4.2/jre/lib/charsets.jar:/usr/lib/j2sdk1.4.2/jre/classes, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.4.2-b28, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, user.name=aron, jboss.bind.address=0.0.0.0, jboss.home.dir=/opt/jboss/jboss-3.2.3, user.language=en, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, sun.boot.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386, dialect=net.sf.hibernate.dialect.PostgreSQLDialect, jboss.home.url=file:/opt/jboss/jboss-3.2.3/, java.version=1.4.2, version=2.4.1, user.timezone=US/Pacific, jboss.server.home.dir=/opt/jboss/jboss-3.2.3/server/default, sun.arch.data.model=32, hibernate.use_outer_join=true, java.endorsed.dirs=/usr/lib/j2sdk1.4.2/jre/lib/endorsed, jboss.server.home.url=file:/opt/jboss/jboss-3.2.3/server/default/, sun.cpu.isalist=, file.encoding.pkg=sun.io, file.separator=/, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, jboss.server.config.url=file:/opt/jboss/jboss-3.2.3/server/default/conf/, user.country=US, java.home=/usr/lib/j2sdk1.4.2/jre, java.vm.info=mixed mode, jboss.lib.url=file:/opt/jboss/jboss-3.2.3/lib/, os.version=2.4.19-4GB, hibernate.connection.datasource=java:/MosesDataSource, path.separator=:, java.vm.version=1.4.2-b28, java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory, vendor-url=http://xml.apache.org/xalan-j, java.protocol.handler.pkgs=org.jboss.net.protocol, java.awt.printerjob=sun.print.PSPrinterJob, vendor=Apache Software Foundation, sun.io.unicode.encoding=UnicodeLittle, jboss.server.temp.dir=/opt/jboss/jboss-3.2.3/server/default/tmp, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, user.home=/home/aron, java.rmi.server.RMIClassLoaderSpi=org.jboss.system.JBossRMIClassLoader, java.specification.vendor=Sun Microsystems Inc., org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl, java.library.path=/usr/lib/j2sdk1.4.2/jre/lib/i386/server:/usr/lib/j2sdk1.4.2/jre/lib/i386:/usr/lib/j2sdk1.4.2/jre/../lib/i386:/home/oracle/OraHome1/lib, java.vendor.url=http://java.sun.com/, program.name=run.sh, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=/opt/jboss/jboss-3.2.3/bin/run.jar:/usr/lib/java/lib/tools.jar, use_outer_join=true, jbossmx.loader.repository.class=org.jboss.mx.loading.UnifiedLoaderRepository3, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, catalina.home=/opt/jboss/jboss-3.2.3/server/default, sun.cpu.endian=little, sun.os.patch.level=unknown, jboss.server.lib.url=file:/opt/jboss/jboss-3.2.3/server/default/lib/, java.rmi.server.codebase=http://linux:8083/, java.io.tmpdir=/tmp, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, jboss.server.data.dir=/opt/jboss/jboss-3.2.3/server/default/data, os.arch=i386, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.ext.dirs=/usr/lib/j2sdk1.4.2/jre/lib/ext, user.dir=/opt/jboss/jboss-3.2.3/bin, line.separator= , java.vm.name=Java HotSpot(TM) Server VM, jboss.server.base.dir=/opt/jboss/jboss-3.2.3/server, jboss.server.base.url=file:/opt/jboss/jboss-3.2.3/server/, file.encoding=ISO-8859-1, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup, java.specification.version=1.4, jboss.server.name=default, hibernate.show_sql=true} 15:02:37,702 INFO [ReflectHelper] reflection optimizer disabled for: net.theatlantis.moses.data.Invite, ClassCastException: null

    Hibernate JIRA | 1 decade ago | Aron sogor
    java.lang.ClassCastException
  3. 0

    initialize Unable to obtain CGLib fast class and/or method implementation for class : cannot be cast to net.sf.cglib.reflect.FastClass

    Stack Overflow | 1 year ago | cc5zhenhua
    java.lang.ClassCastException: com.algoTrader.entity.Transaction$$FastClassByCGLIB$$cf6c10d3 cannot be cast to net.sf.cglib.reflect.FastClass
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    RE: Howto make Liferay 5.2.3 work with Geronimo 2.1.4 - Forums | Liferay

    liferay.com | 1 year ago
    java.lang.ClassCastException: org.apache.geronimo.management.StatisticsProvider$$EnhancerByCGLIB$$9e182224$$FastClassByCGLIB$$7942419c cannot be cast to net.sf.cglib.reflect.FastClass
  6. 0

    Howto make Liferay 5.2.3 work with Geronimo 2.1.4 - 论坛 | Liferay

    liferay.com | 1 year ago
    java.lang.ClassCastException: org.apache.geronimo.management.StatisticsProvider$$EnhancerByCGLIB$$9e182224$$FastClassByCGLIB$$7942419c cannot be cast to net.sf.cglib.reflect.FastClass

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      No message provided

      at net.sf.cglib.reflect.FastClass$Generator.create()
    2. Code Generation Library
      FastClass.create
      1. net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:92)
      2. net.sf.cglib.reflect.FastClass.create(FastClass.java:74)
      2 frames
    3. net.sf.hibernate
      Configuration.buildSessionFactory
      1. net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:763)
      2. net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:699)
      3. net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
      4. net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
      5. net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:739)
      5 frames