2013-02-27 2 views
0

메모리 데이터베이스를 사용하는 grails에 심각한 도메인 클래스 변경을하기 전에 작동하는 웹 사이트가 있습니다. 이것에 대한 어떤 생각? 전에는 그와 같은 것을 보지 못했습니다.grails 중첩 된 bean 오류

Error executing bootstraps: Error creating bean with name 'messageSource':  Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError 

편집

전체 스택 추적은

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java - Dgrails.home=/Users/afrieden/grails/grails-1.3.7 -Dbase.dir=/Users/afrieden/GrailsProjects/GRVariantInterface/trunk -Dtools.jar=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/tools.jar -Dgroovy.starter.conf=/Users/afrieden/grails/grails-1.3.7/conf/groovy-starter.conf -Xmx512M -XX:MaxPermSize=192m -Didea.launcher.port=7537 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 12.app/bin" -Dfile.encoding=UTF-8 -classpath "/Users/afrieden/grails/grails-1.3.7/lib/groovy-all-1.7.8.jar:/Users/afrieden/grails/grails-1.3.7/dist/grails-bootstrap-1.3.7.jar:/Applications/IntelliJ IDEA 12.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf /Users/afrieden/grails/grails-1.3.7/conf/groovy-starter.conf run-app 
Welcome to Grails 1.3.7 - http://grails.org/ 
Licensed under Apache Standard License 2.0 
Grails home is set to: /Users/afrieden/grails/grails-1.3.7 

Base Directory: /Users/afrieden/GrailsProjects/GRVariantInterface/trunk 
Resolving dependencies... 
Dependencies resolved in 747ms. 
Running script /Users/afrieden/grails/grails-1.3.7/scripts/RunApp.groovy 
Environment set to development 
[groovyc] Compiling 1 source file to /Users/afrieden/GrailsProjects/GRVariantInterface/trunk/target/classes 
[delete] Deleting directory /Users/afrieden/.grails/1.3.7/projects/trunk/tomcat 
Running Grails application.. 
2013-02-27 16:04:33,160 [main] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError 
at org.grails.tomcat.InlineExplodedTomcatServer.doStart(InlineExplodedTomcatServer.groovy:112) 
at org.grails.tomcat.InlineExplodedTomcatServer$doStart.callCurrent(Unknown Source) 
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:97) 
at grails.web.container.EmbeddableServer$start.call(Unknown Source) 
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158) 
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy) 
at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280) 
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy) 
at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149) 
at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy) 
at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116) 
at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy) 
at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59) 
at RunApp$_run_closure1.doCall(RunApp.groovy:33) 
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) 
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) 
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) 
at gant.Gant.withBuildListeners(Gant.groovy:427) 
at gant.Gant.this$2$withBuildListeners(Gant.groovy) 
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) 
at gant.Gant.dispatch(Gant.groovy:415) 
at gant.Gant.this$2$dispatch(Gant.groovy) 
at gant.Gant.invokeMethod(Gant.groovy) 
at gant.Gant.executeTargets(Gant.groovy:590) 
at gant.Gant.executeTargets(Gant.groovy:589) 
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) 
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError 
... 26 more 

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError 
... 26 more 
Caused by: java.lang.ExceptionInInitializerError 
... 26 more 
Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: grvariant.vardb.UserRole(java.lang.String, java.lang.Integer, java.lang.String) 
at grvariant.vardb.UserRole.$INIT(UserRole.groovy) 
at grvariant.vardb.UserRole.<clinit>(UserRole.groovy) 
... 26 more 

Process finished with exit code 1 
+0

세션 팩토리 생성과 같은 작업이 필요합니다. –

+0

수정 사항이 있습니까? 그것도 익숙하지 않다 – Badmiral

+0

BootStrap.groovy에는 클래스 변경과 같은 도메인 변경의 영향을받을 수있는 항목이 있습니까? 나는 도메인 클래스를 변경하고 부트 스트랩 코드를 업데이트하지 않았거나 부트 스트랩 라인을 고르려고했을 때 이것을 보았습니다. – Kelly

답변

1

당신이 봄 보안 플러그인을 사용했다는 것, 그리고 UserRole 클래스에 뭔가 문제가있다.

중요한 오류 메시지는 다음과 같습니다

Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: 
grvariant.vardb.UserRole(java.lang.String, java.lang.Integer, java.lang.String) 

내 생각 엔 2 문자열 1 개 정수 속성이 원래 사용자와 일치하지 않는 및 역할은 봄 보안이 원하는 참조, 또는 당신은 몇 가지가있는 문자열 속성을 추가 한 것입니다 예약어를 속성 이름으로 사용하는 것과 같이 Grails/MySQL과 충돌합니다.

이 클래스의 정의를 게시하면 추가 논의에 도움이 될 수 있습니다.

관련 문제