3 Replies Latest reply on Nov 3, 2011 8:14 PM by Udo

    Database connection - couldn't change

    jaggyam
      Hi all,

      This is my first day in APEX.

      I have the oracle apex listerner installed. First time while bringing the listerner up, instead of apex_public_user I gave a different DB user name. Now I want to change it, but it is not allowing me. The fields are non edittable. I used http://localhost:8080/apex/listenerAdmin URL.

      Also when I go to http://localhost:8080/apex and use internal as workspace, ADMIN as the user and enter the password and finally if I click the login button then nothing happens. It niether throws any error nor it navigates to the next screen. Not sure it is due to the first issue mentioned above. Kindly help me to fix this.

      Thanks in advance,
      Jaggyam
        • 1. Re: Database connection - couldn't change
          Udo
          Hi Jaggyam,
          This is my first day in APEX.
          Welcome!
          First time while bringing the listerner up, instead of apex_public_user I gave a different DB user name. Now I want to change it, but it is not allowing me. The fields are non edittable. I used http://localhost:8080/apex/listenerAdmin URL.
          That's correct. You can't change the database parameters while the APEX Listener is running after you've configured the APEX Listener for the first time. However you have two options to change them anyway:
          1. edit the configuration file (stop the listener, edit the apex-config.xml and restart the listener)
          2. delete the configuration file and hence restart the configuration process
          In either situation, you'll have to locate the apex-config.xml . If you use the APEX Listener in standalone mode (i.e., you start the apex.war with java directly), it will be in your ${java.io.tmpdir}, which usually is your users temp (e.g. /tmp on Unix or %TMP%/apex (user profile, local settings, temp) on windows).
          Also when I go to http://localhost:8080/apex and use internal as workspace, ADMIN as the user and enter the password and finally if I click the login button then nothing happens. It niether throws any error nor it navigates to the next screen. Not sure it is due to the first issue mentioned above. Kindly help me to fix this.
          Well, this error might disappear when you use the appropriate database user. Another reason for the white screen could be the fact that you didn't provide the correct directory for the static contents for APEX ("images"). A third cause could be a port conflict if you run the APEX Listener on the same host as your database using the default port, as this default port (TCP 8080) is the same one the HTTP server integrated in the database (XDB HTTP Server) uses as default port.

          -Udo
          • 2. Re: Database connection - couldn't change
            jaggyam
            Hi,

            Thank You!

            I tried deleting the apex-config.xml and restart the listerner. But it is still useing the same and not going to the reconfigure process. So I changed the username/password. Password was encrypted earlier (starting with @) so I replaced that string with actual value. No I could see the changes reflecting in listerner adminscreen. But still I could not login into APEX. Again no error messages and nothing. I am pasting some few lines related to the DB credentials. Kindly let me know your findings.
            <?xml version="1.0" encoding="UTF-8"?>
            
            <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
            -<properties> <comment> Updated: Mon Oct 31 17:55:11 AST 2011 Version: 1.1.3.243.11.40 </comment> <entry key="apex.db.username">apex_public_user</entry> <entry key="apex.db.password">apex_public_user</entry> <entry key="apex.db.connectionType">basic</entry> <entry key="apex.db.hostname">localhost</entry> <entry key="apex.db.port">1522</entry> <entry key="apex.db.sid">orcl</entry>
            *"Another reason for the white screen could be the fact that you didn't provide the correct directory for the static contents for APEX ("images")"*

            I am not getting the white screen I could see the login screen with images. But upon clicking login, it stays in the same page without any error.

            Oracle is running on 1522 port and apex is on 8080. So no port conflict here

            Thank you,
            Jaggyam
            • 3. Re: Database connection - couldn't change
              Udo
              Hi,
              I tried deleting the apex-config.xml and restart the listerner. But it is still useing the same and not going to the reconfigure process.
              Hmm, you should at least be able to run http://localhost:8080/apex/listenerConfigure after you've stopped the APEX Listener, deleted the apex-config.xml and restarted the APEX Listener again. If it doesn't help, try to delete the whole apex-directory in your temp folder.
              Password was encrypted earlier (starting with @) so I replaced that string with actual value.
              If you use the plain text password, you have to let it start with *!* , e.g.
              <entry key="apex.db.password">!newpassword</entry> 
              In that case, the APEX Listener will encrypt it upon the first start. Otherwhise, you'll just get an error on your console.
              Again no error messages and nothing.
              You really should at least get an error on the console if anything went wrong.
              I am pasting some few lines related to the DB credentials. Kindly let me know your findings.
              Are you sure your SID is actually orcl ? This is the default database instance name, but it is different in most cases. Make sure you use the right SID.
              Oracle is running on 1522 port and apex is on 8080. So no port conflict here
              Well, "Oracle" is everything your run. ;)
              But you skipped a point I mentioned above: 1522 is the port your database listener uses for database connections. In addition to that, the database has it's own "internal" web server (the XDB HTTP Server). An that's the service that would use port 8080 per default.
              You can check if that service is actually using that port by logging in to your database as sys / sysdba and run the following query:
              select dbms_xdb.gethttpport from dual;
              If you find out it uses port 8080, and you actually don't need that service, you can disable it as follows
              exec dbms_xdb.sethttpport(0);
              commit;
              Otherwhise, you can either give it a different port than 8080 (using the same command with the target port instead of 0 as parameter) or change the port you use to run your APEX Listener.

              -Udo