我在java上有一个应用程序,使用jpa(spring-data),我使用cf:push构建在bluemix上,一切正常..但是当应用程序开始时抛出:
GetAllGymsByStars
当我看到服务是否绑定在应用程序上时使用cf:services:
[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
我认为这可能是bluemix update auto-config ...任何想法? ps:以前我可以毫无问题地跑,但现在我不能......
经过几天没有变化,我推了一场新的战争......现在得到了error
答案 0 :(得分:0)
The Liberty buildpack automatically configures the Data Source when a recognized relational database service is bound (DB2, mysql, etc.). The JNDI name would be "jdbc/". So you can use that JNDI name to look up the data source in the code or in the JPA configurations/annotations. Read more about this auto-configuration feature in the Liberty buildpack: https://www.ng.bluemix.net/docs/starters/liberty/index.html#automaticconfigurationofboundservices