samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordi Blasi Uribarri <>
Subject Re: NoSuchMethodError
Date Tue, 17 Mar 2015 12:45:40 GMT
After doing what you told me, now I am including all the dependencies in a package. What I
am seeing now is another ClassNotFoundException but in this case it does not seem that it
is related to external libraries but to Samza itself, as it is referencing the config factory.

# bin/ --config-factory=samza.config.factories.PropertiesConfigFactory --config-path=file://\$PWD/samzafroga.jar
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-2)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
/usr/lib/jvm/java-7-openjdk-amd64/bin/java -Dlog4j.configuration=file:bin/log4j-console.xml
-Dsamza.log.dir=/opt/jobs -Xmx768M -XX:+PrintGCDateStamps -Xloggc:/opt/jobs/gc.log
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10241024 -d64 -cp /root/.samza/conf:/opt/jobs/lib/samzafroga-0.0.1-SNAPSHOT.jar:/opt/jobs/lib/samzafroga-0.0.1-SNAPSHOT-jar-with-dependencies.jar
org.apache.samza.job.JobRunner --config-factory=samza.config.factories.PropertiesConfigFactory
Exception in thread "main" java.lang.ClassNotFoundException: samza.config.factories.PropertiesConfigFactory
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(
        at org.apache.samza.util.CommandLine.loadConfig(CommandLine.scala:66)
        at org.apache.samza.job.JobRunner$.main(JobRunner.scala:36)
        at org.apache.samza.job.JobRunner.main(JobRunner.scala)

Do I have to include anything more?



>Hey Jordi,
>The stack trace you've pasted suggests that you're missing Scala in the
>classpath, or have a different version of Scala in the classpath than what
>Samza was compiled with.
>You should not be manually assembling the dependencies for your job. Your
>build system should be doing this for you. Please see hello-samza's pom.xml:
>For an example of how to do this. Specifically, the "assembly" plugin in
>Maven is used to build a .tgz file for your job, which has all of its
>required components:
>If you're not using Maven, Gradle and SBT can both assemble .tgz files as
>On Mon, Mar 16, 2015 at 4:11 AM, Jordi Blasi Uribarri <>
>> Hello,
>> I am new to Samza and I am trying to test it. I have not found much
>> documentation and I am not sure if this is the correct place for this kind
>> of questions. Please let me know if I am in the wrong place. I have tried
>> to follow the documentation but I guess I missed something or  did
>> something wrong.
>> I have installed a clean debian box and followed the instructions to
>> download and build from git.
>> git clone
>> cd samza
>> ./gradlew clean build
>> I have also installed scala (2.9.2 ) and java 7 jdk an jre.
>> I have created a simple job in java and I am trying to run it but I am
>> seeing some java dependencies problems when I try to run both
>> and scripts.
>> What I have done is create a folder for the jobs in /opt/jobs. There I
>> have created a bin folder for the scripts and a lib folder for all the jars
>> that I find that are required (as I have seen in the script that this the
>> place where they are obtained). I have copied there all the jar contained
>> in the samza folders and the ones I have obtained from a hadoop-2.6.0
>> instalation package. Some of the dependencies have been solved but I am
>> stuck in the following error when I run
>> Exception in thread "main" java.lang.NoSuchMethodError:
>> scala.Predef$.augmentString(Ljava/lang/String;)Ljava/lang/String;
>>         at
>> org.apache.samza.job.yarn.SamzaAppMaster$$anonfun$main$3.apply(SamzaAppMaster.scala:63)
>>         at
>> org.apache.samza.job.yarn.SamzaAppMaster$$anonfun$main$3.apply(SamzaAppMaster.scala:63)
>>         at org.apache.samza.util.Logging$
>>         at
>> org.apache.samza.job.yarn.SamzaAppMaster$.info(SamzaAppMaster.scala:55)
>>         at
>> org.apache.samza.job.yarn.SamzaAppMaster$.main(SamzaAppMaster.scala:63)
>>         at
>> org.apache.samza.job.yarn.SamzaAppMaster.main(SamzaAppMaster.scala)
>> What I am missing?
>> As a more general question, I am having quite a work compiling the
>> dependencies. Is there a reference of the jar files needed for the jobs and
>> scripts to run correctly?
>> thanks for your help,
>>                 Jordi
>> ________________________________
>> Jordi Blasi Uribarri
>> Área I+D+i
>> Oficina Bilbao
>> []

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message