You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Prachi Damle <Pr...@citrix.com> on 2014/03/03 23:40:01 UTC

master branch DbUtilTest failure

Hi,

I am facing this error while doing a clean install on latest master.

It fails running 'com.cloud.utils.DbUtilTest' with error 'Could not initialize class com.cloud.utils.db.TransactionLegacy'

I am on Windows.  Anyone seeing this? Any ideas to fix?


Prachi




[INFO] ------------------------------------------------------------------------
[INFO] Building Apache CloudStack Framework - Event Notification 4.4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cloud-framework-db ---
[INFO] Deleting C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target (includes = [**/*], excludes = [])
[INFO] Deleting C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db (includes = [target, dist], excludes = [])
[INFO]
[INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-framework-db ---
[INFO] Starting audit...
Audit done.

[INFO]
[INFO] --- maven-remote-resources-plugin:1.3:process (default) @ cloud-framework-db ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ cloud-framework-db ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ cloud-framework-db ---
[INFO] Compiling 43 source files to C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ cloud-framework-db ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\test\resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ cloud-framework-db ---
[INFO] Compiling 15 source files to C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12:test (default-test) @ cloud-framework-db ---
[INFO] Surefire report directory: C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.cloud.utils.DbUtilTest
log4j:WARN No appenders could be found for logger (com.cloud.utils.crypt.EncryptionSecretKeyChecker).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Tests run: 28, Failures: 0, Errors: 26, Skipped: 2, Time elapsed: 0.667 sec <<< FAILURE!

Results :

Tests in error:
  getTableName(com.cloud.utils.DbUtilTest)
  getTableName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  getColumnName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
  getColumnName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy


RE: master branch DbUtilTest failure

Posted by Prachi Damle <Pr...@citrix.com>.
I solved it this way:

The problem is with the db.properties checked in with this DbUtiltest.java - It is empty

Fix is to

1) Put the right db.properties file under framework/db/test/resources 
2) Set db.cloud.encryption.type=none   [if you don't use encryption, so that EncryptionSecretKeyChecker won't look for \etc\cloudstack\management\key)]

Prachi

-----Original Message-----
From: Prachi Damle [mailto:Prachi.Damle@citrix.com] 
Sent: Monday, March 03, 2014 3:35 PM
To: dev@cloudstack.apache.org
Subject: RE: master branch DbUtilTest failure

Yes! The surefire log prints this:

Caused by: com.cloud.utils.exception.CloudRuntimeException: File containing secret key not found: /etc/cloudstack/management/key
	at com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSecretKeyChecker.java:91)
	at com.cloud.utils.db.DbProperties.getDbProperties(DbProperties.java:80)
	at com.cloud.utils.db.TransactionLegacy.<clinit>(TransactionLegacy.java:1024)
	... 39 more
Caused by: java.io.FileNotFoundException: \etc\cloudstack\management\key (The system cannot find the path specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:146)
	at java.io.FileReader.<init>(FileReader.java:72)
	at com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSecretKeyChecker.java:87)
	... 41 more


So what is the equivalent path for my Windows setup for this to work? Anyone with Windows has got this to work?

Prachi

-----Original Message-----
From: Wido den Hollander [mailto:wido@widodh.nl] 
Sent: Monday, March 03, 2014 3:15 PM
To: dev@cloudstack.apache.org
Subject: Re: master branch DbUtilTest failure



On 03/03/2014 11:40 PM, Prachi Damle wrote:
> Hi,
>
> I am facing this error while doing a clean install on latest master.
>
> It fails running 'com.cloud.utils.DbUtilTest' with error 'Could not initialize class com.cloud.utils.db.TransactionLegacy'
>
> I am on Windows.  Anyone seeing this? Any ideas to fix?
>

Does the logfile of the surefire plugin say something interesting? 
Should be in the target directory.

>
> Prachi
>
>
>
>
> [INFO] 
> ----------------------------------------------------------------------
> -- [INFO] Building Apache CloudStack Framework - Event Notification 
> 4.4.0-SNAPSHOT [INFO] 
> ----------------------------------------------------------------------
> --
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
> cloud-framework-db --- [INFO] Deleting 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t (includes = [**/*], excludes = []) [INFO] Deleting 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db 
> (includes = [target, dist], excludes = []) [INFO] [INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-framework-db --- [INFO] Starting audit...
> Audit done.
>
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.3:process (default) @ 
> cloud-framework-db --- [INFO] [INFO] --- 
> maven-resources-plugin:2.5:resources (default-resources) @ 
> cloud-framework-db --- [debug] execute contextualize [INFO] Using 
> 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ 
> cloud-framework-db --- [INFO] Compiling 43 source files to 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources 
> (default-testResources) @ cloud-framework-db --- [debug] execute 
> contextualize [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\test\
> resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:testCompile 
> (default-testCompile) @ cloud-framework-db --- [INFO] Compiling 15 
> source files to 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\test-classes
> [INFO]
> [INFO] --- maven-surefire-plugin:2.12:test (default-test) @ 
> cloud-framework-db --- [INFO] Surefire report directory: 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running com.cloud.utils.DbUtilTest
> log4j:WARN No appenders could be found for logger (com.cloud.utils.crypt.EncryptionSecretKeyChecker).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
> Tests run: 28, Failures: 0, Errors: 26, Skipped: 2, Time elapsed: 0.667 sec <<< FAILURE!
>
> Results :
>
> Tests in error:
>    getTableName(com.cloud.utils.DbUtilTest)
>    getTableName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize 
> class com.cloud.utils.db.TransactionLegacy
>
>

RE: master branch DbUtilTest failure

Posted by Alex Hitchins <al...@shapeblue.com>.
I too have run into this however not yet managed to sort it out.


Regards

Alex Hitchins

D: +44 1892 523 587 | S: +44 2036 030 540 | M: +44 7788 423 969

alex.hitchins@shapeblue.com

-----Original Message-----
From: Prachi Damle [mailto:Prachi.Damle@citrix.com]
Sent: 03 March 2014 23:35
To: dev@cloudstack.apache.org
Subject: RE: master branch DbUtilTest failure

Yes! The surefire log prints this:

Caused by: com.cloud.utils.exception.CloudRuntimeException: File containing secret key not found: /etc/cloudstack/management/key
at com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSecretKeyChecker.java:91)
at com.cloud.utils.db.DbProperties.getDbProperties(DbProperties.java:80)
at com.cloud.utils.db.TransactionLegacy.<clinit>(TransactionLegacy.java:1024)
... 39 more
Caused by: java.io.FileNotFoundException: \etc\cloudstack\management\key (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileReader.<init>(FileReader.java:72)
at com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSecretKeyChecker.java:87)
... 41 more


So what is the equivalent path for my Windows setup for this to work? Anyone with Windows has got this to work?

Prachi

-----Original Message-----
From: Wido den Hollander [mailto:wido@widodh.nl]
Sent: Monday, March 03, 2014 3:15 PM
To: dev@cloudstack.apache.org
Subject: Re: master branch DbUtilTest failure



On 03/03/2014 11:40 PM, Prachi Damle wrote:
> Hi,
>
> I am facing this error while doing a clean install on latest master.
>
> It fails running 'com.cloud.utils.DbUtilTest' with error 'Could not initialize class com.cloud.utils.db.TransactionLegacy'
>
> I am on Windows.  Anyone seeing this? Any ideas to fix?
>

Does the logfile of the surefire plugin say something interesting?
Should be in the target directory.

>
> Prachi
>
>
>
>
> [INFO]
> ----------------------------------------------------------------------
> -- [INFO] Building Apache CloudStack Framework - Event Notification
> 4.4.0-SNAPSHOT [INFO]
> ----------------------------------------------------------------------
> --
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @
> cloud-framework-db --- [INFO] Deleting
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t (includes = [**/*], excludes = []) [INFO] Deleting
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db
> (includes = [target, dist], excludes = []) [INFO] [INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-framework-db --- [INFO] Starting audit...
> Audit done.
>
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.3:process (default) @
> cloud-framework-db --- [INFO] [INFO] ---
> maven-resources-plugin:2.5:resources (default-resources) @
> cloud-framework-db --- [debug] execute contextualize [INFO] Using
> 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
> cloud-framework-db --- [INFO] Compiling 43 source files to
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources
> (default-testResources) @ cloud-framework-db --- [debug] execute
> contextualize [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\test\
> resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:testCompile
> (default-testCompile) @ cloud-framework-db --- [INFO] Compiling 15
> source files to
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\test-classes
> [INFO]
> [INFO] --- maven-surefire-plugin:2.12:test (default-test) @
> cloud-framework-db --- [INFO] Surefire report directory:
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running com.cloud.utils.DbUtilTest
> log4j:WARN No appenders could be found for logger (com.cloud.utils.crypt.EncryptionSecretKeyChecker).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
> Tests run: 28, Failures: 0, Errors: 26, Skipped: 2, Time elapsed: 0.667 sec <<< FAILURE!
>
> Results :
>
> Tests in error:
>    getTableName(com.cloud.utils.DbUtilTest)
>    getTableName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize
> class com.cloud.utils.db.TransactionLegacy
>
>
Need Enterprise Grade Support for Apache CloudStack?
Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.

Apache CloudStack Bootcamp training courses

**NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

RE: master branch DbUtilTest failure

Posted by Prachi Damle <Pr...@citrix.com>.
Yes! The surefire log prints this:

Caused by: com.cloud.utils.exception.CloudRuntimeException: File containing secret key not found: /etc/cloudstack/management/key
	at com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSecretKeyChecker.java:91)
	at com.cloud.utils.db.DbProperties.getDbProperties(DbProperties.java:80)
	at com.cloud.utils.db.TransactionLegacy.<clinit>(TransactionLegacy.java:1024)
	... 39 more
Caused by: java.io.FileNotFoundException: \etc\cloudstack\management\key (The system cannot find the path specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:146)
	at java.io.FileReader.<init>(FileReader.java:72)
	at com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSecretKeyChecker.java:87)
	... 41 more


So what is the equivalent path for my Windows setup for this to work? Anyone with Windows has got this to work?

Prachi

-----Original Message-----
From: Wido den Hollander [mailto:wido@widodh.nl] 
Sent: Monday, March 03, 2014 3:15 PM
To: dev@cloudstack.apache.org
Subject: Re: master branch DbUtilTest failure



On 03/03/2014 11:40 PM, Prachi Damle wrote:
> Hi,
>
> I am facing this error while doing a clean install on latest master.
>
> It fails running 'com.cloud.utils.DbUtilTest' with error 'Could not initialize class com.cloud.utils.db.TransactionLegacy'
>
> I am on Windows.  Anyone seeing this? Any ideas to fix?
>

Does the logfile of the surefire plugin say something interesting? 
Should be in the target directory.

>
> Prachi
>
>
>
>
> [INFO] 
> ----------------------------------------------------------------------
> -- [INFO] Building Apache CloudStack Framework - Event Notification 
> 4.4.0-SNAPSHOT [INFO] 
> ----------------------------------------------------------------------
> --
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
> cloud-framework-db --- [INFO] Deleting 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t (includes = [**/*], excludes = []) [INFO] Deleting 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db 
> (includes = [target, dist], excludes = []) [INFO] [INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-framework-db --- [INFO] Starting audit...
> Audit done.
>
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.3:process (default) @ 
> cloud-framework-db --- [INFO] [INFO] --- 
> maven-resources-plugin:2.5:resources (default-resources) @ 
> cloud-framework-db --- [debug] execute contextualize [INFO] Using 
> 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ 
> cloud-framework-db --- [INFO] Compiling 43 source files to 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources 
> (default-testResources) @ cloud-framework-db --- [debug] execute 
> contextualize [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\test\
> resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:testCompile 
> (default-testCompile) @ cloud-framework-db --- [INFO] Compiling 15 
> source files to 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\test-classes
> [INFO]
> [INFO] --- maven-surefire-plugin:2.12:test (default-test) @ 
> cloud-framework-db --- [INFO] Surefire report directory: 
> C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\targe
> t\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running com.cloud.utils.DbUtilTest
> log4j:WARN No appenders could be found for logger (com.cloud.utils.crypt.EncryptionSecretKeyChecker).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
> Tests run: 28, Failures: 0, Errors: 26, Skipped: 2, Time elapsed: 0.667 sec <<< FAILURE!
>
> Results :
>
> Tests in error:
>    getTableName(com.cloud.utils.DbUtilTest)
>    getTableName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize 
> class com.cloud.utils.db.TransactionLegacy
>
>

Re: master branch DbUtilTest failure

Posted by Wido den Hollander <wi...@widodh.nl>.

On 03/03/2014 11:40 PM, Prachi Damle wrote:
> Hi,
>
> I am facing this error while doing a clean install on latest master.
>
> It fails running 'com.cloud.utils.DbUtilTest' with error 'Could not initialize class com.cloud.utils.db.TransactionLegacy'
>
> I am on Windows.  Anyone seeing this? Any ideas to fix?
>

Does the logfile of the surefire plugin say something interesting? 
Should be in the target directory.

>
> Prachi
>
>
>
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Apache CloudStack Framework - Event Notification 4.4.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cloud-framework-db ---
> [INFO] Deleting C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target (includes = [**/*], excludes = [])
> [INFO] Deleting C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db (includes = [target, dist], excludes = [])
> [INFO]
> [INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-framework-db ---
> [INFO] Starting audit...
> Audit done.
>
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.3:process (default) @ cloud-framework-db ---
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ cloud-framework-db ---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ cloud-framework-db ---
> [INFO] Compiling 43 source files to C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target\classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ cloud-framework-db ---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\test\resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ cloud-framework-db ---
> [INFO] Compiling 15 source files to C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target\test-classes
> [INFO]
> [INFO] --- maven-surefire-plugin:2.12:test (default-test) @ cloud-framework-db ---
> [INFO] Surefire report directory: C:\cloud\apache-cloudstack-oss\incubator-cloudstack\framework\db\target\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running com.cloud.utils.DbUtilTest
> log4j:WARN No appenders could be found for logger (com.cloud.utils.crypt.EncryptionSecretKeyChecker).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
> Tests run: 28, Failures: 0, Errors: 26, Skipped: 2, Time elapsed: 0.667 sec <<< FAILURE!
>
> Results :
>
> Tests in error:
>    getTableName(com.cloud.utils.DbUtilTest)
>    getTableName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeStatementFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSet(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeResultSetFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    releaseGlobalLock(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeNull(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnection(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getGlobalLockTimeout(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    closeConnectionFail(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    isPersistable(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>    getColumnName(com.cloud.utils.DbUtilTest): Could not initialize class com.cloud.utils.db.TransactionLegacy
>
>