4 Replies Latest reply on May 14, 2002 9:46 PM by svevor

    problem with running CMP bean

    svevor

      When I deploy my CMP.jar it deploys Ok.
      But when I run it from web client I
      get next error messages.
      Can anybody help me with this?
      Thanks.
      18:37:31,721 INFO [STDOUT] There are 3 line items
      18:37:31,722 INFO [STDOUT] OrderBean: ejbCreate
      18:37:31,738 INFO [STDOUT] CustomerBean: ejbLoad
      18:37:31,742 INFO [STDOUT] LineItemBean: ejbCreate
      18:37:31,750 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
      javax.ejb.EJBException: Method is not a known CMP field accessor, CMR field accessor, or ejbSelect method: methodName=setOrder
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:110)
      at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      at LineItemBean$Proxy.setOrder()
      at LineItemBean.ejbPostCreate(LineItemBean.java:46)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        • 1. Re: problem with running CMP bean
          dsundstrom

          Did you forget to declare your relationship in the ejb-jar.xml file?

          • 2. Re: problem with running CMP bean
            svevor

            all relations between three CMP beans set up
            in ejb-jar.xml and if i use hypersonic as datasource
            everything is working but this mistakes are under
            postgresql database.

            • 3. Re: problem with running CMP bean
              dsundstrom

              That is weird. The message means that JBossCMP could not find a cmp field named order of a relationship on the bean with a declare cmr-field named order. This happens way before the database is accessed. Check the ejb-jar file again. Double check capitalization.

              • 4. Re: problem with running CMP bean
                svevor

                Thank you very much,
                I thought it database. Before I had relation order
                as cmr filed as order in ejb-jar.xml.
                I change it to ordera becouse order is reserved word
                for postgresql,but i did't change in bean setOrder and getOrder to setOrdera and getOrdera(abstract method)
                Now I changed it and everything is working fine.