• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Limit on Data/Key-Value Pairs in Form Submission

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I want to know that is there any data limit or any limit on the number of key-value pairs that I can sent (submit a form) from a JSP page to a servlet in an application hosted by WebLogic 9.2? I am using the POST method.

Thanks.
 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

we didn't get any idea what you are trying to say...

provide some more information...
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me rephrase.

I have a web page.A Jsp page which has a form with approx. 400 fields. I then submit this form using POST method to the servlet in an application deployed on a WebLogic 9.2 server. Is there a limit to the amount of data or key value pairs (form fields) that I can send or submit this way? Or this size/amount consideration doesn't matter?

Thanks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happened when you tried it?
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Beer asked, what happened when you tried it. That is certainly a lot of fields on one JSP page. However, since you mentioned you were using the POST method, there is no limit according to the JSP/Servlet specification.
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting a NestedRuntimeException: Cannot parse POST parameters of request ' exception intermittently and the request fails. After some investigation I was redirected to this 'size limit' issue which might be a probable cause but could not confirm this. Hence the query here.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of asking red-herring questions like this, perhaps it would be more useful to post the error that you are getting?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am getting a 'NestedRuntimeException: Cannot parse POST parameters of request ' exception intermittently and the request fails. As stated earlier this exception is the result of submitting a jsp page with a form with about 400 fields.

should i provide more details? basically rest of the exception trace simply tells us that which request failed, which in this case is from the above-mentioned jsp page. i will post it soon as i get back to work. right now i dont have access to it.

by the way bear, you are indeed opinionated
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Haq Yunus wrote:should i provide more details?



Please read this.

by the way bear, you are indeed opinionated

Yes, I am, but how is trying to help you get your question answered opinionated?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get the following exception intermittently when I submit (POST method) a form. of course when this happens the request is not processed.

####<Sep 18, 2009 9:37:05 AM EDT> <Error> <KeyCommerce System> <APP1> <AdminServer> <[ACTIVE] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-2BDBF31E1474> <> <1253281025141> <000000> <Error occured while processing workflow task
keycommerce.web.workflow.WorkflowException: Cannot parse POST parameters of request: '/warehouse/workflow/orderupdate_import_process'
at kcom.web.account.WarehouseLoginTask.execute(WarehouseLoginTask.java:48)
at kcom.web.workflow.WorkflowServlet.executeWorkflow(WorkflowServlet.java:175)
at kcom.web.workflow.WorkflowServlet.doGet(WorkflowServlet.java:122)
at kcom.web.workflow.WorkflowServlet.doPost(WorkflowServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:230)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1861)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

the text in bold is the target action of the JSP which has the form with large number of fields. the text in italic is the place in code where i am doing (which generates the exception):

request.getParameter("param_name");

The application is hosted on WebLogic 9.2. JVM being used is the JRockIt which comes with the WebLogic server. OS is Windows 2003 Server 64bit. The most frustrating thing is that this issue is not consistent and happens every now and then so it is hard to track or debug.

Thanks.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The text of the error message would lead me to suspect that the POST body is somehow malformed and unparsable.

Have you tried it in different browsers to see if the problem is on the client or the server? Also, you want to use an HTTP sniffing tool to check the body of the request when this occurs,. If there's a malformed POST body, it should be readily evident.
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
html sniffing tool sounds relevant! will check it out and get back here to share the results. thanks.
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I didn't use any html sniffing tool but I did find something else. Something totally different.

- The issue is not limited to this one workflow or JSP. It occurs intermittently application-wide.
- The issue seems to be performance/load related rather than HTTP Post parameter corruption. The new stack trace is below:

####<Oct 2, 2009 9:14:22 AM EDT> <Error> <KeyCommerce System> <SIMSAPP1> <AdminServer> <[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-176AA6AF1C35> <> <1254489262078> <000000> <WarehouseLoginTask
weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/warehouse/workflow/orderupdate_import_process'
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1812)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:1699)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1652)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:752)
at keycommerce.web.account.WarehouseLoginTask.execute(WarehouseLoginTask.java:36)
at keycommerce.web.workflow.WorkflowServlet.executeWorkflow(WorkflowServlet.java:175)
at keycommerce.web.workflow.WorkflowServlet.doGet(WorkflowServlet.java:98)
at keycommerce.web.workflow.WorkflowServlet.doPost(WorkflowServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:230)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1861)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
java.net.SocketTimeoutException: Read timed out
at jrockit.net.SocketNativeIO.socketRead(Ljava.io.FileDescriptor;[BIII)I(Unknown Source)
at java.net.SocketInputStream.socketRead0(Ljava.io.FileDescriptor;[BIII)I(SocketInputStream.java:???)
at java.net.SocketInputStream.read(SocketInputStream.java:113)
at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:177)
at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:211)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1787)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:1699)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1652)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:752)
at keycommerce.web.account.WarehouseLoginTask.execute(WarehouseLoginTask.java:36)
at keycommerce.web.workflow.WorkflowServlet.executeWorkflow(WorkflowServlet.java:175)
at keycommerce.web.workflow.WorkflowServlet.doGet(WorkflowServlet.java:98)
at keycommerce.web.workflow.WorkflowServlet.doPost(WorkflowServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:230)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1861)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
>
####<Oct 2, 2009 9:14:22 AM EDT> <Error> <KeyCommerce System> <SIMSAPP1> <AdminServer> <[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-176AA6AF1C35> <> <1254489262078> <000000> <Error occured while processing workflow task
keycommerce.web.workflow.WorkflowException: Cannot parse POST parameters of request: '/warehouse/workflow/orderupdate_import_process'
at keycommerce.web.account.WarehouseLoginTask.execute(WarehouseLoginTask.java:48)
at keycommerce.web.workflow.WorkflowServlet.executeWorkflow(WorkflowServlet.java:175)
at keycommerce.web.workflow.WorkflowServlet.doGet(WorkflowServlet.java:98)
at keycommerce.web.workflow.WorkflowServlet.doPost(WorkflowServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:230)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1861)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)



On googling this it seems that the 'SocketTimeoutException' exception is the one to look for. Many sources suggest that it is basically WebLogic rejecting requests when they go over the limit. Currently the 'Post Timeout' (under HTTP protocol settings) value for the WebLogic server isntance is 30 (default). Some also say that it can be the 'TCP max connection' issue on the server (Windows 2003 Server ). But I didn't find any solution for this. There was also a suggestion about verifying whether the form is being submitted twice. I did check that but that was not the case. Moreover, if it was indeed true then shouldn't this exception occur all the time when the form is submitted and not sporadically?

I know my initial post and analysis was totally different and I apologize for wasting your time. I can start a new thread and link that one to this or moderators can close this.

Anyway, I'll really appreciate the help. Thanks.

Meanwhile I'll try to increase the number of 'Post Timeout' parameter for WebLogic.
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More information which might help:

-There is no clustering in the application and WebLogic deployment. The one AdminServer is also running the application. This mostly happens in the morning when there are many users connected.

-Regarding form being submitted multiple times: There is 2 kinds of strategies being used through JavaScript.
1. HTML button with type 'submit' and on 'onclick' event of this button a small JS method is called which validates stuff and returs true or false. 'form.submit()' is not being called within that JS method.
2. HTML button with type 'submit' and a small JS method is called on the 'onsubmit' event of the form which validates stuff and returns true or false. 'form.submit()' is not being called within that JS method.

Thanks.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At this point I've moved this to the Weblogic forum.
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:At this point I've moved this to the Weblogic forum.



Thanks.

By the way can I change the title of the post or something so it becomes more relevant and so that appropriate people can respond to it? Or should create a new thread altogether?
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are free to continue the discussion here in this post.

From what you describe, when many users hit the application, the processing weblogic thread simply discards it ? That usually does not happen. Weblogic thread time limit is usually 10 minutes after which weblogic assigns a thread status to STUCK. A STUCK thread is one that is processing for 10 minutes or longer (by default) and does not finish. Do your threads take > 10 mins and are they STUCK ?

Using a HTTP sniffer like charles and an atutomated testing tool like selenium or jmeter will also help
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Deepak,

I tried some Charles and it was recording requests from the client (browser) as we know. But as told earlier the issue is not consistent at all, so during all of my tests all requests went through fine.

Then I tried Jmeter. Created a HTTP Request sampler. Simulated that request with appropriate parameters and made like 200-300 calls but again all went through ok. The thing is that I tried to simulate the sampler's parameters as production-like as possible but of course they were not 100% exact. I used graphic listener (which honestly I couldn't get) and Aggregate Report and Summary but all seem to report successes. I also tried the Access Log Sampler which reads from any log files (I supplied some production log files) but it can't simulate Post requests!

There are 3 other things that I am thinking about. What do you advise on that?

1- The actual users (which are in hundreds) are all over the country (I am in US) and connect through firewalls and vpn's and some across the internet. Can this be network related thingy which I should investigate (involve network guys)? I tried 'Wireshark' but as I am very poor in networks I couldn't make it work.

2- In the JSP page the main form is using Post method but in the action we are also sending a query parameter (which goes as Get of course). Can this mixing cause such an intermittent problem? On the same note, if I was submitting the form twice, wouldn't I see this error always rather than sometimes?

3- Do you know any tool which captures requests coming into the WebLogic server? Something we can configure at the server side. This way I will not need to simulate requests and we can capture live requests. I have conifgured 'extended log format' and added couple of ip/dns fields too but they are not helping. There is an entry of each Post request but that's it. The status code is 200 which is success. I think the Post request that give the above mentioned error doesn't get logged in the first place in access.log. Right?

Also the 'Post Timeout' parameter in WebLogic is linked with Thread Stuck time? I thought they were different settings....

Thanks a lot all of you for your time.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can this be network related thingy which I should investigate (involve network guys)? I tried 'Wireshark' but as I am very poor in networks I couldn't make it work.



It might pay to involve the network people. Which actions / servlets actually hit this problem ? Those that have many input parameters to read ?

In the JSP page the main form is using Post method but in the action we are also sending a query parameter (which goes as Get of course). Can this mixing cause such an intermittent problem?



The final request is a POST only. It does not mix. The parameters sent via the POST body go in their own way and the parameters sent via the URL are also made available to the servlet. No problem here.

Do you know any tool which captures requests coming into the WebLogic server?



In production ? Bad idea. The overhead that any tool like this would cause in production simply cannot be justified.

I think the Post request that give the above mentioned error doesn't get logged in the first place in access.log. Right?



It should get logged and return a 500 since the weblogic server threw the exception to the logs.

So what are you doing at -> WarehouseLoginTask.java:36 Is it something related ? Are you trying to read a file or something ?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
q:Which actions / servlets actually hit this problem ? Those that have many input parameters to read ?
a: Nope, not necessarily.

q: It should get logged and return a 500 since the weblogic server threw the exception to the logs.
a: Interesting, as I don't see any 500s....

q: So what are you doing at -> WarehouseLoginTask.java:36 Is it something related ? Are you trying to read a file or something ?
a: Simply getting a request parameter:
String username = request.getParameter("userName");
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

a: Interesting, as I don't see any 500s....



mmm are you using a framework that does a catch all exceptions and then displays a page or are you trying to catch the exception and then display a n error page ? When you display the page is the response code correctly set to 500 ?

String username = request.getParameter("userName");



Very weird ! hmmm... from the information that we have so far it looks like a POST request is truncated in the middle because of a problem. Probable causes could be that the HTTP connection was severed or the user closed the browser (which should throw a connection reset by peer) or something related. I doubt if this is actually a code related problem.

Any web server patches / upgrades, network links that were changed recently ?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
q: are you using a framework that does a catch all exceptions and then displays a page or are you trying to catch the exception and then display a n error page ?
a: I am catching an exception, printing it on the server console and then throwing it again. In addition to this I am also redirecting the user to the error page. So the user simply sees the error page and we get the exception details from the server log. The framework is customized (and very simple) based on FrontController pattern. Nothing fancy going on here. A central servlet which processes each URL pattern and invokes the corresponding action/task class.


q: Any web server patches / upgrades, network links that were changed recently ?
a: Nothing that I know of. I came into this project since last few months and this issue seem to be there for always. As it was infrequent (though it still happens now and inconveniences the user) nobody paid much attention to it until now when the backlog of issues is being cleared.


What should I take to the network guys which shows that this might be a network issue? What should they be looking for at the network side? I don't seem to have anything to pin-point in that direction.

Also, a small request (which is just something irking me and not at all anything substantial): What if we change the title of this post? Maybe (luckily too ;) someone knows something about this. Right now the topic title is totally misleading....thanks.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont think you can change the title after 24 hours. You might be out of luck

I am catching an exception, printing it on the server console and then throwing it again



