13 Replies Latest reply on Jul 8, 2002 10:00 PM by Dain Sundstrom

    EJB1.1 on JBoss3 (CMP2.0)

    Arturo Newbie

      I have an application running on Jboss 2 with an entity EJB and several session EJB. I am trying to migrate to JBoss3 but I get this error when I use the entity EJB:
      16:15:16,316 INFO [STDOUT] Error closing Connection: java.sql.SQLException: Con
      nection handle is not currently associated with a ManagedConnection

      I have changed jaws per jbosscmp-jdbc.xml. I don't want to migrate to EJB2.0, I only want to run this 1.1EJB on JBoss3 Is that posible?

      Thanks in advance.

        • 1. Re: EJB1.1 on JBoss3 (CMP2.0)
          Dain Sundstrom Master

          Your EJB 1.1 ejb-jar file should run in JBoss 3.0 unchanged. You only need to convert to the jbosscmp-jdbc.xml file if you want to use the new JBossCMP persistence manager, otherwise JBoss will use JAWS. I recomend you stick with JAWS until you are ready to add some CMP 2.0 beans, as you are already familar with JAWS (and you have tested with JAWS).

          • 2. Re: EJB1.1 on JBoss3 (CMP2.0)
            Arturo Newbie

            I have try again with the unchanged EJB jar (and with an ear) witch works in JBoss2 but don't works in JBoss3. Please help!!!

            • 3. Re: EJB1.1 on JBoss3 (CMP2.0)
              Dain Sundstrom Master

              How do you expect me to help you? You have not provided any information.

              • 4. Re: EJB1.1 on JBoss3 (CMP2.0)
                Arturo Newbie

                Sorry, I'll try to be more specific.

                I am using jboss-3.0.0_tomcat-4.0.3 with j2sdk1.4.0_01. MS SQLServer 2000 running in other machine. JSQLConnect Driver (http://www.j-netdirect.com) SO: Windows 2000 Porfessional

                If I use JBoss-2.2.2_Tomcat-3.2.2 it works

                I send all the configurations files I have.

                What more can be wrong?


                • 5. Re: EJB1.1 on JBoss3 (CMP2.0)
                  Arturo Newbie

                  More information:

                  The database connection is ok, because I can send querys to the server, the problems is when I try to use the entity EJB.

                  • 6. Re: EJB1.1 on JBoss3 (CMP2.0)
                    Arturo Newbie

                    Must I make any changes in login-conf.xml file?
                    What is this file for?

                    another question:

                    LocalTxConnection means the database must be in the local machine?

                    Thanks again

                    • 7. Re: EJB1.1 on JBoss3 (CMP2.0)
                      Dain Sundstrom Master

                      What is the problem you are having? Are you getting an exception?

                      • 8. Re: EJB1.1 on JBoss3 (CMP2.0)
                        dudoes Newbie

                        must I put
                        <cmp-verion>1.x</cmp-version> or
                        <cmp-version>2.x<cmp-version> tags

                        into ejb-jar.xml and/or jboss.xml,jaws.xml,jbosscmp-jdbc.xml ,then System can determine to use new CMP manager of Jboss3 ,or old CMP manger of Jboss3?

                        how can say jboss support EJB1.1 and EJB2.0?and it support EJB1.1 and EJB2.O Bean in the same container?

                        • 9. Re: EJB1.1 on JBoss3 (CMP2.0)
                          Dain Sundstrom Master

                          No, if you have an EJB 1.1 jar, as identified by the DOCTYPE declaration of the ejb-jar.xml file, then you get the old CMP 1.1 persistence manager, JAWS. If you have an EJB 2.0, jar you get the new JBossCMP persistence manager.

                          If you have an EJB 2.0 jar, the default cmp-version, as defined by the EJB 2.0 specification, is 2.x.

                          • 10. Re: EJB1.1 on JBoss3 (CMP2.0)
                            dudoes Newbie

                            thinks for your reply.

                            My application of EJB1.1 have been deployed JBOSS 3, i also use JAWS.XML, findAll and findByXXX is ok.

                            but select statements with like is working badly.
                            in JAWS.xml:

                            employee_Name like %{0}%


                            when i use '%{0}%', console say:

                            2002-07-08 11:26:53,546 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] PreloadFinder findByEmployeeName command executing: SELECT T_PROJECT_APL.PROJECT_ID,T_PROJECT_APL.DEPARTMENT_ID,...................T_PROJECT_APL.DEPARTMENT_ABBR,T_PROJECT_APL.CONTACT_METHOD,T_PROJECT_APL.CONTACT_NAME,T_PROJECT_APL.JUDGE_DATE FROM T_PROJECT_APL where employee_Name like %?%
                            2002-07-08 11:26:53,546 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=VARCHAR, value=de
                            2002-07-08 11:26:53,657 ERROR [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Exception caught executing SQL
                            java.sql.SQLException: ORA-00911: invalid character

                            when i use %{0}%, console say:

                            ORA-01006: bind variable does not exist

                            why? I need your help

                            • 11. Re: EJB1.1 on JBoss3 (CMP2.0)
                              dudoes Newbie

                              I make the parameter of findByXXX by adding "%" i want before call findByXXX, so {0} can be placed without "%".

                              I think this is a Bug of Jboss.

                              • 12. Re: EJB1.1 on JBoss3 (CMP2.0)
                                Jon Evans Newbie


                                employee_Name like {0}

                                • 13. Re: EJB1.1 on JBoss3 (CMP2.0)
                                  Dain Sundstrom Master

                                  If you are interested, you can use JBossCMP in EJB 1.1 backwards compatability mode in cvs HEAD. This means you can use EJB-QL, JBossQL, etc. with your EJB 1.1 entity. You may even be able to use it in a blind relationship, but I haven't tested that yet.