Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 77276 invoked from network); 1 Nov 2001 15:53:54 -0000 Received: from unknown (HELO osaka.betaversion.org) (192.18.49.133) by daedalus.apache.org with SMTP; 1 Nov 2001 15:53:54 -0000 Received: (qmail 20262 invoked from network); 1 Nov 2001 15:56:05 -0000 Received: from nagoya.betaversion.org (192.18.49.131) by osaka.betaversion.org with SMTP; 1 Nov 2001 15:56:05 -0000 Received: (qmail 22877 invoked by uid 97); 1 Nov 2001 15:53:32 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 22861 invoked by uid 97); 1 Nov 2001 15:53:31 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 22850 invoked from network); 1 Nov 2001 15:53:30 -0000 Message-ID: <20011101155330.72489.qmail@web14005.mail.yahoo.com> Date: Thu, 1 Nov 2001 07:53:30 -0800 (PST) From: Sandeep Takhar Subject: Re: Struts-Validator problem: NoClassDefFoundError To: Struts Users Mailing List In-Reply-To: <502326F46B08D41191C400508B6D70C10280457B@ThisAddressDoesNotExist> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N search the archives for more postings, but I have heard different approaches when I posted the same problem. 1. Check to see that you are using the latest Struts nightly build. 2. If not using hte latest nightly build, this may work if you use Tomcat 4.0 3. Remove Jaxp, crimson and parser.jar files and add xerces.jar file. The first one makes sense to me and the last two I am puzzled about. The main thing is that ActionMessage is a new class to the nightly builds. However this may be circumvented (the use of the ActionMessage) by changing the JSP to not use the new feature (at least this is what I have been told). Sorry if I am confusing you, but as you can probably tell, i myself am confused, but since I do not have to do the work immediately, I have been holding off figuring out exactly what the problem is. - Sandeep --- Parvaze Suleman wrote: > Hi > I am trying to use Validator in my application and > can not get it to work. I > have a single test form that I would like to use the > Validator for > client-side and server-side validation. If I add the > following > > <%@ taglib uri="/WEB-INF/struts-validator.tld" > prefix="validator" %> > > reference to the taglib to the test form JSP page, > when I access this JSP > page after deploying the application, I get a > NoClassDefFoundError exception > thrown (see full message at the end of this email). > If I remove the taglib > reference, I don't get the error but the validation > rules don't get applied > either. > > The latest version of the struts-validator.jar file > and the > struts-validator.tld files are in the WEB-INF/libs > directory. > > Thanks in advance for any help received. > > ============================================================ > > > My web.xml file is defined as follows: > > ..... > > validator > > com.wintecinc.struts.action.ValidatorServlet > > config > > /WEB-INF/validation.xml > > > debug > 2 > > 2 > > .... > > > > /tags/struts-validator.tld > > /WEB-INF/struts-validator.tld > > .... > > > My Validation.xml file is defined as below: > > > > > > classname="com.wintecinc.struts.validation.StrutsValidator" > method="validateRequired" > msg="error.required"> > function validateRequired(form) { > var bValid = true; > var focusField = null; > var i = 0; > var fields = new Array(); > oRequired = new required(); > > for (x in oRequired) { > if ((form[oRequired[x][0]].type > == 'text' || > form[oRequired[x][0]].type == 'textarea' || > form[oRequired[x][0]].type == > 'select' || form[oRequired[x][0]].type == 'radio' || > form[oRequired[x][0]].type == 'password') && > form[oRequired[x][0]].value == > '') { > if (i == 0) > focusField = > form[oRequired[x][0]]; > > fields[i++] = > oRequired[x][1]; > > bValid = false; > } > } > > if (fields.length > 0) { > focusField.focus(); > alert(fields.join('\n')); > } > > return bValid; > }]]> > > > > >
> depends="required,mask"> > > key="prompt.personalDetailsForm.fname.maskmsg"/> > > > mask > ^[a-zA-Z]*$ > > >
>
>
> > > > > ERROR TEXT > ====================================================== > > <01-Nov-01 11:37:51 GMT> > <[WebAppServletContext(2791227,olympus,/olympus)] r > esolved taglib uri '/WEB-INF/struts-html.tld' to > taglib-location > /WEB-INF/struts-html.tld: > > > <01-Nov-01 11:37:52 GMT> > <[WebAppServletContext(2791227,olympus,/olympus)] > Servlet failed with Exception > java.lang.NoClassDefFoundError: > org/apache/struts/action/ActionMessage > at java.lang.Class.getMethods0(Native > Method) > at > java.lang.Class.getDeclaredMethods(Class.java:1039) > at > java.beans.Introspector$1.run(Introspector.java:852) > at > java.security.AccessController.doPrivileged(Native > Method) > at > java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:850) > at > java.beans.Introspector.getTargetEventInfo(Introspector.java:556) > at > java.beans.Introspector.getBeanInfo(Introspector.java:294) > at > java.beans.Introspector.getBeanInfo(Introspector.java:128) > at > weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1003) > at > weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:941) > at > weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:207) > at > weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145) > at > weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:4177) > at > weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4018) > at > weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3865) > at > weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2039) > at > weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1853) > at > weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1735) > at > weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1015) > at > weblogic.servlet.jsp.JspParser.doit(JspParser.java:78) > at > weblogic.servlet.jsp.JspParser.parse(JspParser.java:181) > at > weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119) > at > weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255) > at > weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:327) > at > weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:189) > at > weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:154) > at > weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:36 > 8) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java > :24 > === message truncated === __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: