工作,我敢肯定,我的應用程序的工作權利,直到昨天,當我得到這個錯誤:彈簧自動裝配停在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