1 2 Previous Next 20 Replies Latest reply on Dec 12, 2011 5:13 PM by 904843

    apache tomcat with apex listener?

    Allen Sandiego
      hi guys,

      is it possible? how do i configure it? can someone point me to some guides.

        • 1. Re: apache tomcat with apex listener?
          It isn't officially supported, but of course the APEX Listener works with Tomcat. Deploy the apex.war file that you will find in the .zio file that you download - the way that you would deploy any .war. One way is to create a subdirectory (normally named "apex") in your $CATALINA_HOME/webapps directory and unzip apex.war there. If you are going to use APEX, you will also want to copy the contents of the APEX images directory to a directory named "i' under $CATALINA_HOME/webapps. You'll find that with your APEX installation materials.

          Then you will need one or more users with the Manager and Admin roles. If you are using Tomcat's default file-based authentication you can add the following lines to $CATALINA_HOME/conf/tomcat-users.xml:
          <role rolename="Manager" />
          <role rolename="Admin" />
          <user username="apexManager" password="secret" roles="Manager" />
          <user username="apexAdmin" password="secret" roles="Admin" />
          Startup Tomcat and you should be able to follow the configuration directions in the manual from there.
          • 2. Re: apache tomcat with apex listener?
            Allen Sandiego
            thanks a lot for you help.

            i would like to ask also if there are any issues running apex listener with apache? will apex applications run similarly to when using mod_plsql?

            • 3. Re: apache tomcat with apex listener?
              Do a search in this forum, and you will find several discussions about the limitations of the APEX Listener, and differences from mod_plsql. In short, you shouldn't have any trouble running most APEX applications, but you may find some problems with some non-APEX Web PL/SQL applications.
              • 4. Re: apache tomcat with apex listener?
                I'd rather create the images-directory in the ROOT -context of your webapps, not directly inside the webapps, as the static files are no "classic" webapp.

                In addition, I recommend to configure the Connector in +$CATALINA_HOME/conf/server.xml+ as follows
                                <Connector port="8080" protocol="HTTP/1.1"
                                        redirectPort="8443" />
                where the ports may be changed to fit your environment. The relevant parameters are connectionTimeout and maxHttpHeaderSize.

                There are often always problems concerning the character encoding on Tomcat. To solve this, follow the instructions given in this message: {message:id=3847395}
                As you see, there is another parameter for the Connector ( URIEncoding="UTF-8" ) to be set up. But you need to change the apex.war or your deployment first to make this work. We use a patched version of the war file containing the classes and appropriate entries in the web.xml .


                Edited by: Udo on 11.02.2011 15:28
                1 person found this helpful
                • 5. Re: apache tomcat with apex listener?
                  Allen Sandiego
                  thank you for your effort.

                  i'm also looking at glassfish as well as it seems that a lot of people have used it for apex instead of apache. and just found out recently that its free as well which was one of the main reasons why tried apache. =)
                  • 6. Re: apache tomcat with apex listener?
                    Hello Allen,

                    of course you can also use the GlassFish OpenSource Edition. We started using Tomcat because there was an existing development and production environment for that plattform, but I guess it's easier to use a supported (or similar-to-supported) plattform.
                    If your question is answered, could you please mark your post accordingly and if applicable, mark helpful and/or correct answers to make it easier for other users to find the relevant posts.


                    • 7. Re: apache tomcat with apex listener?
                      Dear jflack,

                      i am searching for apex listener with tomcat and found your answers.
                      I have tried to do so as described in your thread, but it do not work.

                      I have followed your description to add roles and users in tomcat-users.xml

                      But after deploying the standard apex.war the tomcat web services do not start.
                      There is an error message in catalina.log which shows this:

                      INFO: Deploying web application directory apex
                      14.02.2011 20:43:31 org.apache.tomcat.util.digester.Digester getParser
                      SCHWERWIEGEND: Digester.getParser:
                      javax.xml.parsers.ParserConfigurationException: The XDK supports only namespace-aware parsers.

                      Could you help with this issue ?

                      Thanks for response.


                      • 8. Re: apache tomcat with apex listener?
                        Hello Frank,

                        the deployment itself should run without any issue, even if you haven't set up any role or changed anything ceoncering the Connector configuration.
                        Which Java version is your Tomcat running on? It is usually part of the output when you start the service.
                        APEX Listener needs at least a JDK 1.6.0_20.
                        And which Tomcat version are you using? I'd recommend at least Tomcat 6. Even if you might make it work in lower versions, you'll probably face problems in production due to outdated libraries, e.g. the servlet implementation.

                        • 9. Re: apache tomcat with apex listener?
                          Hallo Udo,

                          these are the infos:
                          Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture
                          Apache Tomcat/7.0.8 1.6.0_21-b07 Sun Microsystems Inc. Windows 2003 5.2 x86

                          After deploying the apex.war it seem to word, but after restart of the tomcat i get this error message during start and the tomcat is not working.

                          • 10. Re: apache tomcat with apex listener?
                            Okay, so outdated support infrastructure is not the reason.
                            That leaves two other options:
                            - You have conflicting library versions in your Tomcat. Do you have other applications despite the ones shipped with the Tomcat and the APEX Listener deployed on your Tomcat?
                            - You have an error in your configuration, e.g. some unclosed tag or other XML error.

                            If you have other applications and they were running fine before you deployed the Listener onto your Tomcat, I'd start searching for the second option.

                            • 11. Re: apache tomcat with apex listener?
                              Hi Udo,

                              no, no other applications are installed.
                              If i remove the apex listener, i have the standard applications in the tomcat manager.


                              I have only changed the tomcat-users.xml as described in the thread, so Admin and Manager for the apex user is placed in.

                              After deploying the apex.war the apexlistener is working until restart tomcat.
                              Then the error is shown as described above.

                              • 12. Re: apache tomcat with apex listener?

                                if you only changed the tomcat-users.xml and no other xml (e.g. web.xml of the APEX Listener) that file probably has some typo or other problem in it.

                                • 13. Re: apache tomcat with apex listener?
                                  Hi Udo,

                                  i have checked the .jar files in the apex folder and have removed two ones. Both with an other parser than they came with tomcat.
                                  Now the apex is started and start again after restart the tomcat.

                                  But there is now another problem.
                                  I have copied the image files (i) and my images for the application (myimages) into the ROOT folder of tomcat.
                                  Everything now works but the display is wrong for the CSS design of the application. The apex design is correct with the images in folder i,
                                  but the application design appears something wrong. Not all buttons and colours will display correct.

                                  Do you have any idea for this ?

                                  Sorry, i have found the solution. Some of the files i.e. gif and css were written with capitol letters, so the new apex listener or tomcat couldn't find.

                                  Thank you


                                  Edited by: handwerk.net on 16.02.2011 13:58
                                  • 14. Re: apache tomcat with apex listener?
                                    I've noticed that you can have image problems with APEX if the images aren't the ones that go with your version of APEX. For instance, I had APEX 4.0 installed in my database, but my images were the ones that came with APEX 3.1. (this was with a mod_plsql listener, not the APEX listener). Some things looked right, and other things didn't. I got the contents of /images from the APEX 4.0 installation, and that cleared up the problem.
                                    1 2 Previous Next