3 Replies Latest reply on Oct 28, 2002 8:50 AM by hgsdc

    Problem creating table with Firebird CMP2

    hgsdc

      Hi all,

      I am using JBoss 3.0.3, and the firebird jca connector.
      I did manage to get JBoss up running without any deployments (apps), and the configuration for Firebird.rar/Firebird-service seems to work.

      When I deploy my CMP2 bean I get the following error on creating the table in the database:
      Dynamic SQl Error:
      SQL Error Code = -104
      Token unknown - line 1, char 161
      ))

      Is there any way I can see (in a log or something) the actual SQL code used to generate my table?

      Thanx in advance
      Best regards

      Henrik

        • 1. Re: Problem creating table with Firebird CMP2
          aloubyansky

          You can see executed SQL statements by increasing log level to DEBUG for category org.jboss.ejb.plugins.cmp and also increasing the threshold to DEBUG for console or log file.

          • 2. Re: Problem creating table with Firebird CMP2
            efingal

            I fought with this problem for a while. I found that the primkey-field tag was missing from my ejb-jar.xml file. It should look something like this:

            .
            .
            <cmp-field >
            <![CDATA[]]>
            <field-name>name</field-name>
            </cmp-field>
            <primkey-field>key</primkey-field>
            .
            .

            I was using EJBDoclet to generate this file, and had just hacked up a sample provided with JBoss. The reason that the EJBDoclet was not creating the ejb-jar.xml correctly was because I was not specifying the primkey-field on the bean class. Instead, I was @ejb:pk-field on the getter method. @ejb:pk-field is meant only for composite keys.

            Hope this helps

            • 3. Re: Problem creating table with Firebird CMP2
              hgsdc

              Yep, that did it..Also got the log thang going..

              Thanx for both suggestions..