{"id":5407,"date":"2023-03-27T10:57:07","date_gmt":"2023-03-27T08:57:07","guid":{"rendered":"https:\/\/gpmfactory.com\/?p=5407"},"modified":"2023-03-27T10:57:07","modified_gmt":"2023-03-27T08:57:07","slug":"setting-ords-config-path-when-deploying-on-tomcat","status":"publish","type":"post","link":"https:\/\/gpmfactory.com\/index.php\/2023\/03\/27\/setting-ords-config-path-when-deploying-on-tomcat\/","title":{"rendered":"Setting ORDS config path when deploying on Tomcat"},"content":{"rendered":"\n<p>From the 22.x version of ORDS, ords.war file must be generated in order to include the configuration directory path.<\/p>\n\n\n\n<p>The command is:<br><code>ords war &lt;NEW_ORDS.WAR_NAME> (ie: ords war ords_new.war)<\/code><\/p>\n\n\n\n<p>Before, I set the ORDS_CONFIG environement variable. In my case:<br><code>export ORDS_CONFIG=\/opt\/ords\/conf<\/code><\/p>\n\n\n\n<p>When deploying on Tomcat, it should retrieve the path but in my case, it doesn&rsquo;t. I get a 404.<\/p>\n\n\n\n<p>I mean, the behaviour is the same with the original ords.war file or the new one after rebuilding.<\/p>\n\n\n\n<p>So, a possible way is to pass the path url to Java runtime when starting Tomcat.<\/p>\n\n\n\n<p>Add a new file named exactly : <code>setenv.sh<\/code> in tomcat_home \/bin<\/p>\n\n\n\n<p>In this file, add:<\/p>\n\n\n\n<p><code>export ORDS_CONFIG=\/opt\/ords\/conf<br>export JAVA_OPTS=\"-Dconfig.url=${ORDS_CONFIG} -Xms1024M -Xmx1024M\"<\/code><\/p>\n\n\n\n<p>Then, shutdown Tomcat and restart it.<\/p>\n\n\n\n<p>For <a href=\"https:\/\/www.javasavvy.com\/start-tomcat-boot-linux\/\" data-type=\"URL\" data-id=\"https:\/\/www.javasavvy.com\/start-tomcat-boot-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">automatic starting follow this link<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From the 22.x version of ORDS, ords.war file must be generated in order to include the configuration directory path. The command is:ords war &lt;NEW_ORDS.WAR_NAME>&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"ppma_author":[150],"class_list":["post-5407","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"authors":[{"term_id":150,"user_id":1,"is_guest":0,"slug":"admin8700","display_name":"Patrick","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/209d5ed69b74d288390621ab4c1d3773?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/comments?post=5407"}],"version-history":[{"count":3,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5407\/revisions"}],"predecessor-version":[{"id":5410,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5407\/revisions\/5410"}],"wp:attachment":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/media?parent=5407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/categories?post=5407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/tags?post=5407"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/ppma_author?post=5407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}