我使用Spring Security的核心1.2.7.3插件,并正在此错误时尝试部署:错误部署Grails的2.0.4到GlassFish 3.1.2服务器
Error occurred during deployment: Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'transactionManagerPostProcessor': 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': Cannot resolve reference to bean 'hibernateProperties' while setting
bean property 'hibernateProperties'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while
setting
bean property 'propertie .... msg.seeServerLog
应用程序工作正常,当我运行从netbeans内部,但当我尝试部署它时,我收到错误。我已经尝试清理,并取消BuildConfig.groovy文件中依赖关系中的代码'mysql:mysql-connector-java:5.1.16'
。我正在使用安装在我的/ lib文件夹内的Oracle jdbc驱动程序。
我猜测这与Oracle jdbc驱动程序没有找到有关。
更新:我添加下面
production {
dataSource {
url = "jdbc:oracle:thin:@MYSERVERNAME.com:xxxx:xxxxxxx"
pooled = true
properties {
maxActive = -1
minEvictableIdleTimeMillis=1800000
timeBetweenEvictionRunsMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery="SELECT 1"
}
}
}
好吧,我照你说的做了,并在IDE中设置'-Dgrails.env = production flag'时出错。我编辑了我的原始文章以包括生产关闭。封闭体中是否有可能导致问题的东西? – Universitas
试图添加这些,它仍然是坏的。也许它比只有Datasource.groovy文件更深? – Universitas
我刚刚注释掉了Properties {}部分,并试图运行它 - 它似乎在生产模式下运行OK,一旦我这样做了。我不明白什么是闭包属性,但我认为这是针对H2数据库而不是与Oracle jdbc相关的?这似乎是错误的原因。我应该为oracle db的属性得到什么? – Universitas