[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1709) seam-gen generated code throws exception

Ralph Schaer (JIRA) jira-events at lists.jboss.org
Sun Jul 22 03:46:47 EDT 2007


seam-gen generated code throws exception
----------------------------------------

                 Key: JBSEAM-1709
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1709
             Project: JBoss Seam
          Issue Type: Bug
          Components: Core, Framework
    Affects Versions: 2.0.0.BETA1
         Environment: Seam (CVS checkout from today), JBoss 4.2.1, Java 6, Windows XP
            Reporter: Ralph Schaer


A seam-gen generated application (with generated entities) is throwing the following error, when I click for example on the column header in a list (sort) or when I try to create a new object.

Exception during request processing:
Caused by java.lang.IllegalArgumentException with message: "Could not invoke method by reflection: Instance.getComponent() on: test.CarHome"
  org.jboss.seam.util.Reflections.invoke(Reflections.java:31)
  org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)


Caused by java.lang.IllegalArgumentException with message: "object is not an instance of declaring class"
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
  org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:45)
  org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
  org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38) 
  org.jboss.seam.util.Work.workInTransaction(Work.java:39)
  org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
  org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
  org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) 
  org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
  org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
  org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
  test.CarHome_$$_javassist_2.getComponent(CarHome_$$_javassist_2.java)
  org.jboss.seam.core.Validators.getValidator(Validators.java:85)



Steps to reproduce the error

1. Create a table in the database (Example with mysql. I guess the database does not matter)
CREATE TABLE `test`.`Car` (
  `id` INTEGER UNSIGNED NOT NULL DEFAULT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE = InnoDB;

2. seam setup (ear or war deployment does not matter. Problem exists in both deployment modes)
3. seam new-project
4. seam generate-entities
5. seam explode (jboss is already running)
6. Start the broser and type http://localhost:8080/name_of_webapp
7. Browser shows the Welcome screen. Everything looks fine.
8. Click on "Car List "
9. Click on "Create car"
10. Exception 




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list