9 Replies Latest reply: Jan 5, 2010 7:18 AM by Jake Miller RSS

problem building jsfeJB3 application

Michael Phoenix Newbie

First of all section 4.4.1 tells us to set jboss-dist property in build.xml. That propety does not exist. You need to set the environmment variables JBOSS_HOME otherwise the build fails.
Now I am STILL getting a failusre message that I'm not sure what to do with:
C:\gettingstarted\jsfejb3>ant
Buildfile: build.xml

compile:
[javac] Compiling 4 source files to C:\gettingstarted\jsfejb3\build\classes

BUILD FAILED
C:\gettingstarted\jsfejb3\build.xml:47: C:\seam\lib not found.

Total time: 0 seconds

Some help would be appreciated. It's very hard to figure out exactly what I need to do because the build.xml is really convoluted and its unclear which line the error message line number is referring to.

  • 1. Re: problem building jsfeJB3 application
    Robert Taylor Newbie

    I don't know if you got an answer yet... I'm working through the same tutorial but for release jboss-5.0.0.CR2

    first I had to modify the line that said:

    to this:

    Don't do this though if you didn't get the error:
    .../default/deploy/jboss-web.deploy/jsf-libs not found.

    Then for the missing seam error
    .../seam/lib not found.

    Find and comment out the references to seam in the build.xml file like this:
    <!-- -->
    <!-- -->
    <!--



    -->

    The jsfeJB3 project isn't using seam yet... not moving on to the rest of the tutorial... If I find more issues I'll check back.

  • 2. Re: problem building jsfeJB3 application
    Robert Taylor Newbie

    haha... I guess I should have escaped out the html comment tags.. oh well you get the idea

  • 3. Re: problem building jsfeJB3 application
    Robert Taylor Newbie

    and the other line I referenced before the seam comments went like this
    >property name="jsflib" location="${jboss.home}/server/default/deploy/jboss-web.deploy/jsf-libs" / <
    >property name="jsflib" location="${jboss.home}/server/default/deploy/jbossweb.sar/jsf-libs" / <

    hmmm... too bad I can't edit my posts

  • 4. Re: problem building jsfeJB3 application
    Robert Taylor Newbie

    When trying to deploy the ear file I get this exception:
    vfszip:/usr/jboss/jboss-5.0.0.CR2/server/default/deploy/jsfejb3.ear -> org.jboss .xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI= location=pe rsistence

    Too tired to bother trying to figure this one out tonight.

  • 5. Re: problem building jsfeJB3 application
    jaikiran pai Master

     

    "rtaylor777" wrote:
    When trying to deploy the ear file I get this exception:
    vfszip:/usr/jboss/jboss-5.0.0.CR2/server/default/deploy/jsfejb3.ear -> org.jboss .xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI= location=pe rsistence



    You need to fix the persistence.xml. See this for details http://www.jboss.com/index.html?module=bb&op=viewtopic&t=138438

  • 6. Re: problem building jsfeJB3 application
    Robert Taylor Newbie

    Thanks for that jaikiran.
    I was wrong by the way, the jsfejb3.ear project is using seam or at least the jsf-facelets.jar which the build file was indicating as coming from
    fileset dir="${seamlib}/lib" includes="jsf-facelets.jar"
    Perhaps the getting started documentation should be revised to indicate that seam should be installed and configured before trying the examples.

    Unfortunately in my case "seam" didn't work with jboss-5.0.0.CR2
    While deploying the booking seam example I had issues with JBOSS not being able to extract one of the jars, yet I could browse into the jar it indicated with my file manager (on Linux). I tired setting up with a shallower context for JBOSS but it didn't help. I noticed in the server log there were several issues with ORB and other items while loading the stock jboss-5.0.0.CR2 extracted system without ever having deployed anything yet. In any case I'm going to try jboss-4.2.3.GA-jdk6.zip as at least seam says it works with JBoss AS 4.2.X

    Thanks again

  • 7. Re: problem building jsfeJB3 application
    Tim Russell Newbie

    Just run across this problem... still exists.

    As rtaylor says, the example does require jsf-facelets.jar, so the getting started guide should advise downloading and unpacking seam, then setting the seamlib property of build.xml to wherever you have unpacked seam to.

    And since it does require this jar, don't comment out the lines from the build.xml as suggested at the start of this thread.

  • 8. Re: problem building jsfeJB3 application
    David Murphy Newbie

    These types of problems trying to run examples are really annoying..
    I've spent a lot of time and made some headway with jsfeJB3 (fixed the build and deploy problems mentioned earlier) but now when you try to create a todo or list them it fails with

    com.sun.faces.mgbean.ManagedBeanCreationException: Unable to create managed bean todoBean. The following problems were found:
    - Bean or property class TodoBean for managed bean todoBean cannot be found.
    - Bean or property class TodoBean for managed bean todoBean cannot be found.
    - Bean or property class TodoBean for managed bean todoBean cannot be found.
    - Bean or property class TodoBean for managed bean todoBean cannot be found.

    I've also seen other posts on the web with people struggling with this issue but I have seen no resolution advice to date.

    Any help would be much appreciated..

  • 9. Re: problem building jsfeJB3 application
    Jake Miller Newbie
    I assume an answer to this problem was found by now. I fixed it by moving TodoBean.class into WEB-INF/classes in the app.war file.

    com.sun.faces.mgbean.ManagedBeanCreationException: Unable to create managed bean todoBean. The following problems were found:
    - Bean or property class TodoBean for managed bean todoBean cannot be found.

    ...

    Since I recently just clawed my way through getting the jsfejb3 example running on JBoss AS 5.1.0.GA. I thought I'd post what got it all working for me if it's a help to others. The problems I had were the following:


    1. I couldn't find the "Todo" application source:

      Someone posted this link to it elsewhere: http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.3/gettingstarted.zip

    2. I got the following error in the jboss logs when running the todo app (mentioned earlier in this thread):

      org.jboss .xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI= location=persistence
      ....

      This fix was, as mentioned in another post, to add in some XML Schema attributes to persistence.xml

    3. After compiling and deploying the ejb-jsf todo app, jboss logged the following error when I connected
    with the webapp in my browser:

      Missing Built-in Tag Libraries! Make sure they are included within the META-INF directory of Facelets' Jar

      I fixed this by downloading jboss-seam-2.2.0.GA, and replacing my jsf-facelets.jar with the one from seam. I'm unsure of the version of this newer jsf-facelets.jar from seam, but the one that I had problems with was 1.1.15B1.

    4. Finally, I got this error when attempting to run the todo web app:

      Unable to create managed bean todoBean. The following problems were found:
      - Bean or property class TodoBean for managed bean todoBean cannot be found

      I modified build.xml so that TodoBean.class is placed in 'WEB-INF/classes' in app.war instead of at the
      top level of the war file. I assume there was some change to classloading or the configuration in
      JBoss 5 that causes this. I'm sure there are other ways to resolve this, but this worked. It may be that
      this is something related to seam, who knows.

      For me it's important to be able to get through examples that *don't* use seam as well as those that do.
      It's hard enough to understand umpteen different Java EE technologies before throwing seam into the mix.