9 Replies Latest reply on Oct 5, 2010 9:46 AM by xsalefter.xsalefter.yahoo.com

    PropertyNotFoundException with Seam2

    tsbb

      Hello community!


      I am a newbie to Seam and other related technologies (JSF, EJB). I have been trying to run Seam2 (GA and CR) with jboss (4, 5 and 6) as a standalone application following mainly the tutorial at this site (http://docs.jboss.org/tools/2.0.0.GA/seam/en/html/cruddatabaseapplication.html) for the purpose of database reverse engineering.


      I get the corresponding forms for the tables in my database, but if I want - for instance - to update my table by inserting a data record I get into one of the tables, I get the following annoying errors on a Seam Debug Page-



      - Exception


      Exception during request processing:
      Caused by javax.el.PropertyNotFoundException with message: Target Unreachable, identifier 'userHome' resolved to null
      org.jboss.el.parser.AstValue.getTarget(AstValue.java:38)
      org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
      org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      org.jboss.seam.core.Expressions$2.invoke(Expressions.java:175)
      org.jboss.seam.navigation.Page.preRender(Page.java:311)
      org.jboss.seam.navigation.Pages.preRender(Pages.java:350)
      org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:561)
      org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:472)
      org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:148)
      org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118)
      com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:637)






      I've been searching unfortunately in vain for a (long :-( ) while for a solution. I would be very grateful for any hints.


      Best regards!


        • 1. Re: PropertyNotFoundException with Seam2
          xsalefter.xsalefter.yahoo.com

          Can you paste the source code here? But as far as I know from the stak trace, may be when you try to call


          #{userHome.<xxx>}



          component in somewhere in your code (may be your xhtml files), the component is still null or not yet created by seam container. By the way, did you used seam-gen to generating all your code?

          • 2. Re: PropertyNotFoundException with Seam2
            tsbb
            Hello xsa lefter!

            First thank you very much for your reply. I wonder though why you like to see the source code, since it is auto-generated. Anyway I post the code of the UserEdit.xhtml below. I use seamn with the eclipse ide (galileo Version: 3.5.2.R35x_v20100210-0800-9hEiFzmFst-TiEn9hNYgDWg1XN8ulH_JvCNGB Build id: M20100211-1343). There one can generate the code (xhtml and java) from the project context menu: "new-Seam generate Entities".

            Thank you again!

            Tarek

            User.Edit.xhtml:

            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:a="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">

            <ui:define name="body">

                <h:form id="user" styleClass="edit">

                    <rich:panel>
                        <f:facet name="header">#{userHome.managed ? 'Edit' : 'Add'} User</f:facet>




                        <s:decorate id="uinField" template="layout/edit.xhtml">
                            <ui:define name="label">Uin</ui:define>
                            <h:inputTextarea id="uin"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.uin}"/>
                        </s:decorate>


                        <s:decorate id="birthdayField" template="layout/edit.xhtml">
                            <ui:define name="label">Birthday</ui:define>
                            <rich:calendar id="birthday"
                                      value="#{userHome.instance.birthday}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="chiffreField" template="layout/edit.xhtml">
                            <ui:define name="label">Chiffre</ui:define>
                            <h:inputTextarea id="chiffre"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.chiffre}"/>
                        </s:decorate>


                        <s:decorate id="firstnameField" template="layout/edit.xhtml">
                            <ui:define name="label">Firstname</ui:define>
                            <h:inputTextarea id="firstname"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.firstname}"/>
                        </s:decorate>


                        <s:decorate id="foreignKeyField" template="layout/edit.xhtml">
                            <ui:define name="label">Foreign key</ui:define>
                            <h:inputText id="foreignKey"
                                       size="32"
                                  maxlength="32"
                                      value="#{userHome.instance.foreignKey}">
                                <a:support event="onblur" reRender="foreignKeyField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="salutationField" template="layout/edit.xhtml">
                            <ui:define name="label">Salutation</ui:define>
                            <h:inputText id="salutation"
                                       size="64"
                                  maxlength="64"
                                      value="#{userHome.instance.salutation}">
                                <a:support event="onblur" reRender="salutationField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="genderField" template="layout/edit.xhtml">
                            <ui:define name="label">Gender</ui:define>
                            <h:inputText id="gender"
                                       size="2"
                                  maxlength="2"
                                      value="#{userHome.instance.gender}">
                                <a:support event="onblur" reRender="genderField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="hiddenField" template="layout/edit.xhtml">
                            <ui:define name="label">Hidden</ui:define>
                            <h:selectBooleanCheckbox id="hidden"
                                                  value="#{userHome.instance.hidden}"/>
                        </s:decorate>


                        <s:decorate id="lastnameField" template="layout/edit.xhtml">
                            <ui:define name="label">Lastname</ui:define>
                            <h:inputTextarea id="lastname"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.lastname}"/>
                        </s:decorate>


                        <s:decorate id="newsletterField" template="layout/edit.xhtml">
                            <ui:define name="label">Newsletter</ui:define>
                            <h:selectBooleanCheckbox id="newsletter"
                                                  value="#{userHome.instance.newsletter}"/>
                        </s:decorate>


                        <s:decorate id="nicknameField" template="layout/edit.xhtml">
                            <ui:define name="label">Nickname</ui:define>
                            <h:inputTextarea id="nickname"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.nickname}"/>
                        </s:decorate>


                        <s:decorate id="noipcheckField" template="layout/edit.xhtml">
                            <ui:define name="label">Noipcheck</ui:define>
                            <h:selectBooleanCheckbox id="noipcheck"
                                                  value="#{userHome.instance.noipcheck}"/>
                        </s:decorate>


                        <s:decorate id="passwordField" template="layout/edit.xhtml">
                            <ui:define name="label">Password</ui:define>
                            <h:inputTextarea id="password"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.password}"/>
                        </s:decorate>


                        <s:decorate id="permalinkField" template="layout/edit.xhtml">
                            <ui:define name="label">Permalink</ui:define>
                            <h:inputTextarea id="permalink"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.permalink}"/>
                        </s:decorate>


                        <s:decorate id="resumeField" template="layout/edit.xhtml">
                            <ui:define name="label">Resume</ui:define>
                            <h:inputTextarea id="resume"
                                           cols="80"
                                           rows="10"
                                          value="#{userHome.instance.resume}"/>
                        </s:decorate>


                        <s:decorate id="titleField" template="layout/edit.xhtml">
                            <ui:define name="label">Title</ui:define>
                            <h:inputText id="title"
                                       size="100"
                                  maxlength="128"
                                      value="#{userHome.instance.title}">
                                <a:support event="onblur" reRender="titleField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="tokenField" template="layout/edit.xhtml">
                            <ui:define name="label">Token</ui:define>
                            <h:inputTextarea id="token"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.token}"/>
                        </s:decorate>


                        <s:decorate id="admintypeField" template="layout/edit.xhtml">
                            <ui:define name="label">Admintype</ui:define>
                            <h:inputText id="admintype"
                                       size="3"
                                  maxlength="3"
                                      value="#{userHome.instance.admintype}">
                                <a:support event="onblur" reRender="admintypeField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="languageIdField" template="layout/edit.xhtml">
                            <ui:define name="label">Language id</ui:define>
                            <h:inputText id="languageId"
                                      value="#{userHome.instance.languageId}">
                                <a:support event="onblur" reRender="languageIdField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="creationDateField" template="layout/edit.xhtml">
                            <ui:define name="label">Creation date</ui:define>
                            <rich:calendar id="creationDate"
                                      value="#{userHome.instance.creationDate}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="firstLoginField" template="layout/edit.xhtml">
                            <ui:define name="label">First login</ui:define>
                            <rich:calendar id="firstLogin"
                                      value="#{userHome.instance.firstLogin}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="fullSalutationField" template="layout/edit.xhtml">
                            <ui:define name="label">Full salutation</ui:define>
                            <h:inputTextarea id="fullSalutation"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.fullSalutation}"/>
                        </s:decorate>


                        <s:decorate id="lastLoginField" template="layout/edit.xhtml">
                            <ui:define name="label">Last login</ui:define>
                            <rich:calendar id="lastLogin"
                                      value="#{userHome.instance.lastLogin}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="lastNewsletterField" template="layout/edit.xhtml">
                            <ui:define name="label">Last newsletter</ui:define>
                            <rich:calendar id="lastNewsletter"
                                      value="#{userHome.instance.lastNewsletter}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="loginCounterField" template="layout/edit.xhtml">
                            <ui:define name="label">Login counter</ui:define>
                            <h:inputText id="loginCounter"
                                      value="#{userHome.instance.loginCounter}">
                                <a:support event="onblur" reRender="loginCounterField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="loginNameField" template="layout/edit.xhtml">
                            <ui:define name="label">Login name</ui:define>
                            <h:inputTextarea id="loginName"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.loginName}"/>
                        </s:decorate>


                        <s:decorate id="passwordExpiresField" template="layout/edit.xhtml">
                            <ui:define name="label">Password expires</ui:define>
                            <rich:calendar id="passwordExpires"
                                      value="#{userHome.instance.passwordExpires}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="primaryEmailField" template="layout/edit.xhtml">
                            <ui:define name="label">Primary email</ui:define>
                            <h:inputTextarea id="primaryEmail"
                                           cols="80"
                                           rows="3"
                                          value="#{userHome.instance.primaryEmail}"/>
                        </s:decorate>


                        <s:decorate id="profileLastReviewField" template="layout/edit.xhtml">
                            <ui:define name="label">Profile last review</ui:define>
                            <rich:calendar id="profileLastReview"
                                      value="#{userHome.instance.profileLastReview}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="profileRevReminderCntField" template="layout/edit.xhtml">
                            <ui:define name="label">Profile rev reminder cnt</ui:define>
                            <h:inputText id="profileRevReminderCnt"
                                      value="#{userHome.instance.profileRevReminderCnt}">
                                <a:support event="onblur" reRender="profileRevReminderCntField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="profileRevReminderSentField" template="layout/edit.xhtml">
                            <ui:define name="label">Profile rev reminder sent</ui:define>
                            <rich:calendar id="profileRevReminderSent"
                                      value="#{userHome.instance.profileRevReminderSent}" datePattern="MM/dd/yyyy hh:mm a"/>
                        </s:decorate>


                        <s:decorate id="profileReviewReminderField" template="layout/edit.xhtml">
                            <ui:define name="label">Profile review reminder</ui:define>
                            <h:inputText id="profileReviewReminder"
                                      value="#{userHome.instance.profileReviewReminder}">
                                <a:support event="onblur" reRender="profileReviewReminderField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="regOption1Field" template="layout/edit.xhtml">
                            <ui:define name="label">Reg option1</ui:define>
                            <h:inputText id="regOption1"
                                      value="#{userHome.instance.regOption1}">
                                <a:support event="onblur" reRender="regOption1Field" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="regOption2Field" template="layout/edit.xhtml">
                            <ui:define name="label">Reg option2</ui:define>
                            <h:inputText id="regOption2"
                                      value="#{userHome.instance.regOption2}">
                                <a:support event="onblur" reRender="regOption2Field" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="regOption3Field" template="layout/edit.xhtml">
                            <ui:define name="label">Reg option3</ui:define>
                            <h:inputText id="regOption3"
                                      value="#{userHome.instance.regOption3}">
                                <a:support event="onblur" reRender="regOption3Field" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="regOption4Field" template="layout/edit.xhtml">
                            <ui:define name="label">Reg option4</ui:define>
                            <h:inputText id="regOption4"
                                      value="#{userHome.instance.regOption4}">
                                <a:support event="onblur" reRender="regOption4Field" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="showBirthdayField" template="layout/edit.xhtml">
                            <ui:define name="label">Show birthday</ui:define>
                            <h:selectBooleanCheckbox id="showBirthday"
                                                  value="#{userHome.instance.showBirthday}"/>
                        </s:decorate>


                        <s:decorate id="showEmailField" template="layout/edit.xhtml">
                            <ui:define name="label">Show email</ui:define>
                            <h:selectBooleanCheckbox id="showEmail"
                                                  value="#{userHome.instance.showEmail}"/>
                        </s:decorate>


                        <s:decorate id="showNameField" template="layout/edit.xhtml">
                            <ui:define name="label">Show name</ui:define>
                            <h:selectBooleanCheckbox id="showName"
                                                  value="#{userHome.instance.showName}"/>
                        </s:decorate>


                        <s:decorate id="newsletterLanguageIdField" template="layout/edit.xhtml">
                            <ui:define name="label">Newsletter language id</ui:define>
                            <h:inputText id="newsletterLanguageId"
                                      value="#{userHome.instance.newsletterLanguageId}">
                                <a:support event="onblur" reRender="newsletterLanguageIdField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>


                        <s:decorate id="idCommunityField" template="layout/edit.xhtml">
                            <ui:define name="label">Id community</ui:define>
                            <h:inputText id="idCommunity"
                                      value="#{userHome.instance.idCommunity}">
                                <a:support event="onblur" reRender="idCommunityField" bypassUpdates="true" ajaxSingle="true"/>
                            </h:inputText>
                        </s:decorate>

                        <div style="clear:both">
                            <span class="required">*</span>
                            required fields
                        </div>

                    </rich:panel>

                    <div class="actionButtons">

                        <h:commandButton id="save"
                                      value="Save"
                                     action="#{userHome.persist}"
                                   disabled="#{!userHome.wired}"
                                   rendered="#{!userHome.managed}"/>

                        <h:commandButton id="update"
                                      value="Save"
                                     action="#{userHome.update}"
                                   rendered="#{userHome.managed}"/>

                        <h:commandButton id="delete"
                                      value="Delete"
                                     action="#{userHome.remove}"
                                  immediate="true"
                                   rendered="#{userHome.managed}"/>

                        <s:button id="cancelEdit"
                               value="Cancel"
                         propagation="end"
                                view="/User.xhtml"
                            rendered="#{userHome.managed}"/>

                        <s:button id="cancelAdd"
                               value="Cancel"
                         propagation="end"
                                view="/#{empty userFrom ? 'UserList' : userFrom}.xhtml"
                            rendered="#{!userHome.managed}"/>

                    </div>
                </h:form>

            </ui:define>

            </ui:composition>
            • 3. Re: PropertyNotFoundException with Seam2
              huionn

              Depending on your scenario, seam-gen generated source may not work properly.
              You need to make sure the ScopeType of your @Name(userHome) is correct.

              Btw, to solve your problem, you can try to add @AutoCreate to your userHome:

              @Name("userHome")
              @AutoCreate
              public class UserHome extends ...

              • 4. Re: PropertyNotFoundException with Seam2
                xsalefter.xsalefter.yahoo.com

                The only reason why I need to see the source code is, I need to know whether there is a seam component named userHome, refer to the stack trace message. I'm a fans of seam code generator, and sometimes found some minor bug and typo from the generated code.


                Ok.. About your problem, I guess you have class named UserHome like this:


                @Name("<???>")
                public class UserHome extends EntityHome<User> implements Serializable {
                    // Rest of code..
                }
                



                right? Can you write here what the value of


                <???>



                is? May be it's generated UserHome instead of userHome? By the way, which version of seam do you used?

                • 5. Re: PropertyNotFoundException with Seam2
                  tsbb

                  Hi Than Hui and xsa,


                  thak you very much for you effort.


                  @Than Hui, I tried to fix the problem by adding @AutoCreate (and importing the corresponding org.jboss.seam.annotations.AutoCreate class). But I still get the JBoss Seam Debug Page
                  with the same exception as before.


                  @xsa lefter
                  the code line with the @Name-Annotation looks like: @Name(userHome). I.e. with small u
                  I was experimenting with different Seam2 2.2.1.CR1. But I also used before the 2.2.0.GA -version.


                  Looking forward for your feedback again...


                  Have a nice day!


                  Tarek

                  • 6. Re: PropertyNotFoundException with Seam2
                    xsalefter.xsalefter.yahoo.com

                    Hmm, strange. You used eclipse to generate the code right? Do you mind if you try use command-line version of seam gen? My guess is, may be there is a wrong configuration generated by the eclipse (JBoss Tool) version.


                    If you like to try using command line seam-gen and you using seam 2.2.0 GA and JBoss AS 4.2, please dont forget to edit file:




                    • component.xml: Follow this instruction
                      <!-- If you are still using JBoss 4, uncomment this to have you PU started -->






                    • your-project-name-dev-ds.xml: Edit this line
                      <connection-url>jdbc:<your_database_vendor>:///<your_database_name></connection-url>




                    , and please add appropriate database driver jar in your seam framework library directory.


                    Hope this help.

                    • 7. Re: PropertyNotFoundException with Seam2
                      tsbb
                      Hello again,

                      I have tried to follow your hints along with the tutorial "http://docs.jboss.org/seam/latest/en-US/html/gettingstarted.html" to use seam WITHOUT Eclipse at all. I create a project and explode it. But the JB AS cannot run the application and I get "HTTP Status 404". I am really desperate :-( since I have been trying a lot of things for a very long working hours. Below you can see the content of the "seam-gen/build.properties" file.

                      Any help or useful hints will be more than appreciated :-)

                      Tarek

                      build.properties:

                      #Generated by seam setup
                      #Fri Sep 17 11:02:11 CEST 2010
                      hibernate.connection.password=myPWD
                      workspace.home=~/Documents/workspace
                      hibernate.connection.dataSource_class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
                      model.package=com.jboss.ss
                      driver.jar=/Applications/jboss-seam-2.2.0.GA/lib/mysql-connector-java-5.1.13-bin.jar
                      action.package=com.jboss.ss
                      test.package=com.jboss.ss.test
                      database.type=mysql
                      richfaces.skin=
                      glassfish.domain=exit
                      hibernate.default_catalog.null=
                      hibernate.default_schema.null=
                      database.drop=n
                      project.name=ss
                      hibernate.connection.username=mysqlUser
                      glassfish.home=q
                      hibernate.connection.driver_class=com.mysql.jdbc.Driver
                      hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
                      jboss.domain=localhost
                      project.type=war
                      icefaces.home=
                      database.exists=y
                      jboss.home=/Applications/jboss-6.0.0.20100721-M4/
                      driver.license.jar=
                      hibernate.dialect=org.hibernate.dialect.MySQLDialect
                      hibernate.connection.url=jdbc\:mysql\://mysqlDBMS\:3306/db
                      icefaces=y
                      • 8. Re: PropertyNotFoundException with Seam2
                        xsalefter.xsalefter.yahoo.com

                        Hi.. Sorry for long-time reply. did you solve your problem? Can you copy-paste the error/stack trace here?

                        • 9. Re: PropertyNotFoundException with Seam2
                          xsalefter.xsalefter.yahoo.com

                          And also, please follow this guide. If you wanna run Seam out of the box, you need to:




                          • Use JBoss AS 5 if you using Seam 2.2.0 GA




                          • Use JBoss AS 6 if you using Seam 2.2.1.



                          Hope this help.