Hi!
As I have to get that thing running before our next deadline which is
approaching fast, I'd like to try some more things myself instead of
sitting here and waiting for the solutuion from Sebastien (I DON'T want
to hurry you, Sebastien :-) ).
So what can I do myself ?
Do you think it's a mapping problem ?
Thanks,
Tobias
marc fleury wrote:
>
> thanks for this, Sebastien is looking at a way to auto-detect the connection
> driver class to load the appropriate jaws settings. So this would go in
> jawsstandard.xml
>
> regards
>
> marc
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Tobias
> > Sent: Wednesday, September 06, 2000 5:17 PM
> > To: jBoss
> > Subject: Re: [jBoss-User] Problems with InterBase 6.0 as DataSource
> >
> >
> > Hi Marc, hi Aaron!
> > Now I made up a jaws.xlm and jboss.xlm file. The contents:
> >
> > (as this will be stored in the mailing list archives: WARNING! These
> > settings do not work up to now. I'll post my complete settings again, as
> > soon as they work properly).
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <jaws>
> >
> > <datasource>Hypersonic</datasource>
> > <type-mapping>InterbaseTypeMapping</type-mapping>
> >
> > <type-mappings>
> >
> > <type-mapping>
> >
> > <name>InterbaseTypeMapping</name>
> > <mapping>
> > <java-type>java.lang.Long</java-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > <sql-type>DOUBLE PRECISION</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Byte</java-type>
> > <jdbc-type>TINYINT</jdbc-type>
> > <sql-type>TINYINT</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Boolean</java-type>
> > <jdbc-type>CHAR</jdbc-type>
> > <sql-type>CHAR(5)</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.String</java-type>
> > <jdbc-type>VARCHAR</jdbc-type>
> > <sql-type>VARCHAR(256)</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Character</java-type>
> > <jdbc-type>CHAR</jdbc-type>
> > <sql-type>CHAR</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Short</java-type>
> > <jdbc-type>SMALLINT</jdbc-type>
> > <sql-type>SMALLINT</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.sql.TimeStamp</java-type>
> > <jdbc-type>TIMESTAMP</jdbc-type>
> > <sql-type>DATE</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Double</java-type>
> > <jdbc-type>DOUBLE</jdbc-type>
> > <sql-type>DOUBLE PRECISION</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Float</java-type>
> > <jdbc-type>REAL</jdbc-type>
> > <sql-type>FLOAT</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Object</java-type>
> > <jdbc-type>JAVA_OBJECT</jdbc-type>
> > <sql-type>ARRAY</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.util.Date</java-type>
> > <jdbc-type>DATE</jdbc-type>
> > <sql-type>DATE</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Integer</java-type>
> > <jdbc-type>INTEGER</jdbc-type>
> > <sql-type>INTEGER</sql-type>
> > </mapping>
> > </type-mapping>
> >
> > </type-mappings>
> > </jaws>
> >
> >
> > <?xml version="1.0" encoding="Cp1252"?>
> > <jboss>
> > <resource-managers>
> > <resource-manager
> > res-class="org.jboss.ejb.deployment.JDBCResource">
> > <res-name>PK</res-name>
> > <res-jndi-name>Hypersonic</res-jndi-name>
> > </resource-manager>
> > </resource-managers>
> > </jboss>
> >
> >
> > Relevant trace part of jBoss deploying the TestBean:
> >
> > [JAWS] Initializing JAWS plugin for nextgen.EntityPK
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [Container factory] Caught SQL NPE on JawsCMPField!
> > [Container factory] Caught JDBC NPE on JawsCMPField!
> > [JAWS] Init SQL: CREATE TABLE nextgen_EntityPK (aString
> > VARCHAR(256),otherField INTEGER,aLong DOUBLE PRECISION,aBoolean
> > CHAR(5),aDouble DOUBLE PRECISION,anInt INTEGER)
> > [JAWS] Destroy SQL: DROP TABLE nextgen_EntityPK
> > [JAWS] Exists SQL: SELECT COUNT(*) AS Total FROM nextgen_EntityPK WHERE
> > aBoolean=? AND anInt=? AND aLong=? AND aDouble=? AND aString=?
> > [JAWS] Create SQL: INSERT INTO nextgen_EntityPK
> > (aString,otherField,aLong,aBoolean,aDouble,anInt) VALUES (?,?,?,?,?,?)
> > [JAWS] Remove SQL: DELETE FROM nextgen_EntityPK WHERE aBoolean=? AND
> > anInt=? AND aLong=? AND aDouble=? AND aString=?
> > [JAWS] Load SQL: SELECT aString,otherField,aLong,aBoolean,aDouble,anInt
> > FROM nextgen_EntityPK WHERE aBoolean=? AND anInt=? AND aLong=? AND
> > aDouble=? AND aString=?
> > [JAWS] Init command executing: CREATE TABLE nextgen_EntityPK (aString
> > VARCHAR(256),otherField INTEGER,aLong DOUBLE PRECISION,aBoolean
> > CHAR(5),aDouble DOUBLE PRECISION,anInt INTEGER)
> > [JAWS] Rows affected = 0
> > [JAWS] Table nextgen_EntityPK created
> >
> >
> > When I start the test suite fails at test 81:
> >
> > Test Entity Bean PK
> > ====================
> >
> > 75- Looking up home for nextgen.EntityPK...ok
> > 76- Calling find on the home...not found
> > 77- Did not find the instance will create it...ok
> > 78- Retrieving other field...0, ok
> > 79- Setting it to 4...ok
> > 80- Findind it again ... ok
> > 81- Retrieving other field again, should be
> > 4...java.lang.reflect.UndeclaredThrowableException:
> > java.rmi.ServerException: RemoteException occurred in server thread;
> > nested exception is:
> >
> > <snip>
> >
> > Server trace:
> >
> > [JAWS] Create command executing: INSERT INTO nextgen_EntityPK
> > (aString,otherField,aLong,aBoolean,aDouble,anInt) VALUES (?,?,?,?,?,?)
> > [JAWS] Set parameter: idx=1, jdbcType=VARCHAR, value=Marc
> > [JAWS] Set parameter: idx=2, jdbcType=INTEGER, value=0
> > [JAWS] Set parameter: idx=3, jdbcType=BIGINT, value=100
> > [JAWS] Set parameter: idx=4, jdbcType=CHAR, value=true
> > [JAWS] Set parameter: idx=5, jdbcType=DOUBLE, value=100.0
> > [JAWS] Set parameter: idx=6, jdbcType=INTEGER, value=10
> > [JAWS] Rows affected = 1
> > [nextgen.EntityPK] EntityPK.ejbPostCreate(pk) called
> > [nextgen.EntityPK] commiting
> > [nextgen.EntityPK] beforeCompletion called
> > [nextgen.EntityPK] afterCompletion called
> > [nextgen.EntityPK] TX_REQUIRED for getOtherField
> > [nextgen.EntityPK] Begin tx
> > [nextgen.EntityPK] Tx is tx:Xid:553
> > [nextgen.EntityPK] commiting
> > [nextgen.EntityPK] beforeCompletion called
> > [nextgen.EntityPK] EntityPK.ejbStore() called
> > [nextgen.EntityPK] afterCompletion called
> > [nextgen.EntityPK] TX_REQUIRED for setOtherField
> > [nextgen.EntityPK] Begin tx
> > [nextgen.EntityPK] Tx is tx:Xid:554
> > [nextgen.EntityPK] commiting
> > [nextgen.EntityPK] beforeCompletion called
> > [nextgen.EntityPK] EntityPK.ejbStore() called
> > [JAWS] Store command executing: UPDATE nextgen_EntityPK SET otherField=?
> > WHERE aBoolean=? AND anInt=? AND aLong=? AND aDouble=? AND aString=?
> > [JAWS] Set parameter: idx=1, jdbcType=INTEGER, value=4
> > [JAWS] Set parameter: idx=2, jdbcType=CHAR, value=true
> > [JAWS] Set parameter: idx=3, jdbcType=INTEGER, value=10
> > [JAWS] Set parameter: idx=4, jdbcType=BIGINT, value=100
> > [JAWS] Set parameter: idx=5, jdbcType=DOUBLE, value=100.0
> > [JAWS] Set parameter: idx=6, jdbcType=VARCHAR, value=Marc
> > [JAWS] Rows affected = 1
> > [nextgen.EntityPK] afterCompletion called
> > [Default] JRMPCI:invokeHome findByPrimaryKey
> > [Default] Tx is null
> > [Default] invokeHome
> > [nextgen.EntityPK] TX_REQUIRED for findByPrimaryKey
> > [nextgen.EntityPK] Begin tx
> > [nextgen.EntityPK] EntityPK.setSessionContext() called
> > [JAWS] Exists command executing: SELECT COUNT(*) AS Total FROM
> > nextgen_EntityPK WHERE aBoolean=? AND anInt=? AND aLong=? AND aDouble=?
> > AND aString=?
> > [JAWS] Set parameter: idx=1, jdbcType=CHAR, value=true
> > [JAWS] Set parameter: idx=2, jdbcType=INTEGER, value=10
> > [JAWS] Set parameter: idx=3, jdbcType=BIGINT, value=100
> > [JAWS] Set parameter: idx=4, jdbcType=DOUBLE, value=100.0
> > [JAWS] Set parameter: idx=5, jdbcType=VARCHAR, value=Marc
> > [nextgen.EntityPK] commiting
> > [nextgen.EntityPK] TX_REQUIRED for getOtherField
> > [nextgen.EntityPK] Begin tx
> > [nextgen.EntityPK] EntityPK.ejbActivate() called
> > [JAWS] Load command executing: SELECT
> > aString,otherField,aLong,aBoolean,aDouble,anInt FROM nextgen_EntityPK
> > WHERE aBoolean=? AND anInt=? AND aLong=? AND aDouble=? AND aString=?
> > [JAWS] Set parameter: idx=1, jdbcType=CHAR, value=true
> > [JAWS] Set parameter: idx=2, jdbcType=INTEGER, value=10
> > [JAWS] Set parameter: idx=3, jdbcType=BIGINT, value=100
> > [JAWS] Set parameter: idx=4, jdbcType=DOUBLE, value=100.0
> > [JAWS] Set parameter: idx=5, jdbcType=VARCHAR, value=Marc
> > [JAWS] Got result: idx=1, value=Marc, class=java.lang.String,
> > JDBCtype=VARCHAR
> > [JAWS] Got result: idx=2, value=4, class=java.lang.Integer,
> > JDBCtype=INTEGER
> > [JAWS] Got result: idx=3, value=100.0, class=java.lang.Double,
> > JDBCtype=BIGINT
> > [nextgen.EntityPK] commiting
> > [nextgen.EntityPK] Load failed; nested exception is:
> > java.rmi.ServerException: Load failed; nested exception is:
> > java.lang.IllegalArgumentException: argument type mismatch
> > [Default] java.rmi.ServerException: Load failed; nested exception is:
> > java.rmi.ServerException: Load failed; nested exception is:
> > java.lang.IllegalArgumentException: argument type mismatch
> > [Default] java.rmi.ServerException: Load failed; nested exception is:
> > java.lang.IllegalArgumentException: argument type mismatch
> > at java.lang.reflect.Field.set(Native Method)
> > at
> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setCMPFieldValue(JDBCC
> > ommand.java:567)
> > at
> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleResult
> > (JDBCLoadEntityCommand.java:199)[Default]
> > java.lang.IllegalArgumentException: argument type mismatch
> >
> > at
> > org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementA
> > ndHandleResult(JDBCQueryCommand.java:59)
> > at
> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCComman
> > d.java:122)
> > at
> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBC
> > LoadEntityCommand.java:93)
> > at
> > org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSP
> > ersistenceManager.java:150)
> > at
> > org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersiste
> > nceManager.java:205)
> > at
> > org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(Enti
> tySynchronizationInterceptor.java:166)
> > at
> > org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInsta
> > nceInterceptor.java:106)
> > at
> > org.jboss.ejb.plugins.TxInterceptor.invokeNext(TxInterceptor.java:128)
> > at
> > org.jboss.ejb.plugins.TxInterceptor.runWithTransactions(TxIntercep
> > tor.java:189)
> > at org.jboss.ejb.plugins.TxInterceptor.invoke(TxInterceptor.java:96)
> > at
> > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityIntercept
> > or.java:140)
> > at
> > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:156)
> > at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:320)
> > at
> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMP
> > ContainerInvoker.java:202)
> > at
> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMP
> > ContainerInvoker.java:179)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at
> > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
> > at sun.rmi.transport.Transport$1.run(Transport.java:142)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
> > at
> > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
> > at
> > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransp
> > ort.java:643)
> > at java.lang.Thread.run(Thread.java:484)
> >
> >
> > The test suite stops after this exception.
> >
> > Could it be, that I am still using some wrong mappings ? How to map
> > boolean when no BIT is available ?
> >
> > Thanks a lot,
> > Tobias
> >
> >
> >
> > marc fleury wrote:
> > >
> > > > [JAWS] java.lang.reflect.InvocationTargetException:
> > > > interbase.interclient.SQLException: [interclient][interbase]
> > Dynamic SQL
> > > > Error
> > > > [JAWS] SQL error code = -204
> > > > [JAWS] Table unknown
> > > > [JAWS] NEXTGEN_ENTITYPK
> > >
> > > It seems the table is never created. This means that jaws w/ interbase
> > > chokes on one of the fields of the Primary key at creation time
> > (boolean,
> > > int, long, double, String), try to look for the stack trace of
> > startup and
> > > tell me what the server says at deployment time when it tries
> > to create the
> > > schema...
> > >
> > > And your other tables create fine, yes? (field-CMP and BMP)
> > (obviously since
> > > you run to 77 :(
> > >
> > > marc
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Problems?: [EMAIL PROTECTED]
> >
> >
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]