Hey Jordi,

PropertiesConfigFactory is located in this package:
org.apache.samza.config.factories

You have the package set to samza.config.factories. You'll need to set it
to:

  org.apache.samza.config.factories.PropertiesConfigFactory

Curious where you're getting that value from? We haven't had a "samza.*"
prefix to packages since we open sourced Samza. What docs are you looking
at?

Cheers,
Chris

On Tue, Mar 17, 2015 at 5:45 AM, Jordi Blasi Uribarri <jbl...@nextel.es>
wrote:

> 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/run-job.sh
> --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
> -Djava.io.tmpdir=/opt/jobs/tmp -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
> --config-path=file://$PWD/samzafroga.jar
> Exception in thread "main" java.lang.ClassNotFoundException:
> samza.config.factories.PropertiesConfigFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:191)
>         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?
>
> Thanks,
>
>                 Jordi
>
> >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:
> >
> >  https://github.com/apache/samza-hello-samza/blob/master/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:
> >
> >  http://maven.apache.org/plugins/maven-assembly-plugin/
> >
> >If you're not using Maven, Gradle and SBT can both assemble .tgz files as
> >well.
> >
> >Cheers,
> >Chris
> >
> >On Mon, Mar 16, 2015 at 4:11 AM, Jordi Blasi Uribarri <jbl...@nextel.es>
> >wrote:
> >
> >> 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 http://git-wip-us.apache.org/repos/asf/samza.git
> >> 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 run-job.sh
> >> and run-am.sh 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 run-am.sh:
> >>
> >> 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$class.info(Logging.scala:55)
> >>         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
> >>
> >> jbl...@nextel.es
> >> Oficina Bilbao
> >>
> >> [http://www.nextel.es/wp-content/uploads/Firma_Nextel_2014.png]
> >>
>

Reply via email to