Fixed on master and 4.1, we won't use test lifecycles of maven. So, process-test-resources is now process-resource which should fix the issue.
Regards. On Tue, Feb 12, 2013 at 3:23 AM, Will Stevens <wstev...@cloudops.com> wrote: > I also ran into this issue. I added a comment to the issue you referenced > (just as a cross reference). > > I resolved this issue in my setup by removing the '-Dmaven.test.skip=true' > flag from my mvn clean install command. It appears that the tests need to > run in order for the db to deploy. I didn't research it too much, but this > was the workaround I used to get myself back up and running. > > > > > On Fri, Feb 8, 2013 at 11:39 PM, Rohit Yadav <bhais...@apache.org> wrote: >> >> This occurs because db.properties is hard coded in Transaction and in >> the encryption checker, quick work around would be to follow Sinisa's >> hack (see the comment on the issue). >> But anyway we're passing absolute paths to DatabaseCreator so the fix >> would be to either make sure the db.properties file is in it's >> classpath (when dbcreator is called) or fix in Transaction to ignore >> any NPE and fallback to default datastore. We'll fix this soon. >> >> Regards. >> >> On Sat, Feb 9, 2013 at 6:14 AM, Frank Zhang <frank.zh...@citrix.com> >> wrote: >> > I don't know >> > I just do >> > mvn clean install -Doss >> > >> > I firstly thought it's an deprecated jar in my maven cache, but it >> > convinced it's 4.1 JAR by name >> > >> >> -----Original Message----- >> >> From: Edison Su >> >> Sent: Friday, February 08, 2013 4:35 PM >> >> To: Frank Zhang; Vijayendra Bhamidipati; cloudstack- >> >> d...@incubator.apache.org >> >> Subject: RE: can't deploydb on 4.1 branch, why don't you face it? >> >> >> >> cloud-utils-4.1.0-SNAPSHOT-tests.jar? What's the jar used for? For >> >> test? >> >> >> >> > -----Original Message----- >> >> > From: Frank Zhang [mailto:frank.zh...@citrix.com] >> >> > Sent: Friday, February 08, 2013 4:29 PM >> >> > To: Vijayendra Bhamidipati; cloudstack-dev@incubator.apache.org >> >> > Subject: RE: can't deploydb on 4.1 branch, why don't you face it? >> >> > >> >> > Hmm, it's different issue. >> >> > CS-1181 says NPE caused by db.properties not on classpath, this issue >> >> > is a wrong db.properites file presenting in >> >> > cloud-utils-4.1.0-SNAPSHOT- >> >> tests.jar. >> >> > CS-1181 is no harm as you can ignore the NPE and continue deploying >> >> > db. The issue I encountered totally stops deploying db. >> >> > The problem is I don't know the intention of db.properites in >> >> > cloud-utils- 4.1.0-SNAPSHOT-tests.jar, otherwise I will delete it for >> >> > a fix >> >> > >> >> > > -----Original Message----- >> >> > > From: Vijayendra Bhamidipati >> >> > > Sent: Friday, February 08, 2013 4:21 PM >> >> > > To: Frank Zhang; cloudstack-dev@incubator.apache.org >> >> > > Subject: RE: can't deploydb on 4.1 branch, why don't you face it? >> >> > > >> >> > > Hi Frank, >> >> > > >> >> > > This issue is being tracked in >> >> > > https://issues.apache.org/jira/browse/CLOUDSTACK-1181 . The >> >> > workaround >> >> > > is to comment out the code in Transaction.java that checks whether >> >> > > the db.properties file contains a parameter for encryption. It >> >> > > needs >> >> > > to be fixed - everyone deploying a fresh db will face the issue as >> >> > > of now. I haven't had the time to look into it yet but will do so >> >> > > at >> >> > > the first opportunity unless someone fixes it before that. >> >> > > >> >> > > Regards, >> >> > > Vijay >> >> > > >> >> > > -----Original Message----- >> >> > > From: Frank Zhang [mailto:frank.zh...@citrix.com] >> >> > > Sent: Friday, February 08, 2013 3:52 PM >> >> > > To: cloudstack-dev@incubator.apache.org >> >> > > Subject: can't deploydb on 4.1 branch, why don't you face it? >> >> > > >> >> > > 'mvn -P developer -pl developer -Ddeploydb' greets me below error: >> >> > > >> >> > > [INFO] >> >> > > [INFO] --- exec-maven-plugin:1.2.1:java (create-schema) @ >> >> > > cloud-developer >> >> > > --- ========> WARNING: Provided file does not exist: >> >> > > >> >> > > /home/frank/dev/incubator-cloudstack/utils/conf/db.properties.overri >> >> > > de >> >> > > [WARNING] >> >> > > java.lang.reflect.InvocationTargetException >> >> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> >> > > Method) >> >> > > at >> >> > > >> >> > >> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j >> >> > > ava:57) >> >> > > at >> >> > > >> >> > >> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >> >> > > sorImpl.java:43) >> >> > > at java.lang.reflect.Method.invoke(Method.java:616) >> >> > > at >> >> > org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) >> >> > > at java.lang.Thread.run(Thread.java:679) >> >> > > Caused by: java.lang.ExceptionInInitializerError >> >> > > at >> >> > com.cloud.upgrade.DatabaseCreator.main(DatabaseCreator.java:160) >> >> > > ... 6 more >> >> > > Caused by: com.cloud.utils.exception.CloudRuntimeException: File >> >> > > db.properties not found >> >> > > at >> >> > > >> >> > > com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSec >> >> > > re >> >> > > tK >> >> > > eyChecker.java:142) >> >> > > at >> >> > > com.cloud.utils.db.Transaction.<clinit>(Transaction.java:101) >> >> > > ... 7 more >> >> > > Caused by: java.io.FileNotFoundException: >> >> > > >> >> > > file:/home/frank/.m2/repository/org/apache/cloudstack/cloud-utils/4.1. >> >> > > 0- SNAPSHOT/cloud-utils-4.1.0-SNAPSHOT-tests.jar!/db.properties (No >> >> > > such file or directory) >> >> > > at java.io.FileInputStream.open(Native Method) >> >> > > at java.io.FileInputStream.<init>(FileInputStream.java:137) >> >> > > at >> >> > > >> >> > > com.cloud.utils.crypt.EncryptionSecretKeyChecker.check(EncryptionSec >> >> > > re >> >> > > tK >> >> > > eyChecker.java:65) >> >> > > >> >> > > after looking into it, I think it's a bug that everyone would >> >> > > encounter, but to my surprise it seems as if only I suffer it. >> >> > > >> >> > > The cause is in EncryptionSecretKeyChecker.java >> >> > > >> >> > > @Override >> >> > > public void check() { >> >> > > //Get encryption type from db.properties >> >> > > final File dbPropsFile = >> >> > > PropertiesUtil.findConfigFile("db.properties"); >> >> > > final Properties dbProps = new Properties(); >> >> > > >> >> > > ... .... >> >> > > >> >> > > PropertiesUtil.findConfigFile will search file in classpath first, >> >> > > and unfortunately cloud-utils-4.1.0-SNAPSHOT-tests.jar does have >> >> > > db.properties packaged in it, then it's returned as the first >> >> > > match. >> >> > > As it's a file in JAR it can not be opened as ordinary file that >> >> > > why >> >> > > the exception happens. >> >> > > >> >> > > I don't know why we have utils/conf/db.properties, can anyone tell >> >> > > me its purpose? And does anyone else encountered this bug? >> > > >