NoClassDefFound exception comes while running TestNG from command line

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NoClassDefFound exception comes while running TestNG from command line

SOUVIK DUTTA-2

Hi All,

I am working on a test automation framework where users are allowed to run the TestNG xml using command prompt. We are executing multiple DB queries as well as usual web functional test cases.

Here is the issue
==============================================
When I run using command prompt I am getting NoClassDefFound exception, but same doesnt come while running from TestNG XML.

Command that I am executing :
java -cp H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\bin;H:\common\Automation-Selenium\NewAutoFrmwrkResource\* org.testng.TestNG H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\RunXML\RRT_11192015_230053.xml



Here is what I saw
1) Same JARs used in both cases, but still getting error. Please help to identify the problem.

C:\Java7\bin\javaw.exe -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:58247 -ea -Dfile.encoding=Cp1252 -classpath

"H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\bin;

C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\testng.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\jcommander.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\bsh-2.0b4.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\bsh-2.0b4.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\dom4j-2.0.0-RC1.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-18.0.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-base-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-collections-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\java-json.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\jcommander.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\log4j-1.2.17.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6dms.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-schemas-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\selenium-server-standalone-2.48.2.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\sikulixapi.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng-sources.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\xmlbeans-2.6.0.jar"


org.testng.remote.RemoteTestNG -serport 58246 -d "H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\test-output" "H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\RunXML\RRT_11192015_214644.xml"


C:\Java7\bin\javaw.exe -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:58279 -Dfile.encoding=Cp1252 -classpath "

H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\bin;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\testng.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\jcommander.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\bsh-2.0b4.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\bsh-2.0b4.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\dom4j-2.0.0-RC1.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-18.0.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-base-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-collections-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\java-json.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\jcommander.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\log4j-1.2.17.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6dms.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-schemas-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\selenium-server-standalone-2.48.2.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\sikulixapi.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng-sources.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\xmlbeans-2.6.0.jar" core.framework.DriverScript

Exception that I am getting
Testcase Name :TC008_01_VERIFY_LOGIN_FLOW_SECURITY_ANSWER_INVALID_INPUT_NEW_PSC_USER-java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole at oracle.jdbc.driver.DMSFactory.<clinit>(DMSFactory.java:51) at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:3821) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:632) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:230) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567) at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:404) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:288) at app.psc.common.DBUtils.getDBConnection(DBUtils.java:124) at app.psc.common.DBUtils.getPreparedStatement(DBUtils.java:62) at app.psc.common.DBUtils.executeUpdate(DBUtils.java:49) at app.psc.pageobjects.AccountVerificationPage.recreateNewUser(AccountVerificationPage.java:463) at app.psc.testcases.accountverificationtestcases.TC008_01_Verify_Login_Flow_Security_Answer_Invalid_Input_New_PSC_User(accountverificationtestcases.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) at org.testng.TestNG.run(TestNG.java:1018) at org.testng.TestNG.privateMain(TestNG.java:1325) at org.testng.TestNG.main(TestNG.java:1294) Caused by: java.lang.ClassNotFoundException: oracle.dms.console.DMSConsole at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 36 more ================================================================Testcase Name :TC008_01_VERIFY_LOGIN_FLOW_SECURITY_ANSWER_INVALID_INPUT_NEW_PSC_USER-java.lang.NoClassDefFoundError: Could not initialize class oracle.jdbc.driver.DMSFactory at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:3821) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:632) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:230) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567) at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:404) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:288) at app.psc.common.DBUtils.getDBConnection(DBUtils.java:124) at app.psc.common.DBUtils.getPreparedStatement(DBUtils.java:62) at app.psc.common.DBUtils.executeUpdate(DBUtils.java:49) at app.psc.pageobjects.AccountVerificationPage.recreateNewUser(AccountVerificationPage.java:463) at app.psc.testcases.accountverificationtestcases.TC008_01_Verify_Login_Flow_Security_Answer_Invalid_Input_New_PSC_User(accountverificationtestcases.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) at org.testng.TestNG.run(TestNG.java:1018) at org.testng.TestNG.privateMain(TestNG.java:1325) at org.testng.TestNG.main(TestNG.java:1294) ================================================================Testcase Name :TC008_01_VERIFY_LOGIN_FLOW_SECURITY_ANSWER_INVALID_INPUT_NEW_PSC_USER-java.lang.NoClassDefFoundError: Could not initialize class oracle.jdbc.driver.DMSFactory at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:3821) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:632) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:230) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567) at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:404) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:288) at app.psc.common.DBUtils.getDBConnection(DBUtils.java:124) at app.psc.common.DBUtils.getPreparedStatement(DBUtils.java:62) at app.psc.common.DBUtils.executeUpdate(DBUtils.java:49) at app.psc.pageobjects.AccountVerificationPage.recreateNewUser(AccountVerificationPage.java:463) at app.psc.testcases.accountverificationtestcases.TC008_01_Verify_Login_Flow_Security_Answer_Invalid_Input_New_PSC_User(accountverificationtestcases.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) at org.testng.TestNG.run(TestNG.java:1018) at org.testng.TestNG.privateMain(TestNG.java:1325) at org.testng.TestNG.main(TestNG.java:1294) ================================================================Testcase Name :TC008_01_VERIFY_LOGIN_FLOW_SECURITY_ANSWER_INVALID_INPUT_NEW_PSC_USER-java.lang.NoClassDefFoundError: Could not initialize class oracle.jdbc.driver.DMSFactory at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:3821) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:632) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:230) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567) at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:404) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:288) at app.psc.common.DBUtils.getDBConnection(DBUtils.java:124) at app.psc.common.DBUtils.getPreparedStatement(DBUtils.java:62) at app.psc.common.DBUtils.executeUpdate(DBUtils.java:49) at app.psc.pageobjects.AccountVerificationPage.recreateNewUser(AccountVerificationPage.java:463) at app.psc.testcases.accountverificationtestcases.TC008_01_Verify_Login_Flow_Security_Answer_Invalid_Input_New_PSC_User(accountverificationtestcases.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) at org.testng.TestNG.run(TestNG.java:1018) at org.testng.TestNG.privateMain(TestNG.java:1325) at org.testng.TestNG.main(TestNG.java:1294) ================================================================



