[ http://issues.apache.org/jira/browse/DERBY-1584?page=comments#action_12423391 ] Sunitha Kambhampati commented on DERBY-1584: --------------------------------------------
I looked at the logs and I tried to boot the ina.jar from the testrun using the jar subprotocol on my machine (jdk15, win2k) and it works ok. The failure is when you try to boot using jar subprotocol on cygwin/jdk15 , you get an error. connect 'jdbc:derby:jar:(ina.jar)db1;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666768' AS DB1; ERROR XJ040: Failed to start database 'jar:(ina.jar)db1', see the next exception for details. ERROR XBM0W: An exception was thrown while creating an instance of class class org.apache.derby.impl.io.JarStorageFactory registered for identifier jar. There is another test in the lang suite dcl.sql that also has some tests booting the jar subprotocol and I noticed that in Ole's test runs, those are also failing with the same error from a long time looking at the history on http://www.multinet.no/~solberg/public/Apache/Derby/Limited/ I think this problem is related to booting using jar subprotocol and not related to just encryption part of it.. I am not sure what is so special about the cygwin environment ?. >From the error message, here are my observations. 1) XBM0W corresponds to SQLState.REGISTERED_CLASS_INSTANCE_ERROR 2) This error is thrown in two places in the code. Searching for: REGISTERED_CLASS_INSTANCE_ERROR org\apache\derby\impl\services\monitor\BaseMonitor.java(699): throw StandardException.newException(SQLState.REGISTERED_CLASS_INSTANCE_ERROR, org\apache\derby\impl\services\monitor\StorageFactoryService.java(182): throw StandardException.newException( SQLState.REGISTERED_CLASS_INSTANCE_ERROR, Found 2 occurrence(s) in 2 file(s) 3)From the error message, I think this error is getting thrown from the StorageFactoryService. (ln 182) from this piece of code. catch (PrivilegedActionException pae) { Exception e = pae.getException(); throw StandardException.newException( SQLState.REGISTERED_CLASS_INSTANCE_ERROR, e, subSubProtocol, storageFactoryClass); } 4) The actual exception that caused this is not printed out, not seen in the logs. I have not been able to reproduce this failure on my machine with any jvm. I'll try to upload a set of jars with some debug statements to see what the underlying exception is. > store/encryptionKey_jar.sql fails on Cygwin > ------------------------------------------- > > Key: DERBY-1584 > URL: http://issues.apache.org/jira/browse/DERBY-1584 > Project: Derby > Issue Type: Bug > Components: Regression Test Failure > Affects Versions: 10.2.0.0 > Environment: Cygwin, Sun JDK 1.5 > Reporter: Knut Anders Hatlen > Priority: Minor > Attachments: 424402.zip > > > http://www.multinet.no/~solberg/public/Apache/Derby/testlog/CYGWIN_NT-5.2_i686-unknown/424402-derbyall_diff.txt > ********* Diff file > derbyall/encryptionAll/encryptionAll/encryptionKey_jar.diff > *** Start: encryptionKey_jar jdk1.5.0_04 encryptionAll:encryptionAll > 2006-07-22 01:35:47 *** > 39,50d38 > < ij(DB1)> select * from t1 order by a; > < A > < ----------- > < 1 > < 2 > < 3 > < 4 > < 5 > < ij(DB1)> connect 'jdbc:derby:;shutdown=true'; > < ERROR XJ015: Derby system shutdown. > < ij(DB1)> -- NEGATIVE CASE: Test with wrong encryption key. This should fail. > < connect > 'jdbc:derby:jar:(ina.jar)db1;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666760' > AS DB1; > 52 del > < ERROR XBCXK: The given encryption key does not match the encryption key > used when creating the database. Please ensure that you are using the correct > encryption key and try again. > 53 del > < ij(DB1)> disconnect; > 53a40,50 > > ERROR XBM0W: An exception was thrown while creating an instance of class > > class org.apache.derby.impl.io.JarStorageFactory registered for identifier > > jar. > > ij> select * from t1 order by a; > > IJ ERROR: Unable to establish connection > > ij> connect 'jdbc:derby:;shutdown=true'; > > ERROR XJ015: Derby system shutdown. > > ij> -- NEGATIVE CASE: Test with wrong encryption key. This should fail. > > connect > > 'jdbc:derby:jar:(ina.jar)db1;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666760' > > AS DB1; > > ERROR XJ040: Failed to start database 'jar:(ina.jar)db1', see the next > > exception for details. > > ERROR XBM0W: An exception was thrown while creating an instance of class > > class org.apache.derby.impl.io.JarStorageFactory registered for identifier > > jar. > > ij> disconnect; > > IJ ERROR: Unable to establish connection > 58 del > < ij(DB1)> connect 'jdbc:derby:;shutdown=true'; > 58a55,57 > > ERROR XJ040: Failed to start database 'jar:(ina.jar)db1', see the next > > exception for details. > > ERROR XBM0W: An exception was thrown while creating an instance of class > > class org.apache.derby.impl.io.JarStorageFactory registered for identifier > > jar. > > ij> connect 'jdbc:derby:;shutdown=true'; > 60 del > < ij(DB1)> -- connect to database in jar file using classpath subprotocol. > 60a59 > > ij> -- connect to database in jar file using classpath subprotocol. > 64 del > < ij(DB1)> -- create a class loader for this current thread > 64a63 > > ij> -- create a class loader for this current thread > 76,87d74 > < ij(DB2CL)> select * from t1 order by a; > < A > < ----------- > < 1 > < 2 > < 3 > < 4 > < 5 > < ij(DB2CL)> connect 'jdbc:derby:;shutdown=true'; > < ERROR XJ015: Derby system shutdown. > < ij(DB2CL)> -- try with wrong encryption key, this should fail. > < connect > 'jdbc:derby:classpath:db2;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666760' > AS DB2CL; > 89 del > < ERROR XBCXK: The given encryption key does not match the encryption key > used when creating the database. Please ensure that you are using the correct > encryption key and try again. > 90 del > < ij(DB2CL)> exit; > 90 add > > ERROR XBM0W: An exception was thrown while creating an instance of class > > class org.apache.derby.impl.io.CPStorageFactory registered for identifier > > classpath. > > ij> select * from t1 order by a; > > IJ ERROR: Unable to establish connection > > ij> connect 'jdbc:derby:;shutdown=true'; > > ERROR XJ015: Derby system shutdown. > > ij> -- try with wrong encryption key, this should fail. > > connect > > 'jdbc:derby:classpath:db2;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666760' > > AS DB2CL; > > ERROR XJ040: Failed to start database 'classpath:db2', see the next > > exception for details. > > ERROR XBM0W: An exception was thrown while creating an instance of class > > class org.apache.derby.impl.io.CPStorageFactory registered for identifier > > classpath. > > ij> exit; > Test Failed. > *** End: encryptionKey_jar jdk1.5.0_04 encryptionAll:encryptionAll > 2006-07-22 01:36:14 *** -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
