views:

186

answers:

2

Hi

Im trying to deploy netbeans java ee project ( maven + hibernate + JSF ) on glassfish

Im getting error below. My database configuration is ok ( double checked from several apps ), and database itself is ok and online.

SEVERE: WebModule[/web-0.1-SNAPSHOT]PWC1275: 
  Exception sending context initialized event to listener
  instance of class org.springframework.web.context.ContextLoaderListener 
  org.springframework.beans.factory.BeanCreationException: Error creating bean with
  name 'txManager' defined in ServletContext resource 
  [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed;
  nested exception is java.lang.IllegalArgumentException: 
      Property 'sessionFactory' is required
A: 

It looks like you need to define the sessionFactory in your applicationContext.xml. See this forum post for more details.

jsight
I have file spring-datasources imported to appliacationContext.xmlIt contains <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="c3p0LocalDataSource" /><property name="namingStrategy"> <bean class="org.hibernate.cfg.ImprovedNamingStrategy" /> </property> <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" /> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop> {...}
i believe it is something with IDE or glassfish
im sure because same app is developed on several other machines and they are running correct
+1  A: 

I solved problem by setting correct java executable in glassfish properties. Ty for help !