--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Nat
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFound exception comes while running TestNG from command line

Nat
Try removing "ojdbc6dms.jar" from your classpath.

On Thursday, November 19, 2015 at 10:08:45 AM UTC-8, SOUVIK DUTTA wrote:

Hi All,

I am working on a test automation framework where users are allowed to run the TestNG xml using command prompt. We are executing multiple DB queries as well as usual web functional test cases.

Here is the issue
==============================================
When I run using command prompt I am getting NoClassDefFound exception, but same doesnt come while running from TestNG XML.

Command that I am executing :
java -cp H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\bin;H:\common\Automation-Selenium\NewAutoFrmwrkResource\* org.testng.TestNG H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\RunXML\RRT_11192015_230053.xml



Here is what I saw
1) Same JARs used in both cases, but still getting error. Please help to identify the problem.

C:\Java7\bin\javaw.exe -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:58247 -ea -Dfile.encoding=Cp1252 -classpath

"H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\bin;

C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\testng.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\jcommander.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\bsh-2.0b4.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\bsh-2.0b4.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\dom4j-2.0.0-RC1.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-18.0.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-base-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-collections-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\java-json.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\jcommander.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\log4j-1.2.17.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6dms.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-schemas-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\selenium-server-standalone-2.48.2.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\sikulixapi.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng-sources.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\xmlbeans-2.6.0.jar"


org.testng.remote.RemoteTestNG -serport 58246 -d "H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\test-output" "H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\RunXML\RRT_11192015_214644.xml"


C:\Java7\bin\javaw.exe -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:58279 -Dfile.encoding=Cp1252 -classpath "

H:\GIT\PSCNewExperience\PSC\PSCNewExperience\PSCNewExperience\bin;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\testng.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\jcommander.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\bsh-2.0b4.jar;
C:\IDE\eclipse\plugins\org.testng.eclipse_6.9.5.201508210528\lib\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\bsh-2.0b4.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\dom4j-2.0.0-RC1.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-18.0.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-base-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\guava-collections-r03.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\java-json.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\jcommander.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\log4j-1.2.17.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\ojdbc6dms.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\poi-ooxml-schemas-3.12-20150511.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\selenium-server-standalone-2.48.2.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\sikulixapi.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\snakeyaml.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\testng-sources.jar;
H:\common\Automation-Selenium\NewAutoFrmwrkResource\xmlbeans-2.6.0.jar" core.framework.DriverScript

Exception that I am getting
Testcase Name :TC008_01_VERIFY_LOGIN_FLOW_SECURITY_ANSWER_INVALID_INPUT_NEW_PSC_USER-java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole at oracle.jdbc.driver.DMSFactory.<clinit>(DMSFactory.java:51) at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:3821) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:632) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:230) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567) at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:404) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:288) at app.psc.common.DBUtils.getDBConnection(DBUtils.java:124) at app.psc.common.DBUtils.getPreparedStatement(DBUtils.java:62) at app.psc.common.DBUtils.executeUpdate(DBUtils.java:49) at app.psc.pageobjects.AccountVerificationPage.recreateNewUser(AccountVerificationPage.java:463) at app.psc.testcases.accountverificationtestcases.TC008_01_Verify_Login_Flow_Security_Answer_Invalid_Input_New_PSC_User(accountverificationtestcases.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker
...

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFound exception comes while running TestNG from command line

SOUVIK DUTTA-2
Sure will try that ...but wuts the logic??...how come the script is running when we are triggering the script from testng xml but not when from cmd

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Nat
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFound exception comes while running TestNG from command line

Nat
There are duplicated classes in ojdbc6 and ojdbc6dms.jar. Classpath order affects the behavior. One of them requires dms jar to exist.

On Thursday, November 19, 2015 at 6:53:56 PM UTC-8, SOUVIK DUTTA wrote:
Sure will try that ...but wuts the logic??...how come the script is running when we are triggering the script from testng xml but not when from cmd

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.