5 Replies Latest reply on Aug 26, 2014 12:28 PM by GhanaApexDeveloper

    Issues Installing ORDS With TomCat

    Joe Upshaw

      TomCat 7.0.54

      ORDS 2.0.9

       

      I'm going through the steps in the documentation (Installing Oracle REST Data Services)to install and configure ORDS (which is a pretty simple set of steps). The install (unzip) and configuration went fine without any errors.

       

      TomCat is up and I can reach the front page at http://hostname:8080

       

      I can reach the apex images that were copied into webapps/i. For example, http://hostname:8080/i/oralogo.gif

       

      As instructed, I've copied the ords.war file to the webapps folder in the tomcat directory.

       

      However, when I then try to access the pages http://hostname:8080/ords I get a 404 error page

       

      HTTP Status 404 - /ords


      type Status report

      message /ords

      description The requested resource is not available.


      Apache Tomcat/7.0.54

       

      I know this is vague but, anyone have any ideas what could be wrong?

       

      -Joe

       

       

      Here is a snippet from TomCat's catalina log file (no idea what any of it means).

       

      INFO: Using configuration folder: /var/opt/tomcat-7.0.54/webapps/i/ords/config/ords

      Aug 22, 2014 5:30:19 PM oracle.dbtools.rt.web.SCListener contextInitialized

      SEVERE: Error occurred while injecting: private oracle.dbtools.rt.oauth.bdb.Approvals oracle.dbtools.rt.oauth.builtin.BuiltIns.approvals

      oracle.dbtools.common.service.ServiceLocatorException: Error occurred while injecting: private oracle.dbtools.rt.oauth.bdb.Approvals oracle.dbtools.rt.oauth.builtin.BuiltIns.approvals

              at oracle.dbtools.common.service.Provider.inject(Provider.java:161)

              at oracle.dbtools.common.service.Provider.inject(Provider.java:214)

              at oracle.dbtools.common.service.Provider.activate(Provider.java:43)

              at oracle.dbtools.common.service.Provider.activateIfImmediate(Provider.java:74)

              at oracle.dbtools.common.service.Providers.activateImmediates(Providers.java:20)

              at oracle.dbtools.common.service.ServiceLocator.activateImmediates(ServiceLocator.java:211)

              at oracle.dbtools.rt.web.SCListener.contextInitialized(SCListener.java:92)

              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)

              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)

              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)

              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)

              at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

              at java.util.concurrent.FutureTask.run(FutureTask.java:166)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:722)

      Caused by: oracle.dbtools.common.service.ServiceLocatorException: Error occurred while injecting: protected oracle.dbtools.rt.home.DataStore oracle.dbtools.rt.home.tenants.TenantEntityStorageProviderBase.stor

      e

              at oracle.dbtools.common.service.Provider.inject(Provider.java:161)

              at oracle.dbtools.common.service.Provider.inject(Provider.java:214)

              at oracle.dbtools.common.service.Provider.activate(Provider.java:43)

              at oracle.dbtools.common.service.Provider.match(Provider.java:122)

              at oracle.dbtools.common.service.Providers.match(Providers.java:45)

              at oracle.dbtools.common.service.ServiceLocator.acquireAll(ServiceLocator.java:133)

              at oracle.dbtools.common.service.ServiceLocator.acquire(ServiceLocator.java:111)

              at oracle.dbtools.common.service.Provider.inject(Provider.java:150)

              ... 20 more

      Caused by: oracle.dbtools.common.service.ServiceLocatorException: Exception occurred in activate() method

              at oracle.dbtools.common.service.Provider.activate(Provider.java:63)

              at oracle.dbtools.common.service.Provider.match(Provider.java:122)

              at oracle.dbtools.common.service.Providers.match(Providers.java:45)

              at oracle.dbtools.common.service.ServiceLocator.acquireAll(ServiceLocator.java:133)

              at oracle.dbtools.common.service.ServiceLocator.acquire(ServiceLocator.java:111)

              at oracle.dbtools.common.service.Provider.inject(Provider.java:150)

              ... 27 more

      Caused by: java.lang.IllegalArgumentException: Environment home /var/opt/tomcat-7.0.54/webapps/i/ords/config/ords/bdb/ael-oWBBrd0gwqyoQpIUG_Z6Rw doesn't exist

              at com.sleepycat.je.log.FileManager.<init>(FileManager.java:346)

              at com.sleepycat.je.dbi.EnvironmentImpl.<init>(EnvironmentImpl.java:439)

              at com.sleepycat.je.dbi.EnvironmentImpl.<init>(EnvironmentImpl.java:341)

              at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:181)

              at com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:229)

              at com.sleepycat.je.Environment.<init>(Environment.java:211)

              at com.sleepycat.je.Environment.<init>(Environment.java:165)

              at oracle.dbtools.rt.home.DataStoreHelper.<init>(DataStoreHelper.java:38)

              at oracle.dbtools.rt.home.TransientDataStore.activate(TransientDataStore.java:82)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:601)

              at oracle.dbtools.common.service.__Reflections.invoke(__Reflections.java:85)

              at oracle.dbtools.common.service.Provider.activate(Provider.java:47)

        • 1. Re: Issues Installing ORDS With TomCat
          jariola

          Hi,

           

          I'm not sure what could be problem.

          Check that tomcat user do have read/write privileges to war file and folder where is configuration files.

           

          If you run Tomcat under Java Security Manager, try turn it off.

          Also you could try disable Selinux if it is enabled.

           

          BTW, I think it is not good idea store ords config files under folder where is APEX images

          /var/opt/tomcat-7.0.54/webapps/i/ords/config/ords

           

          Regards,

          Jari

          • 2. Re: Issues Installing ORDS With TomCat
            Joe Upshaw

            Jari,

             

            Can you tell me, in some detail, what users you have employed yourself to get through this installation (assuming you've done it and hopefully on linux)? I suspect there are further prerequisites that are not noted in the install documentation.

             

            What user owned the TomCat installation?

             

            What user owned the APEX files, i.e. images and odrs.war?

             

            Did you create the /i directory under the webapps folder? If so, as what user and with what permissions?

             

            Where did you locate your config files?

             

            Thanks for Replying, BTW. I agree it is probably some silly permissions issue.

             

            -Joe

            • 3. Re: Issues Installing ORDS With TomCat
              jariola

              Hi,

               

              I have previously made Tomcat 6 install to REHL 6.5 and Oracle Linux 6.5 using yum from standard repositories.

              Standard install from repository do not apply Java Security Manager for Tomcat 6 and I have not turn Selinux off.

              Also I did install OpenJDK from repository.

               

              ords.war is located in /var/lib/tomcat/webapps. Owner and group is tomcat. Both tomcat user and group was created when install Tomcat from repository.

              I did create folder /etc/tomcat6/apex and set owner and group to tomcat. Then I did run java -jar ords.war configdir /etc/tomcat6.

              Config files are created using SQL deleloper and then placed to /etc/tomcat6/apex folder.

               

              I have also Install HTTPD to serve APEX static files and connect tomcat using mod_jk.

              I don't think your problem relates to APEX files.

               

              Regards,

              Jari

              • 4. Re: Issues Installing ORDS With TomCat
                D.Vega

                Hi,

                 

                Maybe is user permissions within .war and config dir issue?

                 

                These are the steps I've made to make it work:

                1. I have an isolated user for tomcat, so I've downloaded and unzipped ORDS with this tomcat user, into his home folder.
                2. As suggested by jariola , make a different folder for the config. I made it in the user home
                  $ mkdir /home/tomcateva/apex/config
                  $ /usr/tomcat/jdk1.6.0_27/bin/java -jar ords.war configdir /home/tomcateva/apex/config/

                  18-mar-2014 12:35:08 oracle.dbtools.common.config.cmds.ConfigDir execute
                  INFO: Defina config.dir en /home/tomcateva/apex/config/ en: /home/tomcateva/apex/ords.war
                3. Then, configure the ords
                  $ /usr/tomcat/jdk1.6.0_27/bin/java -jar ords.war setup
                4. Copy the ords.war to the webapps folder
                5. Magic (it should work)



                • 5. Re: Issues Installing ORDS With TomCat
                  GhanaApexDeveloper

                  Hi Joe,

                  Caused by: java.lang.IllegalArgumentException: Environment home /var/opt/tomcat-7.0.54/webapps/i/ords/config/ords/bdb/ael-oWBBrd0gwqyoQpIUG_Z6Rw doesn't exist

                  From your Catalina log file, there seems to be a problem with your ords config files,It seems it might be corrupted,  I suggest you deploy a valid ORDS  war flie check and grant it the appropriate privileges(read/write).

                  Regards,

                  Benjamin.