Derby
  1. Derby
  2. DERBY-456

Can't load the jdbc driver(org.apache.derby.jdbc.EmbeddedDriver) when the derby.jar is contained in a directory having exclamation mark("!")

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 10.0.2.1
    • Fix Version/s: None
    • Component/s: JDBC
    • Labels:
      None
    • Environment:
    • Urgency:
      Normal

      Description

      The test program is as below:

      import org.apache.derby.jdbc.EmbeddedDriver;

      public class testDerby {
      public static void main(String[] args) {
      try

      { new EmbeddedDriver(); }

      catch (Exception e)

      { System.out.println(e.getMessage()); e.printStackTrace(); }

      }
      }

      The following exception is thrown:

      XBM02.D : [0] org.apache.derby.iapi.services.stream.InfoStreams
      ERROR XBM02: XBM02.D : [0] org.apache.derby.iapi.services.stream.InfoStreams
      at org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
      at org.apache.derby.iapi.services.monitor.Monitor.missingImplementation(Monitor.java)
      at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java)
      at org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java)
      at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java)
      at org.apache.derby.impl.services.monitor.FileMonitor.<init>(FileMonitor.java)
      at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java)
      at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java)
      at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java)
      at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(EmbeddedDriver.java)
      at testDerby.main(testDerby.java:6)

        Activity

        Hide
        Kathey Marsden added a comment -

        Closing this as Invalid because it is not a Derby but a java bug.

        Show
        Kathey Marsden added a comment - Closing this as Invalid because it is not a Derby but a java bug.
        Hide
        Kathey Marsden added a comment -

        Reopening to close Invalid which is the norm for java bugs these days.

        Show
        Kathey Marsden added a comment - Reopening to close Invalid which is the norm for java bugs these days.
        Hide
        Kathey Marsden added a comment -

        Adding a couple alternate stack traces when this issue is encountered, so it will be easier to spot.
        In a recent case I was working on, the directory the user was using was /local/something which ended up to be a mount point for something else wth an exclamation point in it so it was trickiy to figure out exactly what was going on.

        First with sysinfo, they saw:

        $ java -cp ./derby.jar org.apache.derby.tools.sysinfo
        Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:218)
        at org.apache.derby.tools.sysinfo.main(sysinfo.java:53)
        Caused by: java.util.MissingResourceException: Can't find bundle for base name o
        rg.apache.derby.loc.sysinfoMessages, locale en
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle
        .java:863)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:753)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:603)
        at org.apache.derby.iapi.tools.i18n.LocalizedResource.setResource(Locali
        zedResource.java:184)
        at org.apache.derby.iapi.tools.i18n.LocalizedResource.getTextMessage(Loc
        alizedResource.java:321)
        at org.apache.derby.impl.tools.sysinfo.Main.getCompleteMessage(Main.java
        :1087)
        at org.apache.derby.impl.tools.sysinfo.Main.getTextMessage(Main.java:106
        8)
        at org.apache.derby.impl.tools.sysinfo.Main.<clinit>(Main.java:375)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)
        ... 1 more

        And then with Network Server a NullPointerException starting the server:
        $ java -cp ./derbynet.jar org.apache.derby.drda.NetworkServerControl start &
        [1] 5724

        kmarsden@IBM-93AE43E63C0 ~/repro/exclambug/!exclamdir
        $ java.lang.NullPointerException
        at org.apache.derby.impl.drda.NetworkServerControlImpl.init(NetworkServe
        rControlImpl.java:454)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.<init>(NetworkSer
        verControlImpl.java:389)
        at org.apache.derby.drda.NetworkServerControl.main(NetworkServerControl.
        java:301)

        I see this with the IBM 1.5:

        Show
        Kathey Marsden added a comment - Adding a couple alternate stack traces when this issue is encountered, so it will be easier to spot. In a recent case I was working on, the directory the user was using was /local/something which ended up to be a mount point for something else wth an exclamation point in it so it was trickiy to figure out exactly what was going on. First with sysinfo, they saw: $ java -cp ./derby.jar org.apache.derby.tools.sysinfo Exception in thread "main" java.lang.ExceptionInInitializerError at java.lang.J9VMInternals.initialize(J9VMInternals.java:218) at org.apache.derby.tools.sysinfo.main(sysinfo.java:53) Caused by: java.util.MissingResourceException: Can't find bundle for base name o rg.apache.derby.loc.sysinfoMessages, locale en at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle .java:863) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:753) at java.util.ResourceBundle.getBundle(ResourceBundle.java:603) at org.apache.derby.iapi.tools.i18n.LocalizedResource.setResource(Locali zedResource.java:184) at org.apache.derby.iapi.tools.i18n.LocalizedResource.getTextMessage(Loc alizedResource.java:321) at org.apache.derby.impl.tools.sysinfo.Main.getCompleteMessage(Main.java :1087) at org.apache.derby.impl.tools.sysinfo.Main.getTextMessage(Main.java:106 8) at org.apache.derby.impl.tools.sysinfo.Main.<clinit>(Main.java:375) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:196) ... 1 more And then with Network Server a NullPointerException starting the server: $ java -cp ./derbynet.jar org.apache.derby.drda.NetworkServerControl start & [1] 5724 kmarsden@IBM-93AE43E63C0 ~/repro/exclambug/!exclamdir $ java.lang.NullPointerException at org.apache.derby.impl.drda.NetworkServerControlImpl.init(NetworkServe rControlImpl.java:454) at org.apache.derby.impl.drda.NetworkServerControlImpl.<init>(NetworkSer verControlImpl.java:389) at org.apache.derby.drda.NetworkServerControl.main(NetworkServerControl. java:301) I see this with the IBM 1.5:
        Hide
        Rick Hillegas added a comment -

        +1 to Knut's suggestion.

        Show
        Rick Hillegas added a comment - +1 to Knut's suggestion.
        Hide
        Knut Anders Hatlen added a comment -

        I'm able to reproduce this with Java 1.5, but not with Java 1.6 (although the bugs mentioned by Dan are still open). Since the root cause is believed to be a Java bug, and it appears to work in recent Java versions, perhaps we could close this bug as won't fix?

        Show
        Knut Anders Hatlen added a comment - I'm able to reproduce this with Java 1.5, but not with Java 1.6 (although the bugs mentioned by Dan are still open). Since the root cause is believed to be a Java bug, and it appears to work in recent Java versions, perhaps we could close this bug as won't fix?
        Hide
        Mike Matrigali added a comment -

        Triaged July 10, 2009: assigned normal urgency.

        Show
        Mike Matrigali added a comment - Triaged July 10, 2009: assigned normal urgency.
        Show
        Daniel John Debrunner added a comment - This is due to Java bug 4523159 (also entered as 4730642) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4523159 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4730642
        Hide
        Daniel John Debrunner added a comment -

        Since a workaround exists, minor is a better match for the priority.

        Show
        Daniel John Debrunner added a comment - Since a workaround exists, minor is a better match for the priority.

          People

          • Assignee:
            Unassigned
            Reporter:
            aakash agrawal
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development