Throwing it to the container right ? If the container catches the exception and an exception page was configured, it should have recorded the 500. mmmm...

What should I take to the network guys which shows that this might be a network issue?



There is not much you can say. Tell them you think it *could* be a network problem.
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm..ok. I will look into the 500 thingy a bit more to find out what is happening there....


Thanks though.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As for your weblogic server side thing, why not set up a proxy on the server side to log all requests ? Not in production of course.

If you have more info / leads feel free to post here.
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still no success.

Though some more info that might help:

1- There is IIS at the front-end working as a Web Server (2 machines infact for load-balancing) for the application. WebLogic-IIS plugin is used to redirect request from IIS to WebLogic. I created a trace at the Web Server level. I used the 'logman' utility which generates .etl files and then 'logparser' to read them. Did this on both the Web Server machines. Logged all components ("IIS: WWW Server" 0xFFFFFFFE 5). But got nothing new or significant in those files. POST parameters are also not logged there.

2- This application was migrated from WebLogic 8.1 to 9.2 a year or 2 back (before I came). Can this have some affect if that was not performed properly?

3- I read at one place that if we are submitting a form through JS 'submit' function then we should not provide the 'action' attribute in the form element. DO this instead in the JS method. As it might cause double submission. But again, I will re-ask the same question: if the form was being submitted twice, wouldn't this error be consistent?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cross posted at: http://forums.oracle.com/forums/thread.jspa?messageID=3823613�
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm none of the possible causes that you mention should cause trouble. I am not sure what is going on.

Since the exception does propagate up to your code, why not catch it and then analyze the request once you have caught it ?
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On a related note, what web framework are you using for this app ?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've now placed the following snoop code in the catch block where this exception is handled (in WarehouseLoginTask.java above!!!):



Do you have any other ideas about analysing the request object? This is in the Task/Action (WarehouseLoginTask.java) class which is invoked by the Front Controller Servlet.
I have now deployed this tonight. Results (hopefully) tomorrow!

There is as such no struts or other external framework. It is pretty much self-written simple framework which uses the front controller pattern. A central servlet is written which intercepts all requests and invokes relevant classes after reading the mapping of requests string from xml. I might be a bit off here in understanding your query. Please do tell what you want to know regarding this and I will explain.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I asked the question out of curiosity.

When the exception is thrown if you can set a break point at the catch block, you should be able to analyze the request before the response is sent out to the client. This is what I had in mind
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepak Bala wrote:I asked the question out of curiosity.

When the exception is thrown if you can set a break point at the catch block, you should be able to analyze the request before the response is sent out to the client. This is what I had in mind



ahh! not practical, i think, as you know it is not consistent at all. and i have to watch the system continuously for the whole day to trap that special moment. by the way do you think that the above snoop code will help?
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Haq Yunus wrote:

Deepak Bala wrote:I asked the question out of curiosity.

When the exception is thrown if you can set a break point at the catch block, you should be able to analyze the request before the response is sent out to the client. This is what I had in mind



ahh! not practical, i think, as you know it is not consistent at all. and i have to watch the system continuously for the whole day to trap that special moment. by the way do you think that the above snoop code will help?



Well it will only tell you what you already know. That an exception occurred I thought you were going to break there once the code reaches. mmmm.... this is a tough cookie.

If it is ok, you can setup a temporary proxy that saves all requests and responses for may be a day or two, just to solve the problem. You will need to analyze all the requests captured to get somewhere. Its ugly but it might help you
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Deepak.

Any suggestion regarding choosing and setting up of the proxy (like you earlier mentioned some sniffing tools)?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the output of one occurence of the exception from today morning from the snoop code:


