1 2 Previous Next 16 Replies Latest reply on Sep 15, 2008 2:55 PM by longbeach

    JBoss 5 RC1 and Struts 2 : Simple validation error

    longbeach

      Hi,
      I am using JBoss RC 1 and Struts 2 and I am facing a problem when trying to use an XML validation file.
      The error message i get is :

      java.lang.IllegalArgumentException: URI scheme is not "file"
      at java.io.File.(Unknown Source)
      at com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:323)
      

      It looks like it is not happy with the XML validation file.
      Here is the content of that file :
      <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE validators PUBLIC
       "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
       "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
      
      <validators>
       <field name="name">
       <field-validator type="requiredstring">
       <message>You must enter a name</message>
       </field-validator>
       </field>
      </validators>
      
      


      I made some research and found out that someone already had the same error :
      http://www.nabble.com/Simple-validation-does-not-work-td18894126.html
      My code looks almost exactly like his.
      He "solved" the problem by switching back to JBoss 4.0.5 which is not a convenient solution for me
      since i want to stick with JBoss 5.

      I also tried without an XML file for validation, using annotations only. And it turns out that I have the same problem.

      Here is the complete stack trace :



      07:15:07,378 INFO [ActionValidatorManagerFactory] Detected AnnotationActionValidatorManager, initializing it...
      07:15:13,239 ERROR [[default]] Servlet.service() for servlet default threw exception
      java.lang.IllegalArgumentException: URI scheme is not "file"
      at java.io.File.(Unknown Source)
      at com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:323)
      at com.opensymphony.xwork2.validator.ValidatorFactory.(ValidatorFactory.java:230)
      at com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.java:192)
      at com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFileParser.java:72)
      at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:361)
      at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:252)
      at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:340)
      at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:69)
      at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:138)
      at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:113)
      at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:100)
      at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:142)
      at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:148)
      at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:186)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
      at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
      at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:183)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:189)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:90)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:96)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:325)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)
      


      Can anyone help me here ? Is there a problem with Struts 2 for JBoss 5 ?
      I would appreciate any help you can provide.
      Thanks

        • 1. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
          jaikiran

          For the information of other readers - We were discussing this in the "Tomcat" forum http://www.jboss.com/index.html?module=bb&op=viewtopic&t=141956 and decided to move it here since this looked specific to JBoss AS5 VFS feature.

          Here's what i think is happening:

          "longbeach" wrote:
          here is the complete stack trace :

          07:15:07,378 INFO [ActionValidatorManagerFactory] Detected AnnotationActionValidatorManager, initializing it...
          07:15:13,239 ERROR [[default]] Servlet.service() for servlet default threw exception
          java.lang.IllegalArgumentException: URI scheme is not "file"
          at java.io.File.<init>(Unknown Source)
          at com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:323)
          at com.opensymphony.xwork2.validator.ValidatorFactory.<clinit>(ValidatorFactory.java:230)
          at com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.java:192)
          at com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFileParser.java:72)
          at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:361)
          at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:252)
          at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:340)
          at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:69)
          at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:138)
          at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:113)
          at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:100)
          at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:142)
          at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:148)
          at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
          at



          Based on this stacktrace, all that i can "guess" is that the com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators expects a URI to be of the form file://something and because of the VFS related changes to JBoss-5, the URI being passed is probably vfsfile://something which only JBoss recognizes and no one else. That might be why you are running into this error.


          • 2. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
            longbeach

            I am adding another trace, that was on top of the previous one :

            exception
            
            javax.servlet.ServletException: Filter execution threw an exception
             org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            
            


            • 3. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
              alesj

               

              "jaikiran" wrote:

              Based on this stacktrace, all that i can "guess" is that the com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators expects a URI to be of the form file://something and because of the VFS related changes to JBoss-5, the URI being passed is probably vfsfile://something which only JBoss recognizes and no one else. That might be why you are running into this error.

              Can we get the source code of this ValidatorFactory::parseValidators?
              Since afaik xwork2 is open source?

              • 4. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                jaikiran

                I had browsed their SVN during the weekend, just to check the code. The SVN is located at http://svn.opensymphony.com/svn/xwork/.
                Based on the line number in the exception stacktrace, i understand that version 2.0.5 is being used http://svn.opensymphony.com/svn/xwork/tags/xwork_2-0-5.

                The error comes up from line 323 at http://svn.opensymphony.com/svn/xwork/tags/xwork_2-0-5/2.0/src/java/com/opensymphony/xwork2/validator/ValidatorFactory.java

                private static void parseValidators() {
                 if (LOG.isDebugEnabled()) {
                 LOG.debug("Loading validator definitions.");
                 }
                
                 // Get custom validator configurations via the classpath
                 List<File> files = new ArrayList<File>();
                 try {
                 Iterator<URL> urls = ClassLoaderUtil.getResources("", ValidatorFactory.class, false);
                 while (urls.hasNext()) {
                 URL u = urls.next();
                
                 File f = new File(u.toURI()); --> Line 323
                 FilenameFilter filter = new FilenameFilter() {
                 public boolean accept(File file, String fileName) {
                 return fileName.contains("-validators.xml");
                 }
                 };
                 files.addAll(Arrays.asList(f.listFiles(filter)));
                 }
                 } catch (URISyntaxException e) {
                 // swallow
                 } catch (IOException e) {
                 throw new ConfigurationException("Unable to load validator files", e);
                 }
                


                Since afaik xwork2 is open source?

                I am not too good in understanding the license terms. Here's their license details http://www.opensymphony.com/xwork/license.action

                By the way, looks like they have newer version available in trunk whose code is slightly different that this one. So i don't know whether fixing version 2.0.5 will help in later versions.

                Ales,

                I had read your blog http://blogs.jboss.com/blog/alesj/2008/07/05/JBoss5_CR1_SpringDeployer_and_VFS.txt sometime back about this exact same issue:


                With VFS you just put in a path or URL, and the framework abstracts all the details for you, hiding them behind simple VirtualFile API.
                But of course something like that comes with a cost, expecting other written frameworks not to understand VFS protocol, since they mostly limit itself to what default JDK provides


                So how does JBoss plan to address such issues where others frameworks dont recognize VFS.


                • 5. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                  alesj

                   

                  "jaikiran" wrote:

                  I had read your blog http://blogs.jboss.com/blog/alesj/2008/07/05/JBoss5_CR1_SpringDeployer_and_VFS.txt sometime back about this exact same issue:


                  With VFS you just put in a path or URL, and the framework abstracts all the details for you, hiding them behind simple VirtualFile API.
                  But of course something like that comes with a cost, expecting other written frameworks not to understand VFS protocol, since they mostly limit itself to what default JDK provides


                  So how does JBoss plan to address such issues where others frameworks dont recognize VFS.

                  Ah, yes, external framework VFS usage. :-)

                  Dunno what we can do, except use some hooks, if they exist.
                  Hopefully framework devs will see the problems themselves
                  and try to be File agnostic.
                  Or, and that's the beauty of open source, users can do some feedback,
                  either to the frameworks or to us; e.g. our Seam+AS5 custom usage.

                  In this case, xwork2, we should check what hook are out there.
                  In the worst case providing a patch for xwork2 - same thing I did for Facelets.

                  • 6. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                    longbeach

                    so, if the problem comes from xwork-2.1.1, what do you suggest that i do ?
                    Thanks

                    • 7. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                      alesj

                       

                      "longbeach" wrote:
                      so, if the problem comes from xwork-2.1.1, what do you suggest that i do ?

                      It depends how much xwork2 experience you have.

                      My choices would be, in this order:
                      1) possible hooks + VFS awareness
                      2) patch; that also works on VFS urls

                      • 8. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                        longbeach

                        I have 0 experience on xwork2 and my goal is not to develop the new version of Struts 2.
                        I just want this thing running, with EJB 3, JBoss 5, JDK 1.6 and Struts 2.

                        But in anyways, does that mean Struts 2 is not ready for JDK 1.6 ?
                        I am lost now, so many versions, i no longer know where exactly is the problem.

                        Will there be a new release soon that will make it possible to use validation annotations in the environment i described ?

                        thanks

                        • 9. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                          jaikiran

                           

                          "longbeach" wrote:

                          But in anyways, does that mean Struts 2 is not ready for JDK 1.6 ?


                          The issue is not related to Struts 2 with JDK 1.6. Instead its the interaction of JBoss-5 and xwork2 which is causing the problem, because of the VFS changes in JBoss-5.

                          "longbeach" wrote:

                          so, if the problem comes from xwork-2.1.1, what do you suggest that i do ?


                          In this thread you mentioned that one of the users had got this working in JBoss-4.x series (which does not have VFS). So one of your options is to use JBoss-4.x (preferably the latest stable version JBoss-4.2.3 GA). But if switching back to JBoss-4.x is not an option for you, then the other possible option would be to post in the xwork2 mailing list/forum and explain the issue there and maybe even point them to this thread. Depending on how critical this issue is for xwork2, they might prioritize it accordingly.


                          • 10. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                            longbeach

                            ok, i posted it on the XWork Users forum.
                            No answer yet.

                            http://forums.opensymphony.com/thread.jspa?threadID=454261

                            • 11. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                              longbeach

                              I found the Jira issue for this problem :
                              http://jira.opensymphony.com/browse/XW-649

                              But they have not fixed it yet ... :(

                              • 12. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                                jaikiran

                                So the issue is already been tracked in their JIRA. All you can do is wait for it to be fixed or vote for it to be fixed.

                                • 13. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                                  jaikiran

                                   

                                  "longbeach" wrote:
                                  I found the Jira issue for this problem :

                                  http://jira.opensymphony.com/browse/XW-649

                                  But they have not fixed it yet ... :(


                                  I have commented and attached a patch there. See if that helps.


                                  • 14. Re: JBoss 5 RC1 and Struts 2 : Simple validation error
                                    longbeach

                                    Thanks. I saw that you modified the ValidatorFactory class and probably the parseValidators method.

                                    Do you know when this modification will be compiled and integrated in the xwork-2.0.5.jar jar file ? (its size should be around 446 Ko)

                                    Can you send me your xwork-2.0.5.jar file compiled with the modification you made on the ValidatorFactory class so that i can test it ?

                                    You used Struts 2.0.11.2 but I will test it on Struts 2.0.11.1 first and then Struts 2.0.11.2 because i am working with 2.0.11.1 at the moment, I will switch to 2.0.11.2 if necessary.

                                    Also, they have transformed that ValidatorFactory class into an interface in xwork-2.1.1.jar, which is the version integrated in Struts 2.1.2

                                    By the way, it might fix the validation problem using a -validation.xml file but I am not sure it will fix the validation problem using annotations (@Validation, @RequiredFieldValidator ...) although i got the same error on both techniques.
                                    Or will it ?

                                    Thanks for helping, really appreciate it.
                                    Celinio

                                    1 2 Previous Next