Mohit Kumar Tayal

Greenhorn
+ Follow
since Aug 27, 2008
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 Mohit Kumar Tayal

Hi gokul,

I am using MyEclipse but the problem comes after deploying the application on live servers after 3-4 days on restarting the application not on my development system.

11 years ago
Hi i found one solution something saying this:

-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled and -XX:+UseConcMarkSweepGC

but i am not getting where to change for this means how to get effect with these lines.

And also please tell me is this the right way to solve the problem.

11 years ago
Hi gokul,

i have tried this by increasing the size of jvm.

but is it the only way to postpone the problem.

please tell me why this problem comes and when this is going to happen.
11 years ago
Hello,

I am working on a web application developed in struts 1.2 framework. I am getting the error when i am redeploying the application:

Servlet.service() for servlet action threw exception java.lang.OutOfMemoryError: PermGen space

I have goggled but found solution to increase the memory size this not solves the problem but postponed the error.

Please tell me what may be the reason for getting this error and how to solve this permanently.

Thank you.
11 years ago
Hi,

I have a problem in loading the resource file with the method ResourceBundle.getBundle if i am putting the property file outside the src folder.
What i am thinking that it is not a good idea to keep the property file with java source file or with class files in jar file. so actually i want to give the path of the property file through system property via command line when need to run the code.
but as i am trying it is not accepting the path for the file specified like C:/MessagingBundleAmazon
It is giving

Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name C:/MessagingBundleAmazon, locale en_US

Please help me how we can specify the path name in the base name for the argument.

Thank you
11 years ago
Hello,

I am working on struts 1.2 application and i am using Dispatch Action class. I have defined some methods in the class extending Dispatch Action and i am passing the name of the method in request parameter named type. Actually the problem is in Chrome and IE these methods are going to called once on each request but on Mozilla some methods are called twice on a single request.

I have got stuck as these behavior is browser dependent so one side i think it must not be the java code issue but what other it may be.
You please guide me what to check for this.

Thank You
11 years ago
Hello,

I am working with struts 1.2 and using tiles for seperation of display content something like header and footer and many more. Now problem is if there is some exception in tiles then that tile content is not going to be seen in jsp. It is ok but i want to show user some exception page in this case not the incomplete page. I have tried global exceptions and exception is Action tag in struts.config file but i think these handle only the exceptions thrown by the execute method in Action classes. So please help me how to handle this exception. I also have tried by putting the error-page tag in web.xml file but this is also not working.

Please help me on this.

Thank you
11 years ago
Thanks William,

You are right, i have achieved this by using file operations.

Thank You.
11 years ago
Thanks Ben,

Is there any alternative way to achieve this something by using context linstener and overriding method named contextinitialized and contextdestroyed.
I think this will solve the problem but is there any direct way to save the object to some file and again load from the file in java.

Thank You.
11 years ago
Thanks Ben,

Actually i have stored the connection object in session within another object that is to be stored but i have removed this object from that class now.
Thank for the help.

Now i need one more help. as you have said that it is vendor specific where it will store the session data either in file on disk or in database, is it possible that tomcat save context attributes as well somewhere and reload them on server startup like session attributes.

I need to store some data in context as well.

Thank You
11 years ago
Hello,

I am working with an J2EE application and i need to save some object (non serialized) into session as an attribute. This is not creating problem on Myeclipse but after hosting the application if after creating some session we change some java files then it throws exception something want to say that we should not store the non serialized object into persisted sessions and session got empty.

Is there any way to forcibly save the non serialized object into session as attribute without creating this type of problems.

Please help me on this.

Thank You.
11 years ago
Hi all,

I am working with a core java application in which i am query a mysql database to retrieve the data from a table which have nearly 5000000 records when i am using the statemnt like this:

ResultSet rs = pstm.executeQuery(select_query);

where pstm is an object of prepared statement and select query is the query to retrieve the data from the database.

I am getting outofmemory exception due to limited heap size.

So i want to retrieve the result in a stream so i tried to set

pstm.setFetchSize(Integer.MIN_VALUE)

but as this method says it is for defining the number of rows to be retrieved but i want to define the number of megabytes to be retrieved because it may be my one row have vaery large data so it may be the scene that only two rows create the same problem.

So how to handle this type of scene.

Please help me on this.

Thank You.
Thank you for the response,

I have done this and solved my problem. Thank you very much. Will you please tell me is there any chance of session clashing etc in implementing this strategy or any other issues with this implementation.

Thank You.
11 years ago
Hello,

I have one servlet application running properly on http://localhost:8080/mainapplication

this refers to the main application. now i need to run another servlet application (completely different) on the url

http://localhost:8080/mainapplication/anotherapplication.

so i am trying to put the application folder in the main application folder but in this way no one is running. actually this is the requirement due to running the applications on same url when live the application because applications are logically connected but need two different sessions for each one because the nested application may be called from some other third party applications so please help me on this how this can be achieved.

Thank you.
11 years ago
Hello,

i have two servlet application. one is main application and other is something child application the main application is working properly and child application also when run in seperate but i want to run these two application on one url when they goes live so is it possible to put the child application to put in the subfolder of main application. what is the process to achieve that how it will be possible for server to look at various web.xml files based upon the url.

please help me on this.

Thank You.
11 years ago