hello,
this problem occurs when querying the DB with a criterion.
if i remove the foreign key "roleID" off the mapping file for 'user' and mark it as a normal long-property, everything works fine.
the error does not occur as well, if the resultset is empty and no user form bean has to be populated (occurs, if no username matches).
values in the DB seem to be correct. it seems as if the query return value for roleID is not of type 'long'.
i am really stuck here, i would appreciate any help. thank you!
chris
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.1.3
Mapping documents:
<hibernate-mapping>
<class name="net.surfout.controlcenter.RoleForm" table="role">
<id name="roleID" type="long">
<generator class="native"/>
</id>
<property name="description" type="string"/>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="net.surfout.controlcenter.UserForm" table="user">
<id name="userID" type="long">
<generator class="native"/>
</id>
<many-to-one name="roleID" class="net.surfout.controlcenter.RoleForm" insert="false" update="false"/>
<property name="username" type="string"/>
<property name="password" type="string"/>
<property name="gender" type="string"/>
<property name="firstname" type="string"/>
<property name="lastname" type="string"/>
<property name="street" type="string"/>
<property name="housenumber" type="long"/>
<property name="areacode" type="long"/>
<property name="city" type="string"/>
<property name="phone" type="long"/>
<property name="email" type="string"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
LoginForm lf = (LoginForm)form;
List userList = s.createCriteria(UserForm.class)
.add(Restrictions.eq("username", lf.getUsername()))
.list();
Full stack trace of any exception that occurs:
DEBUG Thread-1 org.apache.jasper.compiler.JspRuntimeContext - Compilation classpath initialized: /D:/Tomcat/webapps/blank/WEB-INF/classes/;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-antlr-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-junit-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-launcher-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-swing-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/antlr-2.7.6rc1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/antlr.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/asm-attrs.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/asm.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/c3p0-0.9.0.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/cglib-2.1.3.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/cleanimports.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-beanutils.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-collections-2.1.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-collections-3.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-digester.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-fileupload.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-logging-1.0.4.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-logging.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-validator.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/concurrent-1.3.2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/connector.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/dom4j-1.6.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ehcache-1.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/hibernate3.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jaas.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jacc-1_0-fr.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jakarta-oro.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jaxen-1.1-beta-7.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-cache.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-common.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-jmx.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-system.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jdbc2_0-stdext.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jgroups-2.2.8.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jta.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/junit-3.8.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/junit.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/log4j-1.2.11.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/log4j-1.2.13.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/mysql-connector-java-3.1.12-bin.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/mysqlconnector.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/oscache-2.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/proxool-0.8.3.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/struts.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/swarmcache-1.0rc2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/syndiag2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/versioncheck.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/xerces-2.6.2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/xml-apis.jar;D:\Tomcat\work\Catalina\localhost\blank;/D:/Tomcat/webapps/blank/WEB-INF/classes/;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-antlr-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-junit-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-launcher-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ant-swing-1.6.5.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/antlr-2.7.6rc1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/antlr.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/asm-attrs.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/asm.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/c3p0-0.9.0.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/cglib-2.1.3.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/cleanimports.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-beanutils.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-collections-2.1.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-collections-3.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-digester.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-fileupload.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-logging-1.0.4.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-logging.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/commons-validator.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/concurrent-1.3.2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/connector.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/dom4j-1.6.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/ehcache-1.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/hibernate3.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jaas.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jacc-1_0-fr.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jakarta-oro.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jaxen-1.1-beta-7.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-cache.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-common.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-jmx.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jboss-system.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jdbc2_0-stdext.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jgroups-2.2.8.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/jta.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/junit-3.8.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/junit.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/log4j-1.2.11.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/log4j-1.2.13.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/mysql-connector-java-3.1.12-bin.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/mysqlconnector.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/oscache-2.1.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/proxool-0.8.3.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/struts.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/swarmcache-1.0rc2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/syndiag2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/versioncheck.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/xerces-2.6.2.jar;/D:/Tomcat/webapps/blank/WEB-INF/lib/xml-apis.jar;/D:/Tomcat/shared/classes/;/D:/Tomcat/common/classes/;/d:/Tomcat/common/i18n/tomcat-i18n-en.jar;/d:/Tomcat/common/i18n/tomcat-i18n-es.jar;/d:/Tomcat/common/i18n/tomcat-i18n-fr.jar;/d:/Tomcat/common/i18n/tomcat-i18n-ja.jar;/d:/Tomcat/common/lib/commons-el.jar;/d:/Tomcat/common/lib/commons-logging.jar;/d:/Tomcat/common/lib/jasper-compiler-jdt.jar;/d:/Tomcat/common/lib/jasper-compiler.jar;/d:/Tomcat/common/lib/jasper-runtime.jar;/d:/Tomcat/common/lib/jsp-api.jar;/d:/Tomcat/common/lib/naming-factory-dbcp.jar;/d:/Tomcat/common/lib/naming-factory.jar;/d:/Tomcat/common/lib/naming-resources.jar;/d:/Tomcat/common/lib/servlet-api.jar;/D:/Tomcat/bin/bootstrap.jar;/D:/JRE150/lib/ext/dnsns.jar;/D:/JRE150/lib/ext/localedata.jar;/D:/JRE150/lib/ext/sunjce_provider.jar;/D:/JRE150/lib/ext/sunpkcs11.jar
DEBUG Thread-1 org.apache.jasper.servlet.JspServlet - Scratch dir for the JSP engine is: D:\Tomcat\work\Catalina\localhost\blank
DEBUG Thread-1 org.apache.jasper.servlet.JspServlet - IMPORTANT: Do not modify the generated servlets
DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Get module name for path /Login.do
DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Module name found: default
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Processing a 'GET' for path '/Login'
DEBUG http-8080-Processor25 org.apache.struts.util.RequestUtils - Looking for ActionForm bean instance in scope 'request' under attribute key 'LoginForm'
DEBUG http-8080-Processor25 org.apache.struts.util.RequestUtils - Creating new ActionForm instance of type 'net.surfout.controlcenter.LoginForm'
DEBUG http-8080-Processor25 org.apache.struts.util.RequestUtils - --> net.surfout.controlcenter.LoginForm@6576d5
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm'
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Populating bean properties from this request
DEBUG http-8080-Processor25 org.apache.commons.beanutils.BeanUtils - BeanUtils.populate(net.surfout.controlcenter.LoginForm@6576d5, {password=[Ljava.lang.String;@dc024a, username=[Ljava.lang.String;@1a70b8})
DEBUG http-8080-Processor25 org.apache.commons.beanutils.BeanUtils - setProperty(net.surfout.controlcenter.LoginForm@6576d5, password, [w])
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Convert string 'w' to class 'java.lang.String'
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Using converter org.apache.commons.beanutils.converters.StringConverter@1cbda0a
DEBUG http-8080-Processor25 org.apache.commons.beanutils.PropertyUtils - setSimpleProperty: Invoking method public void net.surfout.controlcenter.LoginForm.setPassword(java.lang.String) with value w (class java.lang.String)
DEBUG http-8080-Processor25 org.apache.commons.beanutils.BeanUtils - setProperty(net.surfout.controlcenter.LoginForm@6576d5, username, [crz])
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Convert string 'crz' to class 'java.lang.String'
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Using converter org.apache.commons.beanutils.converters.StringConverter@1cbda0a
DEBUG http-8080-Processor25 org.apache.commons.beanutils.PropertyUtils - setSimpleProperty: Invoking method public void net.surfout.controlcenter.LoginForm.setUsername(java.lang.String) with value crz (class java.lang.String)
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Validating input form properties
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - No errors detected, accepting input
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Looking for Action instance for class net.surfout.controlcenter.LoginAction
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Creating new Action instance
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG http-8080-Processor25 org.hibernate.jdbc.ConnectionManager - opening JDBC connection
DEBUG http-8080-Processor25 org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
DEBUG http-8080-Processor25 org.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
DEBUG http-8080-Processor25 org.hibernate.SQL - select this_.userID as userID2_0_, this_.roleID as roleID2_0_, this_.username as username2_0_, this_.password as password2_0_, this_.gender as gender2_0_, this_.firstname as firstname2_0_, this_.lastname as lastname2_0_, this_.street as street2_0_, this_.housenumber as housenum9_2_0_, this_.areacode as areacode2_0_, this_.city as city2_0_, this_.phone as phone2_0_, this_.email as email2_0_ from user this_ where this_.username=?
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - preparing statement
DEBUG http-8080-Processor25 org.hibernate.type.StringType - binding 'crz' to parameter: 1
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - processing result set
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - done processing result set (0 rows)
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - closing statement
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - total objects hydrated: 0
DEBUG http-8080-Processor25 org.hibernate.engine.StatefulPersistenceContext - initializing non-lazy collections
DEBUG http-8080-Processor25 org.hibernate.jdbc.JDBCContext - after autocommit
DEBUG http-8080-Processor25 org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection
DEBUG http-8080-Processor25 org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
DEBUG http-8080-Processor25 org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - processForwardConfig(ForwardConfig[name=loginfailure,path=/pages/loginfailure.jsp,redirect=false,contextRelative=false,module=null])
DEBUG http-8080-Processor25 org.apache.catalina.core.ApplicationDispatcher - servletPath=/pages/loginfailure.jsp, pathInfo=null, queryString=null, name=null
DEBUG http-8080-Processor25 org.apache.catalina.core.ApplicationDispatcher - servletPath=/pages/loginfailure.jsp, pathInfo=null, queryString=null, name=null
DEBUG http-8080-Processor25 org.apache.catalina.core.ApplicationDispatcher - Path Based Forward
DEBUG http-8080-Processor25 org.apache.catalina.core.ApplicationDispatcher - Path Based Forward
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - JspEngine --> /pages/loginfailure.jsp
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - ServletPath: /pages/loginfailure.jsp
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - PathInfo: null
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - RealPath: d:\Tomcat\webapps\blank\pages\loginfailure.jsp
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - RequestURI: /blank/pages/loginfailure.jsp
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - QueryString: username=crz&password=w
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - Request Params:
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - password = w
DEBUG http-8080-Processor25 org.apache.jasper.servlet.JspServlet - username = crz
DEBUG http-8080-Processor25 org.apache.catalina.core.ApplicationDispatcher - Disabling the response for futher output
DEBUG http-8080-Processor25 org.apache.catalina.core.ApplicationDispatcher - Disabling the response for futher output
DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Get module name for path /Login.do
DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Module name found: default
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Processing a 'GET' for path '/Login'
DEBUG http-8080-Processor25 org.apache.struts.util.RequestUtils - Looking for ActionForm bean instance in scope 'request' under attribute key 'LoginForm'
DEBUG http-8080-Processor25 org.apache.struts.util.RequestUtils - Creating new ActionForm instance of type 'net.surfout.controlcenter.LoginForm'
DEBUG http-8080-Processor25 org.apache.struts.util.RequestUtils - --> net.surfout.controlcenter.LoginForm@d8a1a0
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm'
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Populating bean properties from this request
DEBUG http-8080-Processor25 org.apache.commons.beanutils.BeanUtils - BeanUtils.populate(net.surfout.controlcenter.LoginForm@d8a1a0, {password=[Ljava.lang.String;@5b38d7, username=[Ljava.lang.String;@f0cb3c})
DEBUG http-8080-Processor25 org.apache.commons.beanutils.BeanUtils - setProperty(net.surfout.controlcenter.LoginForm@d8a1a0, password, [w])
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Convert string 'w' to class 'java.lang.String'
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Using converter org.apache.commons.beanutils.converters.StringConverter@1cbda0a
DEBUG http-8080-Processor25 org.apache.commons.beanutils.PropertyUtils - setSimpleProperty: Invoking method public void net.surfout.controlcenter.LoginForm.setPassword(java.lang.String) with value w (class java.lang.String)
DEBUG http-8080-Processor25 org.apache.commons.beanutils.BeanUtils - setProperty(net.surfout.controlcenter.LoginForm@d8a1a0, username, [criz])
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Convert string 'criz' to class 'java.lang.String'
DEBUG http-8080-Processor25 org.apache.commons.beanutils.ConvertUtils - Using converter org.apache.commons.beanutils.converters.StringConverter@1cbda0a
DEBUG http-8080-Processor25 org.apache.commons.beanutils.PropertyUtils - setSimpleProperty: Invoking method public void net.surfout.controlcenter.LoginForm.setUsername(java.lang.String) with value criz (class java.lang.String)
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Validating input form properties
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - No errors detected, accepting input
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Looking for Action instance for class net.surfout.controlcenter.LoginAction
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - Returning existing Action instance
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG http-8080-Processor25 org.hibernate.jdbc.ConnectionManager - opening JDBC connection
DEBUG http-8080-Processor25 org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
DEBUG http-8080-Processor25 org.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
DEBUG http-8080-Processor25 org.hibernate.SQL - select this_.userID as userID2_0_, this_.roleID as roleID2_0_, this_.username as username2_0_, this_.password as password2_0_, this_.gender as gender2_0_, this_.firstname as firstname2_0_, this_.lastname as lastname2_0_, this_.street as street2_0_, this_.housenumber as housenum9_2_0_, this_.areacode as areacode2_0_, this_.city as city2_0_, this_.phone as phone2_0_, this_.email as email2_0_ from user this_ where this_.username=?
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - preparing statement
DEBUG http-8080-Processor25 org.hibernate.type.StringType - binding 'criz' to parameter: 1
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - processing result set
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - result set row: 0
DEBUG http-8080-Processor25 org.hibernate.type.LongType - returning '1' as column: userID2_0_
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - result row: EntityKey[net.surfout.controlcenter.UserForm#1]
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - Initializing object from ResultSet: [net.surfout.controlcenter.UserForm#1]
DEBUG http-8080-Processor25 org.hibernate.persister.entity.AbstractEntityPersister - Hydrating entity: [net.surfout.controlcenter.UserForm#1]
DEBUG http-8080-Processor25 org.hibernate.type.LongType - returning '1' as column: roleID2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'criz' as column: username2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'w' as column: password2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'm' as column: gender2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'c' as column: firstname2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'r' as column: lastname2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'b' as column: street2_0_
DEBUG http-8080-Processor25 org.hibernate.type.LongType - returning '11' as column: housenum9_2_0_
DEBUG http-8080-Processor25 org.hibernate.type.LongType - returning '7' as column: areacode2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'b' as column: city2_0_
DEBUG http-8080-Processor25 org.hibernate.type.LongType - returning '0' as column: phone2_0_
DEBUG http-8080-Processor25 org.hibernate.type.StringType - returning 'c' as column: email2_0_
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - done processing result set (1 rows)
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG http-8080-Processor25 org.hibernate.jdbc.AbstractBatcher - closing statement
DEBUG http-8080-Processor25 org.hibernate.loader.Loader - total objects hydrated: 1
DEBUG http-8080-Processor25 org.hibernate.engine.TwoPhaseLoad - resolving associations for [net.surfout.controlcenter.UserForm#1]
DEBUG http-8080-Processor25 org.hibernate.event.def.DefaultLoadEventListener - loading entity: [net.surfout.controlcenter.RoleForm#1]
DEBUG http-8080-Processor25 org.hibernate.event.def.DefaultLoadEventListener - creating new proxy for entity
ERROR http-8080-Processor25 org.hibernate.property.BasicPropertyAccessor - IllegalArgumentException in class: net.surfout.controlcenter.UserForm, setter method of property: roleID
ERROR http-8080-Processor25 org.hibernate.property.BasicPropertyAccessor - expected type: long, actual value: net.surfout.controlcenter.RoleForm$$EnhancerByCGLIB$$4048afd6
DEBUG http-8080-Processor25 org.hibernate.jdbc.JDBCContext - after autocommit
DEBUG http-8080-Processor25 org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection
DEBUG http-8080-Processor25 org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
DEBUG http-8080-Processor25 org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - getMessage(de_DE,unhandledException)
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - loadLocale(de_DE)
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Loading resource 'org/apache/struts/action/ActionResources_de_DE.properties'
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Loading resource completed
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - loadLocale(de)
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Loading resource 'org/apache/struts/action/ActionResources_de.properties'
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Loading resource completed
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - loadLocale()
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Loading resource 'org/apache/struts/action/ActionResources.properties'
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Loading resource completed
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.initProcessor
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.destroyDataSource
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configWebXml
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configMissing
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyForwardConfig.invalid
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.unhandledException
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.dataSource.init
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyPlugInConfigs.missing
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.dataSource.destroy
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.processInvalid
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.notAuthorized
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyMessageResourcesConfigs.missing
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyMessageResourcesConfigs.key
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.noInput
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configIO
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.reloading
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.processPath
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configInit
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configVerifying
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.sessionCreate
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyForwardConfig.missing
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configCompleted
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyActionMappingClass.invalid
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.initDataSource
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configMapping
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.requestDispatcher
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configParse
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.finalizing
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.formBean
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyActionMappingClass.missing
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyPlugInConfigs.invalid
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.applicationLoading
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.mappingType
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.actionCreate
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.applicationResources
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.configFatal
DEBUG http-8080-Processor25 org.apache.struts.util.PropertyMessageResources - Saving message key '.verifyMessageResourcesConfigs.invalid
WARN http-8080-Processor25 org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class org.hibernate.PropertyAccessException
ERROR http-8080-Processor25 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/blank].[action] - Servlet.service() for servlet action threw exception
org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of net.surfout.controlcenter.UserForm.roleID
at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:104)
at org.hibernate.tuple.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:330)
at org.hibernate.tuple.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:188)
at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3232)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at net.surfout.controlcenter.LoginAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
... 34 more
ERROR http-8080-Processor25 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/blank].[action] - Servlet.service() for servlet action threw exception
org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of net.surfout.controlcenter.UserForm.roleID
at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:104)
at org.hibernate.tuple.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:330)
at org.hibernate.tuple.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:188)
at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3232)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at net.surfout.controlcenter.LoginAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
... 34 more
Name and version of the database you are using:
MySQL 5.0
The generated SQL (show_sql=true):
Hibernate: select this_.userID as userID2_0_, this_.roleID as roleID2_0_, this_.username as username2_0_, this_.password as password2_0_, this_.gender as gender2_0_, this_.firstname as firstname2_0_, this_.lastname as lastname2_0_, this_.street as street2_0_, this_.housenumber as housenum9_2_0_, this_.areacode as areacode2_0_, this_.city as city2_0_, this_.phone as phone2_0_, this_.email as email2_0_ from user this_ where this_.username=?
Debug level Hibernate log excerpt:
log4j, debug mode