Derby
  1. Derby
  2. DERBY-4098

ERROR XBM0J: Directory /var/db/sw-abc already exists.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.4.1.3
    • Fix Version/s: None
    • Component/s: JDBC
    • Environment:
      Sun Solaris 10
    • Urgency:
      Normal

      Description

      We got the folllowing error:

      ERROR XBM0J: Directory /var/db/sw-abc already exists.

      But I checked that the directory didn't exist before I ran the program.

      Then I deleted this db and then re-ran the program, but I still got the same problem.

      When I got this error then it caused the system hung.

      Any help is appreciated.

      ERROR XBM0J: Directory /var/db/sw-abc already exists.
      at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
      at org.apache.derby.impl.services.monitor.StorageFactoryService$9.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
      at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
      at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
      at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
      at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
      at org.apache.derby.jdbc.EmbedPooledConnection.openRealConnection(Unknown Source)
      at org.apache.derby.jdbc.EmbedPooledConnection.<init>(Unknown Source)
      at org.apache.derby.jdbc.Driver30.getNewPooledConnection(Unknown Source)
      at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.createPooledConnection(Unknown Source)
      at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.getPooledConnection(Unknown Source)
      ................
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:252)
      at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:2
      60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter
      .java:150)
      at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:291)

        Issue Links

          Activity

          Peter Schi created issue -
          Peter Schi made changes -
          Field Original Value New Value
          Description We got the folllowing error:

          ERROR XBM0J: Directory //var/opt/SUNWsasm/db/sw-asr already exists.

          But I checked that the directory didn't exist before I ran the program.

          Then I deleted this db and then re-ran the program, but I still got the same problem.

          When I got this error then it caused the system hung.

          Any help is appreciated.

          ERROR XBM0J: Directory /var/opt/SUNWsasm/db/sw-asr already exists.
                  at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
                  at org.apache.derby.impl.services.monitor.StorageFactoryService$9.run(Unknown Source)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
                  at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
                  at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
                  at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
                  at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
                  at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
                  at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
                  at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
                  at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
                  at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbedPooledConnection.openRealConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbedPooledConnection.<init>(Unknown Source)
                  at org.apache.derby.jdbc.Driver30.getNewPooledConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.createPooledConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.getPooledConnection(Unknown Source)
                  at com.sun.svc.container.db.DatabaseService.getPooledConnection(DatabaseService.java:54)
                  at com.sun.svc.container.Container.getPooledConnection(Container.java:344)
                  at com.sun.svc.asr.sw.snmp.DataLoader.createDatabase(DataLoader.java:102)
                  at com.sun.svc.asr.sw.snmp.DataLoader.loadData(DataLoader.java:209)
                  at com.sun.svc.asr.sw.snmp.Activator.start(Activator.java:268)
                  at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
                  at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
                  at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
                  at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
                  at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:252)
                  at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:2
          60)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter
          .java:150)
                  at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:291)




          We got the folllowing error:

          ERROR XBM0J: Directory /var/db/sw-abc already exists.

          But I checked that the directory didn't exist before I ran the program.

          Then I deleted this db and then re-ran the program, but I still got the same problem.

          When I got this error then it caused the system hung.

          Any help is appreciated.

          ERROR XBM0J: Directory /var/db/sw-abc already exists.
                  at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
                  at org.apache.derby.impl.services.monitor.StorageFactoryService$9.run(Unknown Source)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
                  at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
                  at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
                  at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
                  at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
                  at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
                  at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
                  at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
                  at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
                  at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbedPooledConnection.openRealConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbedPooledConnection.<init>(Unknown Source)
                  at org.apache.derby.jdbc.Driver30.getNewPooledConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.createPooledConnection(Unknown Source)
                  at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.getPooledConnection(Unknown Source)
                  ................
                  at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
                  at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
                  at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
                  at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
                  at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:252)
                  at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:2
          60)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter
          .java:150)
                  at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:291)




          Hide
          Kristian Waagan added a comment -

          Hi Peter,

          A few questions:
          a) Can you post the URL or data source configuration used to create/boot this db?
          b) For completeness, which file system type is /var/db?
          c) Is this problem reproducible?
          (i.e does it happen if you try to create the database in a different directory, or /tmp?)

          Thanks,

          Show
          Kristian Waagan added a comment - Hi Peter, A few questions: a) Can you post the URL or data source configuration used to create/boot this db? b) For completeness, which file system type is /var/db? c) Is this problem reproducible? (i.e does it happen if you try to create the database in a different directory, or /tmp?) Thanks,
          Hide
          Peter Schi added a comment -

          a) <data_source>
          <name>sw-abc</name>
          <database_type>DERBY</database_type>
          <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
          <url>jdbc:derby:sw-abc</url>
          <username>swabc</username>
          <password>xxxxxxxx</password>
          <maximum_connections>30</maximum_connections>
          <connection_wait_timeout>5000</connection_wait_timeout>
          </data_source>
          b) /var/db is located on the following filesystem
          Filesystem size used avail capacity Mounted on
          /dev/md/dsk/d0 95G 9.8G 84G 11% /

          c) this can't be reproducible, it only happened on some machines with solaris 10 with the latest update

          Show
          Peter Schi added a comment - a) <data_source> <name>sw-abc</name> <database_type>DERBY</database_type> <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> <url>jdbc:derby:sw-abc</url> <username>swabc</username> <password>xxxxxxxx</password> <maximum_connections>30</maximum_connections> <connection_wait_timeout>5000</connection_wait_timeout> </data_source> b) /var/db is located on the following filesystem Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 95G 9.8G 84G 11% / c) this can't be reproducible, it only happened on some machines with solaris 10 with the latest update
          Hide
          Peter Schi added a comment -

          I appreciate if there are any workarounds for this problem

          Show
          Peter Schi added a comment - I appreciate if there are any workarounds for this problem
          Hide
          Kristian Waagan added a comment -

          Is /dev/md/dsk/d0 a mirrored partition?
          (maybe Disksuite or something?)

          What do you mean by system hang? Did Derby hang, or the machine/OS?
          If it was Derby, and it hangs again, it would be interesting to get the stack trace (using jstack or maybe DTrace).
          If the whole system hung, my first reaction is that it must be a problem on a lower level (i.e. Java, Solaris, drivers, hardware) - but I may be wrong about that of course.

          I see pooled connections are created.
          Is there a connection pool component in the software stack?
          If yes, do you know if this component issues calls to Thread.interrupt()?

          Show
          Kristian Waagan added a comment - Is /dev/md/dsk/d0 a mirrored partition? (maybe Disksuite or something?) What do you mean by system hang? Did Derby hang, or the machine/OS? If it was Derby, and it hangs again, it would be interesting to get the stack trace (using jstack or maybe DTrace). If the whole system hung, my first reaction is that it must be a problem on a lower level (i.e. Java, Solaris, drivers, hardware) - but I may be wrong about that of course. I see pooled connections are created. Is there a connection pool component in the software stack? If yes, do you know if this component issues calls to Thread.interrupt()?
          Hide
          KP Tallapaneni added a comment - - edited

          Thanks Kristian for the support !

          This is a system level hung, and we are already investigating for a possible issue with OS patch that might be causing this hung.
          Also, this is not a mirrored partition.

          We mainly need your help with fixing the Derby error ERROR XBM0J(ERROR XBM0J: Directory /var/db/sw-abc already exists). The directory is not available, but Derby is throwing this error that the directory already exists. Is there any recommended solution(with or without code changes) or work around(without code changes) to prevent this ERROR(XBM0J)? This hung is probably not related to this Derby ERROR(though we need to confirm again from the truss output), but we need to resolve this XBM0J to get things going after resolving the hung issue due to a possible incorrect application of OS patch.

          Appreciate your comments on resolving this derby error.

          Show
          KP Tallapaneni added a comment - - edited Thanks Kristian for the support ! This is a system level hung, and we are already investigating for a possible issue with OS patch that might be causing this hung. Also, this is not a mirrored partition. We mainly need your help with fixing the Derby error ERROR XBM0J(ERROR XBM0J: Directory /var/db/sw-abc already exists). The directory is not available, but Derby is throwing this error that the directory already exists. Is there any recommended solution(with or without code changes) or work around(without code changes) to prevent this ERROR(XBM0J)? This hung is probably not related to this Derby ERROR(though we need to confirm again from the truss output), but we need to resolve this XBM0J to get things going after resolving the hung issue due to a possible incorrect application of OS patch. Appreciate your comments on resolving this derby error.
          Hide
          Kathey Marsden added a comment -

          Changing to normal urgency until we get a reproduction. There is not too much we can do with it until then.

          Show
          Kathey Marsden added a comment - Changing to normal urgency until we get a reproduction. There is not too much we can do with it until then.
          Kathey Marsden made changes -
          Urgency Urgent Normal
          Hide
          Kristian Waagan added a comment -

          Any updates on this issue?
          Is it still a problem?
          Do you believe it is a Derby bug, or was there something else going on?

          Show
          Kristian Waagan added a comment - Any updates on this issue? Is it still a problem? Do you believe it is a Derby bug, or was there something else going on?
          Rick Hillegas made changes -
          Link This issue is related to DERBY-4589 [ DERBY-4589 ]
          Kathey Marsden made changes -
          Labels derby_triage10_5_2
          Gavin made changes -
          Workflow jira [ 12454918 ] Default workflow, editable Closed status [ 12801656 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Peter Schi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development