Failure to deploy datasource because JBoss thinks it already exists - gradlew

I am running gradlew deploy on a JBoss 7.0.5 application and it is complaining that one of my data sources already exists when I try deploying:
Deploying profile/deploy-datasources.cli
{
"outcome" => "failed",
"failure-description" => {"domain-failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalStateException: WFLYCTL0363: Capability 'org.wildfly.data-source.MarketDataSource' is already registered in context 'profile=Int-Market'."},
"rolled-back" => true
}
I use the JBoss cli to deploy the data source (deploy-datasources.cli):
if (outcome == success) of ./subsystem=datasources/data-source=MarketDataSource:read-resource()
data-source remove --name=MarketDataSource --profile=#jboss.profile#
end-if
./subsystem=datasources/data-source=MarketDataSource:add( \
jta=false, \
jndi-name="java:/MarketDataSource", \
driver-name="oracle", \
connection-url="#leftthisout#", \
user-name="#leftthisout#", \
password="$\{#leftthisout#\}", \
min-pool-size=1, \
max-pool-size=5, \
validate-on-match=true, \
valid-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker", \
stale-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker", \
exception-sorter-class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter", \
idle-timeout-minutes=10, \
prepared-statements-cache-size=120, \
enabled=true \
)
if (outcome == success) of ./subsystem=datasources/data-source=MarketDataSource:read-resource
./subsystem=datasources/data-source=MarketDataSource/connection-properties=defaultRowPrefetch:add(value=100)
end-if
and use the JBoss cli again to undeploy data sources (undeploy-datasources.cli):
if (outcome == success) of ./subsystem=datasources/data-source=MarketDataSource:read-resource()
data-source remove --name=MarketDataSource --profile=#jboss.profile#
end-if
I do the same thing (except changing name, passwords, usernames etc.) for another data source and I have no issues with that. I have used a difference checker to ensure that. Something must be configured wrong with this datasource as opposed to the other but I can't figure out what it is.

Turns out there is a bug with JBoss 7.0.* explained here so I just undeployed the app and restarted my domain controller. Deploying again then worked.
Ugrading to JBoss 7.1.* would also work but I did not have that option at the moment so that was the work around.

Related

what is a no nonsense way to create a ubuntu virtual machine using virt-manager on command line

I tried various methods explained on internet, but none seems to be working. using local iso image give one issue and location gives another issue.
Can we setup IP using this command?
currently using this command
sudo virt-install \ --name worker-2 \ --ram=4096 \ --disk size=100 \ --disk path=/opt/sciserver/vm/worker-2.qcow2,size=30,format=qcow2 \ --vcpus 2 \ --os-type linux \ --os-variant ubuntu20.04 \ --graphics none \ --location 'http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/' \ --extra-args "console=tty0 console=ttyS0,115200n8"
and error says..
"ERROR Error validating install location: Could not find an installable distribution at 'http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/'
The location must be the root directory of an install tree.
See virt-install man page for various distro examples."
Your help will be much appreciated

GraphDB Docker Container Fails to Run: adoptopenjdk/openjdk12:alpine

When using the standard DockerFile available here, GraphDB fails to start with the following output:
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME
Looking into it, the DockerFile uses adoptopenjdk/openjdk11:alpine which was recently updated to Alpine 3.14.
If I switch to an older Docker image (or use adoptopenjdk/openjdk12:alpine) then GraphDB starts without a problem.
How can I fix this while still using the latest version of adoptopenjdk/openjdk11:alpine?
Below is the DockerFile:
FROM adoptopenjdk/openjdk11:alpine
# Build time arguments
ARG version=9.1.1
ARG edition=ee
ENV GRAPHDB_PARENT_DIR=/opt/graphdb
ENV GRAPHDB_HOME=${GRAPHDB_PARENT_DIR}/home
ENV GRAPHDB_INSTALL_DIR=${GRAPHDB_PARENT_DIR}/dist
WORKDIR /tmp
RUN apk add --no-cache bash curl util-linux procps net-tools busybox-extras wget less && \
curl -fsSL "http://maven.ontotext.com/content/groups/all-onto/com/ontotext/graphdb/graphdb-${edition}/${version}/graphdb-${edition}-${version}-dist.zip" > \
graphdb-${edition}-${version}.zip && \
bash -c 'md5sum -c - <<<"$(curl -fsSL http://maven.ontotext.com/content/groups/all-onto/com/ontotext/graphdb/graphdb-${edition}/${version}/graphdb-${edition}-${version}-dist.zip.md5) graphdb-${edition}-${version}.zip"' && \
mkdir -p ${GRAPHDB_PARENT_DIR} && \
cd ${GRAPHDB_PARENT_DIR} && \
unzip /tmp/graphdb-${edition}-${version}.zip && \
rm /tmp/graphdb-${edition}-${version}.zip && \
mv graphdb-${edition}-${version} dist && \
mkdir -p ${GRAPHDB_HOME}
ENV PATH=${GRAPHDB_INSTALL_DIR}/bin:$PATH
CMD ["-Dgraphdb.home=/opt/graphdb/home"]
ENTRYPOINT ["/opt/graphdb/dist/bin/graphdb"]
EXPOSE 7200
The issue comes from an update in the base image. From a few weeks adopt switched to alpine 3.14 which has some issues with older container runtime (runc). The issue can be seen in the release notes: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0
Updating your Docker will fix the issue. However, if you don't wish to update your Docker, there's a workaround.
Some additional info:
The cause of the issue is that for some reason containers running in older docker versions and alpine 3.14 seem to have issues with the test flag "-x" so an if [ -x /opt/java/openjdk/bin/java ] returns false, although java is there and is executable.
You can workaround this for now by
Pull the GraphDB distribution
Unzip it
Open "setvars.in.sh" in the bin folder
Find and remove the if block around line 32
if [ ! -x "$JAVA" ]; then
echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME"
exit 1
fi
Zip it again and provide it in the Dockerfile without pulling it from maven.ontotext.com
Passing it to the Dockerfile is done with 'ADD'
You can check the GraphDB free version's Dockerfile for a reference on how to pass the zip file to the Dockerfile https://github.com/Ontotext-AD/graphdb-docker/blob/master/free-edition/Dockerfile

How to output debug info with the dropwizard-migrations liquibase module?

When you run liquibase on the command line, you can set the log level to debug with a command line option:
java -jar liquibase.jar \
--driver=oracle.jdbc.OracleDriver \
--classpath=\path\to\classes:jdbcdriver.jar \
--changeLogFile=com/example/db.changelog.xml \
--url="jdbc:oracle:thin:#localhost:1521:oracle" \
--username=scott \
--password=tiger \
--logLevel=debug
update
Does anyone know how to set the log level when running liquibase via the dropwizard-migrations module?
java -jar /mydropwizardapp.jar db migrate config.yml
(I am having a problem where it intermittently fails to get a lock (Waiting for changelog lock....) and my deployment fails, and I'd like to see more detail on what it is doing. I'm pretty sure the lock is not left from a previously failed deployment)
Thanks
You can set the logging level to DEBUG on the YAML file:
logging:
level: DEBUG

Datatables of laravel

I'm using Laravel recently and still have some difficulty using the APIs that it makes available.
I'm working on a project and I'm using infyom for the backoffice part and the php version is 7.1.
I started with the clone of the git repository (infyom adminLTE), then I configured my .env file, created the necessary migrations and sent the php artisan migrate command. So far all right!
Now I should use YAJRA to build datatables and their CRUD operations.
Following the instructions that make GitHub available, I can not get anything.
The steps I have followed are:
compiler require yajra / laravel-datatables-oracle: "~ 6.0" // here i tried also with version 8 (but nothing)
'providers' => [
...,
Yajra \ DataTables \ DataTablesServiceProvider :: class,
]
'aliases' => [
...,
'DataTables' => Yajra \ DataTables \ Facades \ DataTables :: class,
]
3.php artisan vendor: publish --provider = Yajra \ DataTables \
DataTablesServiceProvide
php artisan infyom: scaffold $ MODEL_NAME --fromTable --tableName = $ TABLE_NAME
Now my table appears in the left menu, but when I go to click it returns this type of error:
FatalThrowableError
Class 'Yajra \ DataTables \ DataTablesServiceProvider' not found
in ProviderRepository.php (line 208)
Can you tell me if I skipped a few passes?
Are the versions of these things good?

Error:Unable to invoke action : The server is currently unavailable

I am doing a on prem setup of openwhisk using local couchdb installation on ubuntu 16.04 for which I downloaded the code from the github. I have followed all the steps of the setup, after the build, I have to run various playbooks
when is run the below playbook with the below command
ansible-playbook -i environments/local openwhisk.yml
I get error
"error": "The server is currently unavailable (because it is overloaded or down for maintenance).",
"code": 4
when I check I found it is coming while executing installRouteMgmt.sh from /openwhisk/ansible/roles/routemgmt/files
the line in the script which is throwing error is
enter code here`echo Installing routemgmt package.
$WSK_CLI -i -v --apihost "$APIHOST" package update --auth "$AUTH" --shared no "$NAMESPACE/routemgmt" \
-a description "This experimental package manages the gateway API configuration." \
-p gwUser "$GW_USER" \
-p gwPwd "$GW_PWD" \
-p gwUrl "$GW_HOST" \
-p gwUrlV2 "$GW_HOST_V2"
where
APIHOST=172.17.0.1
AUTH=path to auth.whisk.system
WSK_CLI= wsk path
NAMESPACE= whisk.system
This error comes when the DB host value is not resolvable from the controller container or when the DB which the controller trying to connect to is not created in the couch DB. Mine was the second case once __subjects db was there,
it was able to run