EmilyS
14 years agoOccasional Contributor
Errors when specifying a new loadUI home folder on cmd line
I'm not sure if this is a bug or I'm doing something wrong.
I'm trying to get loadUI to use a different folder for the home folder, but running into problems. I'm attempting to do this by running loadUI from the command line using the loadui.home parameter.
I first moved the default home folder to a new location (moved, not copied). Then I ran the following command:
loadui-cmd.bat --local -p [path to project file] "-Dloadui.home=[path to new home folder location]"
When I run the above command, I get a huge string of errors, the first of which is:
10:22:30,679 ERROR [ContextLoaderListener] Application context refresh failed (O
sgiBundleXmlApplicationContext(bundle=com.eviware.loadui.http-client, config=osg
ibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean
#0': Invocation of init method failed; nested exception is org.springframework.b
eans.factory.BeanCreationException: Error creating bean with name 'httpClientPro
vider' defined in URL [bundle://31.0:0/META-INF/spring/bundle-context.xml]: Cann
ot resolve reference to bean 'validatorHttpsClient' while setting constructor ar
gument; nested exception is org.springframework.beans.factory.BeanCreationExcept
ion: Error creating bean with name 'validatorHttpsClient' defined in URL [bundle
://31.0:0/META-INF/spring/bundle-context.xml]: Instantiation of bean failed; nes
ted exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public static org.eclipse.jetty.client.HttpClient com.eviware.l
oadui.http.HttpClientFactory.createHttpsClient()] threw exception; nested except
ion is java.lang.RuntimeException: java.io.FileNotFoundException: C:\Users\emily
s\.loadui\keystore.jks (The system cannot find the file specified)
The complete list of errors is attached.
Note that I've completely removed the loadUI home folder from its original (default) location before running the above command. I've found that if I put the keystore file back in the original (default) home folder location, I don't get any errors when running the above command. So it seems like loadUI is still dependent on the keystore file being in the default home folder location, even though I've specified a new home folder location.
Note that in the list of errors, loadUI is complaining because it can't find the keystore file in the default loadUI home folder location (C:\Users\emilys\.loadui\keystore.jks), even though I've specified a different home folder location in the command line (C:\Code\
team-city-build-tools\loadUI\.loadui).
So in summary, to recreate the issue:
1) Move the loadUI home folder (including the keystore file) to a new location. Do not leave a copy of the keystore file in the default home folder location.
2) Run loadUI from the command line using: loadui-cmd.bat --local -p [path to project file] "-Dloadui.home=[path to new home folder location]"
* you should get a bunch of errors
3) Copy the keystore file back to the original default loadUI home folder location (i.e. "C:\Users\[username]\.loadui" or similar)
4) Run the above command again
* it should run this time without any issues
Can you please investigate? We need to get loadUI to look for the keystore file in a different (ie non-default) loadUI home folder location. This is critical because we want to run these test in an automated fashion and we need to be able to specify the home folder location explicitly.
Thanks,
Emily
I'm trying to get loadUI to use a different folder for the home folder, but running into problems. I'm attempting to do this by running loadUI from the command line using the loadui.home parameter.
I first moved the default home folder to a new location (moved, not copied). Then I ran the following command:
loadui-cmd.bat --local -p [path to project file] "-Dloadui.home=[path to new home folder location]"
When I run the above command, I get a huge string of errors, the first of which is:
10:22:30,679 ERROR [ContextLoaderListener] Application context refresh failed (O
sgiBundleXmlApplicationContext(bundle=com.eviware.loadui.http-client, config=osg
ibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean
#0': Invocation of init method failed; nested exception is org.springframework.b
eans.factory.BeanCreationException: Error creating bean with name 'httpClientPro
vider' defined in URL [bundle://31.0:0/META-INF/spring/bundle-context.xml]: Cann
ot resolve reference to bean 'validatorHttpsClient' while setting constructor ar
gument; nested exception is org.springframework.beans.factory.BeanCreationExcept
ion: Error creating bean with name 'validatorHttpsClient' defined in URL [bundle
://31.0:0/META-INF/spring/bundle-context.xml]: Instantiation of bean failed; nes
ted exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public static org.eclipse.jetty.client.HttpClient com.eviware.l
oadui.http.HttpClientFactory.createHttpsClient()] threw exception; nested except
ion is java.lang.RuntimeException: java.io.FileNotFoundException: C:\Users\emily
s\.loadui\keystore.jks (The system cannot find the file specified)
The complete list of errors is attached.
Note that I've completely removed the loadUI home folder from its original (default) location before running the above command. I've found that if I put the keystore file back in the original (default) home folder location, I don't get any errors when running the above command. So it seems like loadUI is still dependent on the keystore file being in the default home folder location, even though I've specified a new home folder location.
Note that in the list of errors, loadUI is complaining because it can't find the keystore file in the default loadUI home folder location (C:\Users\emilys\.loadui\keystore.jks), even though I've specified a different home folder location in the command line (C:\Code\
team-city-build-tools\loadUI\.loadui).
So in summary, to recreate the issue:
1) Move the loadUI home folder (including the keystore file) to a new location. Do not leave a copy of the keystore file in the default home folder location.
2) Run loadUI from the command line using: loadui-cmd.bat --local -p [path to project file] "-Dloadui.home=[path to new home folder location]"
* you should get a bunch of errors
3) Copy the keystore file back to the original default loadUI home folder location (i.e. "C:\Users\[username]\.loadui" or similar)
4) Run the above command again
* it should run this time without any issues
Can you please investigate? We need to get loadUI to look for the keystore file in a different (ie non-default) loadUI home folder location. This is critical because we want to run these test in an automated fashion and we need to be able to specify the home folder location explicitly.
Thanks,
Emily