6 Replies Latest reply on Oct 17, 2017 10:29 AM by Steven Hawkins

    Odata 404

    David Wennemaring Newbie

      Hi,

       

      I try to use Odata with Teiid but I always get the error 404 - Not Found

       

      Wildfly: 10.0.0.final

      Teiid: 9.3.3

       

      I run Teiid in Domain Mode (ha profile) with one master and one slave.

      Both of them have one application server instance.

      Their urls are: teiid1.local and teiid2.local

       

      I deployed a dynamic vdb with the Name: Bike-vdb.xml

       

      I can acces the vdb via this jdbc url:

      jdbc:teiid:Bike@mm://teiid1.local:31000,teiid2.local:31000
      

       

      The URLs I tried are like this:

      http://teiid1.local:8080/odata/Bike/Bikedata
      http://teiid2.local:8080/odata/Bike/Bikedata
      
      http://teiid1.local:8080/odata/Bike/PHOENIX.Bikedata
      ... 
      

       

      I understood that it should work automatically.

      In the folder: "/opt/teiid/modules/system/layers/dv/org/jboss/teiid/main/deployments" are two files.

      1. teiid-olingo-odata4.war

      2. deployments.properties

       

      The .war file doesn't contain any classes.

      What am I missing?

       

      Kind regards,

      David

        • 2. Re: Odata 404
          David Wennemaring Newbie

          I tried the URL, but still get the same error.

           

          In my log file I found this:

          2017-10-16 11:51:03,487 DEBUG [org.teiid.SECURITY] (ServerService Thread Pool -- 28) Socket binding not specified for transport odata; only local access is granted.
          

           

          And in the domain.xml I found this:

          <subsystem xmlns="urn:jboss:domain:teiid:1.1">
                          <policy-decider-module>org.jboss.teiid</policy-decider-module>
                          <resultset-cache infinispan-container="teiid-cache"/>
                          <preparedplan-cache infinispan-container="teiid-cache"/>
                          <distributed-cache jgroups-stack="teiid-cluster"/>
                          <authentication security-domain="teiid-security"/>
                          <transport name="local"/>
                          <transport name="odata"/>
                          <transport name="jdbc" socket-binding="teiid-jdbc" protocol="teiid"/>
                          <transport name="odbc" socket-binding="teiid-odbc" protocol="pg">
                              <ssl mode="disabled"/>
                          </transport>
          ...
          </subsystem>
          
          • 3. Re: Odata 404
            Steven Hawkins Master

            > Socket binding not specified for transport odata; only local access is granted.

             

            Yes that is expected.  The transport being referred to here is the connection the OData 4 layer makes into Teiid - which is through local in-vm connections, not socket connections.

             

            You should see logs such as that confirm the OData 4 layer has started:

             

            [org.jboss.as.server.deployment] (MSC service thread 1-7)  WFLYSRV0027: Starting deployment of "teiid-olingo-odata4.war" (runtime-name: "teiid-olingo-odata4.war")

            [org.wildfly.extension.undertow] (ServerService Thread Pool -- 67)  WFLYUT0021: Registered web context: '/odata4' for server 'default-server'

            [org.jboss.as.server] (ServerService Thread Pool -- 59)  WFLYSRV0010: Deployed "teiid-olingo-odata4.war" (runtime-name : "teiid-olingo-odata4.war")

             

            From there your URLs will start with /odata4/vdbName[.version]/schema

             

            For example /odata4/Bike/BikeData/$metadata

             

            To see all of the entities and functions in the BikeData schema.

             

             

            1 of 1 people found this helpful
            • 4. Re: Odata 404
              David Wennemaring Newbie

              These lines didn't appear in my log-file.

               

              I deployed the teiid-olingo-odata4.war manually and now it is working.

              Thanks alot for your help!

              • 5. Re: Odata 404
                Steven Hawkins Master

                I think this is related to [TEIID-3544] teiid-odata-*.war not deploying in EAP when using domain - JBoss Issue Tracker

                 

                It looks like that was resolved only for a product release.  We need to have the odata4 war deployed with the community domain mode install as well.

                • 6. Re: Odata 404
                  Steven Hawkins Master

                  We'll make sure that the odata4 war is deployed in domain mode with the next set of releases: [TEIID-5107] teiid-olingo-*.war not deploying in wildfly when using domain - JBoss Issue Tracker