Edit standalone.xml in Openshift v3.X - openshift

I have a web app deployed in Openshift v3 with s2i binary that starts with shipped standalone-openshift.xml and datasource injected by config map.
I tried to customize datasource by modifying the standalone-openshift.xml, than I triggered deployment, but wildfly failed to start with the following error:
ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 29) WFLYCTL0013:
Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "oracle")
]) - failure description: "WFLYCTL0212: Duplicate resource [
(\"subsystem\" => \"datasources\"),
(\"jdbc-driver\" => \"oracle\")
]
After I add standalone-openshift.xml, I wiped out every datasource reference into the deployment.yaml.
Any idea?

I found out what is the problem: a workmate of mine, set up a gradle task to launch s2i with an install script to copy some stuff and configure oracle driver.

Related

Spring Boot Application not configuring datasource through CircleCi

I have a Spring Boot Rest Api (v2.2.6.RELEASE) with a mysql database
When I ssh into the remote box and run java -jar it builds and runs perfectly but when I run that same command through CircleCi I get the following.
2021-12-25 17:53:30.112 ERROR 30084 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Below is an extract of the properties file:
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=****
spring.datasource.username=*****
spring.datasource.password=*****
spring.datasource.initialization-mode=always
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Also, Im using the same user for both CircleCi and when I ssh and deploy manually.
Any help and guidance would be appreciated.

TIBCO BW failing to debug successfully a REST service .I have created a jdbc resource and tested the connection was a success but i have this error

<>#BWEclipseAppNode> 12:12:32.545 INFO [main] com.tibco.thor.frwk.Deployer - Started by BusinessStudio.
12:12:34.970 INFO [main] com.tibco.bw.frwk.engine.BWEngine - TIBCO-BW-FRWK-300002: BW Engine [Main] started successfully.
12:12:35.355 INFO [Framework Event Dispatcher: Equinox Container: 80edabb3-8e47-001c-18c5-90bdbc610de0] com.tibco.thor.frwk.Deployer - TIBCO-THOR-FRWK-300001: Started OSGi Framework of AppNode [BWEclipseAppNode] in AppSpace [BWEclipseAppSpace] of Domain [BWEclipseDomain]
12:12:35.483 INFO [Framework Event Dispatcher: Equinox Container: 80edabb3-8e47-001c-18c5-90bdbc610de0] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300018: Deploying BW Application [RESTservice2.application:1.0].
12:12:40.067 INFO [Framework Event Dispatcher: Equinox Container: 80edabb3-8e47-001c-18c5-90bdbc610de0] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300021: All Application dependencies are resolved for Application [RESTservice2.application:1.0]
12:12:41.431 INFO [Thread-28] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300019: BW Application [RESTservice2.application:1.0] is impaired.
12:12:41.435 INFO [Framework Event Dispatcher: Equinox Container: 80edabb3-8e47-001c-18c5-90bdbc610de0] com.tibco.thor.frwk.Application - Started by BusinessStudio, ignoring .enabled settings.
12:12:41.438 ERROR [CM Configuration Updater (Update: pid=bw.resource.jdbc.916120c9-fbcb-45de-a13c-b22e3edf76ec)] com.tibco.bw.sharedresource.runtime.dependency.ReferenceDependency - TIBCO-BW-SR-FRWK-503000: Unable to start SharedResource [restservice2.JDBCConnectionResource] from Module [RESTservice2:1.0.0.qualifier], DeploymentUnit [RESTservice2.application:1.0]. <Reason>: TIBCO-BW-SR-JDBC-500003: The database driver [com.mysql.jdbc.Driver] is not found. Ensure that DataSourceFactory bundle providing this driver is available in the environment.
so this is the error i am getting as a result i cant run OSGi commands to request endpoint urls and for my rest service even though my code has no errors before debug ,i am getting this during debug ,please help.
In order to use the MySql JDBC driver you need to install it in the BusinessWorks environment of your machine.
This is done by running the command 'bwinstall mysql-driver' from the <TIBCO_HOME>bw/6.X/bin folder.
As Emmanuel suggested, according to the error, you probably missed the required JDBC driver installation.
Once you execute the command, it will start successfully.

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured with Spring, MySql and Gradle

I am working with Spring Boot and MySql. When I launch the application, I get the following error:
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/*****
spring.datasource.username=username
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
build.gradle
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "mysql:mysql-connector-java:$sqlClientVersion"
}
dependencies {
implementation 'mysql:mysql-connector-java:8.0.20'
}
Any help would be really appreciated

Open-shift-Running Handler [openshift_master : verify API Server] FAILED - RETRYING Verify API Server

I am Trying to Install Openshift 3.9.1 In CentOS 7.5. All the process Done but Below Failed Issue Occurring. If you have any suggestion about it,
( Running Handler [ openshift_master : verify API Server ])
FAILED - RETRYING Verify API Server (120 retries left).
install configuration
problem occurring...
If any proper step by step guideline notice me. thanks

JBoss Wildfly 10 MYSQL Driver install problems

I am attempting to install a MySQL Driver for WildFly 10.0 bue running into some issues.
I am follwowing these instructions here
I have used Maven to get the driver JAR (This worked fine.)
mvn dependency:copy -Dartifact=mysql:mysql-connector-java:5.1.18 \
-DoutputDirectory=/path/to/SERVER_HOME/modules/com/mysql/jdbc/main/
And am attempting to run this command to setup the MySql driver in JBOSS
./path/to/SERVER_HOME/bin/jboss-cli.sh --file=/path/to/mysql-database-config-wildfly.cli
I get this error:
/apps/wildfly/bin/jboss-cli.sh --file=/home/ec2-user/aerogear-unifiedpush-server-1.1.0.Final/databases/mysql-database-config-wildfly.cli
07:24:48,338 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mysqlup")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.mysql.jdbc]"
The batch failed with the following error (you are remaining in the batch editing mode to have a chance to correct the error): {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYJCA0041: Failed to load module for driver [com.mysql.jdbc]"}}
As this is a fresh install Im stumped as to what might be the issue. I haven't used JBoss before so I am hoping someone can help me out and point me in the right direction.
I did not read the full user guide, but you're missing the adding of the module. Simply just copying the dependency to the modules directory will not work. You need to use the module add CLI command. Here's an example for PostgreSQL.