10 Replies Latest reply on Nov 26, 2001 5:17 AM by vad

    Jboss3.0 + Interbase

    vad

      I have a little CMP2.0 test application which works well under the default config of Jboss3.0. Now, I'd like to switch to Interbase as my defaultDS. I've changed standardjbossjdbc-cmp.xml so that DefaultDS points to InterBase mappings and I've replaced hsqldb-default-service.xml by an interbase-service.xml with :


      ConnectionURL=jdbc:interbase://localhost/c:/bd/bdtest.gdb
      DriverClass=interbase.interclient.Driver
      user=myuser
      password=mypwd
      DefaultDS
      java:/TransactionManager
      Minerva JDBC LocalTransaction ResourceAdapter
      JCA:service=RARDeployer
      MinervaSharedLocalCMFactory
      #
      #Wed Aug 15 16:17:29 EDT 2001
      InvalidateOnError=false
      BlockingTimeoutMillis=500000
      IdleTimeoutMillis=1800000
      MaxSize=10
      TimestampUsed=false
      IdleTimeoutEnabled=false
      CleanupIntervalMillis=120000
      MinSize=0
      GCMinIdleMillis=1200000
      GCEnabled=false
      MaxIdleTimeoutPercent=1.0


      org.jboss.resource.security.ManyToOnePrincipalMapping

      UserName=myuser




      But I get an deploy error :

      org.jboss.deployment.J2eeDeploymentException: Error while starting testCMP2.0.jar: (class: interbase/interclient/ErrorKey, method: _$372 signature: (Ljava/lang/String;Ljava/lang/String;I)V) Expecting to find unitialized object on stack, Cause: java.lang.VerifyError: (class: interbase/interclient/ErrorKey, method: _$372 signature: (Ljava/lang/String;Ljava/lang/String;I)V) Expecting to find unitialized object on stack
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:549)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:469)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:231)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:633)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:308)
      at java.lang.Thread.run(Thread.java:484)

      Maybe the problem comes from the user/password arguments?

      Thanks to tell me of any successful deployment of Jboss3.0 + Interbase

      Vad

        • 1. Re: Jboss3.0 + Interbase
          caba

          try

          user=myuser;password=mypasswd

          CABA

          • 2. Re: Jboss3.0 + Interbase
            caba

            or try separate elements in attribute "ManagedConnectionFactoryProperties" by semicolon - ;

            • 3. Re: Jboss3.0 + Interbase
              davidjencks

              I haven't tried to get this working yet, however there are 2 obvious problems:

              1. I think you are using an interclient compiled for jdk 1.2. It doesn't work with 1.3. (uninitialized object on stack error) Firebird has just released packages for windows and xinetd-based linux at https://sourceforge.net/project/showfiles.php?group_id=9028 , compiled with 1.3. These also fix the problems with being unable to have jaws create your tables for you.

              2. You are using obsolete parameters in your ConnectionFactoryLoader. Look at hslqdb-default-service.xml or the examples in the manual.


              When you get it working, would you contribute the working configuration to the manual? (email it to me, davidjencks@directvinternet.com or the jboss-dev mailing list)

              Thanks!

              david jencks

              • 4. Re: Jboss3.0 + Interbase
                vad

                Thanks for your advice. I've downloaded the firebird interclient, I still have an error but now it's very clear :
                [interclient] Invalid argument: User and password connection properties are not set.
                See API reference for exception interbase.interclient.InvalidArgumentException

                The parameters of my connectionFactory seemed obsolete to you only because I used a 15-day old built Jboss.

                Now, I've built the 20/11 snapshot, same exception. The problem is : Where to state properties for drivers which need them? Is it in the ??
                (I've also tried different separation scheme ; \t... but same exception).

                If I get it working, I'll contribute my configuration.

                Vad

                • 5. Re: Jboss3.0 + Interbase
                  davidjencks

                  Thanks for the offer to contribute. I'm glad the configuration changes weren't the problem... until I change them again;-)

                  I got this to work once, back in Feb, so I think its still possible. You might try

                  UserName=xxx
                  UserPassword=yyy

                  in both ManagedConnectionFactoryProperties and PrincipalMappingProperties.

                  • 6. Re: Jboss3.0 + Interbase
                    vad

                    Thanks! That works... Well, at least Jboss can login into Interbase. However it's unclear for me how it can work, because after a very quick look at the interbase.interclient.Driver source code, I see this :

                    if(properties == null || properties.getProperty("user") == null || properties.getProperty("password") == null || properties.getProperty("user").equals("") || properties.getProperty("password").equals(""))
                    throw new InvalidArgumentException(ErrorKey.invalidArgument__connection_properties__no_user_or_password__);

                    So does it mean that jboss map "UserName" to "user"?...


                    Anyway, another problem arrose, but I guess this one is more a driver problem !

                    Start command executing: CREATE TABLE ProduitBean (ISIN VARCHAR(256), name VARCHAR(256), quotity INTEGER)
                    [2001-11-22 09:37:28,565,DefaultDS,DEBUG] Pool DefaultDS [0/0/10] destroyed object org.jboss.resource.adapter.jdbc.local.JDBCManagedConnection@5b675e.
                    [2001-11-22 09:37:28,565,CMP,DEBUG] interbase.interclient.DriverNotCapableException: [interclient] Unsupported feature: Using a JDBC 2 method which is not yet supported
                    See API reference for exception interbase.interclient.DriverNotCapableException
                    [2001-11-22 09:37:28,575,CMP,DEBUG] Could not create table ProduitBean
                    interbase.interclient.DriverNotCapableException: [interclient] Unsupported feature: Using a JDBC 2 method which is not yet supported.
                    See API reference for exception interbase.interclient.DriverNotCapableException
                    at interbase.interclient.Connection.prepareStatement(Connection.java:1202)
                    at org.jboss.resource.adapter.jdbc.local.ConnectionInPool.prepareStatement(ConnectionInPool.java:652)

                    After another look at the driver code I see this :
                    public synchronized Statement createStatement(int i, int j)
                    throws SQLException
                    {
                    throw new DriverNotCapableException(ErrorKey.driverNotCapable__jdbc2_not_yet_supported__);
                    }

                    public synchronized PreparedStatement prepareStatement(String s, int i, int j)
                    throws SQLException
                    {
                    throw new DriverNotCapableException(ErrorKey.driverNotCapable__jdbc2_not_yet_supported__);
                    }

                    So does it mean that Interbase is unusable with Jboss?

                    Vad

                    • 7. Re: Jboss3.0 + Interbase
                      vad

                      As I could not use the JDBC driver (see previous message), I've tried Sun JDBC-ODBC bridge and ODBC driver for Interbase from EasySoft. It works ! (although I consider it's only a waiting-for-best solution). But I have some questions about mappings, especially for java types Double and Object.

                      <java-type>java.lang.Object</java-type>
                      <jdbc-type>JAVA_OBJECT</jdbc-type>
                      <sql-type>VARCHAR(2000)</sql-type>

                      <java-type>java.lang.Double</java-type>
                      <jdbc-type>DOUBLE</jdbc-type>
                      <sql-type>DOUBLE PRECISION</sql-type>

                      do not give expected results...

                      • 8. Re: Jboss3.0 + Interbase
                        davidjencks

                        Someone who I will try to leave nameless BROKE THIS attempting to make ConnectionInPool use the result set concurrency and scrollablity parameters. I'll fix it shortly.

                        • 9. Re: Jboss3.0 + Interbase
                          davidjencks

                          I'm afraid you'll have to get jboss from cvs and build it yourself, but could you check that I fixed this?

                          Thanks
                          david jencks

                          • 10. Re: Jboss3.0 + Interbase
                            vad

                            Many thanks David, it works fine!

                            I will make more tests and I'll post or send you my config.

                            Vad