5 Replies Latest reply on Apr 14, 2017 3:45 PM by Tomaz Cerar

    WildFly 8 RC1 DefaultDataSource doesn't work

    Guido Granobles Newbie

      The EE specification says this:

       

      "The Java EE Product Provider must make the default data source  accessible to the application under the JNDI name  java:comp/DefaultDataSource."

       

      But I am trying to deploy my app on RC1 but I got this error:

      Incompatible conflicting binding at java:/jboss/datasources/DefaultDataSource source: lookup (java:comp/DefaultDataSource)

      But if I change my datasource like this java:comp/DefaultDataSource I got an error telling me that datasources in JBoss must start with java:/jboss/. So I'm stuck with this problem.

       

      Some one else have had this problem ?

        • 1. Re: WildFly 8 RC1 DefaultDataSource doesn't work
          Scott Marlow Master

          Can you show us the entire deployment error for the "Incompatible conflicting binding" error (including the exception call stack)?

           

          Can you also show us a code example that experiences this problem.

          • 2. Re: WildFly 8 RC1 DefaultDataSource doesn't work
            James Livingston Apprentice

            Guido Granobles wrote:

             

            But if I change my datasource like this java:comp/DefaultDataSource I got an error telling me that datasources in JBoss must start with java:/jboss/. So I'm stuck with this problem.

            You can't globally bind the datasource to java:comp, since that's the EE component namespace - if that's what you were trying to do.

             

            As Scott said, the error stack trace and some details would be helpful for the original problem.

            • 3. Re: WildFly 8 RC1 DefaultDataSource doesn't work
              Jason Greene Master


              The default datasource is an alias to a normal jboss configured datasource. Look at the ee subsystem in your standalone.xml, you can just point it to the datasource of your choice.

              • 4. Re: WildFly 8 RC1 DefaultDataSource doesn't work
                Jesline Dias Jevigeorge Newbie

                Hey Jason,

                            Can you be a little detailed on what you are referring to in the ee subsystem ? I am using EAP 7 and my ee subsystem looks like this.

                 

                <subsystem xmlns="urn:jboss:domain:ee:4.0">

                            <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>

                            <concurrent>

                                <context-services>

                                    <context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>

                                </context-services>

                                <managed-thread-factories>

                                    <managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>

                                </managed-thread-factories>

                                <managed-executor-services>

                                    <managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/>

                                </managed-executor-services>

                                <managed-scheduled-executor-services>

                                    <managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" keepalive-time="3000"/>

                                </managed-scheduled-executor-services>

                            </concurrent>

                            <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" 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"/>

                        </subsystem>

                 

                 

                What should i be changing in this to get this going ?

                • 5. Re: WildFly 8 RC1 DefaultDataSource doesn't work
                  Tomaz Cerar Master

                  Jesline Dias Jevigeorge wrote:

                   

                  Hey Jason,

                  Can you be a little detailed on what you are referring to in the ee subsystem ? I am using EAP 7 and my ee subsystem looks like this.

                   

                  <subsystem xmlns="urn:jboss:domain:ee:4.0">

                  ....

                  <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" 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"/>

                   

                  ....

                  </subsystem>

                   

                   

                  What should i be changing in this to get this going ?