5 Replies Latest reply on Apr 4, 2003 11:56 AM by derwood44

    java.sql interfaces in jboss-jca.jar and class loading

    jova73

      Hi,
      I've seen that the file jboss-jca.jar contains two interfaces of the package java.sql (EndPoint and ParameterMetadata) because of compatibility with JDK 1.4.

      When these classes are loaded we get an error about a prohibited package (java.sql), but only with the IBM JDK 1.3 on AS/400, i.e. these classes are not loaded with the JDK and the classloader tries to load them from JBoss jar.
      On other platforms (Windows, AIX) it's OK.

      It seems that when the JBoss class which references java.sql classes is loaded then the IBM JDK's classloader tries to resolve all the imported classes, therefore also java.sql interfaces.

      Any idea about with different behaviour in class loading?
      Is there any JBoss configuration which can help me?

      Thanks in advance!

      Andrea

        • 1. Re: java.sql interfaces in jboss-jca.jar and class loading

          No config as far as I know. You should talk to David Jencks directly about this.

          • 2. Re: java.sql interfaces in jboss-jca.jar and class loading
            davidjencks

            Do you mean SavePoint?

            You might need to compile with jdk 1.3: I think this will leave out the classes or references to them.

            I don't have a good solution to the problem of the interface incompatiblitly between jdk 1.3 and 1.4.

            • 3. Re: java.sql interfaces in jboss-jca.jar and class loading
              jova73

              Maybe I mispelled the class name however
              - my classes are compiled with jdk 1.3
              - JBoss 3.0.3 is compiled with JDK 1.3 or I think so, I downloaded it from SourceForge. Is maybe JBoss compiled with JDK 1.4?? Should I recompile it with JDK 1.3??

              The problem is that
              - java.sql classes are not left out but included in JBoss jars
              - JBoss classes have the import of the java.sql stuff
              - the JBoss classloader loads its classes and attempts to load the java.sql classes included in JBoss jars.

              This happens only with AS/400 JDK.
              Any idea??

              Thanks,
              Andrea

              • 4. Re: java.sql interfaces in jboss-jca.jar and class loading
                jova73

                Just to be clear: it seems a JBoss bug on AS/400 because:
                - java.sql classes are inside jboss jars
                - JDK for AS/400 loads tries these classes immediatly
                - other JDK classloaders (AIX, Windows) postpone loading when the classes are used, but the methods which uses JDK 1.4 sql classes are never called if JBoss runs with JDK 1.3 so no problem arise.

                The only solution is to drop (by mysel!!) the classes from the jar and I don't like it very much :-(.

                I think that those clases should be left out from the JBoss distribution, or should I prepare two different setup for JBoss (AS/400 and other platforms) ??

                Thanks in advance,
                Andrea

                • 5. Re: java.sql interfaces in jboss-jca.jar and class loading
                  derwood44

                  I'm running an MBean I wrote that is accessing oracle--compiled w/ jdk1.3.1--running on Windows2000--got same error--it is flakey in that the error comes/goes--i rebooted jboss a few times and it went away. do not understand cause.