4 Replies Latest reply on Jul 11, 2006 3:13 PM by cptnkirk

    VariableResolver 'user' not found error

    tobad

      I'm using Tomcat 5.5.9 with Seam Beta 1 and the embedded jboss microcontainer.

      I've followed the exampel from the manual regarding User and RegisterAction but I'm encountering some problems.

      The components register fine in Seam but the Variableresolver can't find them, I get the following error all the time.

      18:18:52,562 WARN [VariableResolverImpl] Variable 'register' could not be resolved.

      Any idea why this is happening?

      thanks for any help

      /Tobias

        • 1. Re: VariableResolver 'user' not found error
          gavin.king

          Try working from one of the example apps (in CVS) that deploy on Tomcat (booking, dvdstore, hibernate).

          • 2. Re: VariableResolver 'user' not found error
            tobad

            Thank you for the answer.
            In the end I checked out a version from CVS (its from the 26th)

            It now deploys fine as can be seen in the log

            2006-01-31 23:15:25,812 [http-8084-Processor25] INFO org.jboss.seam.deployment.Scanner - scanning: C:\dev\java\seamtest\build\web\WEB-INF\classes
            2006-01-31 23:15:25,843 [http-8084-Processor25] INFO org.jboss.seam.Component - Component: register, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: com.keybroker.action.RegisterAction, JNDI: RegisterAction/local
            2006-01-31 23:15:25,906 [http-8084-Processor25] INFO org.jboss.seam.Component - Component: users, scope: SESSION, type: ENTITY_BEAN, class: com.keybroker.entity.User
            2006-01-31 23:15:25,906 [http-8084-Processor25] INFO org.jboss.seam.core.Ejb - starting the embedded EJB container
            2006-01-31 23:15:27,375 [http-8084-Processor25] INFO org.jboss.resource.adapter.jdbc.local.LocalTxDataSource - Bound datasource to JNDI name 'java:/DefaultDS'
            2006-01-31 23:15:27,390 [http-8084-Processor25] INFO org.jboss.resource.adapter.jdbc.local.LocalTxDataSource - Bound datasource to JNDI name 'java:/testDatasource'
            2006-01-31 23:15:28,609 [http-8084-Processor25] INFO org.jboss.ejb3.Ejb3AnnotationHandler - found EJB3: ejbName=RegisterAction, class=com.keybroker.action.RegisterAction, type=STATEFUL
            


            I then run the JSP (http://localhost:8084/seamtest/register.jsf) and it does work as expected until i post the result and all I get back is three conversion errors (one for each input element), but there is nothing in the log to check.

            I'm not quite sure what to do now?
            Anyone have any tips?

            Thanks
            Tobias

            • 3. Re: VariableResolver 'user' not found error
              javidjamae

              One thing that I found was that you have to have a seam.properties file in your EJB jar file. For this example (the registration example) it will just be an empty file. If you don't put the seam.properties file in place, you will get those conversion errors.

              If turn on debugging and look in the console you will see that seam cannot find the user component. That is because it was never instantiated and bound into SEAM. And thus, it cannot be resolved when it is looked up.

              I don't fully understand why you have to have a seam.properties file when it is empty, but I'm sure there is a logical reason. :)

              • 4. Re: VariableResolver 'user' not found error

                Having a seam.properties file tips off Seam to continue scanning the archive for Seam components. There are many jars on the classpath and scanning every class of ever jar is wasteful and time consuming. seam.properties helps narrow the search considerably.