Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Our application is developed with APEX, and it is accessed through APEX listener through HTTP on default port 8080. Now, we want to switch to Apache with mod_proxy_ajp and reconfigure APEX listener to use AJP. We tryed to simply add -Dapex.ajp=8009 to startup parameters but we get 500 Internal server error on apache.

This is how APEX was started with HTTP listener:

java -Dapex.home=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime \
    -Dfile.encoding=UTF8 \
    -jar /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/apex.war

This is logs of that startup:

INFO: Starting: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/apex.war
 See: 'java -jar apex.war --help' for full range of configuration options

INFO: Extracting to: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime

INFO: Using classpath: file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/____embedded/start.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/ojdbc6.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/ucp.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/ojmisc.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/apex.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/je-4.0.103.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/xdb-11.2.0.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/poi-3.6-20091214.jar:

INFO: Starting Embedded Web Container in: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime

23.02.2012 17:26:13 ____bootstrap.Deployer deploy
INFO: Will deploy application path=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/web.xml
23.02.2012 17:26:13 ____bootstrap.Deployer deploy
INFO: deployed application path=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/web.xml
Using config file: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex-config.xml
-- listing properties --

PropertyCheckInterval=60

ValidateConnection=true

MinLimit=1

MaxLimit=10

InitialLimit=3

AbandonedConnectionTimeout=900

MaxStatementsLimit=10

InactivityTimeout=1800

MaxConnectionReuseCount=1000

APEX Listener version : 1.1.3.243.11.40

APEX Listener server info: Grizzly/1.9.18-o

23.02.2012 17:26:34 com.sun.grizzly.Controller logVersion
INFO: Starting Grizzly Framework 1.9.18-o - Thu Feb 23 17:26:34 UZT 2012
INFO: http://localhost:8080/apex started.

Now, we add -Dapex.ajp=8009 parameter and restart APEX listener:

apex: client (pid 19896) exited with 143 status
INFO: Starting: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/apex.war
 See: 'java -jar apex.war --help' for full range of configuration options

INFO: Extracting to: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime

INFO: Using classpath: file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/____embedded/start.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/ojdbc6.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/ucp.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/ojmisc.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/apex.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/je-4.0.103.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/xdb-11.2.0.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:file:/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/lib/poi-3.6-20091214.jar:

INFO: Starting Embedded Web Container in: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime

23.02.2012 17:30:53 ____bootstrap.Deployer start
INFO: AJP Listener on port 8009 enabled, HTTP listener is disabled.
23.02.2012 17:30:53 ____bootstrap.Deployer deploy
INFO: Will deploy application path=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/web.xml
23.02.2012 17:30:53 ____bootstrap.Deployer deploy
INFO: deployed application path=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/apex/listener/runtime/apex/WEB-INF/web.xml
23.02.2012 17:30:53 com.sun.grizzly.http.jk.server.JkMain init
INFO: Can't find home, jk2.properties not loaded
23.02.2012 17:30:53 com.sun.grizzly.http.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
23.02.2012 17:30:53 com.sun.grizzly.http.jk.server.JkMain start
INFO: Jk running ID=0 time=3/15  config=null

When trying to access some page through Apache we get 500 Internal server error and following exception in APEX listener logs:

23.02.2012 17:31:54 com.sun.grizzly.http.servlet.ServletAdapter doService
SEVERE: service exception:
oracle.dbtools.rt.service.ServiceLocatorException: There are no services defined
#011at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:91)
#011at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
#011at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:85)
#011at oracle.dbtools.rt.web.HttpEndpointBase.dispatchers(HttpEndpointBase.java:138)
#011at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:85)
#011at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
#011at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
#011at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
#011at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
#011at ____bootstrap.SecureServletAdapter.doService(SecureServletAdapter.java:72)
#011at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:324)
#011at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
#011at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:180)
#011at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
#011at com.sun.grizzly.http.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:237)
#011at com.sun.grizzly.http.jk.common.HandlerRequest.invoke(HandlerRequest.java:330)
#011at com.sun.grizzly.http.jk.common.ChannelSocket.invoke(ChannelSocket.java:816)
#011at com.sun.grizzly.http.jk.common.ChannelSocket.processConnection(ChannelSocket.java:742)
#011at com.sun.grizzly.http.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:942)
#011at com.sun.grizzly.http.jk.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
#011at java.lang.Thread.run(Thread.java:636)

I assume Apache configuration is correct:

    ProxyPass /apex/ ajp://localhost:8009/apex/
    ProxyPassReverse /apex/ ajp://localhost:8009/apex/

What could be the problem?

share|improve this question
    
Most likely you are using OpenJDK, try using Oracle Sun JDK. –  user11171 Aug 28 '12 at 2:39

1 Answer 1

Looks like the apex listener can't find it's configuration file. Start it up again in http mode, specifying where the application should deploy to with the "-Dapex.home=" parameter.

navigate to

http://:8080/apex/listenerAdmin and complete configuration again, The config file will save to the directory above, and will be read from there everytime it starts up.

I have the listener running with ajp using mod_proxy_ajp without problems here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.