[JBoss JIRA] (WFLY-9610) Start of a BatchJob is called, but BatchJob is seems no started. Absent entries in DB tables step_execution, job_execution
by Serg Pol (JIRA)
Serg Pol created WFLY-9610:
------------------------------
Summary: Start of a BatchJob is called, but BatchJob is seems no started. Absent entries in DB tables step_execution, job_execution
Key: WFLY-9610
URL: https://issues.jboss.org/browse/WFLY-9610
Project: WildFly
Issue Type: Bug
Components: Batch, Clustering
Affects Versions: 9.0.1.Final
Environment: Cluster, standalone-full-ha
Reporter: Serg Pol
Assignee: Cheng Fang
Start of a BatchJob is called and record/entry is absent sometimes in DB table "step_execution" as well as Endtime and Exitstatus in the table job_execution (there is just info about start of BatchJob).
There are no any error nessages.
BatchJob is not started in this case according Log.
Any idea? Thanks
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (DROOLS-2170) Unhelful error message: "Unknown property" should not only mention the name of the property, but also the class on which it is expecting it (and the DRL line causing it)
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2170?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-2170:
--------------------------------
Sprint: 2017 Week 49-50
> Unhelful error message: "Unknown property" should not only mention the name of the property, but also the class on which it is expecting it (and the DRL line causing it)
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-2170
> URL: https://issues.jboss.org/browse/DROOLS-2170
> Project: Drools
> Issue Type: Enhancement
> Components: core engine
> Affects Versions: 7.5.0.Final
> Reporter: Geoffrey De Smet
> Assignee: Mario Fusco
>
> I had no idea which class file it's expecting the room property on in this error message.
> I 'll needed to look for a needle in a haystack:
> {code}
> Caused by: java.lang.RuntimeException: Unknown property: room
> at org.drools.core.reteoo.PropertySpecificUtil.setPropertyOnMask(PropertySpecificUtil.java:105)
> at org.drools.core.reteoo.PropertySpecificUtil.calculatePatternMask(PropertySpecificUtil.java:97)
> at org.drools.core.reteoo.PropertySpecificUtil.calculatePositiveMask(PropertySpecificUtil.java:68)
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:327)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:1545)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.update(DroolsScoreDirector.java:210)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.afterVariableChanged(DroolsScoreDirector.java:197)
> at org.optaplanner.core.impl.heuristic.selector.move.generic.ChangeMove.doMoveOnGenuineVariables(ChangeMove.java:78)
> at org.optaplanner.core.impl.heuristic.move.AbstractMove.doMove(AbstractMove.java:37)
> at org.optaplanner.core.impl.heuristic.move.AbstractMove.doMove(AbstractMove.java:27)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.doMove(ConstructionHeuristicDecider.java:124)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.decideNextStep(ConstructionHeuristicDecider.java:99)
> at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:74)
> at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:87)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:167)
> at org.optaplanner.examples.common.business.SolutionBusiness.solve(SolutionBusiness.java:329)
> at org.optaplanner.examples.common.swingui.SolverAndPersistenceFrame$SolveWorker.doInBackground(SolverAndPersistenceFrame.java:324)
> at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at javax.swing.SwingWorker.run(SwingWorker.java:334)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Reproduce recipe:
> - take meeting scheduling example in optaplanner-examplse
> - remove getters and setters for room in MeetingAssignment.java
> - remove all rules in the drl (to avoid it crashing on something else sooner), especially those that involve the room.
> - the error occurs when DroolsScoreDirector.update(meetingAssignment, "room") is called
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (WFLY-9585) Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
by Shing Lam (JIRA)
[ https://issues.jboss.org/browse/WFLY-9585?page=com.atlassian.jira.plugin.... ]
Shing Lam edited comment on WFLY-9585 at 12/12/17 3:18 AM:
-----------------------------------------------------------
I have trimmed down the essential minimum of our project to illustrate the issue. Please use the ear (27 kB) and source code (jboss-lookup.zip 41 kB), the older ones are obsolete.
we have a datasource to standalone.xml
{code:xml}
<datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
{code}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
{code}
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>
{code}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection as there is no default datasource, but in wildfly-10, it get always wired to the default datasource, instead of following the dd.
was (Author: lam_shing):
I have trimmed down the essential minimum of our project to illustrate the issue. Please use the ear (27 kB) and source code (jboss-lookup.zip 41 kB), the older ones are obsolete.
we have a datasource to standalone.xml
{code:xml}
<datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
{code}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
{code}
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>
{code}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection.
> Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
> ----------------------------------------------------------
>
> Key: WFLY-9585
> URL: https://issues.jboss.org/browse/WFLY-9585
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.1.0.Final
> Environment: Wilfly-10.1.0.Final with jdk-1.8.0_31 under Red Hat Enterprise Linux Server release 5.11 (Tikanga)
> Reporter: Shing Lam
> Assignee: Tomasz Adamski
> Labels: Wildfly-10.0.0.Final, datasource, default, jboss-ejb3.xml, lookup-name, resource-ref
> Attachments: jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBosslookup.zip, jboss-lookup.zip
>
>
> We have a ear that use a datasource that is injected. The application runs normally in Jboss EAP 6.4, with the correct datasource being used. But when deployed to Wildfly-10.1.0_Final, instead of the datasource specified in the jboss-ejb3.xml, the default datasource is alway injected.
> We have in the ejb-jar.xml
> {code:xml}
> <enterprise-beans>
> <session>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> <persistence-context-ref>
> <persistence-context-ref-name>persistence/RMEntityManager</persistence-context-ref-name>
> </persistence-context-ref>
> </session>
> {code}
> and in jboss-ejb3.xml
> {code:xml}
> <jboss:enterprise-beans>
> <jboss:ejb>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <lookup-name>java:jboss/jdbc/RMDataSource</lookup-name>
> </resource-ref>
> </jboss:ejb>
> {code}
> the datasource java:jboss/jdbc/RMDataSource got injected into the EJB under JBoss EAP 6.4.
> But in WildFly 10.1, the default datasource java:jboss/datasources/ExampleDS was injected, causing "org.h2.jdbc.JdbcSQLException: Table "XXX" not found;"
> If we set the default datasource to java:jboss/jdbc/RMDataSource, java:jboss/jdbc/RMDataSource jot injected into the EJB.
> Seems like the jboss-ejb3.xml has no effect on WildFly 10.1, the default datasource is always used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (WFLY-9585) Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
by Shing Lam (JIRA)
[ https://issues.jboss.org/browse/WFLY-9585?page=com.atlassian.jira.plugin.... ]
Shing Lam edited comment on WFLY-9585 at 12/12/17 3:16 AM:
-----------------------------------------------------------
I have trimmed down the essential minimum of our project to illustrate the issue. Please use the ear (27 kB) and source code (jboss-lookup.zip 41 kB), the older ones are obsolete.
we have a datasource to standalone.xml
{code:xml}
<datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
{code}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
{code}
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>
{code}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection.
was (Author: lam_shing):
I have trimmed down the essential minimum of our project to illustrate the issue. Please use the ear (27 kB) and source code (jboss-lookup.zip 41 kB), the older ones are obsolete.
we have a datasource to standalone.xml
{code:xml}
<datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
{code}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
{code}
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>
{code}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection.
> Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
> ----------------------------------------------------------
>
> Key: WFLY-9585
> URL: https://issues.jboss.org/browse/WFLY-9585
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.1.0.Final
> Environment: Wilfly-10.1.0.Final with jdk-1.8.0_31 under Red Hat Enterprise Linux Server release 5.11 (Tikanga)
> Reporter: Shing Lam
> Assignee: Tomasz Adamski
> Labels: Wildfly-10.0.0.Final, datasource, default, jboss-ejb3.xml, lookup-name, resource-ref
> Attachments: jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBosslookup.zip, jboss-lookup.zip
>
>
> We have a ear that use a datasource that is injected. The application runs normally in Jboss EAP 6.4, with the correct datasource being used. But when deployed to Wildfly-10.1.0_Final, instead of the datasource specified in the jboss-ejb3.xml, the default datasource is alway injected.
> We have in the ejb-jar.xml
> {code:xml}
> <enterprise-beans>
> <session>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> <persistence-context-ref>
> <persistence-context-ref-name>persistence/RMEntityManager</persistence-context-ref-name>
> </persistence-context-ref>
> </session>
> {code}
> and in jboss-ejb3.xml
> {code:xml}
> <jboss:enterprise-beans>
> <jboss:ejb>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <lookup-name>java:jboss/jdbc/RMDataSource</lookup-name>
> </resource-ref>
> </jboss:ejb>
> {code}
> the datasource java:jboss/jdbc/RMDataSource got injected into the EJB under JBoss EAP 6.4.
> But in WildFly 10.1, the default datasource java:jboss/datasources/ExampleDS was injected, causing "org.h2.jdbc.JdbcSQLException: Table "XXX" not found;"
> If we set the default datasource to java:jboss/jdbc/RMDataSource, java:jboss/jdbc/RMDataSource jot injected into the EJB.
> Seems like the jboss-ejb3.xml has no effect on WildFly 10.1, the default datasource is always used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (WFLY-9585) Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
by Shing Lam (JIRA)
[ https://issues.jboss.org/browse/WFLY-9585?page=com.atlassian.jira.plugin.... ]
Shing Lam edited comment on WFLY-9585 at 12/12/17 3:13 AM:
-----------------------------------------------------------
I have trimmed down the essential minimum of our project to illustrate the issue. Please use the ear (27 kB) and source code (jboss-lookup.zip 41 kB), the older ones are obsolete.
we have a datasource to standalone.xml
{code:xml}
<datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
{code}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
{code}
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{code:xml}
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>
{code}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection.
was (Author: lam_shing):
I have trimmed down the essential minimum of our project to illustrate the issue. Please use the ear (27 kB) and source code (jboss-lookup.zip 41 kB), the older ones are obsolete.
we have a datasource to standalone.xml
{{ <datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>}}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{{ <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>}}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection.
> Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
> ----------------------------------------------------------
>
> Key: WFLY-9585
> URL: https://issues.jboss.org/browse/WFLY-9585
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.1.0.Final
> Environment: Wilfly-10.1.0.Final with jdk-1.8.0_31 under Red Hat Enterprise Linux Server release 5.11 (Tikanga)
> Reporter: Shing Lam
> Assignee: Tomasz Adamski
> Labels: Wildfly-10.0.0.Final, datasource, default, jboss-ejb3.xml, lookup-name, resource-ref
> Attachments: jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBosslookup.zip, jboss-lookup.zip
>
>
> We have a ear that use a datasource that is injected. The application runs normally in Jboss EAP 6.4, with the correct datasource being used. But when deployed to Wildfly-10.1.0_Final, instead of the datasource specified in the jboss-ejb3.xml, the default datasource is alway injected.
> We have in the ejb-jar.xml
> {code:xml}
> <enterprise-beans>
> <session>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> <persistence-context-ref>
> <persistence-context-ref-name>persistence/RMEntityManager</persistence-context-ref-name>
> </persistence-context-ref>
> </session>
> {code}
> and in jboss-ejb3.xml
> {code:xml}
> <jboss:enterprise-beans>
> <jboss:ejb>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <lookup-name>java:jboss/jdbc/RMDataSource</lookup-name>
> </resource-ref>
> </jboss:ejb>
> {code}
> the datasource java:jboss/jdbc/RMDataSource got injected into the EJB under JBoss EAP 6.4.
> But in WildFly 10.1, the default datasource java:jboss/datasources/ExampleDS was injected, causing "org.h2.jdbc.JdbcSQLException: Table "XXX" not found;"
> If we set the default datasource to java:jboss/jdbc/RMDataSource, java:jboss/jdbc/RMDataSource jot injected into the EJB.
> Seems like the jboss-ejb3.xml has no effect on WildFly 10.1, the default datasource is always used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (WFLY-9585) Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
by Shing Lam (JIRA)
[ https://issues.jboss.org/browse/WFLY-9585?page=com.atlassian.jira.plugin.... ]
Shing Lam edited comment on WFLY-9585 at 12/12/17 3:11 AM:
-----------------------------------------------------------
I have trimmed down the essential minimum of our project to illustrate the issue. Please use the ear (27 kB) and source code (jboss-lookup.zip 42 kB), the older ones are obsolete.
we have a datasource to standalone.xml
{{ <datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>}}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{{ <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>}}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection.
was (Author: lam_shing):
I have trimmed down the essential minimum of our project to illustrate the issue.
we have a datasource to standalone.xml
{{ <datasource jta="true" jndi-name="java:jboss/jdbc/RMDataSource" pool-name="RMDataSource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://host:3306/schema?useUnicode=true&amp;characterEncoding=utf8</connection-url>
<driver>com.mysql</driver>
<security>
<security-domain>encrypted-mysqlds-rm_uat</security-domain>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>}}
If you deploy the ear to Wildfly-10, and point the broswer to http://localhost:8080/lookup/, and click the "get Connection Class", you'll see "com.mysql.jdbc.JDBC4Connection".
For Wildfly-10.1,if the default datasource is set to java:jboss/jdbc/RMDataSource, you'll get com.mysql.jdbc.JDBC4Connection.
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/RMDataSource" jms-connection-factory="java:/JmsXA" 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"/>
if default datasource is set to java:jboss/datasources/ExampleDS, you'll get org.h2.jdbc.JdbcConnection.
standalone.xml
{{ <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:/JmsXA" 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"/>}}
In JBoss EAP 6.4, you always get com.mysql.jdbc.JDBC4Connection.
> Wildfly 10 ignores jboss-ejb3.xml resource-ref lookup-name
> ----------------------------------------------------------
>
> Key: WFLY-9585
> URL: https://issues.jboss.org/browse/WFLY-9585
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.1.0.Final
> Environment: Wilfly-10.1.0.Final with jdk-1.8.0_31 under Red Hat Enterprise Linux Server release 5.11 (Tikanga)
> Reporter: Shing Lam
> Assignee: Tomasz Adamski
> Labels: Wildfly-10.0.0.Final, datasource, default, jboss-ejb3.xml, lookup-name, resource-ref
> Attachments: jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBossLookup-ear-0.0.1-SNAPSHOT.ear, jBosslookup.zip, jboss-lookup.zip
>
>
> We have a ear that use a datasource that is injected. The application runs normally in Jboss EAP 6.4, with the correct datasource being used. But when deployed to Wildfly-10.1.0_Final, instead of the datasource specified in the jboss-ejb3.xml, the default datasource is alway injected.
> We have in the ejb-jar.xml
> {code:xml}
> <enterprise-beans>
> <session>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> <persistence-context-ref>
> <persistence-context-ref-name>persistence/RMEntityManager</persistence-context-ref-name>
> </persistence-context-ref>
> </session>
> {code}
> and in jboss-ejb3.xml
> {code:xml}
> <jboss:enterprise-beans>
> <jboss:ejb>
> <ejb-name>BackgroundRecoverySessionEJB</ejb-name>
> <resource-ref>
> <res-ref-name>jdbc/RMDataSource</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <lookup-name>java:jboss/jdbc/RMDataSource</lookup-name>
> </resource-ref>
> </jboss:ejb>
> {code}
> the datasource java:jboss/jdbc/RMDataSource got injected into the EJB under JBoss EAP 6.4.
> But in WildFly 10.1, the default datasource java:jboss/datasources/ExampleDS was injected, causing "org.h2.jdbc.JdbcSQLException: Table "XXX" not found;"
> If we set the default datasource to java:jboss/jdbc/RMDataSource, java:jboss/jdbc/RMDataSource jot injected into the EJB.
> Seems like the jboss-ejb3.xml has no effect on WildFly 10.1, the default datasource is always used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months