[Beginners Corner] - Http 500 Internal Server Error
by calsonli
Could anyone provides me some solution?
I encountered "HTTP 500 internal server error" while testing a jsp that forwards to an error page whenever user inputs a wrong data type on a web form to sum 2 inputted numbers. The application server version I am using is JBoss 4.0.5.GA application server.
My Calculate3_html.jsp file is:
<HTML>
| <HEAD><TITLE>Calculator</TITLE></HEAD>
| <BODY>
|
| <%@ include file="Calculate3Header.html" %>
| <P>Enter 2 nos. and click the Calculate button.
| <p>
| <FORM METHOD=GET ACTION=Calculate3.jsp>
| <INPUT TYPE=TEXT NAME=Value1><BR>
| <INPUT TYPE=TEXT NAME=Value2><BR>
| <INPUT TYPE=SUBMIT VALUE=Calculate>
| </FORM>
| </BODY></HTML>
My Calculate3.jsp file is:
<%@ page language="java" pageEncoding="UTF-8" errorPage="Calculate3Error.jsp" %>
|
| <%!
| // No try/catch for NumberFormatException
| private double toDouble(String value) {
| return Double.parseDouble(value);
| }
| %>
|
| <%
| double value1 = toDouble(request.getParameter("Value1"));
| double value2 = toDouble(request.getParameter("Value2"));
| double sum = value1 + value2;
| %>
|
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
| <html>
| <head>
| </head>
|
| <body>
|
| <%@ include file="Calculate3Header.html" %>
|
|
| The sum of <%= value1 %> and <%= value2 %> is <%= sum %>
| </body>
| </html>
My Calculate3Header.html file is:
<H1><I>A Simple Calculator (Exercise 3)</I></H1>
My Calculate3Error.jsp file is:
<%@ page language="java" pageEncoding="UTF-8" isErrorPage="true" %>
|
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
| <html>
| <head>
| </head>
|
| <body>
|
| <%@ include file="Calculate3Header.html" %>
|
|
|
| Calculate3Error.jsp reported the following error:
| <I><%= exception %></I>
| <br>
| <a href="Calculate3_html.jsp">Click here to try again</a>
| </body>
| </html>
Thank you.
Calson
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039671#4039671
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039671
19 years
[JBoss Seam] - Can not persist EJB3 Timer since Jboss 4.2.0cr2 + seam from
by gena777
Hi, while i'm trying to persist one start and one end timer, i get following exception. Some details on the unit of work: I persist my object (object graph) at the end of long running conversation with extended persistent context. Then i do em.flash() and (if all succeeded) i wish to schedule two timers (for one execution in a future). Then i get this exception:
| 03:07:07,448 ERROR [STDERR] org.jboss.resource.connectionmanager.JBossLocalXAException: Trying to start a new tx when old is not complete! old: < 131075, 29, 27, 1--3f57feec:1029:462bf231:671-3f57feec:1029:462bf231:6f1
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:886)
| 03:07:07,464 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:701)
| 03:07:07,464 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:446)
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
| 03:07:07,464 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| 03:07:07,464 ERROR [STDERR] at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.insertTimer(GeneralPurposeDatabasePersistencePlugin.java:199)
| 03:07:07,464 ERROR [STDERR] at org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(DatabasePersistencePolicy.java:120)
| 03:07:07,464 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 03:07:07,464 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 03:07:07,464 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 03:07:07,464 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 03:07:07,479 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 03:07:07,479 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 03:07:07,479 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| 03:07:07,479 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 03:07:07,479 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 03:07:07,479 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 03:07:07,479 ERROR [STDERR] at $Proxy30.insertTimer(Unknown Source)
| 03:07:07,479 ERROR [STDERR] at org.jboss.ejb.txtimer.TimerServiceImpl.createTimer(TimerServiceImpl.java:256)
| 03:07:07,479 ERROR [STDERR] at org.jboss.ejb.txtimer.TimerServiceImpl.createTimer(TimerServiceImpl.java:222)
| 03:07:07,479 ERROR [STDERR] at org.jboss.ejb3.timerservice.jboss.TimerServiceFacade.createTimer(TimerServiceFacade.java:61)
| 03:07:07,479 ERROR [STDERR] at org.jboss.seam.core.Dispatcher.schedule(Dispatcher.java:224)
| 03:07:07,479 ERROR [STDERR] at org.jboss.seam.core.Dispatcher.scheduleInvocation(Dispatcher.java:205)
| 03:07:07,479 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 03:07:07,479 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 03:07:07,479 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 03:07:07,479 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 03:07:07,479 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
|
The problem is, it did work on jboss 4.0.5 with seam 1.2.0. Could someone please explain, if there are some changes in the implementation or where is my error.
Many thanks,
Gena
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039667#4039667
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039667
19 years