Wildfly JDBC for Postgres - postgresql

In order to deploy an application in Wildfly I needed to setup a JDBC module for database connection so I deployed the JDBC driver
After that, I added a datasource.
The problem I found no postgresql driver:
Any idea how to solve this?
I'm using Wildfly 10 and PostgreSQL 9.5 with Java 7

You didn't deploy the driver as a module but as a deployment. You have to create the module manually or use the jboss-cli like this:
module add --name=org.postgres --resources=/tmp/postgresql-version.jar --dependencies=javax.api,javax.transaction.api
Then register the module as a JDBC driver like this :
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
Then you'll be able to create your datasource.

Related

Flyway - JDBC query

Do I have to install the JDBC driver to use flyway with PostgreSQL?
If YES - then which JDBC - do I have to download?
I am completely new to data migration - need to know which JDBC I have to install?
Currently the PostgreSql 42.2.19 JDBC driver comes as part of Flyway.
If you are using the command line app, you can see this under the drivers folder, where you can also override it with a later JDBC.

Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc. using database postgres

I am working on report using BIRT with postgresql. While I am able to run the report successfully using BIRT viewer, when I try to integrate with tomcat, it gives the below error-
Cannot open the connection for the driver:
org.eclipse.birt.report.data.oda.jdbc.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: org.postgresql.Driver.
while I have place the oda.jdbc.driver "postgresql-42.2.5" at location "\WEB-INF\lib" but still I'm facing this error.
I am running:
Birt version:-4.8.0
postgres version:- postgres9.5 (1.22.2)
After viewing error it seems the the JDBC driver jar is on at class path into BIRT runtime so it is not able to load the Driver and throwing error.
Please ensure the Driver jars are placed into libs directory of BIRT runtime installed in your server and it is available into class path at runtime.

Using ddl data in teiid

Using jboss EAP 7 and Teiid Designer 10.4 and wildfly 10.
I have DDL file of MySQL .how can I make VDB using that.
Can I run it using teiid?
when I tried to import ddl data as Teiid ddl ,it showed parsing error,but the same was able to import as general ddl.
Please take look at documentation on this http://docs.jboss.org/teiid/designer/11.1/user-guide/en-US/html_single/#ddl-import-section
and then select appropriate dialect while doing so.

Spring-Boot is not working with Flyway

I am using Spring-Boot v1.1.10.RELEASE for my spring based web application. My DB is Postgres & used Flyway for my DB migration.
The postgres sql script file is successfully executed by flyway-maven-plugin by the following maven command i.e. mvn compile flyway:migrate
But the same Postgres sql script file is throwing PSQLException: ERROR: COPY from stdin failed: The JDBC driver currently does not support COPY operations error when running through the Spring-Boot Application.java file.
NOTE: From spring-boot I am executing the script file on fresh DB i.e. at least there is no SCHEMA_VERSION table in DB.
Any inputs?
Thanks,
Baji
By default, Spring Boot 1.1 uses Flyway 3.0 which does not support COPY FROM STDIN. Support was added in 3.1. You can either upgrade to Spring Boot 1.2 (which uses Flyway 3.1 by default) or stick with Spring Boot 1.1 and try overriding the version of Flyway to 3.1.

Installing Liferay 6.2 on IBM WebSphere Application Server 8.5 with DB2 10.1

A little help here. I need to install Liferay 6.2 with WebSphere Application Server 8.5 and DB2 10.1, so I followed the documentation guide for that installation type:
https://www.liferay.com/documentation/liferay-portal/6.2/user-guide/-/ai/installing-liferay-on-websphere-8-5-liferay-portal-6-2-user-guide-15-en
But unfortunately, after doing all the steps in the installation guide, I was not still able to make Liferay work on WAS.
Even though I was able to run the liferay app, it still can't make the setup wizard show.
I installed Liferay 6.1 on DB2 9.7, and I got an error related to the tablespaces. Please, check the installation log file to see the DB2 error. But my problem was that it lacks of a 8KB tablespace
You need to create the database with a 8KB pagesize by default
db2 create db liferay pagesize 8 K
I wrote an article about that http://angocatech.blogspot.fr/2012/04/error-al-instalar-liferay-61-con-db2.html (In Spanish, ;) )
If you followed litterally Liferay 6.2 installation guide you must enable wizard setting setup.wizard.enabled=true in portal-ext.properties
Some more error logs would be great for debugging.
However Liferay 6.2 should run in Websphere 8.5.X without any major issues:
http://www.devops-insight.com/2014/08/liferay-62-in-websphere-application.html
As an alternative you could try to setup an jdbc provider and a data source in websphere to connect to your db2 database.
After that you could setup liferay to use the websphere data source by pointing it to the jndi name of the the data source.
portal-ext.properties:
##
## JDBC
##
#
# Set the JNDI name to lookup the JDBC data source. If none is set,
# then the portal will attempt to create the JDBC data source based on the
# properties prefixed with "jdbc.default.".
#
jdbc.default.jndi.name=jdbc/LiferayPool
Comment out the other jdbc configurations.