Open x-iceman opened 5 years ago
resolved when i have specified datasource and dialect as option -D as following java -Dorg.kie.server.location=http://localhost:8180/rest/server -Dorg.kie.server.persistence.ds=java:jboss/datasources/MyDS -Dorg.kie.server.persistence.dialect=org.hibernate.dialect.MySQL5Dialect -Dswarm.port.offset=100 -jar target/itorders-web-1.0.0-swarm.jar
hi mswiderski thank y for the jbpm exemple but after setting mysql datasource in the main of KieServerMain class as following :
String driverModule = "com.mysql"; String MYSQL_OPTIONS = "autoReconnect=true&useSSL=false&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"; container.fraction(new DatasourcesFraction() .jdbcDriver("mysql", (d) -> { d.driverClassName("com.mysql.jdbc.Driver"); d.xaDatasourceClass("com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"); d.driverModuleName("com.mysql"); }) .dataSource("MyDS", (ds) -> { ds.driverName("mysql"); ds.connectionUrl("jdbc:mysql://localhost:3306/test?" + MYSQL_OPTIONS); ds.userName("root"); ds.password("root"); }) );
when starting wildfly-swarm with : java -Dorg.kie.server.location=http://localhost:8180/rest/server -Dswarm.port.offset=100 -jar target/itorders-web-1.0.0-swarm.jarthe following exception is thrown
2019-04-10 18:54:23,347 ERROR [org.kie.server.services.impl.KieServerImpl] (ServerService Thread Pool -- 24) Error when initializing server extension of type jBPM KIE Server extension: java.lang.RuntimeException: Unable to create EntityManagerFactory due to Unable to find jta data source under name java:jboss/datasources/ExampleDS