4 Replies Latest reply on Jun 10, 2011 2:27 PM by robert walker

    help with richfaces4 showcase and eclipse setup problems

    robert walker Newbie

      hi all, i have been struggling for a few days on and off trying to get eclipse helios and richfaces4 working together


      I just want to create the richfaces 4 showcase app running local in eclipse so

      I can use the code samples there for learning rf4 and as a testbed project

      for a production app we are coding.




      I read over here (http://community.jboss.org/wiki/HowToWorkWithRichFaces4xExamplesSources) and did this step


      1) checkout examples sources from svn (http://anonsvn.jboss.org/repos/richfaces/trunk/examples/):



      then I read in (http://community.jboss.org/wiki/MavenGettingStarted-Users)

      regarding changing settings.xml


      1) $HOME/.m2/settings.xml


      2) apache-maven/conf/settings.xml


      i added these 2 additional tags in settings.xml in both places (trying every combination because nothing is working for me)


                <name>JBoss Public Maven Repository Group</name>
                <name>JBoss Public Maven Repository Group</name>



          <!-- pluginGroup
           | Specifies a further group identifier to use for plugin lookup.
           | -->




      examples\richfaces-showcase\readme.txt file it states


      Open Eclipse and go to File > Import

            * Expand the project type named Maven and select Import Maven Project



      i point to the root examples directoy and it finds all the projects, imports them but every pom.xml file

      has an error. I have tried to just point to examples\richfaces-showcase, or go the way of the aggregate import, but

      i still get this sam error.


      "Project build error: Non-resolvable parent POM for org.richfaces.examples:richfaces-example-parent:4.1.0-SNAPSHOT: Failure to transfer org.richfaces:richfaces-parent:pom:10 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.richfaces:richfaces-parent:pom:10 from/to central (http://repo1.maven.org/maven2): connection timed out and 'parent.relativePath' points at wrong local POM"




      can anyone please help, i am spent trying o get this to work



        • 1. Re: help with richfaces4 showcase and eclipse setup problems
          Nick Belaevski Master

          Hi Robert,


          You have added settings under profile, but I think it's not activated - and that's the reason why settings are not applied.

          • 2. Re: help with richfaces4 showcase and eclipse setup problems
            robert walker Newbie

            thanks nick, i appreciate ur reply.


            I did a search for settings.xml on my entire computer,



            c:\Documents and Settings\walk3ro\.m2\settings.xml

            and I made the needed eclipse changes to both files,

            i would think that would be enough but you are thinking there is yet another settings.xml file that is being read instead, or the changes

            are not taking effect even though they are present?



            i just want t get the examples, core, showcase, even the other, maybe load eclipse via aggregate and get them all

            under one node, but man alive, i have ben fighting with this for days


            at this rate maybe i will just wait for max katz book practical rf4 to come out in august cause

            he had a great walkthrough in his 1st book about getting richfaces and eclipse

            working together, maybe he'll have something about getting the showcase and other examples

            up and running

            • 3. Re: help with richfaces4 showcase and eclipse setup problems
              Nick Belaevski Master



              You can check the actual settings by issuing mvn help:effective-settings command.

              • 4. Re: help with richfaces4 showcase and eclipse setup problems
                robert walker Newbie

                man alive, i am getting real close, thanks Nick, I did ur suggestions, and got closer, then had some issues about

                not finding jss-api and jsk-impl articfacts, so changed respoitory url as described here http://community.jboss.org/message/598984?tstart=0

                and then I am able to

                "You could use Jboss Tools with m2eclipse plugin and just import the examples as maven-based projects."

                as described in the article "How to work with RichFaces 4.x examples sources"


                NOW, no errors in eclipse when looking at the project, deploying is different story though,

                I got all the richfaces 4 example project nodes in eclipse package explorer, I am getting giddy!



                when i right click on richfaces-showcase project node and say run on server (jboss6) I get



                14:22:42,386 INFO  [org.jboss.jpa.deployment.PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=richfaces-showcase.war#richfaces-showcase

                14:22:42,402 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=richfaces-showcase.war#richfaces-showcase state=Create: java.lang.RuntimeException: Specification violation [EJB3 JPA] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: richfaces-showcase




                the persistence.xml for richfaces-showcase project has this

                in it



                <persistence-unit name="richfaces-showcase"




                and so I get a error message in jboss server log stating non-jta-data-source for a RESOURCE_LOCAL not defined.


                I thought adding


                to persistence.xml might be good but it gaves other errors




                can anyone provide some guidence on how to get past this, i can take the generated

                richfaces-showcase\target\richfaces-showcase-jee6\* files, put them in a war

                and deploy to glassfish 3.1 with no errors, but i really want to stick with jboss6/richfaces4

                not glassfish3/richfaces4.


                at lest i can see the richfaces4 demo glassfish, but we use jboss here at work and so really need to get

                that working. guess my paid training from the jboss folk isn't paying off  :-(