Closing socket as no data read from it during the configured idle timeout of 5 secs

Posted by Steve Racanovic | Posted in | Posted on 1:43 PM


In Jdeveloper, when I am running my web application I am frequently left with the following error from the integrated server:

<Warning> <Socket> <BEA-000449> <Closing socket as no data read from it during the configured idle timeout of 5 secs>

This is because I sometimes have multiple browsers/windows open of same application connections due to stopping and start the server each time opens a new window. Closing down all browsers/windows related to the application connection can avoid the problem.

WARNING: NoClassDefFoundErrororacle.oc4j.admin.internal.DeployerException: NoClassDefFoundError

Posted by Steve Racanovic | Posted in , | Posted on 2:18 PM


When deploying a simple ADF application to standalone oc4j for the first time I get this error:

09/07/06 14:11:10 WARNING: NoClassDefFoundErrororacle.oc4j.admin.internal.DeployerException: NoClassDefFoundError
at oracle.oc4j.admin.internal.DeployerBase.execute(
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(
at com.evermind.util.ReleasableResourcePooledExecutor$
Caused by: java.lang.NoClassDefFoundError: oracle/jbo/JboException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(
at java.lang.Class.getConstructor0(
at java.lang.Class.newInstance0(
at java.lang.Class.newInstance(
at com.sun.faces.config.ConfigureListener.configure(
at com.sun.faces.config.ConfigureListener.configure(
at com.sun.faces.config.ConfigureListener.contextInitialized(
at com.evermind.server.http.HttpApplication.initDynamic(
at com.evermind.server.http.HttpApplication.(
at com.evermind.server.ApplicationStateRunning.getHttpApplication(
at com.evermind.server.Application.getHttpApplication(
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.(
at com.evermind.server.http.HttpSite.addHttpApplication(
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(
at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(
at oracle.oc4j.admin.internal.DeployerBase.execute(
... 4 more
This is because the ADF libraries are not installed on oc4j standalone.

1. Shut down oc4j.
2. Using the same Jdev version as oc4j, install the libraries from the menu: Tools -> ADF Runtime Installer - Standalone OC4J.
3. Select the oc4j home and install i.e D:\Oracle\oc4j\oc4j_extended_101330

Using log4j as a shared library in Oracle Application Server 10.1.3.x.

Posted by Steve Racanovic | Posted in , | Posted on 2:48 PM


In this example I installed log4j as a shared library to my oc4j instance and then deploy my application from Jdev that utilises this library.

First Download log4j from

Deploying log4j as shared library.

1. Unzip the downloaded log4j file.

2. In OAS ASC, select your oc4j instance -> Administration. Under Administration Tasks -> Properties and select Shared Libraries.

3. In Shared Libraries click Create.

4. Enter the library name/version

Shared Library Name = log4j
Shared Library Version = 1.0

5. Select the jar to load into the library.

6. Click finish and see the loaded library.

In Jdev, create a simple web application servlet that uses log4j.

7. My servlet looks like:

package project1;


import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class Log4jDemoInOAS extends HttpServlet {
private static final String CONTENT_TYPE =
"text/html; charset=windows-1252";
Logger log = Logger.getLogger("Log4jDemoInOAS.class");

public void init(ServletConfig config) throws ServletException {
String prefix = getServletContext().getRealPath("/");
String file = getInitParameter("log4j-prop-file");
if (file != null) {
PropertyConfigurator.configure(prefix + file);


public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
PrintWriter out = response.getWriter();
out.println("<head><title>Log4j Demo In OAS</title></head>");
out.println("<h2>Using log4j shared libraries in OAS Demo</h2>");
System.out.println("=== Log4jDemo ===");
log.debug("== DEBUG Message ==");"== INFO Message ==");
log.warn("== WARN Message ==");
log.error("== ERROR Message ==");
log.fatal("== FATAL Message ==");

8. The orion-application.xml must import the library name define in step 4. It looks like:

<import-shared-library name="log4j"></import-shared-library>

9. Now, before deploying the application to oc4j, I need to uncheck the log4j library that we included in the JDev application during development. This is to ensure that when Jdev packages the application it does not for include the library in the package. From the deployment properties, uncheck this library.

10. Deploy the application and see the opmn container logs for the results.