I need configure changeSet executing sql loaded from jar.
I have internal project changeSet that works correctly
<changeSet id="1" author="sergii" dbms="h2">
<sqlFile
encoding="utf8"
path="schema-ms-sql.0.0.1.sql"
relativeToChangelogFile="true"
splitStatements="true"
stripComments="true"/>
</changeSet>
Some scripts are provided from different libraries (in my case it is spring-boot-starter-batch), for example:
classpath:/org/springframework/batch/core/schema-h2.sql
Note that jar is in the project and accessible (build \ test\ run times).
As result I need register one also into my changeSet, trying:
<changeSet id="2" author="sergii" dbms="h2">
<sqlFile
encoding="utf8"
path="classpath*:/org/springframework/batch/core/schema-h2.sql"
relativeToChangelogFile="true"
splitStatements="true"
stripComments="true"/>
</changeSet>
and it doesn't work with any configuration (like "classpath:/org/springframework/batch/core/schema-h2.sql", "/org/springframework/batch/core/schema-h2.sql", "org/springframework/batch/core/schema-h2.sql", "classpath*:/org/springframework/batch/core/schema-h2.sql" and so on) because of
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.UnexpectedLiquibaseException: java.io.IOException: File does not exist: 'classpath*:/org/springframework/batch/core/schema-h2.sql'
I know using spring I could use auto configuration, but I'm interested in liquibase auditing...
Is any ideas how to make packaged scripts working via changeSet or include into liquibase auditing?
Solution is to change attribute for sqlFile tag:
relativeToChangelogFile="false"
Result changeSet below:
<changeSet id="2" author="sergii" dbms="h2">
<sqlFile
encoding="utf8"
path="classpath:/org/springframework/batch/core/schema-h2.sql"
relativeToChangelogFile="false"
splitStatements="true"
stripComments="true"/>
</changeSet>
Example for separate changelog.yaml file with relative path:
databaseChangeLog:
- changeSet:
id: my_script_1
changes:
- sqlFile:
dbms: mysql
encoding: utf8
path: db/changelog/0_0_1/my_script_1.sql
relativeToChangelogFile: false
splitStatements: true
stripComments: true
rollback:
- sqlFile:
dbms: mysql
encoding: utf8
path: db/changelog/0_0_1/my_script_1_rollback.sql
relativeToChangelogFile: false
splitStatements: true
stripComments: true
- changeSet:
id: my_script_2
changes:
- sqlFile:
dbms: mysql
encoding: utf8
path: db/changelog/0_0_1/my_script_2.sql
relativeToChangelogFile: false
splitStatements: true
stripComments: true
rollback:
- sqlFile:
dbms: mysql
encoding: utf8
path: db/changelog/0_0_1/my_script_2_rollback.sql
relativeToChangelogFile: false
splitStatements: true
stripComments: true
Related
How to configure MongoDB DataSource JNDI in JBoss Server.
I downloaded MongoDB jar (mongo-java-driver-3.4.2.jar) and deployed using admin console, it got successfully deployed but when I went to add Datasource in customize option I am not able to see MongoDB driver, the only one option available was h2. Why so? Do I have to do any other configuration change or am I missing any step?
I Even tried to manually create the MongoDB driver and datasource but that is also not working.
I placed module.xml and mongo-java-driver- 3.4.2.jar to the following path
..\devstudio\runtimes\jboss-eap\modules\system\layers\base\org\mongodb\main
--------- module.xml ---------------------
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.mongodb">
<resources>
<resource-root path="mongo-java-driver-3.4.2.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
--------------standalone.xml ------------
<datasource jndi-name="java:jboss/datasources/mongodb" pool-name="mongodb"
enabled="true" use-java-context="true">
<connection-url>jdbc:mongodb://127.0.0.1:27017/example;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>mongodb</driver>
</datasource>
<driver name="mongodb" module="org.mongodb">
<xa-datasource-class>mongodb.jdbc.MongoXADataSource</xa-datasource-class>
</driver>
I was getting the following error when i started the server
("subsystem" => "datasources"),
("data-source" => "mongodb")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable
dependencies" => [
"org.wildfly.data-source.mongodb is missing [jboss.jdbc-driver.mongodb]",
"jboss.driver-demander.java:jboss/datasources/mongodb is missing
[jboss.jdbc-driver.mongodb]"
]}
23:51:44,277 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "mongodb")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable
dependencies" => [
"org.wildfly.data-source.mongodb is missing [jboss.jdbc-driver.mongodb]",
"jboss.driver-demander.java:jboss/datasources/mongodb is missing
[jboss.jdbc-driver.mongodb]",
"org.wildfly.data-source.mongodb is missing [jboss.jdbc-driver.mongodb]"
]}
Could you let me know how to do JNDI Datasource configuration in JBoss Server ?? Please explain in detail as I am new for JNDI Configuration
Refer https://www.progress.com/blogs/configure-connect-for-jdbc-mongodb-driver-with-jboss-eap-64enter link description here
I added jdbc driver in pom.xml:
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
And I add in project-defaults.yml:
swarm:
datasources:
data-sources:
erp-ds:
driver-name: sqlserver
connection-url: jdbc:sqlserver://localhost:1433;DatabaseName=COMPARTILHADO
user-name: teste
password: teste
jdbc-drivers:
sqlserver:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
xa-datasource-name: com.microsoft.sqlserver.jdbc.SQLServerXADataSource
driver-module-name: com.microsoft.sqlserver
but I run application it throws exception:
2017-06-14 13:09:54,337 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "erp-ds")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.sqlserver"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:jboss/datasources/erp-ds is missing [jboss.jdbc-driver.sqlserver]",
"org.wildfly.data-source.erp-ds is missing [jboss.jdbc-driver.sqlserver]"
]
}
In Wildfly I has to add driver in standalone.xml but I don't know in wildfly-swarm. In development stage I add a DatasourcesFraction with jdbcDriver, its easy, but when I build .war and I run uberjar java -jar ??????-swarm.jar throws exception above.
You're actually providing too much information in project-defaults.yml!
swarm:
datasources:
data-sources:
erp-ds:
driver-name: sqlserver
connection-url: jdbc:sqlserver://localhost:1433;DatabaseName=COMPARTILHADO
user-name: teste
password: teste
should be all you need.
By adding com.microsoft.sqlserver:sqljdbc4:4.0 as a project dependency, WF Swarm will automatically create the JDBC Driver configuration for you.
That may not solve the particular issue you're having, so I'd take a look at the WAR that WF Swarm modifies (the one without the .original suffix) in /target and see whether your jdbc jar is inside WEB-INF/lib.
I'm totally new to Java and its tools, I would like to use Dropwizard framework.
I found an example found in its repository, however I could not run it.
As its said in the README.md, I need to run mvn package. However, as I understood, Maven tries to run integration tests but exception is thrown. The stack trace is like so:
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.975 sec << FAILURE! - in com.example.helloworld.IntegrationTest
com.example.helloworld.IntegrationTest Time elapsed: 5.974 sec <<< ERROR!
liquibase.exception.LockException: liquibase.exception.DatabaseException: Unknown data type: "İNT"; SQL statement:
CREATE TABLE PUBLIC.DATABASECHANGELOGLOCK (ID İNT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)) [50004-192] [Failed SQL: CREATE TABLE PUBLIC.DATABASECHANGELOGLOCK (ID İNT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.command.Parser.parseColumnWithType(Parser.java:4079)
at org.h2.command.Parser.parseColumnForTable(Parser.java:3937)
at org.h2.command.Parser.parseCreateTable(Parser.java:5972)
at org.h2.command.Parser.parseCreate(Parser.java:4237)
at org.h2.command.Parser.parsePrepared(Parser.java:362)
at org.h2.command.Parser.parse(Parser.java:317)
at org.h2.command.Parser.parse(Parser.java:289)
at org.h2.command.Parser.prepareCommand(Parser.java:254)
at org.h2.engine.Session.prepareLocal(Session.java:560)
at org.h2.engine.Session.prepareCommand(Session.java:501)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1202)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:170)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:299)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:107)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:97)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:94)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:206)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:170)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.Liquibase.update(Liquibase.java:188)
at liquibase.Liquibase.update(Liquibase.java:181)
at io.dropwizard.migrations.DbMigrateCommand.run(DbMigrateCommand.java:68)
at io.dropwizard.migrations.DbCommand.run(DbCommand.java:52)
at io.dropwizard.migrations.AbstractLiquibaseCommand.run(AbstractLiquibaseCommand.java:64)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
at io.dropwizard.cli.Cli.run(Cli.java:75)
at io.dropwizard.Application.run(Application.java:79)
at com.example.helloworld.IntegrationTest.migrateDb(IntegrationTest.java:38)
I think it has some issues with locale, because my operating system is OS X 10.11 Turkish, where we capitalize strings 'i' to 'İ', not 'I'.
I'm using IntelliJ IDEA, could you tell me how can I change current locale for the guy who is tested (I don't know it's JVM or Maven or something...)?
As it's requested, my migrations.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="1" author="codahale">
<createTable tableName="people">
<column name="id" type="bigint" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="fullName" type="varchar(255)">
<constraints nullable="false"/>
</column>
<column name="jobTitle" type="varchar(255)"/>
</createTable>
</changeSet>
</databaseChangeLog>
It should have been caused by your locale settings of Java Virtual Machine (JVM).
Simply change your locale to English by opening your terminal or console (for Windows) and running the following command.
set JAVA_ARGS=-Duser.language=en -Duser.region=US %JAVA_ARGS%
To automate that, you might need to export the environment variable in your terminal startup script, something like .bash_profile.
I have migrated play framework from 2.0.8 to 2.1.0, everything was perfectly working before. Now i am getting following error:
play.api.UnexpectedException: Unexpected exception[PersistenceException: [PersistenceUnit: hbllnd] Unable to build EntityManagerFactory]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:142) ~[play_2.10.jar:2.1.0]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.0]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.0]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:104) ~[play_2.10.jar:2.1.0]
at scala.util.Either$RightProjection.flatMap(Either.scala:523) [scala-library.jar:na]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: hbllnd] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915) ~[hibernate-entitymanager-4.1.3.Final.jar:4.1.3.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) ~[hibernate-entitymanager-4.1.3.Final.jar:4.1.3.Final]
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57) ~[hibernate-entitymanager-4.1.3.Final.jar:4.1.3.Final]
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) ~[hibernate-jpa-2.0-api.jar:1.0.1.Final]
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) ~[hibernate-jpa-2.0-api.jar:1.0.1.Final]
at play.db.jpa.JPAPlugin.onStart(JPAPlugin.java:35) ~[play-java-jpa_2.10.jar:2.1.0]
Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: models.ProgramModule column: _ebean_intercept (should be mapped with insert="false" update="false")
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:681) ~[hibernate-core-4.1.3.Final.jar:4.1.3.Final]
at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:703) ~[hibernate-core-4.1.3.Final.jar:4.1.3.Final]
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:725) ~[hibernate-core-4.1.3.Final.jar:4.1.3.Final]
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:478) ~[hibernate-core-4.1.3.Final.jar:4.1.3.Final]
at org.hibernate.mapping.RootClass.validate(RootClass.java:270) ~[hibernate-core-4.1.3.Final.jar:4.1.3.Final]
at org.hibernate.cfg.Configuration.validate(Configuration.java:1294) ~[hibernate-core-4.1.3.Final.jar:4.1.3.Final]
Here is my persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="hbllnd" transaction-type="RESOURCE_LOCAL" >
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>hbllndDS</non-jta-data-source>
<mapping-file>META-INF/orm.xml</mapping-file>
<class>models.User</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.ejb.use_class_enhancer" value="true" />
</properties>
</persistence-unit>
</persistence>
Here is my application.conf
# This is the main configuration file for the application.
# ~~~~~
# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
application.secret="dAktNi/d>QGan4fFMnaecK;Bspp;DHQ/F5uU? VM8<wUVpSJ0`;m]efM2E^^bsaFl"
# The application languages
# ~~~~~
application.langs="en"
# Global object class
# ~~~~~
# Define the Global object class for this application.
# Default to Global in the root package.
# global=Global
# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
#db.default.driver=org.h2.Driver
#db.default.url="mysql://localhost:3306/test"
#db.default.driver=com.mysql.jdbc.Driver
#db.default.user=""
#db.default.password=""
## HBL L&D
db.hbllnd.url="jdbc:mysql://localhost:3306/hbllnd"
db.hbllnd.driver=com.mysql.jdbc.Driver
db.hbllnd.user="root"
db.hbllnd.pass="root"
db.hbllnd.jndiName=hbllndDS
jpa.hbllnd=hbllnd
# Evolutions
# ~~~~~
# You can disable evolutions if needed
# evolutionplugin=disabled
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/), by providing a logger.xml file in the conf directory .
# Root logger:
logger.root=ERROR
# Logger used by the framework:
logger.play=INFO
release.date=20141226
release.version="1.0.1"
# deployment version configuration
include "version.conf"
session.timeout=5
program.expire.days=30
# Logger provided to your application:
logger.application=DEBUG
blog.testMode = true
# SMTP configuration
include "smtp.conf"
# play-easymail configuration
include "play-easymail.conf"
Can any one please let me know what's the issue??
EDIT: resolved it by disabling jBean.
resolved it by disabling jBean.
I have next problem when deploy application on openshift. I use a wildfly application server and PostgreSQL cartrige.
In persistence.xml i set property "hibernate.hbm2ddl.auto" value="update". In wildfly modules in org/main/postgresql i see that wildfly use postgresql-9.3-1102-jdbc41.jar
12:12:14,760 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 62) HHH000319: Could not get database metadata: org.h2.jdbc.JdbcSQLException: Table "PG_CLASS" not found; SQL statement:
select relname from pg_class where relkind='S' [42102-173]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:331)
at org.h2.message.DbException.get(DbException.java:171)
at org.h2.message.DbException.get(DbException.java:148)
at org.h2.command.Parser.readTableOrView(Parser.java:4864)
at org.h2.command.Parser.readTableFilter(Parser.java:1107)
at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1713)
at org.h2.command.Parser.parseSelectSimple(Parser.java:1821)
at org.h2.command.Parser.parseSelectSub(Parser.java:1707)
at org.h2.command.Parser.parseSelectUnion(Parser.java:1550)
at org.h2.command.Parser.parseSelect(Parser.java:1538)
at org.h2.command.Parser.parsePrepared(Parser.java:405)
at org.h2.command.Parser.parse(Parser.java:279)
at org.h2.command.Parser.parse(Parser.java:251)
at org.h2.command.Parser.prepareCommand(Parser.java:218)
at org.h2.engine.Session.prepareLocal(Session.java:428)
at org.h2.engine.Session.prepareCommand(Session.java:377)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1138)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:72)
at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:178) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:92) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:84) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:196) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:522) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_05]
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474) [wildfly-security-manager-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_05]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_05]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]
I'am use a hibernate as JPA (hibernate-core-4.3.6). And i think that this problem with different version of Postgresql 9.2 and 9.3 Can anybody explain me how to change hibernate dialect at 9.2 Postgres version or change postgresql library module on openshift?
I just changed the hibernate property hibernate.hbm2ddl.auto to create. This resolved the issue for me.
Had the same error recently. Please open your wildfly's standalone.xml (or standalone-full.xml or whichever you are using) and find and delete the following fragment:
<default-bindings contextservice="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
Important: Make sure to shut wildfly down before editing, otherwise it will overwrite the changes the next time it shuts down.
You need this property
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
1) check if you are using correct dialect in application.properties
spring.jpa.database-platform
2) and check the value of spring.jpa.hibernate.ddl-auto
spring.jpa.database-platform solved my problem
I saw this exception when I also had an inconsistency with my entity and persistence metamodel classes (e.g. Customer_.java). That inconsistency was also reported by wildfly. It disappeared when I resolved that inconsistencies.