Open bmeynell opened 7 years ago
I think I was able to resolve this by modifying pom.xml
as so:
$ git diff
diff --git a/pom.xml b/pom.xml
index 0208f90..a13bf69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,6 +21,14 @@
</testResources>
<plugins>
<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.2</version>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.10</version>
Then ran mvn compile
:
$ mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building big-data-book 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ big-data-book ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/bmeynell/big-data-code/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ big-data-book ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 27 source files to /home/bmeynell/big-data-code/target/classes
[INFO] /home/bmeynell/big-data-code/src/java/manning/batchlayer/BatchWorkflow.java: /home/bmeynell/big-data-code/src/java/manning/batchlayer/BatchWorkflow.java uses or overrides a deprecated API.
[INFO] /home/bmeynell/big-data-code/src/java/manning/batchlayer/BatchWorkflow.java: Recompile with -Xlint:deprecation for details.
[INFO] /home/bmeynell/big-data-code/src/java/manning/speedlayer/UniquesOverTime.java: Some input files use unchecked or unsafe operations.
[INFO] /home/bmeynell/big-data-code/src/java/manning/speedlayer/UniquesOverTime.java: Recompile with -Xlint:unchecked for details.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.970s
[INFO] Finished at: Mon Oct 03 23:49:40 UTC 2016
[INFO] Final Memory: 23M/205M
[INFO] ------------------------------------------------------------------------
And the compiled Java classes are there!
$ tree /home/bmeynell/big-data-code/target/classes
/home/bmeynell/big-data-code/target/classes
└── manning
├── batchlayer
│ ├── BatchWorkflow$1.class
│ ├── BatchWorkflow$AnalyzeVisits.class
│ ├── BatchWorkflow$BidirectionalEdge.class
│ ├── BatchWorkflow.class
│ ├── BatchWorkflow$ConstructHyperLogLog.class
│ ├── BatchWorkflow$Debug.class
│ ├── BatchWorkflow$EdgifyEquiv.class
│ ├── BatchWorkflow$EmitGranularities.class
│ ├── BatchWorkflow$ExtractDomain.class
│ ├── BatchWorkflow$ExtractPageViewFields.class
│ ├── BatchWorkflow$IterateEdges.class
│ ├── BatchWorkflow$MakeNormalizedPageview.class
│ ├── BatchWorkflow$MergeHyperLogLog.class
│ ├── BatchWorkflow$NormalizeURL.class
│ ├── BatchWorkflow$ToHourBucket.class
│ ├── BatchWorkflow$ToSerializedLong.class
│ ├── BatchWorkflow$ToSerializedLongPair.class
│ ├── BatchWorkflow$ToSerializedString.class
│ ├── BatchWorkflow$ToUrlBucketedKey.class
│ └── BatchWorkflow$UrlOnlyScheme.class
├── schema
│ ├── Data$1.class
│ ├── Data.class
│ ├── Data$DataStandardScheme.class
│ ├── Data$DataStandardSchemeFactory.class
│ ├── Data$DataTupleScheme.class
│ ├── Data$DataTupleSchemeFactory.class
│ ├── Data$_Fields.class
│ ├── DataUnit$1.class
│ ├── DataUnit.class
│ ├── DataUnit$_Fields.class
│ ├── EquivEdge$1.class
│ ├── EquivEdge.class
│ ├── EquivEdge$EquivEdgeStandardScheme.class
│ ├── EquivEdge$EquivEdgeStandardSchemeFactory.class
│ ├── EquivEdge$EquivEdgeTupleScheme.class
│ ├── EquivEdge$EquivEdgeTupleSchemeFactory.class
│ ├── EquivEdge$_Fields.class
│ ├── ExternalDataSystem$1.class
│ ├── ExternalDataSystem.class
│ ├── ExternalDataSystem$ExternalDataSystemStandardScheme.class
│ ├── ExternalDataSystem$ExternalDataSystemStandardSchemeFactory.class
│ ├── ExternalDataSystem$ExternalDataSystemTupleScheme.class
│ ├── ExternalDataSystem$ExternalDataSystemTupleSchemeFactory.class
│ ├── ExternalDataSystem$_Fields.class
│ ├── GenderType.class
│ ├── Location$1.class
│ ├── Location.class
│ ├── Location$_Fields.class
│ ├── Location$LocationStandardScheme.class
│ ├── Location$LocationStandardSchemeFactory.class
│ ├── Location$LocationTupleScheme.class
│ ├── Location$LocationTupleSchemeFactory.class
│ ├── OrigSystem$1.class
│ ├── OrigSystem.class
│ ├── OrigSystem$_Fields.class
│ ├── PageID$1.class
│ ├── PageID.class
│ ├── PageID$_Fields.class
│ ├── PageProperty$1.class
│ ├── PageProperty.class
│ ├── PageProperty$_Fields.class
│ ├── PageProperty$PagePropertyStandardScheme.class
│ ├── PageProperty$PagePropertyStandardSchemeFactory.class
│ ├── PageProperty$PagePropertyTupleScheme.class
│ ├── PageProperty$PagePropertyTupleSchemeFactory.class
│ ├── PagePropertyValue$1.class
│ ├── PagePropertyValue.class
│ ├── PagePropertyValue$_Fields.class
│ ├── PageViewEdge$1.class
│ ├── PageViewEdge.class
│ ├── PageViewEdge$_Fields.class
│ ├── PageViewEdge$PageViewEdgeStandardScheme.class
│ ├── PageViewEdge$PageViewEdgeStandardSchemeFactory.class
│ ├── PageViewEdge$PageViewEdgeTupleScheme.class
│ ├── PageViewEdge$PageViewEdgeTupleSchemeFactory.class
│ ├── PageViewSystem$1.class
│ ├── PageViewSystem.class
│ ├── PageViewSystem$_Fields.class
│ ├── PageViewSystem$PageViewSystemStandardScheme.class
│ ├── PageViewSystem$PageViewSystemStandardSchemeFactory.class
│ ├── PageViewSystem$PageViewSystemTupleScheme.class
│ ├── PageViewSystem$PageViewSystemTupleSchemeFactory.class
│ ├── Pedigree$1.class
│ ├── Pedigree.class
│ ├── Pedigree$_Fields.class
│ ├── Pedigree$PedigreeStandardScheme.class
│ ├── Pedigree$PedigreeStandardSchemeFactory.class
│ ├── Pedigree$PedigreeTupleScheme.class
│ ├── Pedigree$PedigreeTupleSchemeFactory.class
│ ├── PersonID$1.class
│ ├── PersonID.class
│ ├── PersonID$_Fields.class
│ ├── PersonProperty$1.class
│ ├── PersonProperty.class
│ ├── PersonProperty$_Fields.class
│ ├── PersonProperty$PersonPropertyStandardScheme.class
│ ├── PersonProperty$PersonPropertyStandardSchemeFactory.class
│ ├── PersonProperty$PersonPropertyTupleScheme.class
│ ├── PersonProperty$PersonPropertyTupleSchemeFactory.class
│ ├── PersonPropertyValue$1.class
│ ├── PersonPropertyValue.class
│ ├── PersonPropertyValue$_Fields.class
│ └── Source.class
├── speedlayer
│ ├── CassandraState$1.class
│ ├── CassandraState$CassandraSerializerFactory.class
│ ├── CassandraState.class
│ ├── CassandraState$Factory.class
│ ├── CassandraState$IntegerSerializer.class
│ ├── CassandraState$Options.class
│ ├── CassandraState$StringSerializer.class
│ ├── TridentSpeedLayer$AnalyzeVisits$1.class
│ ├── TridentSpeedLayer$AnalyzeVisits.class
│ ├── TridentSpeedLayer$BooleanToInt.class
│ ├── TridentSpeedLayer.class
│ ├── TridentSpeedLayer$CombinedCombinerAggregator.class
│ ├── TridentSpeedLayer$ExtractDomain.class
│ ├── TridentSpeedLayer$NormalizeURL.class
│ ├── TridentSpeedLayer$ToHourBucket.class
│ ├── TridentSpeedLayer$Visit.class
│ ├── TridentSpeedLayer$VisitInfo.class
│ ├── UniquesOverTime.class
│ ├── UniquesOverTime$ExtractFilterBolt.class
│ ├── UniquesOverTime$PageviewScheme.class
│ └── UniquesOverTime$UpdateCassandraBolt.class
├── tap
│ ├── DataPailStructure.class
│ ├── DataPailTap.class
│ ├── DataPailTap$DataPailTapOptions.class
│ ├── SplitDataPailStructure.class
│ ├── SplitDataPailStructure$EdgeStructure.class
│ ├── SplitDataPailStructure$FieldStructure.class
│ ├── SplitDataPailStructure$PropertyStructure.class
│ ├── SplitDataPailTap.class
│ ├── SplitDataPailTap$SplitDataPailTapOptions.class
│ └── ThriftPailStructure.class
└── test
└── Data.class
6 directories, 135 files
Similar success running mvn package
, which creates a /home/bmeynell/big-data-code/target/big-data-book-1.0.0-SNAPSHOT.jar
. However when attempting to run the jar file, it fails:
$ java -jar /home/bmeynell/big-data-code/target/big-data-book-1.0.0-SNAPSHOT.jar
no main manifest attribute, in /home/bmeynell/big-data-code/target/big-data-book-1.0.0-SNAPSHOT.jar
Have to run now. If anyone can lend a hand that'd be great, otherwise I'll keep investigating as I can squeeze in time.
On this same boat here - the difference is that I added maven-jar-plugin
to pom.xml
in order to try to circumvent the manifest error - since I am not sure what is the main Class name for the manifest, I tried manning.batchlayer.BatchWorkflow
(big shot in the dark here):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
...
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>manning.batchlayer.BatchWorkflow</mainClass>
</manifest>
</archive>
</configuration>
...
</plugin>
which gave me the following error after compiling and generating the package:
$ java -jar ~/big-data-code/target/big-data-book-1.0.0-SNAPSHOT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: backtype/hadoop/pail/PailStructure
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
at java.lang.Class.getMethod0(Class.java:2866)
at java.lang.Class.getMethod(Class.java:1676)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: backtype.hadoop.pail.PailStructure
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)
... 6 more
Not sure what else to try here - but will keep digging.
If someone can shed a light on this matter, it will be greatly appreciated.
Java noob here. Trying to compile and use Pail examples from Big Data book on Ubuntu 14.04. Below is the full output. Any and all help greatly appreciated! I'll continue to try and figure out. @handdola @nagarajanchinnasamy - kindly lend a hand? Cheers.