Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!

Piyush Jain

Ranch Hand
+ Follow
since Apr 25, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Piyush Jain

What would be the best way to find out if there are any unclosed handles?

jconsole? How would I know whether I am looking at Tomcat threads of my own application threads?
11 years ago
We are having a "too many open files" problem in production, which might be caused by too many threads opened from tomcat. One of the deployed apps is a middleware which is a proxy for handling a large number of requests (each servlet request makes couple of network calls). During large loads this is throwing a "java.net.socket" exception and the application stops working after that. I checked for open files with "lsof" and sometimes the number reaches "1900" and stays there even after the requests have stopped.

So I am assuming bringing down the open connections should help solve this problem.

However, there might be leaks somewhere else in the application i.e., unclosed network connections etc., but so far I haven't been able to find any. I am printing debug statements and making sure all network calls are closed after completion.
11 years ago
I have the following setup in the server.xml file:


I want the Tomcat threads to come down to 5 or 10 if there are no requests to the server. However, when I started firing requests to the server, and it reached 15, it never came down. I looked at the "Status" page in the Tomcat Manager application, and the current thread count remains 15, never comes down.

Is there anything that I missed in the above configuration? What am I doing wrong here?
11 years ago
That will not work in this scenario:

I have a service middleware, which passes this cookie, which is a siteminder authentication cookie, and if it does not contain the trailing "=", the authentication fails.
11 years ago
I am facing the same problem.

Has anyone found a solution to this?
11 years ago
We are getting this error when trying to access the application:

symbol : class HttpSession location: class _jsps._jsp._webCISLogin_jsp HttpSession session = null; ^ /opt/httpd/sunws6.1/https-pasteur.nyp.org/ClassCache/https-pasteur.nyp.org/EpiTest/_jsps/_jsp/_webCISLogin_jsp.java:40: cannot resolve symbol symbol : class ServletContext location: class _jsps._jsp._webCISLogin_jsp ServletContext application = null;

The war has been deployed to Sun One Web Server 6.1. We are not able to figure out the exact cause of this sudden problem, as the application is behaving fine when deployed to TOMCAT 5.5.

Any ideas will be highly appreciated....
13 years ago
Here is the error.

Error in CrsHierarchyHandler.javajava.sql.SQLException: Connection has already been closed.
java.sql.SQLException: Connection has already been closed.
at weblogic.jdbc.pool.Connection.checkIfClosed(Connection.java:62)
at weblogic.jdbc.pool.ResultSet.next(ResultSet.java:198)
at com.crs.action.CrsHierarchyHandler.execute(CrsHierarchyHandler.java:149)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:288)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:212)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2765)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2433)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:172)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:145)


CrsHierarchyHandler.java:149 points to this in the code:

rSet = dbCon.exeQRY(sqlStr);

Line 149:while (rSet.next()) {
hierarchyChunk = hierarchyChunk
+ (rSet.getString("location"));
hierarchyChunk = hierarchyChunk + "|"
+ (rSet.getString("location")) + "||";
}

This is inside a try block with a finally like:

finally {
try {
dbCon.closeConnection();
dbCon = null;
} catch (Exception ex) {
System.out.println(" Inside 2" + ex.toString());
forwardPage = "failure";
ex.printStackTrace();
}
}

This happened in the very first page on the application, so cannot be from anywhere else in the code. Its only happening when there is more than 1 user. Never happened for 1 user while testing.

Any suggestions?

[ June 08, 2006: Message edited by: Piyush Jain ]
14 years ago
The log you are refering to is weblogic.log right?
14 years ago
Can anything cause the application server process to be killed by itself e.g., application code error. or this is only possible by manual intervention?

The App log is showing 'Killed' at the end.
14 years ago
We are currently using JSP to load data to an excel by setting the content type header in the JSP.

Inside the JSP we are just creating a regular HTML table with rows and columns which excel uses to populate cells.

What we really want to do is control the Page setup of the created excel for example changing the style of sheet from Potrait to Landscape etc.

Is this possible directly from JSP?

Thanks
15 years ago
Hi,

Can somebody tell what might cause the following error:

"Root cause of ServletException
javax.servlet.jsp.JspException: Define tag cannot set a null value
at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272)
at jsp_servlet.__Frm_createProcedure._jspService(__Frm_createProcedure.j
ava:1523)"


Checked in the (__Frm_createProcedure.j
ava:1523 file, and the corresponding line in the jsp. The corresponding code is:

<bean efine id="probAdverseRiskList" name="TestProcedureBean" property="probAdverseRisk" type="java.util.ArrayList" scope="session"/>

There is nothing that I could find wrong with the code. More surprising all the code is working great in IST, we are facing problem only in UAT.



Thanks
[ October 12, 2005: Message edited by: Piyush Jain ]
15 years ago
I found it .

there is nothing called hard references.

however SoftReference is a class in the java.lang.ref package.

this resource has good explnation of these references.

softreferences
16 years ago
are there anything called soft and hard references in java?


what are they?

Thanks
16 years ago
That was perfect.

Thanks.
Thanks Kathy.

J2EE RI 1.3.1 does work fine on Mac. Now you are using the tcsh shell whereas I have bash by default. i am able to open the deploytool by navigating to the j2ee bin directory but not otherwise from anywhere else. so I am having trouble configuring my environment variables. i dont see .cshrc, .profile or login_cshrc files in my home. i changed the path appropriately in /etc/profile but still doesn't work.

any clues?