Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!

yatin baraiya

Ranch Hand
+ Follow
since Jul 17, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by yatin baraiya

Ulf Dittmer wrote:It won't work like that. If your code had a section that was by itself CPU-intensive you would likely already know about it. It is much more likely to be caused by a coincidence of several factors, which you will have to tease out by reasoning and experimentation. I advise to let go of the hope that you can somehow avoid that.

hi ilf dittmer
i had just giving the example for it , there has been some other code in this, and i am not aware about all those code which cause more CPU usage , if possible then please suggest me those tools,
at least it pointing me the java method level , then also it should be useful for me

4 years ago

Ulf Dittmer wrote:How, exactly, have you used those tools, and what have you found out so far? Tools are only part of the answer ; the other part is logical reasoning about the code and experimentation on your part.

I will use this tool to identify my java source code line which cause more CPU usage, i had sample java program ,which cause more cpu usage , so i will call this java program method from one of my servlet service ,and i will expect that tool will point out this code which cause more CPU usage ,and from that i will get the full confirmation and get verification for this tool usages for monitoring my web application,
and from that i will get the root cause of my cpu usage , according to that we will provide the fix for related issue in features

4 years ago
i do not want to depend on thread dump way, is there any tool which really help me out in this regards?
debugging, thread dump,jconsole,visualVm everything we had try , but now onwards , we looking perfect tool for it,
as above not giving any perfect root cause for it
4 years ago
Yes you both are right

can any one suggest me the tools for it which excatly point out the my java code which cause more CPU usage, so i can easily investigate those things?

Share me if you have any freeware/liceneced tool name,link etc...

4 years ago
Hi all

Sometime our tomcat use 100% CPU usage,
So we want free up some cpu usage by killing some thread process which is running by deployed web application in that tomcat
I want the tool , which kill those thread process running in tomcat container

I had search in net , but not get any proper information on this

please give me the link,name,reference details for those all tools
i want the demo for it if possible,
Please some body share your knowledge in this regards

Our environment is
Apache server 2.2
Tomcat 7
Java 1.7
Struts 2.2

and we had deployed web application in tomcat 7

Let me know if you want any other information from our side

Yatin Baraiya

4 years ago
My application environment is Tomcat 7.0, JDK 1.7. I am using Jersey for the REST API. One of our post type REST API request takes the processing more than 3 minutes, and it is just approx time, it can be more than 3 minutes. Then we send the response back to the client when our request processing is completed. but here request processing take 3 minutes so I got the request time out at the client side , and I do not get any response from the server , as I expected to success response

Request processing at server is like below:

Start the request

Insert details to db table [this process taking time in seconds]
Copying files to remote computer server [this process taking 3 minutes]
Update/active the files [this process taking time in seconds]
Send response to the client

End the request processing

All the above process must be in transaction , so we can not remove any of the above process,

We had already improve the best performance for Step 2 of the process , and it only happens, when we request with the more than 1 gb size file.

As of now for the temporary solution we had increase the timeout value which is configured in the Apache server.

Now I am looking for the solution of my issue, with any of the following approach:

Suggest me any development or implementation strategies which can resolve the my issue and it should be expected as described me?
How do I tackle the request time out issue?
Looking for the solution which notify the client from the server side , when the response is done?
Looking for the solution which can not close the connection between client and the server with the Jersey REST API implementation?

Thanks & regards
Yatin Baraiya
4 years ago
hi all

In one of my jsp page having menu-bar, in that menu-bar i have three link option which is

ption1 || option 2 || option 3||

when i first click on the option 1

it will call the below my strut-action using JavaScript function only

then on success my result page is load in that page we further load the tree structure [using the the dhtmltree js ] and call some dwr , which load some data in the result page level div , while this process is running it prompt the alert message on html page ,
and the alert message is :- "Incomplete reply from server"

i don't know at when it comes, it comes randomly.I face this issue only with the chrome,IE 7/8,mac safari browser

can anybody having idea why this happen?

If anyone having the idea of root-cause/solution ,please share it with me,

right now we using the dwr3.0 rc2 version.

thnaks in advance
4 years ago
When we click on one of our jsp page textarea, we load the ckeditor in that textarea. After cancelling it, we unload the ckeditor from the area and make it a simple text area. Then we attempt to load the ckeditor the second time, and it gives a js error.

What is this error?

We are using ckedtor v4.0.

We got the following js error only with IE 9/10 browser.

Message: Permission denied
Line: 50
Char: 375
Code: 0

After checking in the ckeditor.js file, we got the line and took a snippet

