[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Openshift v3 WAR deployment with database

----- Original Message -----
> From: "Sebastian Lorenz" <sebastian p lorenz gmail com>
> To: users lists openshift redhat com
> Sent: Wednesday, May 27, 2015 11:35:20 AM
> Subject: Openshift v3 WAR deployment with database
> Hi,
> I successfully deployed the jee sample app from bparees/javaee7-hol. Now I'm
> trying to use this as a template for my war application with a postgresql
> db.
> The POD for the db is started successfully and the service is available. But
> when starting the application it fails since the Persistence Unit cannot be
> started. If I look into the standalone.xml of the server I see that the
> POSTGRESQL_USER,... env. variables have not been replaced during
> build/deployment. The "enabled" flag for the postgresql db is not set to
> true. From the javaee7-hol example I cannot figure out what triggers the
> enabled flag of the mysql datasource to true? I set the environment
> variables in the ...-sti.json the same way as in the example. But nothing is
> replaced in standalone.xml.
> How/when is the replacement done?

I assume you're doing this with the wildfly-8-centos builder image?  it's a bit hackish i'm afraid since the wildfly image was one of our early samples ported from v2 code (our EAP and EWS images will be/are cleaner), but here's the relevant bit you probably missed:


So you need to ensure you are a setting a POSTGRESQL_DB_NAME env variable on your pod.

The javaee sample repo does the equivalent for mysql here:

that should get this set to true:

> Regards, Sebastian
> _______________________________________________
> users mailing list
> users lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]