[ 
https://issues.apache.org/jira/browse/DERBY-6650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14058718#comment-14058718
 ] 

Rick Hillegas commented on DERBY-6650:
--------------------------------------

Thanks for those improvements, Knut. You tripped across something interesting 
in writing the disable-on-cp2.diff patch: Lucene has such a different 
philosophy about backward compatibility that even version ids change between 
releases. We persist the string name of the Version enum with the index 
metadata when we create a Lucene index and we use that metadata to determine 
whether the current rev of Lucene is compatible (that is, later than) the rev 
which was used to create the index. That is, an index created with 4.8 persists 
the string "LUCENE_48" in the index metadata, but Lucene 4.9 won't recognize 
that as the name of a Version enum because it expects the string "LUCENE_4_8". 
I think that our check won't be able to figure out that Lucene 4.9 comes after 
Lucene 4.8. If users create a Lucene index using a pre-4.9 version and then 
upgrade to 4.9, they may have to toss their indexes and re-create them. The 
Tools Guide does warn users that you may need to bounce your indexes when 
moving to a new Lucene version.

> Lucene tests fail on compact profile 2
> --------------------------------------
>
>                 Key: DERBY-6650
>                 URL: https://issues.apache.org/jira/browse/DERBY-6650
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.11.0.0
>         Environment: java version "1.8.0_05"
> Java(TM) SE Embedded Runtime Environment (build 1.8.0_05-b13, profile 
> compact2, headless)
> Java HotSpot(TM) Embedded Server VM (build 25.5-b02, mixed mode)
>            Reporter: Knut Anders Hatlen
>         Attachments: disable-on-cp2.diff, lucene48.diff, lucene49-v2.diff, 
> lucene49.diff
>
>
> http://download.java.net/javadesktop/derby/request_5593638/javadb-task-3898689.html
> {noformat}
> java.sql.SQLException: The exception 'java.lang.NoClassDefFoundError: 
> javax/management/MBeanServerConnection' was thrown while evaluating an 
> expression.
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:107)
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:133)
>       at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:255)
>       at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
>       at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
>       at 
> org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2396)
>       at 
> org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
>       at 
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1430)
>       at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1709)
>       at 
> org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(EmbedCallableStatement.java:134)
>       at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(EmbedPreparedStatement.java:320)
>       at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java:309)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.assertUpdateCount(BaseJDBCTestCase.java:1415)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.LuceneSupportTest.testCreateAndQueryIndex(LuceneSupportTest.java:115)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:118)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:440)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:457)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: ERROR 38000: The exception 'java.lang.NoClassDefFoundError: 
> javax/management/MBeanServerConnection' was thrown while evaluating an 
> expression.
>       at 
> org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java:162)
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:74)
> Caused by: java.lang.NoClassDefFoundError: 
> javax/management/MBeanServerConnection
>       at 
> org.apache.lucene.index.BufferedUpdates.<clinit>(BufferedUpdates.java:53)
>       at 
> org.apache.lucene.index.DocumentsWriterDeleteQueue.<init>(DocumentsWriterDeleteQueue.java:86)
>       at 
> org.apache.lucene.index.DocumentsWriterDeleteQueue.<init>(DocumentsWriterDeleteQueue.java:82)
>       at 
> org.apache.lucene.index.DocumentsWriter.<init>(DocumentsWriter.java:115)
>       at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:772)
>       at 
> org.apache.derby.optional.lucene.LuceneSupport$5.run(LuceneSupport.java:1694)
>       at 
> org.apache.derby.optional.lucene.LuceneSupport$5.run(LuceneSupport.java:1689)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> org.apache.derby.optional.lucene.LuceneSupport.getIndexWriter(LuceneSupport.java:1687)
>       at 
> org.apache.derby.optional.lucene.LuceneSupport.createOrRecreateIndex(LuceneSupport.java:514)
>       at 
> org.apache.derby.optional.lucene.LuceneSupport.createIndex(LuceneSupport.java:421)
>       at 
> org.apache.derby.exe.ac7e434f4ax0147x151ex54d2x0000594f050da.g0(Unknown 
> Source)
>       at 
> org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46)
>       at 
> org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallStatementResultSet.java:75)
>       at 
> org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:470)
>       at 
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:349)
>       at 
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1338)
> Caused by: java.lang.ClassNotFoundException: 
> javax.management.MBeanServerConnection
>       at java.net.URLClassLoader$1.run(Unknown Source)
>       at java.net.URLClassLoader$1.run(Unknown Source)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(Unknown Source)
>       at java.lang.ClassLoader.loadClass(Unknown Source)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>       at java.lang.ClassLoader.loadClass(Unknown Source)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to