Hi Chamalee Then add below to the test module pom.
<dependency> <groupId>com.h2database.wso2</groupId> <artifactId>h2-database-engine</artifactId> </dependency> Thanks, Nuwanw On Thu, Jul 9, 2015 at 3:13 PM, Chamalee De Silva <chama...@wso2.com> wrote: > Hi, > > No. Only in the parent pom.xml of product-apim it has the following > dependency. > > <dependency> > <groupId>com.h2database.wso2</groupId> > <artifactId>h2-database-engine</artifactId> > <version>${orbit.version.h2.engine}</version> > </dependency> > > > > > On Thu, Jul 9, 2015 at 3:07 PM, Irham Iqbal <iq...@wso2.com> wrote: > >> Hi Chamalee, >> >> Can you please make sure whether you have dependency related to org.h2.Driver >> in your tests-integration module pom.xml >> >> Thanks, >> Iqbal >> >> On Thu, Jul 9, 2015 at 2:57 PM, Chamalee De Silva <chama...@wso2.com> >> wrote: >> >>> hi all, >>> >>> I am writing a test case for WSO2 API Manager to test Read Only External >>> Stores in java. >>> I pointed the WSO2CARBON_DB to add Roles and Users. >>> >>> But when I build it fails with a ClassNotFoundException for the >>> following. ( java.lang.ClassNotFoundException: org.h2.Driver) >>> >>> H2DataBaseManager dbmanager = new H2DataBaseManager("jdbc:h2:" + >>> ServerConfigurationManager.getCarbonHome() + >>> "/repository/database/WSO2CARBON_DB, "wso2carbon', "wso2carbon"); >>> dbmanager.executeUpdate(new >>> File(ServerConfigurationManager.getCarbonHome() + "/dbscripts/h2.sql")); >>> dbmanager.disconnect(); >>> >>> *Error Log : * >>> >>> java.lang.ClassNotFoundException: org.h2.Driver >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) >>> at java.lang.Class.forName0(Native Method) >>> at java.lang.Class.forName(Class.java:171) >>> at >>> org.wso2.carbon.automation.test.utils.dbutils.H2DataBaseManager.<init>(H2DataBaseManager.java:39) >>> at >>> org.wso2.am.integration.tests.other.ReadOnlyExternalStoreAPITokenGenerationTestCase.setEnvironment(ReadOnlyExternalStoreAPITokenGenerationTestCase.java:94) >>> >>> >>> PS : I am creating the external store in the environment setup before >>> the test start to run. >>> >>> Any ideas to resolve this issue? >>> >>> -- >>> Thanks & Regards, >>> >>> *Chamalee De Silva* >>> Software Engineer >>> *WS**O2* Inc. .:http://wso2.com >>> lean *.* enterprise *.* middleware >>> >>> Office :- *+94 11 2145345 <%2B94%2011%202145345>* >>> mobile :- *+94 7 <%2B94%2077%202782039>1 4315942* >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Irham Iqbal >> Software Engineer - Test Automation >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> phone: +94 777888452 >> > > > > -- > Thanks & Regards, > > *Chamalee De Silva* > Software Engineer > *WS**O2* Inc. .:http://wso2.com > lean *.* enterprise *.* middleware > > Office :- *+94 11 2145345 <%2B94%2011%202145345>* > mobile :- *+94 7 <%2B94%2077%202782039>1 4315942* > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Nuwan Wimalasekara Senior Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 71 668 4620
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev