5 Replies Latest reply on May 18, 2017 1:50 PM by Jason Glass

    RichFaces 4.5.17, JBoss EAP 7 - 403 forbidden error

    Jason Glass Newbie

      Hi All!

       

      So I'm trying to get our RichFaces 3.3.3 project up to 4.5.17 version.  The 3.3.3 worked fine in JBoss EAP 5 - but has issues when deployed in JBoss EAP 7, for example some command buttons work and others dont (wherein it worked fine in JBoss 5).  I know Jboss 7 now has JSF 2 and JSP's are frowned up - anyways I downloaded the RichFaces-Showcase 4.5.17 to get started with a known and should be working project.  I struggled with maven to build it (its missing an artifact) so I gave up on the maven side of things other that havinf maven convert it to a eclipse project.  In eclipse, I have no build errors and everything looks good.  I added the specified minimum amount of jars to be deployed with the web application in the WEB-INF/lib folder and I dont get any exceptions in the servers console when deploying (note, I did have to leave the persistence.xml file even though I was instructed to remove it as when trying to deploy without it, there were too many code dependencies to clean things up)

       

      When I browse to the application, all I get is a 403 forbidden.  I tried turning on DEBUG for org.richfaces but that didnt provide anything useful, well nothing at all.  I tried different URL scenarios and get 404 not found.  I have not changed ANY of the settings in the local JBoss running on my dev box within eclipse say for adding other logging categories.  I also did add the JMS guest user just in case that helped.

       

      I was wondering if anyone else had run into the problem and managed to solve it, or if anyone knew what type of JBoss logging to turn on to get the http processor to log something as to what its trying to get to and why it is forbidden.

       

      Any help would be appreciated, thank you in advance!

       

      Note:  I did add facets to the project as it was just a general project.  I also added the Dynamic Web Module 3.1 and the Java facet is set to 1.8.  I also tried deploying as an exploded WAR by add/remove in Eclipse as well as a real WAR archive through the admin console.  One strange thing also, if I navigate to http://localhost:8080/richfaces-showcase.WAR/index.jsp

      I get the following html output with no 404 error

      <html><head><title>Error</title></head><body>/richfaces-showcase.WAR/index.jsp</body></html>

       

      And If I navigate to an index.jsf I get

      <html><head><title>Error</title></head><body>/richfaces-showcase.WAR/index.jsp</body></html>

       

      I've zipped up the eclipse project as well as the server.log traces and attached them!

        • 1. Re: RichFaces 4.5.17, JBoss EAP 7 - 403 forbidden error
          Michal Petrov Master

          You don't suppose that fixing the problem with the missing artifact would save you all this trouble?

           

          A 403 is certainly coming from the server, Showcase wouldn't be throwing that. The project is meant to build several wars to deploy on various servers, it's possible whatever you built isn't correct for EAP. Can you share the war? (Though I'd prefer trying to figure out the issue with maven)

          1 of 1 people found this helpful
          • 2. Re: RichFaces 4.5.17, JBoss EAP 7 - 403 forbidden error
            Jason Glass Newbie

            Hi Michal!  Thank you for getting back to me!  Fixing the problem in Maven may be the way to go - but I stink at Maven - lol - so figured it'd be easier to just get it working in eclipse as a normal project.  I figured it would have just built and deployed normally as I do any other ear or war but you're likely right in that since it was created for numerous other app servers theres likely something misconfigured. The artifact that was missing also had to be added to the Dynamic web project to get it to build properly so I did/do have the offending jar just not sure if or how to add it to the local maven repository.  I was also a little confused as to which jboss profile to run, e.g. remote, managed or wildfly.

             

            Here's the WAR.  I'll try the Maven again and put the error here

             

            Thanks Again!

             

            Jay

            • 3. Re: RichFaces 4.5.17, JBoss EAP 7 - 403 forbidden error
              Jason Glass Newbie

              Hi Michal!  Well, so I guess when I manually had to copy the "offending" jar/artifact to get the Eclipse project to build properly I also *semi* corrected the problem with the maven build as now it compiles!  Whoot!  Thank you for pushing me to try it again.  Note, I still get the missing POM error, e.g. "[WARNING] The POM for org.richfaces:richfaces-build-resources:jar:4.5.17.Final is missing, no dependency information available"

               

              And I also get this warning which I didnt spend too much time trying to resolve, again I'm a maven newb :-) "[WARNING] The project org.richfaces.examples:richfaces-showcase:war:4.5.17.Final uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html"

               

              But it did/does now create a war!

               

              So I tried to build profile 

              C:\local_git_repo\PSD\java_libs\richfaces-distribution-4.5.17.Final\examples\richfaces-showcase>C:\Apps\apache-maven-3.5.0\bin\mvn -fpom.xml -Pjee6 install

               

              And, excuse how I'm going about replying to this as trying to not waste your invaluable time but I'm making live updates to the "reply" prior to "replying"

               

              So Update, building the above profile WORKED! WHOOT!  You're awesome!  Richfaces showcase now loads in JBoss EAP 7! and at least a couple things I tried to run Poll, CommandLink and Command Button are working!

               

              So to help others, to get this working:
              1.  I had to download richfaces-build-resources4.5.17.Final.jar and place it in the following directory (your path may vary (especially as this is windows I'm developing on))

              C:\Users\<YOUR USER ID>\.m2\repository\org\richfaces\richfaces-build-resources\4.5.17.Final

              2.  After running "mvn -fpom.xml -Pjee6 install" - the WAR was still missing the hibernate sql jar, so I manually placed the hsqldb-j5-2.0.0.jar in the zipped wars WEB-INF lib folder, redeployed and no complaints

              3.  I do still get an exception

              09:21:05,865 FINE  [org.richfaces.log.Resource] (default task-3) could not load myfaces resource utils class: org.apache.myfaces.shared.renderkit.html.util.ResourceUtils: java.lang.ClassNotFoundException: org.apache.myfaces.shared.renderkit.html.util.ResourceUtils from [Module "deployment.richfaces-showcase-jee6.war:main" from Service Module Loader]

               

              But this looks to be easily solvable!

               

              Thanks Again Michal!  You're awesome!

              1 of 1 people found this helpful
              • 4. Re: RichFaces 4.5.17, JBoss EAP 7 - 403 forbidden error
                Michal Petrov Master

                No wonder you can't open anything, the war doesn't contain any pages.

                1 of 1 people found this helpful
                • 5. Re: RichFaces 4.5.17, JBoss EAP 7 - 403 forbidden error
                  Jason Glass Newbie

                  In hindsight, ROFL - you're right - the src folders empty compared to the working one - that should be easy to correct?  I also had to remove "hsqldb-j5-2.0.0.jar" from the open shift excludes list as it was being used by the jee6 profile and that lib is needed when deploying in JBoss 7

                   

                  PS:  meh, the easy to correct - not so much, looks like I'd need to remove the other versions of source, for example the tomcat source to get it to deploy as an eclipse (not maven) built war - oh well, another day.  Maven works and forces me to get the hang of it more ;-)

                   

                  Thanks Again Michal