[英]Error to start java app on IBM/Bluemix with DB service auto-config
我在java上有一個使用jpa(spring-data)的應用程序,並且我在cf:push的bluemix上進行了構建,一切正常..但是當應用程序開始開始時拋出該錯誤:
[INFO ] Auto-reconfiguring beans of type javax.sql.DataSource
Failed to created cloud datasource for ubivisDB service
[INFO ] FFDC1015I: An FFDC Incident has been created: "org.cloudfoundry.reconfiguration.org.springframework.cloud.service.ServiceConnectorCreationException: Failed to created cloud datasource for ubivisDB service com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated 1341" at ffdc_15.08.28_19.03.47.0.log
at org.cloudfoundry.reconfiguration.org.springframework.cloud.service.relational.DataSourceCreator.create(DataSourceCreator.java:60)
at org.cloudfoundry.reconfiguration.org.springframework.cloud.service.relational.DataSourceCreator.create(DataSourceCreator.java:23)
at org.cloudfoundry.reconfiguration.spring.AbstractCloudServiceBeanFactoryPostProcessor.reconfigureBean(AbstractCloudServiceBeanFactoryPostProcessor.java:119)
at org.cloudfoundry.reconfiguration.spring.AbstractCloudServiceBeanFactoryPostProcessor.processBeans(AbstractCloudServiceBeanFactoryPostProcessor.java:97)
at org.cloudfoundry.reconfiguration.org.springframework.cloud.Cloud.getSingletonServiceConnector(Cloud.java:155)
at org.cloudfoundry.reconfiguration.spring.AbstractCloudServiceBeanFactoryPostProcessor.processBean(AbstractCloudServiceBeanFactoryPostProcessor.java:112)
[ERROR ] SRVE0283E: Exception caught while initializing context: org.cloudfoundry.reconfiguration.org.springframework.cloud.service.ServiceConnectorCreationException: Failed to created cloud datasource for ubivisDB service
at org.cloudfoundry.reconfiguration.org.springframework.cloud.Cloud.getServiceConnector(Cloud.java:245)
at org.cloudfoundry.reconfiguration.org.springframework.cloud.service.relational.DataSourceCreator.getDriverClassName(DataSourceCreator.java:81)
at [internal classes]
at org.cloudfoundry.reconfiguration.org.springframework.cloud.service.relational.DataSourceCreator.create(DataSourceCreator.java:50)
... 16 more
當我看到服務是否與cf:services綁定在應用程序上時:
mvn -P bluemix cf:services
[INFO] ------------------------------------------------------------------------
[INFO] Building iservport-ubivis 0.1-RELEASE
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cf-maven-plugin:1.1.2:services (default-cli) @ iservport-ubivis ---
[INFO] Services instances
[INFO]
name service plan bound apps
-------- ------- ---------- -------------
ubivisDB sqldb sqldb_free familiasegura
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.947s
[INFO] Finished at: Fri Aug 28 15:57:42 BRT 2015
[INFO] Final Memory: 15M/197M
我認為可能是bluemix更新自動配置...任何想法嗎? ps:以前我可以毫無問題地運行,但是現在我不能...
經過幾天沒有任何變化,我發起了一場新的戰爭...現在出現了一個錯誤
當綁定了公認的關系數據庫服務(DB2,mysql等)時,Liberty buildpack會自動配置數據源。 JNDI名稱將為“ jdbc /”。 因此,您可以使用該JNDI名稱在代碼或JPA配置/批注中查找數據源。 在Liberty buildpack中閱讀有關此自動配置功能的更多信息: https ://www.ng.bluemix.net/docs/starters/liberty/index.html#automaticconfigurationofboundservices
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.