[ https://issues.apache.org/jira/browse/DERBY-3302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-3302: -------------------------------------- Attachment: npe.sql Attaching a script which reproduces the failure. Follow these steps: 1. Start ij 2. Execute this command in ij: run 'npe.sql'; 3. Terminate ij with Ctrl-C (don't terminate it with Ctrl-D or EXIT, as those commands will perform a clean shutdown) 4. Restart ij 5. Open a connection to the database with this command: connect 'jdbc:derby:colldb'; Then you'll get a NullPointerException with the following stack trace: java.lang.NullPointerException at org.apache.derby.iapi.types.SQLChar.getCollationKey(SQLChar.java:2516) at org.apache.derby.iapi.types.WorkHorseForCollatorDatatypes.stringCompare(WorkHorseForCollatorDatatypes.java:88) at org.apache.derby.iapi.types.CollatorSQLVarchar.stringCompare(CollatorSQLVarchar.java:159) at org.apache.derby.iapi.types.SQLChar.compare(SQLChar.java:902) at org.apache.derby.impl.store.access.btree.ControlRow.compareIndexRowToKey(ControlRow.java:1354) at org.apache.derby.impl.store.access.btree.index.B2IUndo.findUndo(B2IUndo.java:221) at org.apache.derby.impl.store.raw.data.LogicalPageOperation.findLogicalPage(LogicalPageOperation.java:358) at org.apache.derby.impl.store.raw.data.LogicalPageOperation.generateUndo(LogicalPageOperation.java:164) at org.apache.derby.impl.store.raw.log.FileLogger.undo(FileLogger.java:991) at org.apache.derby.impl.store.raw.xact.Xact.abort(Xact.java:919) at org.apache.derby.impl.store.raw.xact.XactFactory.rollbackAllTransactions(XactFactory.java:529) at org.apache.derby.impl.store.raw.log.LogToFile.recover(LogToFile.java:1201) at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:334) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1992) at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:291) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:546) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:419) at org.apache.derby.impl.store.access.RAMAccessManager.boot(RAMAccessManager.java:1001) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1992) at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:291) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:546) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:419) at org.apache.derby.impl.db.BasicDatabase.bootStore(BasicDatabase.java:753) at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:201) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1992) at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:291) at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1829) at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(BaseMonitor.java:1695) at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(BaseMonitor.java:1575) at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(BaseMonitor.java:994) at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Monitor.java:542) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:1957) at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:255) at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:73) at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(EmbedConnection40.java:54) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:68) at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:211) at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:119) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:1238) at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:1088) at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:916) at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:328) at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:248) at org.apache.derby.impl.tools.ij.Main.go(Main.java:215) at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:181) at org.apache.derby.impl.tools.ij.Main.main(Main.java:73) at org.apache.derby.tools.ij.main(ij.java:59) at org.apache.derby.iapi.tools.run.main(run.java:51) > NullPointerException during recovery of database with territory-based > collation > ------------------------------------------------------------------------------- > > Key: DERBY-3302 > URL: https://issues.apache.org/jira/browse/DERBY-3302 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.3.1.4, 10.3.2.1, 10.4.0.0 > Reporter: Knut Anders Hatlen > Attachments: npe.sql > > > When logical undo is performed on a database with territory-based collation, > you may get a NullPointerException in SQLChar.getCollationKey() because > SQLChar.getLocaleFinder() returns null. > This bug was reported on derby-user: > http://thread.gmane.org/gmane.comp.apache.db.derby.user/8253 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.