<**************************REQUEST ATTRIBUTES*********************************>
< weblogic.servlet.network_channel.port = 7001>
<**************************REQUEST HEADERS**************************>
< <b>Cache-Control</b>: no-cache>
< <b>Content-Type</b>: application/x-www-form-urlencoded>
< <b>Accept</b>: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*>
< <b>Accept-Encoding</b>: gzip, deflate>
< <b>Accept-Language</b>: en-us>
< <b>Cookie</b>: JSESSIONID=ThvvKJDDCHHhyb0w3bc6gJKnL3PdQZBlWGJQQCYqtlF669KjtTcN!2081454430>
< <b>Host</b>: {server name which hosts the app.}>
< <b>Referer</b>: {full https request url}>
< <b>User-Agent</b>: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; msn OptimizedIE8;ENUS)>
< <b>Content-Length</b>: 7187>
< <b>Connection</b>: Keep-Alive>
< <b>Proxy-Client-IP</b>: {client ip}>
< <b>X-Forwarded-For</b>: {client ip}>
< <b>X-WebLogic-KeepAliveSecs</b>: 30>
< <b>X-WebLogic-Force-JVMID</b>: 2081454430>
> <**************************MISC. REQUEST INFO.**************************>
<Protocol: HTTP/1.1>
<Scheme: https>
<Server Name: {server name which hosts the app.}>
<Server Port: 7002>
<Server Info: WebLogic Server 9.2 MP2 Mon Jun 25 01:32:01 EDT 2007 952826 >
<Remote Addr: {client ip}>
<Remote Host: {full client machine address}>
<Character Encoding: null>
<Content Length: 7187>
<Content Type: application/x-www-form-urlencoded>
<Locale: en_US>
<Default Response Buffer: 12216>
<Request Is Secure: true>
<Auth Type: null>
<HTTP Method: POST>
<Remote User: null>
<Request URI: /warehouse/workflow/update_mfg_shipment>
<Context Path: /warehouse>
<Servlet Path: /workflow>
<Path Info: /update_mfg_shipment>
<Path Trans: null>
<Query String: null>
<**************************PARAMETER NAMES AND VALUES**************************>


As we can see that nothing was printed when we tried to get 'request.parameterNames'. The values in italics are just informatory and have been masked for confidentiality.

But interesting to notice is that the following didn't seem to get executed at all:



If getParameterNames generated an exception (which it seems to have done) then shouldn't we something from this catch.....i am losing my mind gradually....
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Weird indeed. If it is ok, why not try to setup a proxy ? You can setup a tool like tcpmon so that requests go to it first. Tcp mon will then forward the requests to your server. If there was a problem, tcpmon should have captured the data.

Charles is also a good debugging tool but requires 50$ for you to buy it. mm... not sure what is going on. Quite weird indeed
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. I'll try TCPMON now. It will run on the server side right? Because in Charles what I found was that it works at the client side (in addition to be a shareware)....am i correct?

Also, what about 'Post Timeout' parameter. I know I have asked this before but I didn't get your 'Stuck Thread' explanation. How is that linked with 'Post Timeout'? Don't you think that the Post request is timing out if there is network latency or a large request. I am trying to get network involved too but as I don't have anything concrete for them so it is taking some time.


Do you think contacting WebLogic support will help? We do have a contract.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is good, that you have a WL contact. Ask them if it is a known problem.

As for stuck thread, they need not involve a POST request. Any thread that is waiting for 10 mins (triggered by a servlet or not) will be marked as STUCK
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Just opened a case today. Let us see.

Meanwhile can HTTP tunneling be involved in here? Actually right now I am trying to exhaust all options. Moreover we do get 'HTTP Tunneling no enabled' exception every now and then but i never paid any attention to it as it doesn't seem to be linked with the application.

One more thing:
Yesterday we got a 'SocketTimeOutException:read timed out' (only this nothing else) in a workflow where user uploads a file. It was generated on 'InputStream.readLine()' method. again intermittent and never seen before. This made me think that the above original problem might be after all network issue....right??
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Haq Yunus wrote:Yes. Just opened a case today. Let us see.

Meanwhile can HTTP tunneling be involved in here? Actually right now I am trying to exhaust all options. Moreover we do get 'HTTP Tunneling no enabled' exception every now and then but i never paid any attention to it as it doesn't seem to be linked with the application.

One more thing:
Yesterday we got a 'SocketTimeOutException:read timed out' (only this nothing else) in a workflow where user uploads a file. It was generated on 'InputStream.readLine()' method. again intermittent and never seen before. This made me think that the above original problem might be after all network issue....right??



Tunneling is used when one protocol needs to be accessed by tunneling over the http or other port. For example SSH can be used to tunnel to different ports on a server. As for the problem, yes if it is a code related problem you should be able to see some consistency. This looks like a problem with the link or content length or something related. I say that based on the thread discussion alone so take that with a grain of salt. My opinion may vary if I were sitting right next to you and analyzing this.

Good luck solving the problem. Would love to know what it was.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic