Re: How to build? jar is not created.

408 views
Skip to first unread message

James Waldrop

unread,
Jul 31, 2012, 12:16:19 PM7/31/12
to iago-...@googlegroups.com
You are probably hitting the NullPointerException in one of the tests that uses Finagle. This is something the Finagle team is still tracking down, the source is a reference counted timer that underlies all the other timers that Finagle uses, and it's being referenced after it's freed for some reason. The short answer is that there's a work around:

mvn -DskipTests package

If you're hitting some other test failure, please let me know. This NullPointerException is tricky -- it only happens on some systems, and doesn't happen in CI (not our internal CI or Travis CI run against the Github repo) so I haven't bothered disabling it.

James


On Tuesday, July 31, 2012 6:42:25 AM UTC-7, xogml wrote:
Hi, 
I was cloned source.
and run 'mvn package'
Then there is build fail..
How to build this src.

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to /home/xogml/develop/iago/target/surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: There are test failures.

Please refer to /home/xogml/develop/iago/target/surefire-reports for the individual test results.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to /home/xogml/develop/iago/target/surefire-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:83)
at org.apache.maven.plugin.surefire.SurefirePlugin.writeSummary(SurefirePlugin.java:673)
at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:647)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:137)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:98)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more

xogml

unread,
Aug 2, 2012, 4:45:50 AM8/2/12
to iago-...@googlegroups.com
Thank you!.
I got iago jar!!

xogml

unread,
Aug 3, 2012, 12:17:33 AM8/3/12
to iago-...@googlegroups.com
Hi ~
I have some problems
when i run "java -jar ./target/iago-0.5.1-SNAPSHOT.jar -f ./config/test-thrift.scala"

Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at com.twitter.parrot.launcher.LauncherMain.main(LauncherMain.scala)
Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 12 more

I don't know scala...
Please,Give me some advice.

Trisha Quan

unread,
Aug 3, 2012, 3:18:26 AM8/3/12
to iago-...@googlegroups.com
This is actually something we should clarify better.

With maven, the way the files are generated, you actually want to take the generated zip and unpack it into a temp dir and run from there.. the jar isn't runnable alone (without its dependencies) straight from the target dir.

If it helps, here's the command for your terminal:
mkdir tmp; mv *zip; cd tmp; unzip *zip

then run the command again =)



--
 
 
 

xogml

unread,
Aug 3, 2012, 5:00:34 AM8/3/12
to iago-...@googlegroups.com
Thank you!! :)
This is first time for me using maven. Thank you for your kind answer.

I unzip the zip file and run iago. there was any actions.

no console print, no log...

just done the process like this

xogml@ubuntu11:~/develop/iago/target/tmp$ sudo java -jar ./iago-0.5.1-SNAPSHOT.jar ./config/test-feeder.scala 
xogml@ubuntu11:~/develop/iago/target/tmp$ 

Is there anything else to run iago??

James Waldrop

unread,
Aug 3, 2012, 12:27:50 PM8/3/12
to iago-...@googlegroups.com
You missed a -f before your config file. There is a bug fix for the fact that we don't print an error that we need to integrate.


--
 
 
 

priyadarshi kunal

unread,
Jul 11, 2013, 3:47:51 AM7/11/13
to iago-...@googlegroups.com
I am getting following error now after following the steps mentioned above.

kunal@ubuntu:/tmp/iago$ java -jar iago-0.6.8.jar -f ~/Documents/workspace/twitter-iago/config/test-thrift.scala
Jul 11, 2013 1:15:26 PM com.twitter.logging.Logger log
FATAL: com.twitter.util.Eval$CompilerException: Compiler exception error: line 6: LocalCluster is not a member of com.twitter.parrot.util
import com.twitter.parrot.util.LocalCluster
       ^
error: line 21: not found: type LocalCluster
  clusterService = Some(new LocalCluster)
                            ^
com.twitter.util.Eval$CompilerException: Compiler exception error: line 6: LocalCluster is not a member of com.twitter.parrot.util
import com.twitter.parrot.util.LocalCluster
       ^
error: line 21: not found: type LocalCluster
  clusterService = Some(new LocalCluster)
                            ^
at com.twitter.util.Eval$StringCompiler.apply(Eval.scala:557)
at com.twitter.util.Eval$StringCompiler$$anonfun$apply$3.apply(Eval.scala:568)
at com.twitter.util.Eval$StringCompiler$$anonfun$apply$3.apply(Eval.scala:567)
at scala.Option.getOrElse(Option.scala:108)
at com.twitter.util.Eval$StringCompiler.apply(Eval.scala:567)
at com.twitter.util.Eval.applyProcessed(Eval.scala:196)
at com.twitter.util.Eval.applyProcessed(Eval.scala:189)
at com.twitter.util.Eval.apply(Eval.scala:135)
at com.twitter.util.Eval.apply(Eval.scala:169)
at com.twitter.parrot.launcher.LauncherMain$$anonfun$1.apply(LauncherMain.scala:35)
at com.twitter.parrot.launcher.LauncherMain$$anonfun$1.apply(LauncherMain.scala:35)
at scala.Option.map(Option.scala:133)
at com.twitter.parrot.launcher.LauncherMain$.main(LauncherMain.scala:35)
at com.twitter.parrot.launcher.LauncherMain.main(LauncherMain.scala)

Jul 11, 2013 1:15:26 PM com.twitter.logging.Logger log
ERROR: Exception raised while reading file: /home/kunal/Documents/workspace/twitter-iago/config/test-thrift.scala
 

Can someone please help in here?

Thanks in advance. 

Tom Howland

unread,
Jul 11, 2013, 2:40:18 PM7/11/13
to priyadarshi kunal, iago-...@googlegroups.com
Priyadarshi Kunal

LocalCluster is used for testing the Iago interface to zookeeper. It is defined in the testing portion of Iago and would not be part of the jar.



--
 
---
You received this message because you are subscribed to the Google Groups "Iago Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iago-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James Waldrop

unread,
Jul 11, 2013, 3:01:08 PM7/11/13
to iago-...@googlegroups.com, priyadarshi kunal
Yeah, using test-thrift.scala is probably the answer. This is there to support integration tests, not to actually be used "in production."
Reply all
Reply to author
Forward
0 new messages