Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6696

ERROR XBM0X: Supplied territory description 'es_419' is invalid, expecting ln[_CO[_variant]]

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Services
    • None
    • Workaround attached
    • Crash

    Description

      We have a customer in the South American Spanish locale, which in effect are using these settings: -Duser.language=es -Duser.country=419. I have seen DERBY-4854 and this comment:

      The problem seems to be that Locale.getDefault().getCountry() returns "8859_1" in this locale, and that value confuses Derby. The javadoc for Locale.getCountry() says that it should return an empty string or a two-letter uppercase country code, so I think it's a bug that getCountry() returns "8859_1".

      However the Javadoc in fact states that 3 digit codes are permitted:

      Returns the country/region code for this locale, which should either be the empty string, an uppercase ISO 3166 2-letter code, or a UN M.49 3-digit code.

      So it seems Derby requires adding support for the three digit country codes.

      As a workaround, I can apply territory=en_US to the connection parameters, but this is not ideal.

      For the record, here is the stacktrace seen:

      Thu Aug 07 12:13:27 CDT 2014 Thread[DefaultExecutorService-4,4,DefaultExecutorService] Cleanup action starting
      ERROR XBM0X: Supplied territory description 'es_419' is invalid, expecting ln[_CO[_variant]]
      ln=lower-case two-letter ISO-639 language code, CO=upper-case two-letter ISO-3166 country codes, see java.util.Locale.
      	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:278)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.staticGetLocaleFromString(BaseMonitor.java:2020)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.setLocale(BaseMonitor.java:505)
      	at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:156)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1993)
      	at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1827)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1013)
      	at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:596)
      	at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:2604)
      	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:407)
      	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:73)
      	at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(EmbedConnection40.java:53)
      	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:70)
      	at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:255)
      	at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:480)
      	at org.apache.derby.jdbc.EmbedPooledConnection.openRealConnection(EmbedPooledConnection.java:178)
      	at org.apache.derby.jdbc.EmbedPooledConnection.<init>(EmbedPooledConnection.java:119)
      	at org.apache.derby.jdbc.EmbedPooledConnection40.<init>(EmbedPooledConnection40.java:54)
      	at org.apache.derby.jdbc.Driver40.getNewPooledConnection(Driver40.java:179)
      	at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.createPooledConnection(EmbeddedConnectionPoolDataSource.java:129)
      	at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.getPooledConnection(EmbeddedConnectionPoolDataSource.java:75)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sits David Sitsky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: