[英]Error to start java app on IBM/Bluemix with DB service auto-config
I have a app on java , using jpa(spring-data) and I build on bluemix with cf:push and everything its ok .. but when app beginning start throw that: 我在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
When I see if service it's bound on app with cf:services : 当我看到服务是否与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
I think that could be bluemix update auto-config... any idea? 我认为可能是bluemix更新自动配置...任何想法吗? ps: previously I can run without problems , but now i can't... ps:以前我可以毫无问题地运行,但是现在我不能...
After some days without changes , I push a new war...and now a got that error 经过几天没有任何变化,我发起了一场新的战争...现在出现了一个错误
The Liberty buildpack automatically configures the Data Source when a recognized relational database service is bound (DB2, mysql, etc.). 当绑定了公认的关系数据库服务(DB2,mysql等)时,Liberty buildpack会自动配置数据源。 The JNDI name would be "jdbc/". JNDI名称将为“ jdbc /”。 So you can use that JNDI name to look up the data source in the code or in the JPA configurations/annotations. 因此,您可以使用该JNDI名称在代码或JPA配置/批注中查找数据源。 Read more about this auto-configuration feature in the Liberty buildpack: https://www.ng.bluemix.net/docs/starters/liberty/index.html#automaticconfigurationofboundservices 在Liberty buildpack中阅读有关此自动配置功能的更多信息: https ://www.ng.bluemix.net/docs/starters/liberty/index.html#automaticconfigurationofboundservices
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.