${fn:length ()} throws javax.servlet.ServletException:
This is an Issue with JSTL in struts framework
a.class
private StringBuilder actionPlans;
b.jsp
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:choose>
<c:when test="${empty summaryCO.actionPlans}">
<c:out value="${summaryCO.actionPlans}"/>
</c:when>
<c:otherwise>
<c:out value="${summaryCO.actionPlans}"/>
<c:out value="${fn:length(summaryCO.actionPlans)}"/>
<html:link page="/maintainSummaryPre.do?method=readSummaryAction&&actionPlanDesc=${summaryCO.actionPlans}" styleClass="ajaxOverlayTrigger">
<fmt:message key="label.viewSummary.readSummaryActionPlan"/>
</html:link>
</c:otherwise>
</c:choose>
In the above piece of code fn:length is not fetching result and throws
javax.servlet.ServletException: An error occurred while evaluating function "fn:length"
but when is use ${fn:toUpperCase , it workd fine and fetches me correct result ..
please reply why it throws error only for length . my requirement is to find the length of that String and display it .
do we have any other alternative in JSTL or struts to do this..
Thanks
<c:out value="${fn:length(summaryForm.currentRedRatedDeliverablesByCategory)}"/>
<c:forEach var="summaryCO" items="${summaryForm.currentRedRatedDeliverablesByCategory}">
<tr>
<td>
<c:set var="actionPlanString" value="${summaryCO.actionPlans}"></c:set>
<c:choose>
<c:when test="${empty summaryCO.actionPlans}">
<c:out value="${summaryCO.actionPlans}"/>
</c:when> <c:otherwise>
<c:out value="${summaryCO.actionPlans}"/>
<c:out value="${fn:length(actionPlanString)}"/>
<html:link page="/maintainSummaryPre.do?
method=readSummaryAction&&actionPlanDesc=${summaryCO.actionPlans}"
styleClass="ajaxOverlayTrigger">
<fmt:message key="label.viewSummary.readSummaryActionPlan"/>
</html:link>
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
In this piece of code the first line gives the length value of the ArraList
so fn:length works fine for getting the no of chars of a list .
but inside the list when i use <c:out value="${fn:length(actionPlanString)}"/> to get the length of a String of an item in the ArrayList
it didnt fetch the count , it throws
javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in <forEach>
at org.apache.taglibs.standard.functions.Functions.length(Unknown Source)
javax.servlet.ServletException: An error occurred while evaluating function "fn:length"
The Issues assumptions are following
1) becoz it is a stringbuilder and fn:length does not work for that
2)as the String builder is set to var it is converted to a string and still fn:length does not work becoz it is and item inside the List
3)fn:length cant be used for getting the length of the string as it will work only if a string is outside a loop.
ultimately my requirement is to print the no of characters of the "actionPlanString" which is inside the loop of List.
I need an answer with a modified code piece .
Thanks.
Similar Messages
-
Javax.servlet.ServletException: Before start of result set
I have a page where i want to put items that have been entered into a bean and put them into my SQL database. Firs of all i want to insert some value into my question table and then I use the SELECT LAST_INSERT_ID() function in mySQL to get the last incremented ID from the first statement. As you can see I then want to use this ID and insert it into the other statements to relate the tables but I get an exception which is shown below. The frist insert staemet works fine when the rest is commented out but when i try it with the other 2 insert statements it throws this back at me.
javax.servlet.ServletException: Before start of result set
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:453)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
java.sql.SQLException: Before start of result set
com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:4424)
com.mysql.jdbc.ResultSet.getNativeInt(ResultSet.java:6210)
com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1335) org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:126)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
My code is shown here
// gets the feedback string parameters
if (request.getParameterValues("feedbackBox") != null) {
String [] feedbackList = request.getParameterValues("feedbackBox");
questionData.feedback = feedbackList;
//gets the session username variable
String insertQuestion1__username = null;
if (session.getValue("MM_Username") != null) {
insertQuestion1__username = (String)session.getValue("MM_Username");
//Creates a new mySQL date
java.sql.Date currentDate = new java.sql.Date((new java.util.Date()).getTime());
//goes thorugh each element of the scores array and calculates maxScore
questionData.maxScore = 0;
for (int i = 0; i < questionData.scores.length; i++) {
questionData.maxScore = questionData.maxScore + questionData.scores;
Driver DriverinsertQuestion = (Driver)Class.forName(MM_connQuestion_DRIVER).newInstance();
Connection ConninsertQuestion1 = DriverManager.getConnection(MM_connQuestion_STRING, MM_connQuestion_USERNAME,
MM_connQuestion_PASSWORD);
questionData.numOutcomes = questionData.choices.length;
PreparedStatement insertQuestion1 =
ConninsertQuestion1.prepareStatement("INSERT INTO Question.question (Topic_ID, Description, Image, Author, Created_Date, Max_Score, Question_Type) VALUES ('"
+ questionData.topicID + "', '"
+ questionData.questionText + "', '"
+ questionData.questionImage + "', '"
+ insertQuestion1__username + "', '" + currentDate
+ "', " + questionData.maxScore + ", '"
+ questionData.questionType + "') ");
insertQuestion1.executeUpdate();
PreparedStatement StatementlastID = ConninsertQuestion1.prepareStatement("SELECT LAST_INSERT_ID()");
ResultSet lastID = StatementlastID.executeQuery();
int questionID = lastID.getInt(1);
Driver DriverinsertQuestion2 = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
Connection ConninsertQuestion2 = DriverManager.getConnection(MM_connAnswer_STRING, MM_connAnswer_USERNAME,
MM_connAnswer_PASSWORD);
PreparedStatement insertQuestion2 =
ConninsertQuestion2.prepareStatement("INSERT INTO Answer.question (Question_ID, Question_Description, Question_Type, Topic, Number_Outcomes, Question_Wording) VALUES ('"
+ questionID + "', '" + questionData.questionLabel
+ "', '" + questionData.questionType + "', '"
+ questionData.questionType + "', '"
+ questionData.topicID + "', '"
+ questionData.numOutcomes + "', '"
+ questionData.questionText + "' ) ");
insertQuestion2.executeUpdate();
Driver DriverinsertOutcomes = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
Connection ConninsertOutcomes = DriverManager.getConnection(MM_connAnswer_STRING, MM_connAnswer_USERNAME,
MM_connAnswer_PASSWORD);
for (int i = 0; i < questionData.numOutcomes; i++) {
PreparedStatement insertOutcomes =
ConninsertOutcomes.prepareStatement("INSERT INTO Answer.outcome (Question_ID, Outcome_Number, Outcome_Text, Score, Feedback) VALUES ( '"
+ questionID + "', '" + i + "', '"
+ questionData.choices[i] + "', '"
+ questionData.scores[i] + "', '"
+ questionData.feedback[i] + "' ) ");
insertOutcomes.executeUpdate();further to Limo2kz's problem, LAST_INSERT_ID() will return 0 if the last INSERT statement actually has inserted 0 records. this could happen if the previous INSERT attempt has failed.
as far as i can remember, you should find out if the account or user that you are currently using to connect to MySQL database is allowed to do more SQL executions and create more SQL connections at certain given time (i.e., 10 executions in 1 hour, 10 connections in 1 hour). otherwise, you would have subsequent SQL exceptions because the database server won't allow you to execute them, thus giving you a null ResultSet. -
The source code I am having is
1> Login.jsp
2>LoginForm.java
3>LoginAction.java
4>web.xml
5>struts-config.xml
1>Login.jsp
<%@ page language="java"%>
<%@ page import="java.io.*"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:html>
<center><IMG SRC="E:\jboss-4.0.3SP1\server\default\deploy\TestApplication.war\image\welcome.jpg" HEIGHT=233 WIDTH=282 ALT="WELCOME TO DATAMATICS"></center>
<center><h1 style="color:blue"><hr>WELCOME TO DATAMATICS</hr></h1></center>
<h2 style="color:green">LOGIN FORM</h2>
<html:errors/>
<center>
<body>
<html:form action="/login.do" >
<table width="20%" border="0">
<td>
<tr><h4 style="color:red">USER ID:<h4></tr>
<tr><html:text property="username" size="30"/></tr>
<hr>
</td>
<td>
<tr><h4 style="color:red">PASSWORD:</h4></tr>
<tr><html:password property="password" size="30" /></tr>
<hr>
<tr><html:submit>SUBMIT </html:submit></tr><hr>
<tr><html:reset/></tr>
<tr></tr>
</td>
</table>
</body>
</html:form>
</center>
</html:html>------------------------------------------------------
2>LoginForm.java
package com.MyPack.Datamatics;
import com.MyPack.Datamatics.LoginAction;
import javax.servlet.http.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action.*;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError.*;
//import java.util.*;
//import java.io.*;
public class LoginForm extends ActionForm
private String username=null;
private String password=null;
public void setUserName(String username)
this.username=username;
public String getUserName()
return username;
public void setPassword(String password)
this.password=password;
public String getPassword()
return password;
public void reset(ActionMapping am,HttpServletRequest req)
this.username="";
this.password="";
public ActionErrors validate(ActionMapping am, HttpServletRequest req)
ActionErrors ae = new ActionErrors();
if ( (username==null) || (username.length()==0))
// ae.add("username" , new ActionMessage("errors.username.required") );
if( (password==null) || (password.length()==0))
// ae.add("password" , new ActionMessage("errors.password.required") );
return ae;
3>LoginAction.java
package com.MyPack.Datamatics;
import com.MyPack.Datamatics.LoginForm;
import javax.servlet.http.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import javax.servlet.ServletException;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
public class LoginAction extends Action
public ActionForward execute(ActionMapping am,
ActionForm af,
HttpServletRequest req,
HttpServletResponse res)throws IOException, ServletException
String target= new String("success");
if(af!=null)
LoginForm loginForm = (LoginForm)af;
String userName = loginForm.getUserName();
String password = loginForm.getPassword();
if (userName.equalsIgnoreCase("Datamatics") && password.equalsIgnoreCase("12345"))
req.setAttribute("UserName",userName);
else
target = new String("failure");
return am.findForward(target);
4>web.xml
<web-app>
<servlet>
<servlet-name>ActionServlet</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config </param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>application </param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mappings>
<servlet-name>ActionServlet</servlet-name>
<url-mapping>*.do</url-mapping>
</servlet-mappings>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app>-----------------------
5>Struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<struts-config>
<form-beans>
<form-bean name="loginForm" type="com.MyPack.Datamatics.LoginForm" />
<form-bean name="uploadForm" type="com.MyPack.Datamatics.UploadForm" />
</form-beans>
<global-forwards>
<forward name="success" path="/index.jsp"/>
</global-forwards>
<action-mappings>
<action path="/login"
type="com.MyPack.Datamatics.LoginAction"
name="loginForm"
scope="request"
input="/login.jsp">
<forward name="success" path="/upload.jsp" />
<forward name="fail" path="/index.jsp" />
</action>
<action path="/upload"
type="com.MyPack.Datamatics.UploadAction"
name="uploadForm"
scope="request"
input="/upload.jsp">
<forward name="success" path="/successUpload.jsp" />
<forward name="fail" path="/index.jsp" />
</action>
</action-mappings>
<controller
processorClass="org.apache.struts.action.RequestProcessor"/>
</struts-config>Kindly help where i am going wrong ..... I have mapped every property, even though I am getting this error
:::::::>> javax.servlet.ServletException: No getterError come from your LogonForm.
Field: username So getter must be getUsername() and not getUserName() ("N" is lower case). -
Dear all,
First of all sorry, if this is not the right place for my question.
I am facing some problem with the XFire Webservices. When i am trying to access the WSDL through the url. server is throwing the following exception :
javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.jdom.Namespace.getNamespace(Namespace.java:164)
org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
cont.......
I am not able to figure out the root cause for this. The service.xml file looks like below:
<?xml version="1.0" encoding="UTF-8"?>
<!-- START Service.xml -->
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<!-- Construct the castor service factory by Spring -->
<bean id="castorTypeRegistry" class="org.codehaus.xfire.castor.CastorTypeMappingRegistry"/>
<bean id="bindingProvider" class="org.codehaus.xfire.aegis.AegisBindingProvider">
<constructor-arg ref="castorTypeRegistry"/>
</bean>
<bean id="castorServiceFactory" class="org.codehaus.xfire.service.binding.ObjectServiceFactory">
<constructor-arg index="0" ref="xfire.transportManager"/>
<constructor-arg index="1" ref="bindingProvider"/>
</bean>
<service>
<name>ReleaseManager</name>
<namespace>ReleaseManager</namespace>
<serviceClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManager</serviceClass>
<implementationClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManagerImpl</implementationClass>
<schemas>
<schema>META-INF/schema/release-impact-worksheet-3.2.0.xsd</schema>
</schemas>
<style>document</style>
<serviceFactory>#castorServiceFactory</serviceFactory>
</service>
</beans>
<!-- END Service.xml-->
The issue which i am facing is it due to the problem with the service.xml (Which i dont think so..), Or is it any thing to do with the XSD file which i am using.
Can any body give me some guide lines for this ????
Thanks in advance.
Thanks and Regards,
Manjunath.Any one any thoughts..
I need to find out the solution for this as soon as possible; Not able to proceed further...
Thanks and Regards,
Manjunath. -
Javax.servlet.ServletException: Servlet execution threw an exception
Hi guys...
I got an error message after I click a button on my page. Before my action class called, servlet throw an exception.
this is the error message from my eclipse console.
15:31:31,062 INFO [STDOUT] javax.servlet.ServletException: Servlet execution threw an exception
15:31:31,062 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
15:31:31,062 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at roll.mov.j2ee.common.filters.PersistFilter.doFilter(PersistenceFilter.java:160)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
15:31:31,156 INFO [STDOUT] at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
15:31:31,156 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
15:31:31,156 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
15:31:31,156 ERROR [PersistFilter] Exception object caught by servlet persist filter.
15:31:31,171 ERROR [[action]] Servlet.service() for servlet action threw exception
roll.mov.j2ee.common.exceptions.RollMovException: Error caught
begin nested exception:
javax.servlet.ServletException: Servlet execution threw an exception
end nested exception:
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at roll.mov.j2ee.common.filters.PersistenceFilter.doFilter(PersistenceFilter.java:160)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Note:
- roll.mov.j2ee.common.exceptions.RollMovException is my custom exception.
- roll.mov.j2ee.common.filters.AuthenticationFilter, implement javax.servlet.Filter
- roll.mov.j2ee.common.filters.PersistFilter, implement javax.servlet.Filter
this persistFilter work as proxy hibernate filterFrom my experience, Normally the root cause will be display in the exception. but this error message doesn't provide any information about what's wrong with my code.
Anyone have an idea?
Thanks in advamce
pdtThanks for replying gimbal2.
in that line, " AuthenticationFilter.java:167" i called the
filterChain.doFilter(request, response);where filterChain is object of javax.servlet.FilterChain
I run my jboss with debug mode and i got abit more information about the error.
the error message:
2006-07-20 12:56:48,437 WARN [org.apache.struts.action.RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
2006-07-20 12:56:48,437 INFO [STDOUT] ServletException thrown
2006-07-20 12:56:48,437 INFO [STDOUT] javax.servlet.ServletException
2006-07-20 12:56:48,437 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
2006-07-20 12:56:48,437 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
2006-07-20 12:56:48,437 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
2006-07-20 12:56:48,437 INFO [STDOUT] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
2006-07-20 12:56:48,437 INFO [STDOUT] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
2006-07-20 12:56:48,437 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2006-07-20 12:56:48,437 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
15:31:31,062 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
15:31:31,062 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at roll.mov.j2ee.common.filters.PersistFilter.doFilter(PersistenceFilter.java:160)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
15:31:31,156 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
15:31:31,156 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
15:31:31,156 INFO [STDOUT] at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
15:31:31,156 INFO [STDOUT] at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
15:31:31,156 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
15:31:31,156 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
15:31:31,156 ERROR [PersistFilter] Exception object caught by servlet persist filter.
15:31:31,171 ERROR [[action]] Servlet.service() for servlet action threw exception
roll.mov.j2ee.common.exceptions.RollMovException: Error caught
begin nested exception:
javax.servlet.ServletException: Servlet execution threw an exception
end nested exception:
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at roll.mov.j2ee.common.filters.PersistenceFilter.doFilter(PersistenceFilter.java:160)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)I check in docjar.com, seems like the the line in requestprocessor.java that thrown this exception is
return (handler.execute(exception, config, mapping, form, request, response)); where handler is org.apache.struts.action.ExceptionHandler
any idea guys..
Thanks in advance
pdt -
Initially, when I clicked on my JSPs, everything was fine. I was able to retrieve data successfully from all the JSPs. However, after much clicking through the JSPs. I was not able to access the JSPs and the Internal Servlet Error was shown.
Below is my Tomcat.log:
Context log: path="/Aedge" Error in jsp service() : Connection reset by peer: socket write error
javax.servlet.ServletException: Connection reset by peer: socket write error
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:375)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163)
at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)
Context log: path="/Aedge" <b>Internal Servlet Error:</b><br>.....
What is the problem here? How can I solve this as I had to restart my Tomcat once a while due to this problem.ok.. I have db classes where all my sql statements methods are being displayed.. In each db class, there will be a getInstance() method to create the connection. Below is one of my db class.. How to I modified the things you had mentioned in my codes..
package aedgeSoft.access;
import aedgeSoft.business.*;
import java.sql.*;
import java.util.*;
import java.util.Date;
import java.io.*;
public class DBMemberType
private Connection con;
private static DBMemberType instance = null;
public static DBMemberType getInstance()
try
if(instance==null)
instance = new DBMemberType();
catch(SQLException e)
System.out.println("Problems with loading database in DBMemberType");
catch(ClassNotFoundException e)
System.out.println("Problems with loading db driver in DBMemberType");
finally
return instance;
private DBMemberType() throws SQLException, ClassNotFoundException
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;user=username;password=password;DatabaseName=db");
catch(InstantiationException e)
e.printStackTrace();
catch(IllegalAccessException e)
e.printStackTrace();
//add memberType
public boolean addMemberType(MemberType mt)
.......... -
Javax.servlet.ServletException: javax/jms/JMSException
Hi,
I am trying to deploy a web application in tomcat 5.5, the application is trying to connect to BPEL using RMI. It throws the next exception when trying to retrieve the worklist:
javax.servlet.ServletException: javax/jms/JMSException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)....
It works fine in the OC4J
Please Help!!!Hi,
I am trying to deploy a web application in tomcat 5.5, the application is trying to connect to BPEL using RMI. It throws the next exception when trying to retrieve the worklist:
javax.servlet.ServletException: javax/jms/JMSException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)....
It works fine in the OC4J
Please Help!!! -
Javax.servlet.ServletException: Unknown SMTP host
Hi
I am using tomcat and trying to send emails. I keep getting a javax.servlet.ServletException: Unknown SMTP host error.
I initially thought the problem was with the line: props.put("mail.smtp.host", "makethegrade.co.za"); But i checked the smtp info with the guys i'm hosing with and they said its right
I am currently setting the fields manually, so it can't be a problem with passing data around in the webpage
In my WEB-INF/lib i have jaf-1.0.2 and javamail-1.4.1 (i.e. mail.jar and activation.jar)
The code for my mailer bean is:
package mailer;
import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.event.*;
import javax.mail.internet.*;
public final class MailerBean extends Object implements Serializable {
/* Bean Properties */
private String to = null;
private String from = null;
private String subject = null;
private String message = null;
public static Properties props = null;
public static Session session = null;
static {
/* Setting Properties for STMP host */
props = System.getProperties();
props.put("mail.smtp.host", "makethegrade.co.za");
session = Session.getDefaultInstance(props, null);
/* Setter Methods */
public void setTo(String to) {
this.to = to;
public void setFrom(String from) {
this.from = from;
public void setSubject(String subject) {
this.subject = subject;
public void setMessage(String message) {
this.message = message;
/* Sends Email */
public void sendMail() throws Exception {
if(!this.everythingIsSet())
throw new Exception("Could not send email.");
try {
MimeMessage message = new MimeMessage(session);
message.setRecipient(Message.RecipientType.TO,
new InternetAddress(this.to));
message.setFrom(new InternetAddress(this.from));
message.setSubject(this.subject);
message.setText(this.message);
Transport.send(message);
} catch (MessagingException e) {
throw new Exception("Caught in sendMail" + e.getMessage());
/* Checks whether all properties have been set or not */
private boolean everythingIsSet() {
if((this.to == null) || (this.from == null) ||
(this.subject == null) || (this.message == null))
return false;
if((this.to.indexOf("@") == -1) ||
(this.to.indexOf(".") == -1))
return false;
if((this.from.indexOf("@") == -1) ||
(this.from.indexOf(".") == -1))
return false;
return true;
}and the error i get is:
org.apache.jasper.JasperException: Exception in JSP: /processingPages/mailer.jsp:17
14: mailer.setFrom("[email protected]");
15: mailer.setSubject("mailer test");
16: mailer.setMessage("TEst test test");
17: mailer.sendMail();
18:
19: %>
20: </jsp:useBean>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
javax.servlet.ServletException: Unknown SMTP host: mail.yourisp.com
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.processingPages.mailer_jsp._jspService(mailer_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
java.lang.Exception: Unknown SMTP host: mail.yourisp.com
mailer.MailerBean.sendMail(MailerBean.java:54)
org.apache.jsp.processingPages.mailer_jsp._jspService(mailer_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
Tomcat logs give:
Jul 15, 2009 10:50:35 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.Exception: Unknown SMTP host: mail.yourisp.com
at mailer.MailerBean.sendMail(MailerBean.java:54)
at org.apache.jsp.processingPages.mailer_jsp._jspService(mailer_jsp.java:67)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
If anyone needs any other details feel free to ask.
Any help or any pointers to a place to find a solution would be deeply appreciated
ThanksAll I can see is that you are running this in a web application. In most web application containers there's a place where you configure your mail providers and mail sessions. You seem to be ignoring that (you aren't using JNDI to get a session for example) but you are getting the default instance, so perhaps that uses that configuration anyway.
-
Javax.servlet.ServletException - On launching BPEL Console
Hi,
I have applied MLR 7 patch (Patch # 8372141 ) on my fmw environment.
Environment Details applying the patch:
SOA Suite - 10.1.3.1 + 10.1.3.4
OPatch 1.0.0.0.61
MLR5 patch 7714967
Before applying the patch it was working fine and no issues.
After applying the patch, I could not login to BPEL Console URL, getting the below error message
Oracle BPEL Process Manager Full Cycle
An unexpected error has occurred while executing your request. This is most likely related to a defect in the Oracle BPEL Process Manager product. We apologize you can post the error to the OTN forum and we will get back to you as soon as possible.
Build Information:
Oracle BPEL Server version 10.1.3.4.0
Build: 0
Build time: Fri May 01 18:07:27 PDT 2009
Build type: release
Source tag: PCBPEL_10.1.3.4.0MLR7_GENERIC_RELEASE
Exception Message:
javax.servlet.ServletException - com.collaxa.cube.ejb.impl.BPELProcessManagerBean.getDefaultRevision(com.oracle.bpel.client.BPELProcessId, com.oracle.bpel.client.auth.DomainAuth)
I could not find a way to attach the log file and the log file content is too big to post it here.. (exceeds the maximum length)
Could someone help me on this ?
Thanks,
SureshHi,
Yes you are correct. There was a mismatch in orabpel.ear file sizes. Seems post.bat script did not run properly.
Ran the below commands manually,
chmod 755 $ORACLE_HOME/bpel/system/services/lib/orabpel.ear
chmod 755 $ORACLE_HOME/bpel/system/services/lib/ejb_services.jar
chmod 755 $ORACLE_HOME/bpel/system/services/lib/ejb_ob_engine.jar
cp $ORACLE_HOME/bpel/system/j2ee/orabpel.ear $ORACLE_HOME/bpel/system/services/lib/orabpel.ear
cp $ORACLE_HOME/bpel/system/j2ee/ejb/oc4j_ejb_services.jar $ORACLE_HOME/bpel/system/services/lib/ejb_services.jar
cp $ORACLE_HOME/bpel/system/j2ee/ejb/ejb_ob_engine_oc4j.jar $ORACLE_HOME/bpel/system/services/lib/ejb_ob_engine.jar
cd $ORACLE_HOME/bpel/system/services/lib
$ORACLE_HOME/jdk/bin/jar -uvf orabpel.ear ejb_services.jar ejb_ob_engine.jar
cp $ORACLE_HOME/bpel/system/services/lib/orabpel.ear $ORACLE_HOME/j2ee/oc4j_soa/applications/orabpel.ear
Then took a backup of the folder $ORACLE_HOME/j2ee/oc4j_soa/application-deployments/orabpel
Deleted "orabpel" folder and restarted the opmn
This worked.
Thanks,
Suresh M -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:711)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:419)
org.apache.jsp.index_jsp._jspx_meth_html_form_0(org.apache.jsp.index_jsp:139)
org.apache.jsp.index_jsp._jspx_meth_html_html_0(org.apache.jsp.index_jsp:114)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
This is my web.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//SUN Microsystem, //"
"http://java.sun.com/j2ee/dtds/web-app_2.2/dtd">
<web-app>
<!--Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!-- Resource Bundle base class -->
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<!-- Context Relative Path to the XML resource containing Struts Configuration -->
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<!-- The Debugging detail level for this servlet, which controls how much information -->
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Application Tag Library Descriptor -->
<taglib>
<taglib-uri>/WEB-INF/app.tld</taglib-uri>
<taglib-location>/WEB-INF/app.tld</taglib-location>
</taglib>
<!-- Struts Tag Lib Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app>
==================================================================================================================
This is my Struts-config.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC "-//SUN Microsystem, //"
"http://java.sun.com/j2ee/dtds/struts-config_1_0/dtd">
<struts-config>
<form-beans>
<!-- Logon Form Bean -->
<form-bean name="loginForm" type="LoginForm" />
</form-beans>
<global-forwards>
<forward name="mainmenu" path="/mainmenu.jsp" />
</global-forwards>
<action-mappings>
<!-- Process a user logon -->
<action path="/login" type="LoginAction"
name="loginForm" scope="session" input="/index.jsp">
</action>
</action-mappings>
</struts-config>
==================================================================================================================
This is my LoginForm.java file
package src;
import org.apache.struts.action.ActionForm;
public class LoginForm extends ActionForm {
private String login;
private String password;
public String getLogin() {
return login;
public void setLogin(String login) {
this.login = login;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
==================================================================================================================
This is my LoginAction.java file
package src;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.action.Action;
public class LoginAction extends Action {
public ActionForward execute( ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
return (mapping.findForward("mainmenu"));
==================================================================================================================
This is my index.jsp file
<%@ page language ="java" %>
<%@ taglib uri ="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri ="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri ="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<title> My First Struts Application! </title>
</head>
<body>
<html:form action="/login">
LOGIN : <html:text property="login" />
PASSWORD : <html:password property="password" />
<html:submit> Login </html:submit>
<html:reset> Reset </html:reset>
</html:form>
</body>
</html:html>
==================================================================================================================
and finally This is my mainmenu.jsp file
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<title>Main Menu</title>
</head>
<body>
This is the MainMenu !
</body>
</html:html>
==================================================================================================================
Kindly solve my problem........
try to run on your machine...........
I am using Tomcat 5.5.9 and my Project name is MyAppliHey guys,
Even I was frustrated for a long time with all the Struts errors for which Google returned loads of results but no particular solutions. All these solutions were all based on hit and trial and only work on some cases. Let me tell you that Struts (and most other frameworks) have a general approach to consume the actual error message and throw an exception which is light years away from the actual cause. So whats' the solution?
Enable logging.... LOG4J to be precise...
...and see that it (log4j) is configured properly. You will see the actual cause there and not on the consoles of your servers (whichever you use).
In my case, it was a host not found exception in the logs because I was sitting behind a firewall and the validator could not locate struts.apache.org
(Wish this thread had some duke dollars)
Regards,
The Correspondent
http://www.araneidae.org -
Hi,
I am using BEA WebLogic Server 9.2
When I deployed my [ear] apllication (Struts 1, Java 1.4, EJB2) I get this error:
Message icon - Error javax.servlet.ServletException: [HTTP:101250][[email protected] -
appName: 'test-ear', name: 'TEST', context-path: '/TEST']: Servlet class de.general.TestActionServlet for servlet action could not be loaded because a class on which
it depends was not found in the classpath . java.lang.NoClassDefFoundError:
org/apache/struts/action/ActionServlet.
Please help me in this ClassLoader problem,
RegardsHi
you can set the classpath struts.jar in setDomainEnv.cmd
you can get this file in your root domain under the bin directory.
set classpath=%classpath%;/struts.jar; -
Javax.servlet.ServletException: runtime failure in custom tag 'content'
Hi When iam trying to click on a link which takes to an another JSP.
iam getting this error after few minutes and that page doesnt display at
all.
can anybody help me out????
==vasan++;
<Jan 9, 2001 11:50:10 AM PST> <Error> <HTTP>
<[WebAppServletContext(627219,console)] exception raised on
'/console/panels/mbean/Server.jsp'
javax.servlet.ServletException: runtime failure in custom tag 'content'
at
weblogic.management.console.pages._panels._mbean._server._jspService(_server
.java:9798)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Jan 9, 2001 11:50:10 AM PST> <Error> <HTTP>
<[WebAppServletContext(627219,console)] Root cause of ServletException
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
weblogic.servlet.internal.ChunkUtils.writeHeaderChunk(ChunkUtils.java:127)
at
weblogic.servlet.internal.ResponseHeaders.writeHeaders(ResponseHeaders.java:
345)
at
weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletResponseIm
pl.java:683)
at
weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamI
mpl.java:124)
at
weblogic.servlet.internal.ServletOutputStreamImpl.flushWithCheck(ServletOutp
utStreamImpl.java:451)
at
weblogic.servlet.internal.ServletOutputStreamImpl.print(ServletOutputStreamI
mpl.java:243)
at
javax.servlet.ServletOutputStream.println(ServletOutputStream.java:286)
at
weblogic.servlet.jsp.JspWriterImpl.println(JspWriterImpl.java:204)
at
weblogic.management.console.pages._common._requestinfo.print(_requestinfo.ja
va:68)
at
weblogic.management.console.pages._common._requestinfo._jspService(_requesti
nfo.java:224)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
l.java:249)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
l.java:167)
at
weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:104)
at
weblogic.management.console.pages._common._error._jspService(_error.java:162
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:149)
at
weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:100)
at
weblogic.management.console.pages._panels._mbean._server._jspService(_server
.java:9830)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
I just started getting this error after a year in production environment without any problems. Did you every find out what caused this or better yet how to prevent this?
Dan.
-
Javax.servlet.ServletException & java.lang.NoClassDefFoundError
I am getting this javax.servlet.ServletException & java.lang.NoClassDefFoundError
exceptions while running jsp in .netbeans.
Iwas able to compile and run jsp pgms , but i am getting this error when i use jsp:useBean.I think the java class created is not in the proper path..netbeans is using tomcat server.The ide put the jsp's in the proper path. but it is not putting the java class i created with setter and getter methods.I also set the classpath. but din't work
I t is eating up my time!Pl. suggest me a solution!
Directory structure is :source file
c:/windows/.netbeans/3.5/samples/jsp
I guess the ide is putting all the class files(jsp) in
C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
so i copied the userData.class from source dir to the above directory.
and i also did the
set CLASSPATH= C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
in dos prompt
pl. find the code below.
Html:
<HTML>
<HEAD>
<TITLE>getData</TITLE>
</HEAD>
<BODY>
<form method = post action="saveData.jsp">
What's your Name : <input type=text name =username size=10>
<br>
What's Age : <input type=text name=age size=10>
<br>
What's ur email id : <input type=text name=email size=10>
<input type=submit>
</FORM>
</BODY>
</HTML>
SaveData.jsp
<jsp:useBean id="user" class="JSP.userData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<html>
<head><title>using bean</title></head>
<body>
--Continue
Thank u
</body>
</html>
userData.java
* userData.java
* Created on February 12, 2004, 1:06 PM
package JSP;
* @author amano
public class userData {
String userName;
int age;
String email;
/** Creates a new instance of userData */
public userData()
public void setUsername(String str)
userName=str;
public void setAge(int str)
age=str;
public void setEmail(String str)
email=str;
public String getUsername()
return userName;
public int getAge()
return age;
public String getEmail()
return email;when i click on the submit button i get the following error msg.
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
javax.servlet.ServletException: JSP/user_data
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:349)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NoClassDefFoundError: JSP/user_data
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.load(IDEJspServlet.java:106)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.loadIfNecessary(IDEJspServlet.java:150)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:160)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534) -
Getting javax.servlet.ServletException: General error
Someone pls help me....
I am getting General Error while inserting a row in database.I am not able to solve this error...I would really appreciate your help...Thanks in advance...
Following is my Code ::
<%! int countBts,countBts1,mmm; %>
<%! String msg; %>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String dataSourceName = "ProjData";
String dbURL = "jdbc:odbc:" + dataSourceName;
Connection conn = DriverManager.getConnection(dbURL, "","");
int dataMgx= Integer.parseInt(request.getParameter("allocMgxId"));
int dataFrsm=Integer.parseInt(request.getParameter("allocFrsmSlotNo"));
int dataPort=Integer.parseInt(request.getParameter("allocPortNo"));
int dataBts=Integer.parseInt(request.getParameter("bts1"));
int dataRpm=Integer.parseInt(request.getParameter("allocRpmNo"));
int dataMultiLink=Integer.parseInt(request.getParameter("allocMultiLinkNo"));
String dataPortStatus= "vacant";
Statement myStat1 = conn.createStatement();
myStat1.execute("select count(BTS_ID) from MGX where BTS_ID=" + dataBts);
ResultSet result1 = myStat1.getResultSet();
if(result1.next())
countBts=Integer.parseInt(result1.getString(1));
countBts1=countBts+1;
if(countBts > 6)
msg="Configuration of more than 6 spans not allowed";
%>
<h3><%=msg %></h3>
<%}
else
PreparedStatement stmt1 =
conn.prepareStatement(("Insert into MGX (BTS_ID,Port_Status,MGX_Num,Port_No,FRSM_No,RPM_Card,Multi_Link) values ("+dataBts+",'"+dataPortStatus+"',"+dataMgx+","+dataPort+","+dataFrsm+","+dataRpm+","+dataMultiLink+")"));
mmm = stmt1.executeUpdate();
stmt1.close();
if(mmm == 1)
msg="One SpanRecord successfully added in the Database ";
else
msg="Failure in Update Operation";
result1.close();
myStat1.close();
conn.close();
%>
The error I am getting is as follows::
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: General error
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp._5_jsp._jspService(_5_jsp.java:179)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.sql.SQLException: General error
sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6987)
sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:3150)
sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:214)
sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(JdbcOdbcPreparedStatement.java:136)
org.apache.jsp._5_jsp._jspService(_5_jsp.java:121)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Pls Help meThanks for the reply buddy...
As per your reply....I have tried modifying my Preparedstatement properly with ? and then binding values...
But even after doing this i am still getting the same error....
I am clueless...
Following is my modified Prepared Statement ::
conn.prepareStatement(("Insert into MGX (BTS_ID,MGX_Num,Port_No,FRSM_No,RPM_Card,Multi_Link,Port_Status) values (?,?,?,?,?,?,?)"));
stmt1.setInt(1,Integer.parseInt(request.getParameter("bts1")));
stmt1.setInt(2,Integer.parseInt(request.getParameter("allocMgxId")));
stmt1.setInt(3,Integer.parseInt(request.getParameter("allocPortNo")));
stmt1.setInt(4,Integer.parseInt(request.getParameter("allocFrsmSlotNo")));
stmt1.setInt(5,Integer.parseInt(request.getParameter("allocRpmNo")));
stmt1.setInt(6,Integer.parseInt(request.getParameter("allocMultiLinkNo")));
stmt1.setString(7,"Allocated");
Awaiting for a solution.... -
Hi.
I've got this piece of code into a servlet:
<%@page language="java" import="java.sql.*"%>
<%
Driver DriverRecordset1 = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection Conn = DriverManager.getConnection("jdbc:oracle:thin:@myserver:1521:SID","system","manager");
When starting Tomcat, I included into startup.bat:
set CLASSPATH=%CLASSPATH%;d:\orant\jdbc\classes102.zip (it exists)
But when executing the code, I get this error message:
javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
What am I doing wrong?
Thank you very much.The whole message:
javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
at mypage_1._jspService(mypage_1.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
================
If I write only:
Class.forName("oracle.jdbc.driver.OracleDriver");
I get the same error.
Maybe you are looking for
-
Query in SQL to display count of all records but where condition is present
Hi All, I have situation where I need to display count of all records all particular period but in where condition type condition has to be present : Please find the below sample data : PERIOD_ID TYPE MV_COUNT IS_FLAG 20110401 AM
-
Html snippet rectangle is white, hides white overlaying text.
Hi, Is there any way to change the base color of the rectangle the html snippet displays? I use a snippet to display some flash animation, which doesn't appear in iWeb. I don't mind only getting a rectangle, but it's white, and so it my overlying tex
-
Remote control Sony video camera with Mac Mini?
Is it possible to connect an IR transmitter to a mac mini to be able to control a Sony camera from a remote location miles away? Specificaly, I want to be able to point my Sony IR remote control at my Mac Book Pro at home to control a video camera at
-
How to automate SQL packages deletion prior to IPL to apply PTF's ?
Hi, When PTF's need to be applied to the system to avoid trouble it is recommended to delete the SQL packages. The only way to do this that I know of is by using the R3MAIN menu to access the option to delete the SQL packages. As we have two instance
-
New Otter Box for iPhone G4S, talking on phone with speaker on, I have to yell for anyone to hear me, like the internal mike is not working or some setting is changed? How do I fix this?