简体   繁体   中英

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:

[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 :

 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? ps: previously I can run without problems , but now i can't...

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.). 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM