struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zied Bejaoui" <bejaouiz...@hotmail.com>
Subject RE: Hibernate3+Spring2.5+Struts2
Date Wed, 19 Aug 2009 11:05:17 GMT
Thanks for you reply,

In my table I have three coloumns ID, UserName and password.

This is my po.User:

package service;
import po.User;

/**
 *
 * @author ABIS1
 */
public class UserServiceImp implements UserService {
    
     private dao.UserDao userDao;

    public void addUser(String userName, String password, int admin) throws
Exception{
        po.User user = new User();
               
        user.setName(userName);
        user.setPassword(password);
        try
        {
            userDao.save(user);
        }
        catch(Exception err)
        {
            throw err;
        }
    }
    public User getUser(long userId)
    {
        return userDao.getUser(userId);
    }

    public void setUserDao(dao.UserDaoImpl userDao) {
        this.userDao = userDao;
    }

    public User getUser(String userName) {
        return this.userDao.getUser(userName);
    }

}

And this is my applicationcontext.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">

<beans default-autowire="autodetect">
    <!-- add your spring beans here -->
    <bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost:3306/sshdemo"/>
        <property name="username" value="root"/>
        <property name="password" value=""/>
    </bean>
    <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="mappingResources">
            <list>
                <value>po/user.hbm.xml</value>
            </list>
        </property>
        <property name="hibernateProperties">
 
<value>hibernate.dialect=org.hibernate.dialect.MySQLDialect</value>
        </property>
    </bean>
    <bean id="userDao" class="dao.UserDaoImpl">
        <property name="sessionFactory">
            <ref bean="sessionFactory"></ref>
        </property>
    </bean> 
    <bean id="userService" class="service.UserServiceImp">
        <property name="userDao">
            <ref bean="userDao"></ref>
        </property>
    </bean>
    <bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource"> 
        <property name="basename" value="messages" /> 
    </bean>

    <bean id="loginAction" class="action.LoginAction">
        <property name="userService">
            <ref bean="userService"></ref>
        </property>
        <property name="messageSource" ref="messageSource"/>
    </bean>
</beans>

-----Original Message-----
From: Nils-Helge Garli Hegvik [mailto:nilsga@gmail.com] 
Sent: 19 August 2009 11:48
To: Struts Users Mailing List
Subject: Re: Hibernate3+Spring2.5+Struts2

>From your stack trace:

SEVERE: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed; nested exception is org.hibernate.PropertyNotFoundException:
Could not find a getter for admin in class po.User

I'm guessing that might have something to do with it.

Nils-H

On Wed, Aug 19, 2009 at 12:40 PM, ZiedBejaoui<bejaouizied@hotmail.com>
wrote:
> Hi,
>
> I am trying to run an example to integrate struts2 with hibernate and
Spring.
>
> When running the example tomcat display en error: 404 resource is not
available.
>
> This is my stack trace:
>
> 19-Aug-2009 11:29:06 org.apache.catalina.core.StandardContext start
>
> SEVERE: Error listenerStart
>
> 19-Aug-2009 11:29:06 org.apache.catalina.core.StandardContext start
>
> SEVERE: Context [/WebApplication4] startup failed due to previous errors
>
> 19-Aug-2009 11:30:00 org.apache.catalina.core.StandardContext stop
>
> INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/WebApplicati
on4] has not been started
>
> 19-Aug-2009 11:30:00 org.apache.catalina.core.StandardContext
addApplicationListener
>
> INFO: The listener "org.springframework.web.context.ContextLoaderListener"
is already configured for this context. The duplicate definition has been
ignored.
>
> 19-Aug-2009 11:30:00 org.springframework.web.context.ContextLoader
initWebApplicationContext
>
> INFO: Root WebApplicationContext: initialization started
>
> 19-Aug-2009 11:30:00
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
>
> INFO: Refreshing
org.springframework.web.context.support.XmlWebApplicationContext@1cfad77:
display name [Root WebApplicationContext]; startup date [Wed Aug 19 11:30:00
BST 2009]; root of context hierarchy
>
> 19-Aug-2009 11:30:01
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
>
> INFO: Loading XML bean definitions from ServletContext resource
[/WEB-INF/applicationContext.xml]
>
> 19-Aug-2009 11:30:01
org.springframework.context.support.AbstractApplicationContext
obtainFreshBeanFactory
>
> INFO: Bean factory for application context
[org.springframework.web.context.support.XmlWebApplicationContext@1cfad77]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@1ed2061
>
> 19-Aug-2009 11:30:01
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
>
> INFO: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1ed2061
: defining beans
[dataSource,sessionFactory,userDao,userService,messageSource,loginAction];
root of factory hierarchy
>
> 19-Aug-2009 11:30:01
org.springframework.jdbc.datasource.DriverManagerDataSource
setDriverClassName
>
> INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
>
> 19-Aug-2009 11:30:01 org.hibernate.cfg.Environment <clinit>
>
> INFO: Hibernate 3.2.5
>
> 19-Aug-2009 11:30:01 org.hibernate.cfg.Environment <clinit>
>
> INFO: hibernate.properties not found
>
> 19-Aug-2009 11:30:01 org.hibernate.cfg.Environment buildBytecodeProvider
>
> INFO: Bytecode provider name : cglib
>
> 19-Aug-2009 11:30:01 org.hibernate.cfg.Environment <clinit>
>
> INFO: using JDK 1.4 java.sql.Timestamp handling
>
> 19-Aug-2009 11:30:01 org.hibernate.cfg.HbmBinder
bindRootPersistentClassCommonValues
>
> INFO: Mapping class: po.User -> user
>
> 19-Aug-2009 11:30:01
org.springframework.orm.hibernate3.LocalSessionFactoryBean
buildSessionFactory
>
> INFO: Building new Hibernate SessionFactory
>
> 19-Aug-2009 11:30:01 org.hibernate.connection.ConnectionProviderFactory
newConnectionProvider
>
> INFO: Initializing connection provider:
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: RDBMS: MySQL, version: 5.4.1-beta-community
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC driver: MySQL-AB JDBC Driver, version:
mysql-connector-java-5.1.8 ( Revision: ${svn.Revision} )
>
> 19-Aug-2009 11:30:02 org.hibernate.dialect.Dialect <init>
>
> INFO: Using dialect: org.hibernate.dialect.MySQLDialect
>
> 19-Aug-2009 11:30:02 org.hibernate.transaction.TransactionFactoryFactory
buildTransactionFactory
>
> INFO: Using default transaction strategy (direct JDBC transactions)
>
> 19-Aug-2009 11:30:02
org.hibernate.transaction.TransactionManagerLookupFactory
getTransactionManagerLookup
>
> INFO: No TransactionManagerLookup configured (in JTA environment, use of
read-write or transactional second-level cache is not recommended)
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Automatic flush during beforeCompletion(): disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Automatic session close at end of transaction: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC batch size: 15
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC batch updates for versioned data: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Scrollable result sets: enabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC3 getGeneratedKeys(): enabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Connection release mode: on_close
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Maximum outer join fetch depth: 2
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Default batch fetch size: 1
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Generate SQL with comments: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Order SQL updates by primary key: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Order SQL inserts for batching: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory
createQueryTranslatorFactory
>
> INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
>
> 19-Aug-2009 11:30:02 org.hibernate.hql.ast.ASTQueryTranslatorFactory
<init>
>
> INFO: Using ASTQueryTranslatorFactory
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Query language substitutions: {}
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JPA-QL strict compliance: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Second-level cache: enabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Query cache: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory createCacheProvider
>
> INFO: Cache provider: org.hibernate.cache.NoCacheProvider
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Optimize cache for minimal puts: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Structured second-level cache entries: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Statistics: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Deleted entity synthetic identifier rollback: disabled
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Default entity-mode: pojo
>
> 19-Aug-2009 11:30:02 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Named query checking : enabled
>
> 19-Aug-2009 11:30:03 org.hibernate.impl.SessionFactoryImpl <init>
>
> INFO: building session factory
>
> 19-Aug-2009 11:30:03
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
>
> INFO: Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1ed2061
: defining beans
[dataSource,sessionFactory,userDao,userService,messageSource,loginAction];
root of factory hierarchy
>
> 19-Aug-2009 11:30:03 org.springframework.web.context.ContextLoader
initWebApplicationContext
>
> SEVERE: Context initialization failed
>
> org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested
exception is org.hibernate.PropertyNotFoundException: Could not find a
getter for admin in class po.User
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1362)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:485)
>
>        at java.security.AccessController.doPrivileged(Native Method)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:455)
>
>        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:251)
>
>        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:169)
>
>        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:248)
>
>        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:170)
>
>        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:407)
>
>        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:735)
>
>        at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:369)
>
>        at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:251)
>
>        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:190)
>
>        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:45)
>
>        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3843)
>
>        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
>
>        at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1244)
>
>        at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:374)
>
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
>
>        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:196)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
>
>        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
>
>        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:175)
>
>        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:525)
>
>        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)
>
>        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)
>
>        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
>
>        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>
>        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>
>        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:583)
>
>        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>
>        at java.lang.Thread.run(Thread.java:619)
>
> Caused by: org.hibernate.PropertyNotFoundException: Could not find a
getter for admin in class po.User
>
>        at
org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAcces
sor.java:282)
>
>        at
org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor
.java:275)
>
>        at org.hibernate.mapping.Property.getGetter(Property.java:272)
>
>        at
org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertyGetter(PojoEntity
Tuplizer.java:247)
>
>        at
org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTupli
zer.java:125)
>
>        at
org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java
:55)
>
>        at
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEn
tityModeToTuplizerMapping.java:56)
>
>        at
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
>
>        at
org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntity
Persister.java:434)
>
>        at
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTable
EntityPersister.java:109)
>
>        at
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFacto
ry.java:55)
>
>        at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
>
>        at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
>
>        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:753)
>
>        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFacto
ry(LocalSessionFactoryBean.java:691)
>
>        at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertie
sSet(AbstractSessionFactoryBean.java:211)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)
>
>        ... 36 more
>
> 19-Aug-2009 11:30:03 org.apache.catalina.core.StandardContext start
>
> SEVERE: Error listenerStart
>
> 19-Aug-2009 11:30:03 org.apache.catalina.core.StandardContext start
>
> SEVERE: Context [/WebApplication4] startup failed due to previous errors
>
> 19-Aug-2009 11:30:17 org.apache.catalina.core.StandardContext stop
>
> INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/WebApplicati
on4] has not been started
>
> 19-Aug-2009 11:30:17 org.apache.catalina.startup.HostConfig checkResources
>
> INFO: Undeploying context [/WebApplication4]
>
> 19-Aug-2009 11:30:17 org.apache.catalina.core.StandardContext
addApplicationListener
>
> INFO: The listener "org.springframework.web.context.ContextLoaderListener"
is already configured for this context. The duplicate definition has been
ignored.
>
> 19-Aug-2009 11:30:18 org.springframework.web.context.ContextLoader
initWebApplicationContext
>
> INFO: Root WebApplicationContext: initialization started
>
> 19-Aug-2009 11:30:18
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
>
> INFO: Refreshing
org.springframework.web.context.support.XmlWebApplicationContext@7db754:
display name [Root WebApplicationContext]; startup date [Wed Aug 19 11:30:18
BST 2009]; root of context hierarchy
>
> 19-Aug-2009 11:30:18
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
>
> INFO: Loading XML bean definitions from ServletContext resource
[/WEB-INF/applicationContext.xml]
>
> 19-Aug-2009 11:30:18
org.springframework.context.support.AbstractApplicationContext
obtainFreshBeanFactory
>
> INFO: Bean factory for application context
[org.springframework.web.context.support.XmlWebApplicationContext@7db754]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@1c9fe7e
>
> 19-Aug-2009 11:30:18
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
>
> INFO: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1c9fe7e
: defining beans
[dataSource,sessionFactory,userDao,userService,messageSource,loginAction];
root of factory hierarchy
>
> 19-Aug-2009 11:30:18
org.springframework.jdbc.datasource.DriverManagerDataSource
setDriverClassName
>
> INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
>
> 19-Aug-2009 11:30:18 org.hibernate.cfg.Environment <clinit>
>
> INFO: Hibernate 3.2.5
>
> 19-Aug-2009 11:30:18 org.hibernate.cfg.Environment <clinit>
>
> INFO: hibernate.properties not found
>
> 19-Aug-2009 11:30:18 org.hibernate.cfg.Environment buildBytecodeProvider
>
> INFO: Bytecode provider name : cglib
>
> 19-Aug-2009 11:30:18 org.hibernate.cfg.Environment <clinit>
>
> INFO: using JDK 1.4 java.sql.Timestamp handling
>
> 19-Aug-2009 11:30:19 org.hibernate.cfg.HbmBinder
bindRootPersistentClassCommonValues
>
> INFO: Mapping class: po.User -> user
>
> 19-Aug-2009 11:30:19
org.springframework.orm.hibernate3.LocalSessionFactoryBean
buildSessionFactory
>
> INFO: Building new Hibernate SessionFactory
>
> 19-Aug-2009 11:30:19 org.hibernate.connection.ConnectionProviderFactory
newConnectionProvider
>
> INFO: Initializing connection provider:
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
>
> 19-Aug-2009 11:30:19 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: RDBMS: MySQL, version: 5.4.1-beta-community
>
> 19-Aug-2009 11:30:19 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC driver: MySQL-AB JDBC Driver, version:
mysql-connector-java-5.1.8 ( Revision: ${svn.Revision} )
>
> 19-Aug-2009 11:30:19 org.hibernate.dialect.Dialect <init>
>
> INFO: Using dialect: org.hibernate.dialect.MySQLDialect
>
> 19-Aug-2009 11:30:19 org.hibernate.transaction.TransactionFactoryFactory
buildTransactionFactory
>
> INFO: Using default transaction strategy (direct JDBC transactions)
>
> 19-Aug-2009 11:30:19
org.hibernate.transaction.TransactionManagerLookupFactory
getTransactionManagerLookup
>
> INFO: No TransactionManagerLookup configured (in JTA environment, use of
read-write or transactional second-level cache is not recommended)
>
> 19-Aug-2009 11:30:19 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Automatic flush during beforeCompletion(): disabled
>
> 19-Aug-2009 11:30:19 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Automatic session close at end of transaction: disabled
>
> 19-Aug-2009 11:30:19 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC batch size: 15
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC batch updates for versioned data: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Scrollable result sets: enabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JDBC3 getGeneratedKeys(): enabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Connection release mode: on_close
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Maximum outer join fetch depth: 2
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Default batch fetch size: 1
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Generate SQL with comments: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Order SQL updates by primary key: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Order SQL inserts for batching: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory
createQueryTranslatorFactory
>
> INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
>
> 19-Aug-2009 11:30:20 org.hibernate.hql.ast.ASTQueryTranslatorFactory
<init>
>
> INFO: Using ASTQueryTranslatorFactory
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Query language substitutions: {}
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: JPA-QL strict compliance: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Second-level cache: enabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Query cache: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory createCacheProvider
>
> INFO: Cache provider: org.hibernate.cache.NoCacheProvider
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Optimize cache for minimal puts: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Structured second-level cache entries: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Statistics: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Deleted entity synthetic identifier rollback: disabled
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Default entity-mode: pojo
>
> 19-Aug-2009 11:30:20 org.hibernate.cfg.SettingsFactory buildSettings
>
> INFO: Named query checking : enabled
>
> 19-Aug-2009 11:30:20 org.hibernate.impl.SessionFactoryImpl <init>
>
> INFO: building session factory
>
> 19-Aug-2009 11:30:20
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
>
> INFO: Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1c9fe7e
: defining beans
[dataSource,sessionFactory,userDao,userService,messageSource,loginAction];
root of factory hierarchy
>
> 19-Aug-2009 11:30:20 org.springframework.web.context.ContextLoader
initWebApplicationContext
>
> SEVERE: Context initialization failed
>
> org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested
exception is org.hibernate.PropertyNotFoundException: Could not find a
getter for admin in class po.User
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1362)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:485)
>
>        at java.security.AccessController.doPrivileged(Native Method)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:455)
>
>        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:251)
>
>        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:169)
>
>        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:248)
>
>        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:170)
>
>        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:407)
>
>        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:735)
>
>        at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:369)
>
>        at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:251)
>
>        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:190)
>
>        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:45)
>
>        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3843)
>
>        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
>
>        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
>
>        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>
>        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>
>        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
>
>        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:511)
>
>        at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1229)
>
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
>
>        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
>
>        at java.lang.reflect.Method.invoke(Method.java:597)
>
>        at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297
)
>
>        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer
verInterceptor.java:836)
>
>        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>
>        at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1465)
>
>        at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:821)
>
>        at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:349)
>
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
>
>        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:196)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
>
>        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
>
>        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
>
>        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:175)
>
>        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:525)
>
>        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)
>
>        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)
>
>        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
>
>        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>
>        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>
>        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:583)
>
>        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>
>        at java.lang.Thread.run(Thread.java:619)
>
> Caused by: org.hibernate.PropertyNotFoundException: Could not find a
getter for admin in class po.User
>
>        at
org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAcces
sor.java:282)
>
>        at
org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor
.java:275)
>
>        at org.hibernate.mapping.Property.getGetter(Property.java:272)
>
>        at
org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertyGetter(PojoEntity
Tuplizer.java:247)
>
>        at
org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTupli
zer.java:125)
>
>        at
org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java
:55)
>
>        at
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEn
tityModeToTuplizerMapping.java:56)
>
>        at
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
>
>        at
org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntity
Persister.java:434)
>
>        at
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTable
EntityPersister.java:109)
>
>        at
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFacto
ry.java:55)
>
>        at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
>
>        at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
>
>        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:753)
>
>        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFacto
ry(LocalSessionFactoryBean.java:691)
>
>        at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertie
sSet(AbstractSessionFactoryBean.java:211)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
>
>        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)
>
>        ... 50 more
>
> 19-Aug-2009 11:30:20 org.apache.catalina.core.StandardContext start
>
> SEVERE: Error listenerStart
>
> 19-Aug-2009 11:30:20 org.apache.catalina.core.StandardContext start
>
> SEVERE: Context [/WebApplication4] startup failed due to previous errors
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message