Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in pushing data through hibernate even after creating the hibernate session...

 
Vinod Vinu
Ranch Hand
Posts: 217
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam getting the following error : -

*** Reading Hibernate Session ***
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.0.5
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
************ in the session factory *******************
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate/hibernate.cfg.xml
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate/hibernate.cfg.xml
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration addResource
INFO: Mapping resource: /hibernate/login.hbm.xml
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: form.LoginForm -> LOGIN
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
************ cfg.configure(CONFIG_FILE_LOCATION); *******************
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing extends queue
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing collection mappings
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing association property references
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
Aug 31, 2009 4:57:17 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Aug 31, 2009 4:57:17 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 10
Aug 31, 2009 4:57:17 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
Aug 31, 2009 4:57:17 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: com.microsoft.sqlserver.jdbc.SQLServerDriver at URL: jdbc:sqlserver://192.168.230.214:1433;DatabaseName=vinod
Aug 31, 2009 4:57:17 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=sa, password=****}
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: Microsoft SQL Server, version: 9.00.1399
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: Microsoft SQL Server 2005 JDBC Driver, version: 1.0.809.102
Aug 31, 2009 4:57:17 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.SQLServerDialect
Aug 31, 2009 4:57:17 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Using default transaction strategy (direct JDBC transactions)
Aug 31, 2009 4:57:17 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: null
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Aug 31, 2009 4:57:17 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Aug 31, 2009 4:57:17 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Aug 31, 2009 4:57:17 PM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Aug 31, 2009 4:57:17 PM net.sf.ehcache.config.Configurator configure
WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/VinodNairWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Hibernate/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
Aug 31, 2009 4:57:17 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
Aug 31, 2009 4:57:17 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries
INFO: Checking 0 named queries
%%%% Success Creating SessionFactory %%%%
Hibernate file successfully Read
Inserting Record
Hibernate: insert into LOGIN (PASSWORD, USERNAME) values (?, ?)
Aug 31, 2009 4:57:17 PM org.apache.struts.action.RequestProcessor processException
WARNING: Unhandled Exception thrown: class java.lang.ClassCastException
Aug 31, 2009 4:57:17 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
java.lang.ClassCastException: java.lang.String

at org.hibernate.type.LongType.set(LongType.java:40)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:62)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:44)
at org.hibernate.persister.entity.BasicEntityPersister.dehydrate(BasicEntityPersister.java:1628)
at org.hibernate.persister.entity.BasicEntityPersister.dehydrate(BasicEntityPersister.java:1594)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1850)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at action.LoginAction.execute(LoginAction.java:57)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)

Any help would be really appreciated.....
thnx in advance
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the mapping for LOGIN? Why does it expect a long?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic