工作,我敢肯定,我的应用程序的工作权利,直到昨天,当我得到这个错误:弹簧自动装配停在GAE
Failed startup of context [email protected]1079ff{/,/ base/data/home/apps/s~trewnewmedia/1.357617962256387950} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scadenziarioController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void it.trew.prove.web.controllers.ScadenziarioController.setScadenzaService(it. trew.prove.services.ScadenzaService); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scadenzaService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void it.trew.prove.services.ScadenzaService.setSocietaService(it.trew.prove.serv ices.SocietaService); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'societaService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void it.trew.prove.services.SocietaService.setSocietaDao(it.trew.prove.model.dao .Dao); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory': Post-processing of the FactoryBean's object failed; nested exception is java.lang.SecurityException: Unable to get members for class org.hibernate.impl.SessionFactoryImpl
我使用与谷歌云SQL冬眠,它总是工作。
在我的本地机器上,使用本地MySQL,它仍然有效!
我不认为这是一个云SQL问题,因为删除一些自动装配(测试)它仍然连接等。这里是我的xml:
<bean id="mySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="myDataSource" />
<property name="annotatedClasses">
<list>
<value>it.trew.prove.model.beans.Scadenza</value>
<value>it.trew.prove.model.beans.Fornitore</value>
<value>it.trew.prove.model.beans.Societa</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
<!-- <prop key="hibernate.hbm2ddl.import_files">/setup.sql</prop> -->
</props>
</property>
</bean>
我的一块DAO的:
@Component
public class Dao {
@Resource(name = "mySessionFactory")
private SessionFactory sessionFactory;
...
我的服务:
@Service
@Transactional
public class SocietaService {
private Dao societaDao;
@Autowired
public void setSocietaDao(Dao societaDao) {
this.societaDao = societaDao;
}
...
我找不到什么是GAE和我的地方之间的不同(MVN GAE :跑)。 上周为什么完美运作。
请GAE团队支持我!我对这个问题
快要疯了(我可能会开始一个赏金,这太过分了急)
编辑我的pom.xml冬眠部分:
<!-- Hibernate framework -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
<type>pom</type>
<!--hibernate-dependencies is a pom, not needed for hibernate-core-->
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
的签字同意核心问题是:'无法获取org.hibernate.impl.SessionFactoryImpl类的成员是否需要更新Hibernate模块? – vacuum 2012-03-20 10:18:11
没有...... :(见编辑 – 2012-03-20 12:00:19
这个错误发生之前你做过的最后一次修改是什么?如果它之前在工作,你必须做些什么。 – 2012-03-21 10:29:49