2 Replies Latest reply on Apr 29, 2002 4:19 PM by song chang

    VARCHAR2 type for Oracle

    song chang Newbie

      Hi, I created an entity bean. It works fine when I use run.sh. However, when I use run_with_catalina.sh, it complains
      [14:58:11,056,JAWSPersistenceManager] java.sql.SQLException: Wrong data type: VARCHAR2 in statement [CREATE TABLE CustomerBean (custName VARCHAR2(20),title VARCHAR2(16),id NUMBER(6))]
      [14:58:11,059,JAWSPersistenceManager] Could not create table CustomerBean: Wrong data type: VARCHAR2 in statement [CREATE TABLE CustomerBean (custName VARCHAR2(20),title VARCHAR2(16),id NUMBER(6))]

      The following is jaws.xml. Can anyone explain why it works under jboss standalone, but not with the one embedded with Tomcat? Thanks.

      <?xml version="1.0" encoding="UTF-8"?>

      <enterprise-beans>

      <ejb-name>CustomerBean</ejb-name>
      <remove-table>true</remove-table>
      <cmp-field>
      <field-name>id</field-name>
      <column-name>id</column-name>
      <jdbc-type>INTEGER</jdbc-type>
      <sql-type>NUMBER(6)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>title</field-name>
      <column-name>title</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR2(16)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>custName</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR2(20)</sql-type>
      </cmp-field>

      findFirstName
      custname like {0}
      id DESC


      </enterprise-beans>

        • 1. Re: VARCHAR2 type for Oracle
          song chang Newbie

          After going through the server.log file, I saw JBoss is using Hypersonic instead of Oracle, which I set up in jboss.jcml as the following:

          [15:23:50,343,ConfigurationService] Drivers set to org.hsqldb.jdbcDriver in DefaultDomain:service=JdbcProvider
          [15:23:50,346,ConfigurationService] Port set to 1476 in DefaultDomain:service=Hypersonic
          [15:23:50,347,ConfigurationService] Silent set to true in DefaultDomain:service=Hypersonic
          [15:23:50,359,ConfigurationService] Database set to default in DefaultDomain:service=Hypersonic
          [15:23:50,360,ConfigurationService] Trace set to false in DefaultDomain:service=Hypersonic
          [15:23:50,374,ConfigurationService] PoolName set to DefaultDS in DefaultDomain:service=XADataSource,name=DefaultDS
          [15:23:50,386,ConfigurationService] DataSourceClass set to org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl in DefaultDomain:service=XADataSource,name=DefaultDS
          [15:23:50,405,ConfigurationService] URL set to jdbc:hsqldb:hsql://localhost:1476 in DefaultDomain:service=XADataSource,name=DefaultDS
          [15:23:50,407,ConfigurationService] GCMinIdleTime set to 1200000 in DefaultDomain:service=XADataSource,name=DefaultDS

          However, I already removed DefaultDS section from jboss.jcml.

          Can anyone explain why this happens?

          Thanks

          • 2. Re: VARCHAR2 type for Oracle
            song chang Newbie

            Please ignore my question. I didn't realize that conf/catalina is used when running run_with_catalina.ksh. Duh.