[[TestNGClassFinder]] Unable to read methods on class com.nap.cportal.smoke.tests.Login - unable to resolve class reference com/google/inject/internal/Lists

1,822 views
Skip to first unread message

Nikesh

unread,
Mar 30, 2015, 7:45:42 PM3/30/15
to testng...@googlegroups.com
Hi,

everything was working fine on Windows with JDK 1.7
when I moved to Linux (Open JDK1.7) ...I was able to create the build (JAR) using ANT script 

but at the time on execution (on Linux using command : java -jar xxxx.jar) I am facing error ..

[[TestNGClassFinder]] Unable to read methods on class xxxxxxxxx - unable to resolve class reference com/google/inject/internal/Lists

I have all the external jars are bundled up in the project jar

<target name="compile" description="Build class files" depends="clean,init">
<copy includeemptydirs="false" todir="${class.dir}">
<fileset dir="${source.dir}">
<exclude name="**/*.java" />
</fileset>
</copy>
<javac srcdir="${source.dir}" destdir="${class.dir}" includeantruntime="false">
<classpath refid="project.classpath" />
</javac>
<echo>Classpath: ${toString:project.classpath}</echo>
</target>

<!-- Create jar -->
<target name="jar" depends="compile">
<jar destfile="${ant.project.name}.jar" basedir="${class.dir}">

<manifest>
<attribute name="Main-Class" value="${main-class}" />
<attribute name="built-by" value="${user.name}" />
</manifest>

<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/MonteScreenRecorder.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/poi-3.11-20141221.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/poi-ooxml-3.11-20141221.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/poi-ooxml-schemas-3.11-20141221.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/selenium-server-standalone-2.44.0.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/testng-6.8.15.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/cuanto-adapter-2.8.0.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/cuanto-api-2.8.0.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/javax.mail.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/joda-time-2.7.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/mysql-connector-java-5.1.34-bin.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/poi-excelant-3.11-20141221.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/xmlbeans-2.6.0.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/ini4j-0.5.2.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/commons-net-3.1.jar" />

</jar>
</target>

Thanks
Nikesh

Varun Menon

unread,
Mar 30, 2015, 8:05:21 PM3/30/15
to testng...@googlegroups.com

Have you tried using Oracle jdk on linux?
Also try adding google-guice to your jar.

-Varun

--
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 testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Nikesh

unread,
Mar 30, 2015, 9:56:17 PM3/30/15
to testng...@googlegroups.com
Added the google guice but still facing the same error.

Nikesh

unread,
Mar 30, 2015, 10:03:18 PM3/30/15
to testng...@googlegroups.com
looks like some problem with testng 6.8.15
no errors when using testng 6.8.21

Cédric Beust ♔

unread,
Mar 31, 2015, 12:18:53 AM3/31/15
to testng...@googlegroups.com
Yes, it's fixed in the current release, nothing to do with OpenJDK.


-- 
Cédric

Reply all
Reply to author
Forward
0 new messages