This discussion is archived
11 Replies Latest reply: Dec 31, 2012 7:51 AM by Nattu RSS

Apex Listener Configuration Issue.

Nattu Explorer
Currently Being Moderated
Hi there,

As I wanted to try the latest Restful services in apex 4.2, I decided to install Apex Listener 2.0. I downloaded the file and followed the steps as in the installation notes. As a pre-requisite, I configured the Restful services successfully in apex 4.2 along with Oracle 11g Express Edition. However, the installation of listener seems to be not compleated successfully with the following installation feed back.
D:\software\apex_listener>java -jar apex.war
This Listener instance has not yet been configured.
Please complete the following prompts

Enter the location to store configuration data:d:\apexlistnerconf
Dec 27, 2012 3:34:47 PM oracle.dbtools.common.config.cmds.ConfigDir execute
INFO: Set config.dir to d:\apexlistnerconf in: D:\software\apex_listener\apex.war
Dec 27, 2012 3:34:49 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: D:\apexlistnerconf\apex
Enter the name of the database server [localhost]:
Enter the database listen port [1521]:
Enter 1 to specify the database service name, or 2 to specify the database SID [1]:2
Enter the database SID [xe]:
Enter the database user name [APEX_PUBLIC_USER]:
Enter the database password for APEX_PUBLIC_USER:
Password must not be empty
Enter the database password for APEX_PUBLIC_USER:
Confirm password:
Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:3
Dec 27, 2012 3:37:03 PM oracle.dbtools.common.config.file.ConfigurationFiles update
INFO: Updated configurations: defaults, apex
Enter 1 if you wish to start in standalone mode or 2 to exit [1]:
Enter the APEX static resources location or Enter to skip:D:\software\apex42en\apex\images
Enter the HTTP port [8080]:
Dec 27, 2012 3:41:17 PM oracle.dbtools.standalone.Standalone execute
INFO: NOTE:

Standalone mode is designed for use in development and test environments. It isnot supported for use in production environments.

Dec 27, 2012 3:41:17 PM oracle.dbtools.standalone.Standalone execute
INFO: Starting standalone Web Container in:  d:\apexlistnerconf\apex
Dec 27, 2012 3:41:17 PM oracle.dbtools.standalone.Deployer deploy
INFO: Will deploy application path = d:\apexlistnerconf\apex\apex\WEB-INF\web.xml
Dec 27, 2012 3:41:17 PM oracle.dbtools.standalone.Deployer deploy
INFO: Deployed application path = d:\apexlistnerconf\apex\apex\WEB-INF\web.xml
Dec 27, 2012 3:41:18 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: D:\apexlistnerconf\apex
Default Database connection not configured properly
Dec 27, 2012 3:41:20 PM oracle.dbtools.rt.web.SCListener contextInitialized
INFO: Oracle Application Express Listener initialized
Application Express Listener version : 2.0.0.354.17.06
Application Express Listener server info: Grizzly/1.9.49

Dec 27, 2012 3:41:20 PM com.sun.grizzly.Controller logVersion
INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.49 - 12/27/12 3:41 PM
Dec 27, 2012 3:41:20 PM com.sun.grizzly.SelectorHandlerRunner handleSelectException
SEVERE: doSelect IOException
java.net.BindException: No free port within range: 8080=com.sun.grizzly.http.SelectorThreadHandler@480d41f3
        at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
        at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
        at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
        at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Dec 27, 2012 3:41:20 PM com.sun.grizzly.http.SelectorThread$3 onException
SEVERE: Exception during starting the controller
java.net.BindException: No free port within range: 8080=com.sun.grizzly.http.SelectorThreadHandler@480d41f3
        at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
        at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
        at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
        at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
java.net.BindException: No free port within range: 8080=com.sun.grizzly.http.SelectorThreadHandler@480d41f3
        at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
        at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
        at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
        at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Dec 27, 2012 3:41:20 PM oracle.dbtools.standalone.Standalone execute
INFO: http://localhost:8080/apex started.
It simply hangs at the last line and I couldn't make any further progress.

Can you please help to find out what went wrong?

Thanks in advance.

Regards,

