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

0

In Jdeveloper 11.1.1.1.0, 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: DeployerRunnable.run NoClassDefFoundErrororacle.oc4j.admin.internal.DeployerException: NoClassDefFoundError

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

0

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

09/07/06 14:11:10 WARNING: DeployerRunnable.run NoClassDefFoundErrororacle.oc4j.admin.internal.DeployerException: NoClassDefFoundError
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:134)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError: oracle/jbo/JboException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:731)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:418)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1141)
at com.evermind.server.http.HttpApplication.(HttpApplication.java:741)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
at com.evermind.server.Application.getHttpApplication(Application.java:570)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.(HttpSite.java:1906)
at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1603)
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:238)
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:99)
at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:547)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:202)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
... 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

0

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

http://jakarta.apache.org/log4j/docs/download.html

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 java.io.IOException;
import java.io.PrintWriter;

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 {
super.init(config);
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 {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head><title>Log4j Demo In OAS</title></head>");
out.println("<body>");
out.println("<h2>Using log4j shared libraries in OAS Demo</h2>");
System.out.println("=== Log4jDemo ===");
log.debug("== DEBUG Message ==");
log.info("== INFO Message ==");
log.warn("== WARN Message ==");
log.error("== ERROR Message ==");
log.fatal("== FATAL Message ==");
out.close();
}
}

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

...
<imported-shared-libraries>
<import-shared-library name="log4j"></import-shared-library>
</imported-shared-libraries>
...

http://download-west.oracle.com/docs/cd/B32110_01/web.1013/b28957/deploysimple.htm#CHDIEFGE

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.