Receiving java.lang.NoClassDefFoundError: com/google/inject/Module when using ReportNG listener

2,812 views
Skip to first unread message

Anthony Kim

unread,
Mar 28, 2012, 8:04:45 PM3/28/12
to webd...@googlegroups.com
I'm using testng-6.4 and reportng-1.1.3 and when running my tests using an ant build with listener "org.uncommons.reportng.HTMLReporter" everything is fine.  However, when I add the listener to my testng.xml I receive a stack trace stating, "java.lang.NoClassDefFoundError: com/google/inject/Module". Anyone know what I have wrong?  The full stacktrace is below:
 

java.lang.NoClassDefFoundError: com/google/inject/Module

at java.lang.Class.getDeclaredMethods0(

Native Method)

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.privateGetPublicMethods(Unknown Source)

at java.lang.Class.getMethods(Unknown Source)

at org.apache.velocity.util.introspection.ClassMap.getAccessibleMethods(

ClassMap.java:258)

at org.apache.velocity.util.introspection.ClassMap.populateMethodCache(

ClassMap.java:151)

at org.apache.velocity.util.introspection.ClassMap.<init>(

ClassMap.java:64)

at org.apache.velocity.util.introspection.IntrospectorBase.createClassMap(

IntrospectorBase.java:126)

at org.apache.velocity.util.introspection.IntrospectorBase.getMethod(

IntrospectorBase.java:112)

at org.apache.velocity.util.introspection.Introspector.getMethod(

Introspector.java:100)

at org.apache.velocity.runtime.parser.node.PropertyExecutor.discover(

PropertyExecutor.java:65)

at org.apache.velocity.runtime.parser.node.PropertyExecutor.<init>(

PropertyExecutor.java:39)

at org.apache.velocity.util.introspection.UberspectImpl.getPropertyGet(

UberspectImpl.java:156)

at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(

ASTIdentifier.java:125)

at org.apache.velocity.runtime.parser.node.ASTReference.execute(

ASTReference.java:175)

at org.apache.velocity.runtime.parser.node.ASTReference.value(

ASTReference.java:327)

at org.apache.velocity.runtime.parser.node.ASTAddNode.value(

ASTAddNode.java:66)

at org.apache.velocity.runtime.parser.node.ASTExpression.value(

ASTExpression.java:51)

at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(

ASTSetDirective.java:95)

at org.apache.velocity.runtime.parser.node.ASTBlock.render(

ASTBlock.java:55)

at org.apache.velocity.runtime.directive.Foreach.render(

Foreach.java:166)

at org.apache.velocity.runtime.parser.node.ASTDirective.render(

ASTDirective.java:114)

at org.apache.velocity.runtime.parser.node.ASTBlock.render(

ASTBlock.java:55)

at org.apache.velocity.runtime.directive.Foreach.render(

Foreach.java:166)

at org.apache.velocity.runtime.parser.node.ASTDirective.render(

ASTDirective.java:114)

at org.apache.velocity.runtime.parser.node.SimpleNode.render(

SimpleNode.java:230)

at org.apache.velocity.Template.merge(

Template.java:256)

at org.apache.velocity.app.Velocity.mergeTemplate(

Velocity.java:449)

at org.uncommons.reportng.AbstractReporter.generateFile(

AbstractReporter.java:108)

at org.uncommons.reportng.HTMLReporter.createOverview(

HTMLReporter.java:142)

at org.uncommons.reportng.HTMLReporter.generateReport(

HTMLReporter.java:107)

at org.testng.TestNG.generateReports(

TestNG.java:1080)

at org.testng.TestNG.run(

TestNG.java:1039)

at org.testng.remote.RemoteTestNG.run(

RemoteTestNG.java:109)

at org.testng.remote.RemoteTestNG.initAndRun(

RemoteTestNG.java:202)

at org.testng.remote.RemoteTestNG.main(

RemoteTestNG.java:173)

Caused by:

java.lang.ClassNotFoundException: com.google.inject.Module

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

Anthony Kim

unread,
Mar 28, 2012, 8:19:59 PM3/28/12
to webd...@googlegroups.com
This was answered in another post titled: Configure ReportNG to Eclipse+Selenium
Reply all
Reply to author
Forward
0 new messages