How can we get rid of this error?

Can anybody give us the solution of this js error to us. It is critical for us.
Hi everyone

i am getting trouble with below issue:

one of the my jsp page having following href link

Consider the value of this parameter for below url:

${userSecureKey} = "gfdsgghfhfdhliKksoT3zhgghgfX/BKUc4o+Kp31SFDSFjQ="

When i click the above ical link from the jsp page through ff,chrome, browser it will create the calender successfully in my outlook, but when i try same through IE 8/9 browser ,
it is not create the calender in outlook.

We use this following in this apps.

1.Core java
2.Struts 2.0
4.Struts interceptor.
5.Tomcat as deployment server
6.Apache 2.2 as redirect server.

as per the our code logic we allow to create the calender if the submitted value of user Key is same at server side ,
after doing too much analysis on it we found that as per the below

We get the userSecureKey value at server side [struts 2.0 interceptor side] "gfdsgghfhfdhliKksoT3zhgghgfX/BKUc4o Kp31SFDSFjQ="
while instead, we are expect its value should be like this "gfdsgghfhfdhliKksoT3zhgghgfX/BKUc4o+Kp31SFDSFjQ="

we can see that it convert '+' character to blank space ' ' , When user click on the link , it control first comes to interceptor , so no one can changes its value between those sequnce.
as well as i have also verify the value of userSecureKey through firebug tool of browser , it as same which i expected, so no question about the browser is not change its value.

We found that when href link is submit through IE browser, struts 2.0 or somehow something is changed '+' character value to ' ' blank-space , it happen only when i use webcal protocol with href link.
It is work very well with IE browser but when i use https protocol instead of webcal in href link.I want to know the reason why that happen , it is the issue of browser or struts 2.0's valustack interceptor.

right now i had solve the issue with something character replacing way. but i do not figure out what is the root cause of this issue.? and why the special symbolic character value is changed?I think it is big issue for me , right now i am looking for the specific and effective solution for the my issue, whatever i had provide is not best anybody please share your view regarding the my issue, and provide me the guidance on it.

Thanks & Regards
Yatin Baraiya

5 years ago
hi all

finally i have find the problem

it is working fine when i remove space in exe path, as like below

now anybody have idea which run my command if my exe having whatever path?

Yatin Baraiya
5 years ago
hi Jeff Verdegan

thanks for quick reply

when i execute with the below code , it will not create any process in task manger and not giving any error as well

but when i execute with the below command, it create this process "SAV32CLI123" in task manger process section with normal priority.

5 years ago

When i execute the following java program it gives me the error,

Actually i want to run this exe with low process priority.

Check the below code , which i have write, Can any body tell me that my command string is proper or not?

I have try it with notepad.exe ,for the notepad.exe it working fine and proper but not working with this exe file ,SAV32CLI123.EXE
and for testing purpose , i have manually run this SAV32CLI123.EXE through command prompt , it gives me the same working result as like my notepad.exe case.
But from java , i can not run it ?
Let me know ,if you want to need other information?

Thanks & Regards
Yatin Baraiya
5 years ago
Can you guide me the approach of serialization in my case?
Will you provide me the Any reference link,example demo etc...
Paul Clapham

First of thanks for the reply

As per i had making the Xml file ,check below code

While above code making the xml file
Now i have created one StaxbasedParser java file which have one method ,which take fileinputstream and outputstream, and this method give me all the attribute value of the given xml based fileinputstream , but now i want to not making any xml file and give the dom object directly to my method
i want solution like below

at this stage my dom element have making the below part

at this stage i want to parse the above partial xml part using staxbased parsing

Now dom is still running for the next element generating

now above code again making the below xml portion

now again i need to parse the above portion .

..........element added in xml is still going on..

Now you getting my requirement or not

Still let me know if you want to other information?

Thanks & Regards
Yatin Baraiya
Hy everyone

Right now i have implement the Staxbased xml parsing , which take as input as inputstream and OutputStream. and generate the file.
But now i wan to implementation it in another stream-based concept.,

Current Implementation:
Right now i had create the xml using the following code

Above code generate element for the xml using the Document object
and i will generate the xml file using the testdata object , and make the fileinputstrem object and pass it to my staxparser method , which give me the appropriate file.

But now i do not want to not generate the xml file , and giving whatever write in the dom element pass it to staxbased parser ,
so it will increase the my performance, but i don't know any idea how do i start it?How to start that implementation for it? if any body having know this concept/approach /reference link/solution , please share it with me.

thanks & regards
Yatin Baraiya