Druid Tutorial - No Such File Or Directory

1,030 views
Skip to first unread message

Chadin Anuwattanaporn

unread,
Feb 2, 2014, 11:32:30 PM2/2/14
to druid-de...@googlegroups.com
Hi all!

I'm trying to follow the tutorial here (http://druid.io/docs/0.6.52/Tutorial:-A-First-Look-at-Druid.html) and I downloaded and extracted the files just fine. When I ran "run_example_server.sh" and tried to run the Wikipedia example, however, I got the following: 

This will run a stand-alone version of Druid
Please specify an example type.
Examples availables:
rabbitmq rand twitter webstream wikipedia
> wikipedia

ls: cannot access /home/ubuntu/druid-services-0.6.52/../target/druid-examples-*-selfcontained.jar: No such file or directory
ls: cannot access /home/ubuntu/druid-services-0.6.52/../../services/target/druid-services-*-selfcontained.jar: No such file or directory
Running command:
+ java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Ddruid.realtime.specFile=/home/ubuntu/druid-services-0.6.52/examples/wikipedia/wikipedia_realtime.spec -classpath '/home/ubuntu/druid-services-0.6.52/examples/wikipedia:::/home/ubuntu/druid-services-0.6.52/../config/realtime:/home/ubuntu/druid-services-0.6.52/lib/*:/home/ubuntu/druid-services-0.6.52/config/realtime' io.druid.cli.Main example realtime
Exception in thread "main" java.lang.UnsupportedClassVersionError: io/druid/cli/Main : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
        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:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: io.druid.cli.Main. Program will exit.

I did a search for the two files highlighted, but I couldn't find it.

Did I miss anything?

Thanks!

Carlos

unread,
Feb 3, 2014, 1:21:31 PM2/3/14
to druid-de...@googlegroups.com
+1. Similar issue here.


carlos@ubuntu:~/Desktop/druid-services-0.6.52$ sudo ./run_example_server.sh 
This will run a stand-alone version of Druid
Please specify an example type.
Examples availables:
rabbitmq rand twitter webstream wikipedia
> wikipedia
 
ls: cannot access /home/carlos/Desktop/druid-services-0.6.52/../target/druid-examples-*-selfcontained.jar: No such file or directory
ls: cannot access /home/carlos/Desktop/druid-services-0.6.52/../../services/target/druid-services-*-selfcontained.jar: No such file or directory
Running command:
+ java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Ddruid.realtime.specFile=/home/carlos/Desktop/druid-services-0.6.52/examples/wikipedia/wikipedia_realtime.spec -classpath '/home/carlos/Desktop/druid-services-0.6.52/examples/wikipedia:::/home/carlos/Desktop/druid-services-0.6.52/../config/realtime:/home/carlos/Desktop/druid-services-0.6.52/lib/*:/home/carlos/Desktop/druid-services-0.6.52/config/realtime' io.druid.cli.Main example realtime
2014-02-03 18:04:01,762 INFO [main] io.druid.server.initialization.PropertiesModule - Loading properties from runtime.properties
2014-02-03 18:04:01,802 INFO [main] org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 5.0.1.Final
2014-02-03 18:04:02,406 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.server.initialization.ExtensionsConfig] from props[druid.extensions.] as [ExtensionsConfig{searchCurrentClassloader=true, coordinates=[io.druid.extensions:druid-examples:0.6.52, io.druid.extensions:druid-kafka-seven:0.6.52, io.druid.extensions:druid-rabbitmq:0.6.52], localRepository='/root/.m2/repository', remoteRepositories=[http://repo1.maven.org/maven2/, https://metamx.artifactoryonline.com/metamx/pub-libs-releases-local]}]
2014-02-03 18:04:02,567 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:druid-examples:0.6.52] for class[io.druid.cli.CliCommandCreator]

Fangjin Yang

unread,
Feb 3, 2014, 1:59:41 PM2/3/14
to druid-de...@googlegroups.com
Hi Chadin,

That message is actually quite misleading. There are a set of files that are added to the classpath before Druid is run. We used to build a self contained jar with Druid that no longer exists. The script should really be updated.

The actual problem is this message:
Unsupported major.minor version 51.0

What this message means is that a higher JDK version was used at compile time than at run time. Druid 0.6.x requires Java 7. You will need to update your JDK to 1.7


Carlos:

Your run actually seems correct. The first time you run Druid examples, it needs a few minutes to download some dependency packages. 

If you notice this message:
2014-02-03 18:04:02,567 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:druid-examples:0.6.52] for class[io.druid.cli.CliCommandCreator]

It means Druid is downloading extension packages. These should complete in a few minutes and the example should run.

Hope that helps guys.

Thanks,
FJ

Carlos

unread,
Feb 4, 2014, 6:33:58 AM2/4/14
to druid-de...@googlegroups.com
Perfect! Thanks FJ

Chadin Anuwattanaporn

unread,
Feb 4, 2014, 7:25:21 AM2/4/14
to druid-de...@googlegroups.com
Hi FJ, 

Worked awesome! Thank you!

Manh Tran

unread,
Apr 2, 2014, 11:36:37 PM4/2/14
to druid-de...@googlegroups.com
Hi FJ,

I also have problem with version druid 0.6.77. I run with stand-alone mode with JDK is 1.7.0_07. After I run script and choise example is wikipedia then throw exception as below:

[root@offica1 druid-services-0.6.77]# ./run_example_server.sh
This will run a stand-alone version of Druid
Please specify an example type.
Examples availables:
rabbitmq rand twitter webstream wikipedia
> wikipedia

Running command:
+ java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Ddruid.realtime.specFile=/opt/druid-services-0.6.77/examples/wikipedia/wikipedia_realtime.spec -classpath '/opt/druid-services-0.6.77/examples/wikipedia:/opt/druid-services-0.6.77/../config/realtime:/opt/druid-services-0.6.77/lib/*:/opt/druid-services-0.6.77/config/realtime' io.druid.cli.Main example realtime
Exception in thread "main" java.lang.UnsupportedClassVersionError: io/druid/cli/Main : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: io.druid.cli.Main.  Program will exit.
[root@offica1 druid-services-0.6.77]#

Could you please give me an advice on this case?

Many thanks,
MT

Frank Ren

unread,
Apr 2, 2014, 11:40:40 PM4/2/14
to druid-de...@googlegroups.com
http://druid.io/docs/0.6.77/ now gives this:

Whoops! We couldn't find that page…


--
Frank

Fangjin Yang

unread,
Apr 3, 2014, 12:00:24 AM4/3/14
to druid-de...@googlegroups.com
MT: What this message means is that a higher JDK version was used at compile time than at run time. Druid 0.6.x requires Java 7. You will need to update your JDK to 1.7

Frank: Should be fixed now. Thanks.


--
You received this message because you are subscribed to the Google Groups "Druid Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-developm...@googlegroups.com.
To post to this group, send email to druid-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-development/46672d90-cae4-4182-82a4-0a4598e2ef03%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Manh Tran

unread,
Apr 3, 2014, 3:34:27 AM4/3/14
to druid-de...@googlegroups.com
Many thanks FJ
Reply all
Reply to author
Forward
0 new messages