2 Replies Latest reply on Jul 10, 2003 6:23 PM by Ricardo Temporal

    custom finder EJB 1.1 jboss 2.2.2 x 3.2.1

    Ricardo Temporal Newbie

      Hello,

      I am upgrading from jboss 2.2.2 to jboss 3.2.1 and the application was written in EJB 1.1 specification.

      A custom finder method in a CMP EntityBean is throwing an exception, and ejbFindCustom never get called.

      IMPORTANT: custom finder method in CMP, not BMP.

      I think this is standard, acording to paragraph 9.2.5 of EJB 1.1 specification, although appendix B.4 says there is no way to specify a criteria.

      I don't want to re-write in EJB 2.0, because the application is in production and I don't have time for that, not now.

      I have the documentation, if someone can help me or indicate where can I find it in the docs...

      Thanks.
      ---------------------------
      java.lang.IllegalStateException
      at org.jboss.ejb.EntityContainer.find(EntityContainer.java:654)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:188)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477)
      at org.jboss.ejb.Container.invoke(Container.java:694)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java(Compiled Code))
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java(Compiled Code))
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:83)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy327.findCodInstrumento_DtTime(Unknown Source)

        • 1. Re: custom finder EJB 1.1 jboss 2.2.2 x 3.2.1
          Ricardo Temporal Newbie

          It's me again.

          It's still not working, but not throwing Exception anymore.

          There was a custumized container-configuration in my jboss.xml, After I cut it off, the Exception disapeared.

          The ejbFindCustom method still not get called.

          But the findCustom return an Empty Collection and does not throw Exception.

          Follow my configuration:
          -------------------------------
          ejb-jar:
          -------------------------------
          <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/dtd/ejb-jar_1_1.dtd">


          No description
          <ejb-name>TblValoresCurvas</ejb-name>
          acme.mks.ejb.interfaces.local.TblValoresCurvasHome
          acme.mks.ejb.interfaces.local.TblValoresCurvas
          <ejb-class>acme.mks.ejb.beans.TblValoresCurvasBean</ejb-class>
          <persistence-type>Container</persistence-type>
          <prim-key-class>acme.mks.value.TblValoresCurvasPK</prim-key-class>
          False
          <cmp-field><field-name>codInstrumento</field-name></cmp-field>
          <cmp-field><field-name>dtTime</field-name></cmp-field>
          <cmp-field><field-name>codNo</field-name></cmp-field>
          <cmp-field><field-name>flValue</field-name></cmp-field>
          <cmp-field><field-name>boolReuters</field-name></cmp-field>


          -------------------------------
          jboss.xml
          -------------------------------

          <ejb-name>TblValoresCurvas</ejb-name>
          <jndi-name>acme.mks.TblValoresCurvasHome</jndi-name>
          <configuration-name>Standard CMP EntityBean</configuration-name>

          -------------------------------
          jaws.xml
          -------------------------------

          <ejb-name>TblValoresCurvas</ejb-name>
          <table-name>tblValoresCurvas</table-name>

          -------------------------------

          • 2. Re: custom finder EJB 1.1 jboss 2.2.2 x 3.2.1
            Ricardo Temporal Newbie

            Hello,

            It is working now, I am not sure, but I think the error was caused by the wrong DOCTYPE address.

            this...

            <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/dtd/ejb-jar_1_1.dtd">


            it should be...

            <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

            Thanks.