Natarajan
  • 1. Re: Apex Listener Configuration Issue.
    Prabodh Guru
    Currently Being Moderated
    Hi Nattu,
    Here is the error.
    >
    Dec 27, 2012 3:41:20 PM com.sun.grizzly.SelectorHandlerRunner handleSelectException
    SEVERE: doSelect IOException
    java.net.BindException: No free port within range: 8080=com.sun.grizzly.http.SelectorThreadHandler@480d41f3
    >
    Its a port conflict. The 11g XE EPG is using 8080 so the apexlistener cannot use the same port.
    Try 8585 for Apexlistener.
    If you want to use 8080 then disable EPG by connecting to the instance with SQLPlus as SYSDBA and running the following commands
    SQL>EXEC DBMS_XDB.SETHTTPPORT(0);
    SQL>COMMIT;
    Then start ApexListener on 8080
    Cheers,
  • 2. Re: Apex Listener Configuration Issue.
    Nattu Explorer
    Currently Being Moderated
    Thank you Probodh for your quick help. I set the port 8080 to apex listener and it does not give that error now.

    However, it still says "Default Database Connection not configured properly"

    I gave the SID name as xe which is the default one, and that is the correct SID for my DB also.

    Any possible mistakes in there?
    D:\software\apex_listener>java -jar apex.war
    Dec 27, 2012 7:29:45 PM oracle.dbtools.standalone.Standalone execute
    INFO: NOTE:
    
    Standalone mode is designed for use in development and test environments. It is
    not supported for use in production environments.
    
    Dec 27, 2012 7:29:45 PM oracle.dbtools.standalone.Standalone execute
    INFO: Starting standalone Web Container in:  d:\apexlistnerconf\apex
    Dec 27, 2012 7:29:45 PM oracle.dbtools.standalone.Deployer deploy
    INFO: Will deploy application path = d:\apexlistnerconf\apex\apex\WEB-INF\web.xm
    l
    Dec 27, 2012 7:29:46 PM oracle.dbtools.standalone.Deployer deploy
    INFO: Deployed application path = d:\apexlistnerconf\apex\apex\WEB-INF\web.xml
    Dec 27, 2012 7:29:46 PM oracle.dbtools.common.config.file.ConfigurationFolder lo
    gConfigFolder
    INFO: Using configuration folder: D:\apexlistnerconf\apex
    Default Database connection not configured properly
    Dec 27, 2012 7:29:48 PM oracle.dbtools.rt.web.SCListener contextInitialized
    INFO: Oracle Application Express Listener initialized
    Application Express Listener version : 2.0.0.354.17.06
    Application Express Listener server info: Grizzly/1.9.49
    
    Dec 27, 2012 7:29:48 PM com.sun.grizzly.Controller logVersion
    INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.49 - 12/27/12 7:29 PM
    Dec 27, 2012 7:29:48 PM oracle.dbtools.standalone.Standalone execute
    INFO: http://localhost:8080/apex started.
    Regards,

    Natarajan
  • 3. Re: Apex Listener Configuration Issue.
    Prabodh Guru
    Currently Being Moderated
    Hi,
    I set the port 8080 to apex listener and it does not give that error now.
    However, it still says "Default Database Connection not configured properly"

    I gave the SID name as xe which is the default one, and that is the correct SID for my DB also.
    >

    SID=xe is correct as you are using 11g XE.

    What is more important is whether you are able to access the Apex Application Builder through the ApexListener or not.
    If Apex is not accessible then the thing to check would be the Apex_Public_user password. Can you login to XE using Apex_Public_user with the password you supplied when configuring the ApexListener?
    Also ensure that the Apex_Public_user , and the other 2 users of ApexListener 2.0EA, are UNLOCKED.


    Cheers,
  • 4. Re: Apex Listener Configuration Issue.
    Nattu Explorer
    Currently Being Moderated
    Thank you so much, Probodh. That was the case, after unlocking the accounts, the listener started successfully. Thanks again.
  • 5. Re: Apex Listener Configuration Issue.
    Nattu Explorer
    Currently Being Moderated
    I am now able to login to apex (that is http://localhost:8585/apex), but unable to get the page http://localhost:8585/apex/listenerConfigure or http://localhost:8585/apex/listenerAdmin and get Page not found error. As mentioned in the another thread Re: Getting blank page using APEX Listener in standalone mode , checked the images folder and it seems correct. The link http://localhost:8585/i/apex_version.txt returns the version correctly. Not sure what is wrong. Will highly appreciate your help.

    Thanks,

    Natarajan
  • 6. Re: Apex Listener Configuration Issue.
    Udo Guru
    Currently Being Moderated
    Hi,

    both listenerConfigure and listenerAdmin don't exist in APEX Listener 2. These two interfaces are only available in the "old" APEX Listener 1/1.1 releases. APEX Listener 2 is configured using SQL Developer or its command line interface (CLI).
    For the CLI, you should read the [url http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/config.htm#CBDCHGDF]APEX Listener Installation and Configuration Guide Release 2.0.
    For SQL Developer, check [url http://docs.oracle.com/cd/E35137_01/appdev.32/e35117/intro.htm#CEGEEHGB]the corresponding section of the User´s Guide for Release 3.2.

    -Udo
  • 7. Re: Apex Listener Configuration Issue.
    Nattu Explorer
    Currently Being Moderated
    Thank you Udo, very useful information for the new bees on Apex Listener. I did also try using SQL Developer, but for a silly reason it did not work. Being case sensitive, it did not accept the user name "Adminlistener" but accepted "adminlistener". Thanks again.
  • 8. Re: Apex Listener Configuration Issue.
    Nattu Explorer
    Currently Being Moderated
    Though I got steps successfully, I still need the great help from the forum. I have set everything for the listener thro SQL Developer, after that, The TEST button appears on the RESTful Service>Resource Template> Resource Handler Page in Apex SQL Workshop. However, if I click the button it says 404 Page not found error. The URL is http://localhost:8585/apex/natarajan/hr/empinfo where apex is the default data base, natarajan is my workspace name, hr is the RESTful service module and empinfo is the URI template. Note, it is the url of the sample web service oracle.example.hr created by Oracle itself. I am not sure what went wrong with this.

    I followed the steps in the SQL Developer (version 3.2) User Guide for administrating RESTful services
     http://docs.oracle.com/cd/E35137_01/appdev.32/e35117.pdf
    , in there it is told in the section 1.16.4.2 to Enable RESTful Services, but I couldn't find an option in the SQL Developer window under the Listener>Database Settings>apex>Connections>RESTful Connection. I was able to give password for APEX_LISTENER and APEX_REST_PUBLIC_USER and the listener started successfully.

    Will highly appreciate your help.

    Regards,

    Natarajan
  • 9. Re: Apex Listener Configuration Issue.
    Nattu Explorer
    Currently Being Moderated
    Reopening the issue as I get new issues.
  • 10. Re: Apex Listener Configuration Issue.
    Prabodh Guru
    Currently Being Moderated
    Hi,
    Your new issue is not related to the Original Post. So I suggest you start a new thread for it.

    Cheers,
  • 11. Re: Apex Listener Configuration Issue.
    Nattu Explorer
    Currently Being Moderated
    Thanks Probodh, I created a new post for the issue. RESTful web services throws page not found error in apex listener

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points