Arrrggghhhhh!!!!
I have been working with Hibernate, bought the books and read the forums and I am faced with a problem I cannot surmount. :-(
Thanks tons in Advance!
Tactic:
I have created a 'core.jar' with my back-end persistence layers encapsulated by DAOs. This jar has had JUnit tests run against it with ~20 unit tests that cover all of the CRUD operations for the User class in question. This 'core.jar' is then embedded within a WAR file, used by my servlets, and then deployed into Tomcat 5.0.28. For the most part, all of the mappings work great and have given little problems.
Problem:
When I attempt to save a user with its password to the database, I get a
No persister for: java.lang.String followed by a rollback. This same code outside the WAR file passes the same test with the same data contained within. I have a constraint that I am not allowed to keep the password within the session and therefore it may not be contained within a member variable of the User object.
Note:
Line 314 of stack trace refers to
Code:
this.save(user)
Hibernate version: 2.1.6
Mapping documents: hibernate.cfg.xmlCode:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!-- Settings for a local MSSQL database. -->
<property name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>
<property name="connection.driver_class">net.sourceforge.jtds.jdbcx.JtdsDataSource</property>
<property name="connection.url">jdbc:jtds:sqlserver://localhost:1433/realtor</property>
<property name="connection.username">realtor</property>
<property name="connection.password">realtor</property>
<!-- Use the Apache DBCP Connection Pool. -->
<property name="hibernate.dbcp.maxActive">15</property>
<property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.maxWait">120000</property>
<property name="hibernate.dbcp.maxIdle">15</property>
<property name="hibernate.dbcp.ps.maxActive">100</property>
<property name="hibernate.dbcp.ps.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.ps.maxWait">120000</property>
<property name="hibernate.dbcp.ps.maxIdle">10</property>
<property name="hibernate.dbcp.validationQuery">select 1 from zone_types</property>
<property name="hibernate.dbcp.testOnBorrow">false</property>
<property name="hibernate.dbcp.testOnReturn">false</property>
<property name="hibernate.connection.provider_class">net.sf.hibernate.connection.DBCPConnectionProvider</property>
<!-- Misc Configruation. -->
<!-- set the maximum JDBC 2 batch size (a nonzero value enables batching)-->
<property name="hibernate.jdbc.batch_size">0</property>
<!-- enable use of JDBC 2 scrollable ResultSets (specifying a Dialect will cause Hibernate to use a sensible default)-->
<!--<property name="hibernate.jdbc.use_scrollable_resultset">true</property>-->
<!-- use streams when writing binary types to / from JDBC -->
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
<!-- use streams when writing binary types to / from JDBC -->
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
<!-- specify a default schema for unqualified tablenames -->
<!--<property name="hibernate.default_schema">test</property>-->
<!-- use a custom stylesheet for XML generation (if not specified, hibernate-default.xslt will be used)-->
<!--<property name="hibernate.xml.output_stylesheet">C:/Hibernate/net/sf/hibernate/hibernate-default.xslt</property>-->
<!-- enable outerjoin fetching (specifying a Dialect will cause Hibernate to use sensible default) -->
<!--<property name="hibernate.use_outer_join">false</property>-->
<!-- set the maximum depth of the outer join fetch tree -->
<property name="hibernate.max_fetch_depth">1</property>
<!-- enable CGLIB reflection optimizer (enabled by default) -->
<property name="hibernate.cglib.use_reflection_optimizer">true</property>
<!-- enable the query cache -->
<!--<property name="hibernate.cache.use_query_cache">true</property>-->
<!-- choose a cache implementation -->
<!--<property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.Provider</property>-->
<!--<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.EmptyCacheProvider</property>-->
<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.HashtableCacheProvider</property>
<!--<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.TreeCacheProvider</property>-->
<!--<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.OSCacheProvider</property>-->
<!--<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.JCSCacheProvider</property>-->
<!--<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.SwarmCacheProvider</property>-->
<!-- Print SQL to stdout. -->
<property name="show_sql">true</property>
<!-- EDMap mapping files. -->
<mapping resource="com/esi/base/realty/AssessorRecord.hbm.xml"/>
<mapping resource="com/esi/base/realty/Site.hbm.xml"/>
<mapping resource="com/esi/base/realty/SiteType.hbm.xml"/>
<mapping resource="com/esi/base/realty/ZoneType.hbm.xml"/>
<mapping resource="com/esi/base/address/StreetAddress.hbm.xml"/>
<mapping resource="com/esi/base/contact/Contact.hbm.xml"/>
<mapping resource="com/esi/base/demographics/DemographicSummary.hbm.xml"/>
<mapping resource="com/esi/base/bus/Business.hbm.xml"/>
<mapping resource="com/esi/base/bus/BusinessSummary.hbm.xml"/>
<mapping resource="com/esi/base/bus/BusinessCategory.hbm.xml"/>
<mapping resource="com/esi/base/security/User.hbm.xml"/>
<mapping resource="com/esi/base/security/Role.hbm.xml"/>
</session-factory>
</hibernate-configuration>
User.hbm.xmlCode:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="com.esi.base.security" default-cascade="none">
<class name="User" table="edmap_users">
<id name="userId" type="int" column="user_id">
<generator class="identity"/>
</id>
<property name="username" column="username" unique="true" not-null="true"/>
<many-to-one class="com.esi.base.contact.Contact"
name="contactInfo"
column="contact_id"
cascade="all"
outer-join="true"
/>
<property name="insertDate" column="insert_date" update="false" insert="true" not-null="true"/>
<property name="updateDate" column="update_date" update="true" insert="true" not-null="true"/>
<set name="roles"
cascade="all-delete-orphan"
inverse="true">
<key column="user_id"/>
<one-to-many class="Role"/>
</set>
</class>
</hibernate-mapping>
Role.hbm.xmlCode:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping default-cascade="none" package="com.esi.base.security">
<class name="Role" table="edmap_user_roles">
<id name="id" column="role_id" type="int" unsaved-value="0">
<generator class="identity"/>
</id>
<property name="name" column="role" not-null="true"/>
<property name="username" column="username" not-null="false"/>
<many-to-one
name="user"
column="user_id"
class="User"
not-null="true"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():UserDAO.javaCode:
package com.esi.base.security.dao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;
import net.sf.hibernate.Criteria;
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.LockMode;
import net.sf.hibernate.Query;
import net.sf.hibernate.Session;
import net.sf.hibernate.UnresolvableObjectException;
import net.sf.hibernate.expression.Example;
import com.esi.base.exception.InfrastructureException;
import com.esi.base.realty.HibernateUtil;
import com.esi.base.security.User;
public class UserDAO {
/**
* Logger for this class
*/
private static final Log logger = LogFactory.getLog(UserDAO.class);
public UserDAO() {
HibernateUtil.beginTransaction();
}
/**
* Permanently stores the user in the database.
* @param user The user to permanently store.
* @throws InfrastructureException
*/
public void save(User user)
throws InfrastructureException {
try {
HibernateUtil.getSession().saveOrUpdate(user);
} catch (HibernateException ex) {
throw new InfrastructureException(ex);
}
}
/**
* Checks for the existence of this username in the database.
* @param username The username to test with.
* @return Whether this user currently exists in the database.
*/
public boolean exists(String username) throws InfrastructureException {
return this.findByUserName(username) != null;
}
private static final String HQL_SELECT_BY_UNAME =
"from User u where u.username = ?";
public User findByUserName(String username){
User result = null;
Session session = HibernateUtil.getSession();
try {
Query query = session.createQuery(HQL_SELECT_BY_UNAME);
query.setString(0, username);
List users = query.list();
switch (users.size()){
case 0: // Item not found, therefore null
result = null;
break;
case 1: // Found it, return it
result = (User)users.get(0);
break;
default:
result = (User)users.get(0);
logger.error("findByUserName found more than one user with the username = "+ username
+ ". Returning first found.");
break;
}
} catch (UnresolvableObjectException e){
// This is OK...
// Either it was deleted or could not be found by this session
} catch (HibernateException ex) {
throw new InfrastructureException(ex);
}
return result;
}
/**
* Saves the User graph and encoded password to the database.
* @param user The User object (graph) to save.
* @param password The encoded password to save for this user.
* @throws InfrastructureException If the database is not able to save the
* user or if either username or password
* trimmed resolves to be an empty string.
* @throws NullPointerException if either user or password are null
*/
public final void saveUserPass( User user, String password )
throws InfrastructureException {
logger.debug("Saving userpass...");
// Validate the user input
if ( user == null || user.getUsername()==null || password == null){
throw new NullPointerException("Either the user or the password was null or empty");
}
if (user.getUsername().trim().length() == 0){
throw new InfrastructureException("Username name must not be a zero lentth string.");
}
password = password.trim();
if (password.length() == 0){
throw new InfrastructureException("Password must not be a zero length string.");
}
Session hibSess = HibernateUtil.getSession();
try {
// Save the user
if (logger.isDebugEnabled()){
logger.debug("Saving user: " + user);
}
this.save(user);
// Update with the password
// HACK: This is a hack due to hibernate not allowing two mappings
// to the same table that use the same key
// NOT ALLOWED TO KEEP PASSWORD IN SESSION
// THEREFORE CANNOT KEEP PASSWORD AS MEMBER
// (i.e. username on User and UserPassword on edmap_users)
if (logger.isDebugEnabled()){
logger.debug("Saving password");
}
Connection con = hibSess.connection();
PreparedStatement pstmt = null;
try {
pstmt = con.prepareStatement("update edmap_users set password = ? where username = ?");
pstmt.setString(1, password);
pstmt.setString(2, user.getUsername());
int rowCount = pstmt.executeUpdate();
if (rowCount!=1){
throw new InfrastructureException("Update password expected to modify 1 user, attempted to update " + rowCount);
}
} catch (SQLException e) {
throw new InfrastructureException("Unable to update password",e);
} finally {
try {
if (pstmt != null) pstmt.close();
} catch (SQLException e1) {
logger.error("Could not update password", e1);
}
}
HibernateUtil.commitTransaction();
logger.debug("Successfully saved the user.");
}
catch (HibernateException he) {
he.printStackTrace();
HibernateUtil.rollbackTransaction();
throw new InfrastructureException("Unable to save a user/password ", he);
}
logger.debug("Saving userpass complete");
}
}
Full stack trace of any exception that occurs:Logging session with the SQL generated and Stack trace
Code:
2005-04-30 15:29:47,015 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.EntityPersister - Dehydrating entity: [com.esi.base.address.StreetAddress#<null>]
2005-04-30 15:29:47,015 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'Mesa' to parameter: 1
2005-04-30 15:29:47,031 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'AZ' to parameter: 2
2005-04-30 15:29:47,031 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'E' to parameter: 3
2005-04-30 15:29:47,031 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding '55th' to parameter: 4
2005-04-30 15:29:47,031 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding '555' to parameter: 5
2005-04-30 15:29:47,031 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'WAY' to parameter: 6
2005-04-30 15:29:47,046 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding '555' to parameter: 7
2005-04-30 15:29:47,046 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding '85555' to parameter: 8
2005-04-30 15:29:47,046 [http-8080-Processor23] DEBUG net.sf.hibernate.type.TimestampType - binding '2005-04-30 15:29:46' to parameter: 9
2005-04-30 15:29:47,062 [http-8080-Processor23] DEBUG net.sf.hibernate.type.TimestampType - binding '2005-04-30 15:29:46' to parameter: 10
2005-04-30 15:29:47,125 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.AbstractEntityPersister - Natively generated identity: 464
2005-04-30 15:29:47,125 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets
2005-04-30 15:29:47,125 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - closing statement
2005-04-30 15:29:47,125 [http-8080-Processor23] DEBUG net.sf.hibernate.engine.Cascades - done processing cascades for: com.esi.base.contact.Contact
2005-04-30 15:29:47,125 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.EntityPersister - Inserting entity: com.esi.base.contact.Contact (native id)
2005-04-30 15:29:47,140 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets
2005-04-30 15:29:47,140 [http-8080-Processor23] DEBUG net.sf.hibernate.SQL - insert into contact (l_name, m_init, f_name, phone, web_addr, street_addr, email, fax, company, insert_date, update_date) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2005-04-30 15:29:47,140 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - preparing statement
2005-04-30 15:29:47,140 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.EntityPersister - Dehydrating entity: [com.esi.base.contact.Contact#<null>]
2005-04-30 15:29:47,140 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'test' to parameter: 1
2005-04-30 15:29:47,156 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'S' to parameter: 2
2005-04-30 15:29:47,156 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'ms' to parameter: 3
2005-04-30 15:29:47,156 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding '(480)555-5555' to parameter: 4
2005-04-30 15:29:47,156 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'www.mstest.com' to parameter: 5
2005-04-30 15:29:47,171 [http-8080-Processor23] DEBUG net.sf.hibernate.type.LongType - binding '464' to parameter: 6
2005-04-30 15:29:47,171 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'mstest@mstest.com' to parameter: 7
2005-04-30 15:29:47,171 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding '(480)555-5556' to parameter: 8
2005-04-30 15:29:47,171 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'mstest co' to parameter: 9
2005-04-30 15:29:47,187 [http-8080-Processor23] DEBUG net.sf.hibernate.type.TimestampType - binding '2005-04-30 15:29:46' to parameter: 10
2005-04-30 15:29:47,187 [http-8080-Processor23] DEBUG net.sf.hibernate.type.TimestampType - binding '2005-04-30 15:29:46' to parameter: 11
2005-04-30 15:29:47,296 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.AbstractEntityPersister - Natively generated identity: 260
2005-04-30 15:29:47,296 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets
2005-04-30 15:29:47,296 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - closing statement
2005-04-30 15:29:47,296 [http-8080-Processor23] DEBUG net.sf.hibernate.engine.Cascades - processing cascades for: com.esi.base.contact.Contact
2005-04-30 15:29:47,296 [http-8080-Processor23] DEBUG net.sf.hibernate.engine.Cascades - done processing cascades for: com.esi.base.contact.Contact
2005-04-30 15:29:47,312 [http-8080-Processor23] DEBUG net.sf.hibernate.engine.Cascades - done processing cascades for: com.esi.base.security.User
2005-04-30 15:29:47,328 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.WrapVisitor - Wrapped collection in role: com.esi.base.security.User.roles
2005-04-30 15:29:47,328 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.EntityPersister - Inserting entity: com.esi.base.security.User (native id)
2005-04-30 15:29:47,328 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets
2005-04-30 15:29:47,328 [http-8080-Processor23] DEBUG net.sf.hibernate.SQL - insert into edmap_users (username, contact_id, insert_date, update_date) values (?, ?, ?, ?)
2005-04-30 15:29:47,328 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - preparing statement
2005-04-30 15:29:47,343 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.EntityPersister - Dehydrating entity: [com.esi.base.security.User#<null>]
2005-04-30 15:29:47,343 [http-8080-Processor23] DEBUG net.sf.hibernate.type.StringType - binding 'mstest' to parameter: 1
2005-04-30 15:29:47,343 [http-8080-Processor23] DEBUG net.sf.hibernate.type.IntegerType - binding '260' to parameter: 2
2005-04-30 15:29:47,343 [http-8080-Processor23] DEBUG net.sf.hibernate.type.TimestampType - binding '2005-04-30 15:29:46' to parameter: 3
2005-04-30 15:29:47,375 [http-8080-Processor23] DEBUG net.sf.hibernate.type.TimestampType - binding '2005-04-30 15:29:46' to parameter: 4
2005-04-30 15:29:47,421 [http-8080-Processor23] DEBUG net.sf.hibernate.persister.AbstractEntityPersister - Natively generated identity: 83
2005-04-30 15:29:47,421 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets
2005-04-30 15:29:47,421 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.BatcherImpl - closing statement
2005-04-30 15:29:47,437 [http-8080-Processor23] DEBUG net.sf.hibernate.engine.Cascades - processing cascades for: com.esi.base.security.User
2005-04-30 15:29:47,437 [http-8080-Processor23] DEBUG net.sf.hibernate.engine.Cascades - cascading to collection: com.esi.base.security.User.roles
2005-04-30 15:29:47,437 [http-8080-Processor23] DEBUG net.sf.hibernate.engine.Cascades - cascading to saveOrUpdate()
2005-04-30 15:29:47,437 [http-8080-Processor23] DEBUG com.esi.base.realty.HibernateUtil - Tyring to rollback database transaction of this thread.
2005-04-30 15:29:47,453 [http-8080-Processor23] DEBUG net.sf.hibernate.transaction.JDBCTransaction - rollback
2005-04-30 15:29:47,484 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion
2005-04-30 15:29:47,484 [http-8080-Processor23] DEBUG com.esi.base.realty.HibernateUtil - Closing Session of this thread.
2005-04-30 15:29:47,484 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.SessionImpl - closing session
2005-04-30 15:29:47,484 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.SessionImpl - disconnecting session
2005-04-30 15:29:47,500 [http-8080-Processor23] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion
[b][color=red]2005-04-30 15:29:47,515 [http-8080-Processor23] ERROR com.esi.web.edmap.action.CreateUserAction - Attempt failed to save the User information for user mstest
com.esi.base.exception.InfrastructureException: net.sf.hibernate.MappingException: No persister for: java.lang.String[/color][/b]
at com.esi.base.security.dao.UserDAO.save(UserDAO.java:111)
at com.esi.base.security.dao.UserDAO.saveUserPass(UserDAO.java:314)
at com.esi.web.edmap.action.CreateUserAction.execute(CreateUserAction.java:59)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: net.sf.hibernate.MappingException: No persister for: java.lang.String
at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:347)
at net.sf.hibernate.impl.SessionImpl.getClassPersister(SessionImpl.java:2690)
at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2697)
at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1382)
at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)
at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:952)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)
at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1388)
at com.esi.base.security.dao.UserDAO.save(UserDAO.java:109)
... 34 more
2005-04-30 15:29:47,531 [http-8080-Processor23] DEBUG com.esi.web.edmap.action.CreateUserAction - execute(ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse) - end
Name and version of the database you are using:Microsoft SQL Server 2000 w/ SP3
The generated SQL (show_sql=true):See the log and stack trace above in the Stack Trace section.
Debug level Hibernate log excerpt:See the log and stack trace above in the Stack Trace section.
[/code]