我使用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