5 Replies Latest reply on Jan 5, 2002 10:28 AM by sheepe

    JBoss3 - CMR problems

    sheepe

      Hi, I'm trying to use the fresh CVS snapshots of RH, without many success so far. I have two concrete problems at the moment:

      1. I have a jar file which deploys 2 CMP2 beans using CMR. In jboss-all-2001-12-19, they work and CMR seems to be working, however, using jboss-all-2002-01-04, I get an exception at deployment:
      java.lang.IllegalStateException: Foreign key constriant is not allowed for this type of datastore

      The jar file is the same in both cases, and I can't really figure out what's that exception wants to say.


      2. In both snapshots, the container managed findAll() and findByPrimaryKey() methods seem to fail with this exception:
      ERROR [LogInterceptor] TransactionRolledbackException, causedBy: java.lang.NullPointerException
      <full trace follows>


      Regarding all these - are there around any test packages which use CMR, container finder routines, etc. to help tracking down such problems? Now I'm unsure whether my code has the problem, or I've just touched another unstable point in RH :)

      tia,
      Christopher

        • 1. Re: JBoss3 - CMR problems
          dsundstrom

          You have a very old copy of the code. Get the new code and repost if your problems don't go away.

          • 2. Re: JBoss3 - CMR problems
            lafr

            The cause for your first problem is probably, that you have the current code but an outdated standardjbosscmp-jdbc.xml.
            The <fk-contraint-template> for your database mapping is missing.

            • 3. Re: JBoss3 - CMR problems
              sheepe

              I've checked the today snapshot, getting the jboss-all module from scratch as well. It gave the same exception . If you check it carefully, I wrote that it was working in the version from middle of December, and stopped working in January. Do I have a too old, or a too fresh copy of the code then?

              Christopher

              • 4. Re: JBoss3 - CMR problems
                lafr

                Which database and which type-mapping do you use ?
                I guess the default Hypersonic SQL.

                It seems you enabled <fk-constraint> either in standardjbosscmp-jdbc.xml or in your jbosscmp-jdbc.xml.

                Hypersonic seems not to support foreign keys, the template for foreign-key creation is empty.

                So, choose another database and type-mapping or disable <fk-constraint>.

                I also use the most current cvs-version of jboss but with an informix-database for persistance.
                Your problems do not appear here.

                • 5. Re: JBoss3 - CMR problems
                  sheepe

                  Yeah, you're right, I am using Hypersonic with it's default configuration at the moment.. I've disabled the fk-constraint using the right XDoclet tag, and now it deploys without any error.. :)

                  Thanks much for your help,
                  Christopher