Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Dilip Kumar

Greenhorn
+ Follow
since Feb 12, 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 Dilip Kumar

Its just like a java process continuosly polling on MQ Queue, and gets the data and updates the data in the database.
Hi,

Can any body suggest me the exact reason for the following error, thanks in advance

Error is:

Exception occured. Error Message is Io exception: Connection reset by peer: JVM_recv in socket input stream read
I have a webapp on WebLogic 8.1 SP1 and I get the following exception (Has anyone seen thsi before?):

Error 500--Internal Server Error

java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:170)
at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:180)
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestImpl.java:1257)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequestImpl.java:1124)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1335)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1321)
at sfmsbr.login.ValidateUser.doPost(ValidateUser.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/servlet/ValidateUser' - with nested exception:
[java.net.SocketTimeoutException: Read timed out]
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestImpl.java:1288)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequestImpl.java:1124)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1335)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1321)
at sfmsbr.login.ValidateUser.doPost(ValidateUser.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
15 years ago
I have a webapp on WebLogic 8.1 SP1 and I get the following exception (Has anyone seen thsi before?):

Error 500--Internal Server Error

java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:170)
at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:180)
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestImpl.java:1257)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequestImpl.java:1124)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1335)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1321)
at sfmsbr.login.ValidateUser.doPost(ValidateUser.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/servlet/ValidateUser' - with nested exception:
[java.net.SocketTimeoutException: Read timed out]
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestImpl.java:1288)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequestImpl.java:1124)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1335)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:1321)
at sfmsbr.login.ValidateUser.doPost(ValidateUser.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
15 years ago
Dear All,

How to search a file with file name in LDAP??

Here is my code

import javax.naming.directory.DirContext;
import javax.naming.directory.SearchResult;
import javax.naming.directory.Attributes;
import javax.naming.directory.Attribute;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchControls;

import javax.naming.NamingEnumeration;
import javax.naming.NamingException;

import java.util.Properties;
import java.util.ResourceBundle;

import java.io.FileWriter;

import sfmshub.coms.core.utils.SFMSConstants;


public class CrlSearch
{
/**
* This metood gets the file from LDAP Server
*
* @Throws NamingException
* @Throws Exception
* @Return String
*/

public static void fetchFile() throws NamingException, Exception
{
// The search base is the level in the hierarchy
// that our search will start at. Here was use ""
// which indicates the very root of the directory.
final String strBase = "c=IN";

// LDAP filters are sort of like a WHERE clause. It
// is constructed in a standard way based on LDAP
// standards. The search here is a simple one that
// says to return any entry with an objectclass value.
// Since all entries must contain an objectclass, all
// entries will be returned.
final String strFilter = "(objectclass=cRLDistributionPoint)";

// Here we set some connection properties for JNDI.
Properties PropEnv = new Properties();

// String Variable which holds the CRL File Data
String strCrlFile = "";

// ResourceBundle for fetching crl file path and ldap ip
ResourceBundle rsBundleSecu = null;

// String for CRL File Path
String strNewFilePath;

// String for new CRL File
String strCrlFilePath;

// Setting environment for search
PropEnv.put(DirContext.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");

try
{
rsBundleSecu = ResourceBundle.getBundle("coms.core.utils.SFMSSecurityConf");

// Get LDAP ip and port and set in environment
PropEnv.put(DirContext.PROVIDER_URL,"ldap://"+rsBundleSecu.getString("LDAPSERVERNAME").trim()+":"+rsBundleSecu.getString("LDAPPORTNUMBER").trim());

// Get CRL File path and set in path variables
strCrlFilePath = rsBundleSecu.getString("CRLFILENAME").trim();
strNewFilePath = strCrlFilePath.substring(0,strCrlFilePath.lastIndexOf("/"));

// InitialDirCOntext with the environment
DirContext dcLdap = new InitialDirContext(PropEnv);

// SearchControls for search
SearchControls scCrl = new SearchControls();

//LDAP Search Scope is sub tree
scCrl.setSearchScope(SearchControls.SUBTREE_SCOPE);

// should return attributes common name and mail
final String returnedAttributes[] = {"cn","certificateRevocationList;binary"};
scCrl.setReturningAttributes(returnedAttributes);

// Performing search.
NamingEnumeration neSearch = dcLdap.search(strBase, strFilter, scCrl);

// Byte array which holds the CRL File data from LDAP
byte[] byteCrlFile = null;

String strCn = null;
Attribute attr = null;

// While search results is not null or has more elements perform the operation
while ((neSearch != null) && (neSearch.hasMore()))
{
SearchResult srLdapSearch = (SearchResult) neSearch.next();
Attributes attrs = srLdapSearch.getAttributes();

// If attributes are null skip the process
if (attrs == null)
{
System.out.println("No attributes");
}// End of if

else
{
// if attributes are not null get all attributes
for (NamingEnumeration neAttributes = attrs.getAll(); neAttributes.hasMore()
{
attr = (Attribute) neAttributes.next();
String strAttrID = attr.getID();

for (NamingEnumeration neAttribute = attr.getAll(); neAttribute.hasMore()
{
if (strAttrID.equals("cn"))
{
strCn = neAttribute.next().toString();
}// end of else if
else if (strAttrID.equals("certificateRevocationList;binary"))
{
// Get the file
byteCrlFile = (byte[]) neAttribute.next();

}// End of else if

}// End of inner for

}// End of outer for

// Converts binary data to String
strCrlFile = com.security.Base64.encodeBytes(byteCrlFile);

// Write into new file
FileWriter fileWriteCrl = new FileWriter(strNewFilePath+"/newcrl.crl");
fileWriteCrl.write(SFMSConstants.strCrlHeader + strCrlFile + SFMSConstants.strCrlFooter);
fileWriteCrl.close();
}// End of else

}// End of while

dcLdap.close();

}// End of try

catch (NamingException nExc)
{
nExc.printStackTrace();
throw nExc;
}// End of NamingException catch

catch(Exception exc)
{
exc.printStackTrace();
throw exc;
}// End of Exception catch

}// End of fetchFile

}// End of CrlSearch
15 years ago
Hi,

We are using JDK 1.3.1_08 version, in the text field we want to restrict user to enter only 11 characters, how can I achieve this feature??

If any body knows please give me solution on early basis.

Thanks in advance.
16 years ago
Hi all,
if my child window contains some more child windows, then how can i close those sub child windows
if any one knows it then pl reply to this id dilip.g@goldstonetech.com
Thanks inadvance
dilip
on selection of radio button call a javascript function, in that function use window.open("pageName"), then it will opens another window
Hi,
How to implement Frames in Strust Framework, i tried with Struts <html:frame /> tag, when i am using this tag its giving exceptions at runtime....
if any one knows answer abt this, pl give a solution
Thanks in Advance
Dilip Kumar
18 years ago
Hi,
How to implement Frames in Strust Framework, i tried with Struts <html:frame /> tag, when i am using this tag its giving exceptions at runtime....
if any one knows answer abt this, pl give a solution
Thanks in Advance
Dilip Kumar
18 years ago
hi,
my suggestion is better to write database connection in a servlet, and call that servlet from applet.....
Cheers,
Dilip
19 years ago