This discussion is archived
1 2 Previous Next 25 Replies Latest reply: Jan 28, 2011 2:24 AM by 830522 RSS

What version of Java to use / where to get? I want listener to run.

SM_Work Newbie
Currently Being Moderated
I just downloaded and extracted and attempted to run the Web Container Listener ...

and I get the "Exception in thread "main" java.lang.UnsupportedClassVersionError:" (etc., many more lines of text that I don't understand) error ...

SO ... what version of Java should I use, and from whence to do I get it?

Finally ... assuming I do that ...

What I wanted to do ... was connect to the APEX40 that's installed in my 10g database ... I don't know how to do that either. All I can tell you is that I can connect via normal SQL Plus client and TNSNAMES settings, from the test/development server on which I want to run the listener (as well as from my desktop).

(and then, I am assuming, from my desktop PC, I point my browser at the listener, and it connects me to the APEX that's installed in my 10g database?)

(so, in case it is not clear ... (1) DB 10g/w 4.0 is a UNIX box, (2) server where listener will run is Windows (and I can install whatever is useful on it, or wipe it clear and do something else, whatever), and then there's my local PC browser (3))

So if someone could point me in the right direction, I would be grateful.

Thanks.

Suzanne
  • 1. Re: What version of Java to use / where to get? I want listener to run.
    Udo Guru
    Currently Being Moderated
    Hello Suzanne,

    the manual for the APEX Listener names the following requirements:
    - Oracle Database 10.2+ or later releases
    - Java 6 Update 20 JDK or higher
    - Java Servlet Specification 2.3 or higher

    You can download the required Java version here:
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    Make sure to download the JDK.

    As soon as you get the Listener up and running you'll be able to configure it. Again, the documentation is a great help.
    If I got you right you want to use the "Embedded Web Container" that ships with the Listener as Web Container.
    You need to have the "images" from the APEX 4.0 installation package available on the machine that runs the Listener.
    In addition to the path for this "static content" you'll be asked for username and password for the administrative accounts for the Listener.
    If all questions are answered, the Listener is ready to be configured using the URL
    http://host:port/apex/listenerConfigure
    where "host" might be "localhost" if you run the Listener on your desktop and "port" will be 8080 in the default case.
    You'll need the following parameters to configure the Listener:
    - DB-Connect parameters, like the ones you have in your TNSNAMES
    - password for the APEX_PUBLIC_USER (that will usually be the one you provided for the APEX installation)

    After you applied these settings you'll be redirected to the APEX-URL and you can start using APEX.

    -Udo
  • 2. Re: What version of Java to use / where to get? I want listener to run.
    SM_Work Newbie
    Currently Being Moderated
    Thanks, Udo!! I will do as you say. Somehow, when I read stuff, I missed what you said. Thanks for restatement.
  • 3. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    I am having the same trouble but your solution doesn't seem to work for me. Anyone still monitoring this?
  • 4. Re: What version of Java to use / where to get? I want listener to run.
    Udo Guru
    Currently Being Moderated
    Hello,

    which Javaversion do you actually use and what is the exact error message you get?
    Also, please provide further information on your setup, i.e. versions of APEX Listener, J2EE Container and OS.

    Thanks,

    -Udo
  • 5. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    Hi Udo,
    Thank God you're still here. The set up iss as follows:
    Window XP Professional wth Oracle Express Release 10.2.0.1.0.
    Java version using CMD Prompt is 1.4.2_03 but on the Java website it says Version 6 Update 23.
    Application Express is version 4 (Apex 4.0.2). For the listener, I tried both the Early Adopters (http://www.oracle.com/technetwork/developer-tools/apex-listener/overview/index.html) and the other one that came out with Application Express (http://www.oracle.com/technetwork/developer-tools/apex-listener/downloads/index.html).
    The exact message I get is:
    C:\Documents and Settings\Sam>java -jar C:\ApexListener\apex.war
    Exception in thread "main" java.lang.UnsupportedClassVersionError: ____embedded/
    ____EntryPoint (Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

    Let me know if you want more information. Sorry, I am new to Oracle, SQL Server was much much easier...

    thanks
    Sam
  • 6. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    Just another thing Udo..can you clarify the point aboutt Java Servlet Specification 2.3 or higher
    I google it and the only thing I can relating to this on the Oracle website is some papers, rather than any patch/appliction.

    thanks and much appreciated.

    Sam

    Edited by: user10048105 on 12/01/2011 03:07
  • 7. Re: What version of Java to use / where to get? I want listener to run.
    Udo Guru
    Currently Being Moderated
    Hi Sam,

    just to point that out: SQL Server doesn't have APEX, does it? ;)
    In general, APEX isn't that hard to handle if you follow the documentation thoroughly. Of course, you have to know what it says, so you might need more knowledge about your system/environment, as things are a little more complex, but you certainly also get more functionality...

    To your Java-Version: It seems you have multiple Java versions on your system and the old 1.4.2 is the one that stands first in your search path. It probably is the one installed with your Oracle XE. To solve this, you could edit your PATH-variable to have the path to your recent JDK-Location before the path to the XE. Another option would be to start the embedded GlassFish with the explicit path to your JDK-location, so your call could look like this
    %ProgramFiles%\Java\jdk1.6.0_23\bin\java -jar C:\ApexListener\apex.war
    Concerning the required "Java Servlet Specification 2.3": This is a requirement for the J2EE-Container you use. In your case, you use the embedded GlassFish which will always meet any requirement. However, if you decided to deploy the Listener on an existing J2EE Server (such as OC4J, Apache Tomcat (which is not officially supported), JBoss (also unsupported), etc.), you need to ensure that server provides the required version of the Servlet implementation.

    -Udo
  • 8. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    No it doesn't . But given the ease it was to get started, looking back now ,,perhaps all the faults with MS wasn't that bad after all...
    You're certainly right about more funtionality, could say I'm converted (if I can only get this damn thing up and running). But a good learning experience all the same..

    Your suggestion about Java version is consistent with what I read on another site except the solution was different and involved a lot more work which I couldnt really follow (didnt think it was related to Oracle too)
    But let me get this straight, I should run the following in the command prompt?

    " %ProgramFiles%\Java\jdk1.6.0_23\bin\java -jar C:\ApexListener\apex.war "

    Sorry to be a nuisance, guess it comes with being a learner :-)
    Anyway, I'll try that tonight and see what I get..get back to you with my results.

    thanks Udo, I am glad there's people like you in this world..

    cheers
    Sam
  • 9. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    Hi Udo,
    Its probably because I am not sure of what I am supposed to do but this is what I tried and got on the cmd command


    C:\>ProgramFiles\Java\jdk1.6.0_23\bin\java -jar C:\ApexListener\apex.war
    The system cannot find the path specified.

    C:\>%ProgramFiles%\Java\jdk1.6.0_23\bin\java -jar C:\ApexListener\apex.war
    'C:\Program' is not recognized as an internal or external command,
    operable program or batch file.

    Can you see what I did wrong please.

    cheer
    Sam
  • 10. Re: What version of Java to use / where to get? I want listener to run.
    Udo Guru
    Currently Being Moderated
    Hi Sam,

    seems as if Windows doesn't put appropriate string delimiters around when necessary. In my case %ProgramFiles% has the German language value for that directory, which is "Programme". In your case, this is probably the English "Program Files" and Windows doesn't take it as a path but as a command because of the blank in between.
    Try this instead:
    "%ProgramFiles%\Java\jdk1.6.0_23\bin\java" -jar C:\ApexListener\apex.war
    The " help Windows to interprete the path as single string, so it will find your java.

    -Udo
  • 11. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    Hi Udo,
    I think we're almost there..the command you gave kicked off the installation. I got the following message after inputing your command:

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\Sam>"%ProgramFiles%\Java\jdk1.6.0_23\bin\java" -jar C:
    \ApexListener\apex.war
    INFO: Starting: C:\ApexListener\apex.war
    See: 'java -jar apex.war --help' for full range of configuration options
    INFO: Extracting to: C:\Documents and Settings\Sam\.apex\8080
    Enter the path to the directory containing the APEX static resources
    Example: /Users/myuser/apex/images
    or press Enter to skip:


    Do you want to be prompted to specifiy this path next time? y/n [y]: INFO: Using
    classpath: file:/C:/Documents%20and%20Settings/Sam/.apex/8080/apex/____embedded
    /start.jar:file:/C:/Documents%20and%20Settings/Sam/.apex/8080/apex/WEB-INF/lib/a
    pex.jar:file:/C:/Documents%20and%20Settings/Sam/.apex/8080/apex/WEB-INF/lib/comm
    ons-fileupload-1.2.1.jar:file:/C:/Documents%20and%20Settings/Sam/.apex/8080/apex
    /WEB-INF/lib/ojdbc6.jar:file:/C:/Documents%20and%20Settings/Sam/.apex/8080/apex/
    WEB-INF/lib/ojmisc.jar:file:/C:/Documents%20and%20Settings/Sam/.apex/8080/apex/W
    EB-INF/lib/poi-3.6-20091214.jar:file:/C:/Documents%20and%20Settings/Sam/.apex/80
    80/apex/WEB-INF/lib/ucp.jar:
    INFO: Starting Embedded Web Container in: C:\Documents and Settings\Sam\.apex\80
    80
    Enter a username for the APEX Listener Administrator [adminlistener]: Enter a pa
    ssword for adminlistener:
    Confirm password for adminlistener:
    Enter a username for the APEX Listener Manager [managerlistener]: sammy
    Enter a password for sammy:
    Confirm password for sammy:
    Passwords do not match. Try Again.
    Enter a password for sammy:
    Confirm password for sammy:
    13/01/2011 10:34:17 PM ____bootstrap.Deployer deploy
    INFO: Will deploy application path=C:\Documents and Settings\Sam\.apex\8080\apex
    \WEB-INF\web.xml
    13/01/2011 10:34:17 PM ____bootstrap.Deployer deploy
    INFO: deployed application path=C:\Documents and Settings\Sam\.apex\8080\apex\WE
    B-INF\web.xml
    13/01/2011 10:34:18 PM com.sun.grizzly.Controller logVersion
    INFO: Starting Grizzly Framework 1.9.18-o - Thu Jan 13 22:34:18 EST 2011
    13/01/2011 10:34:18 PM com.sun.grizzly.SelectorHandlerRunner handleSelectExcepti
    on
    SEVERE: doSelect IOException
    java.net.BindException: Address already in use: bind: 8080=com.sun.grizzly.http.
    SelectorThreadHandler@e66f56
    at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.ja
    va:432)
    at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:
    379)
    at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.
    java:183)
    at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:
    130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
    utor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:908)
    at java.lang.Thread.run(Thread.java:662)
    13/01/2011 10:34:18 PM com.sun.grizzly.http.SelectorThread$3 onException
    SEVERE: Exception during starting the controller
    java.net.BindException: Address already in use: bind: 8080=com.sun.grizzly.http.
    SelectorThreadHandler@e66f56
    at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.ja
    va:432)
    at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:
    379)
    at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.
    java:183)
    at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:
    130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
    utor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:908)
    at java.lang.Thread.run(Thread.java:662)
    java.net.BindException: Address already in use: bind: 8080=com.sun.grizzly.http.
    SelectorThreadHandler@e66f56
    at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.ja
    va:432)
    at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:
    379)
    at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.
    java:183)
    at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:
    130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
    utor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:908)
    at java.lang.Thread.run(Thread.java:662)
    INFO: Please complete configuration at: http://localhost:8080/apex/listenerConfi
    gure


    The only problem now is the browser that got launched with the following address "http://host:8080/apex/listenerConfigure" did not bring up anything. I only got the standard Windows message 'Internet Explorer cannot display the webpage'.

    It's late now so I haven't had the chance do any further investigations (nor am I really thinking) but if you know what's wrong, would save me considerable amount of work and would be much appreicated. But in any event much appreciated. Owe you a bear mate..

    cheers
    Sam
  • 12. Re: What version of Java to use / where to get? I want listener to run.
    Udo Guru
    Currently Being Moderated
    Hi Sam,

    seems you already have another service that runs on port 8080, probably an IIS.
    You can choose a different port for the embedded GlassFish by passing a parameter for it, so your call would then look like this:
    "%ProgramFiles%\Java\jdk1.6.0_23\bin\java" -Dapex.port=12345 -jar C:\ApexListener\apex.war 
    where 12345 is the port number to be used and can be changed to the value you want - a so far unused port.
    See the documentation for details on all parameters.

    -Udo
  • 13. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    Ugo,
    You're a legend, I am in !!
    Thank you so much, much appreciated mate. Definitely owe you a beer.
    So relieved now :-)

    Edited by: user10048105 on 13/01/2011 23:38
  • 14. Re: What version of Java to use / where to get? I want listener to run.
    830522 Newbie
    Currently Being Moderated
    Hi Udo,
    Got another question for you if I can. I have another computer but this one has Oracle 11g on it as well as XE. If I want Apex available to both on the same computer, do I still only install one instance of APEX or two? I know this sounds stupid but on a failed installation, I can only see it on XE not 11g (the installation failed but I can still see parts of the Apex page, though cannot logon). Hope I make sense..

    Another thing, you're employed by Oracle right?
    thanks for your help.

    Sam
1 2 Previous Next

Legend

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