简体   繁体   English

使用数据库服务自动配置在IBM / Bluemix上启动Java应用程序时出错

[英]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.

相关问题 spring-config中的auto-config = true有什么用? - what is the use of auto-config=true in spring security 在使用Camel 2.19的Maven构建中,Spring Boot自动配置失败 - Spring boot auto-config fails on maven build with Camel 2.19 将Custom AuthenticationProcessingFilter与 <form-login> (自动配置=“ true”) - Using Custom AuthenticationProcessingFilter with <form-login> (auto-config=“true”) IBM Bluemix Cloud Foundry SpringBoot kotlin应用程序错误 - IBM Bluemix Cloud Foundry SpringBoot kotlin app error 如何解决IBM Bluemix Workload Scheduler for Java Runtime错误? - How to troubleshoot IBM Bluemix Workload Scheduler for Java Runtime Error? 在IBM Bluemix中推送Liberty for Java应用程序时出错 - Error when push Liberty for Java application in IBM Bluemix 春季启动自动配置:在daoimpl类中,数据源未自动装配,但在contoller中自动装配时,则正常工作 - Spring-boot Auto-config: DataSource not getting autowired in daoimpl class, but works properly when autowired in contoller 我可以用吗 <http:auto-config=true> 和 <UsernamePasswordAuthenticationFilter> 在春季安全的同时 - can i use <http:auto-config=true> and <UsernamePasswordAuthenticationFilter> at the same time in spring security 定义 DataSource bean 是否会自动停止 spring 自动配置,即使数据源未使用 @Primary 注释? - Does defining a DataSource bean automatically stop spring auto-config, even if the data source is not annotated with @Primary? IBM Bluemix:Watson问答服务设置 - IBM Bluemix: Watson Q&A service setup
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM