yuicompressor for css throws error for some files - css

i just tried using the yuicompressor for CSS. Works for most files, but for one it didnt, and gives me this error:
"C:\Program Files (x86)\JetBrains\PhpStorm 8.0.1\jre\jre/bin/java" -jar C:/nodejs/node_modules/yuicompressor/build/yuicompressor-2.4.8.jar style.css -o style.min.css
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)
Caused by: java.lang.StackOverflowError
at java.util.regex.Pattern$Loop.match(Pattern.java:4663)
After these lines there are thousand errors.
I looked at another post here but it didnt fix it really. It said something about increasing the stack size(?), if thats the solution, how would i do that? google wouldnt give me any useful answere either.
thanks in advance.

To increase the stack size, you need passing -Xss option to java. Default is 512k, try increasing it, for example to -Xss2048k.
To do this, you either need to modify node_modules\yuicompressor\nodejs\cli.js accordingly, by adding args.unshift('-Xss2048k');:
var spawn = require('child_process').spawn,
fs = require('fs'),
compressor = require('./index'),
args = process.argv.slice(2);
args.unshift(compressor.jar);
args.unshift('-jar');
args.unshift('-Xss2048k');
...
and then specify a path to yuicompressor binary in a Program field of your file watcher (like C:\Users\My.Name\AppData\Roaming\npm\yuicompressor.cmd).
Or, set up your file watcher in a different way, using java as a Program:
Program: C:\Program Files (x86)\JetBrains\PhpStorm 8.0.1\jre\jre\bin\java.exe
Arguments: -Xss2048k -jar "C:\Users\My.Name\AppData\Roaming\npm\node_modules\yuicompressor\build\yuicompressor-2.4.8.jar " $FileName$ -o $FileNameWithoutExtension$.min.css

Related

log4j Error in building Corda sample project

When I build the sample corda project with gradle on windows (gradlew.bat deployNodes)
I see the error about DELETE command in log4j:
2019-10-28 16:30:47,207 main ERROR Delete contains invalid attributes "IfFileName", "IfLastModified"
2019-10-28 16:30:47,213 main ERROR Missing Delete conditions: unconditional Delete not supported
2019-10-28 16:30:47,217 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.rolling.action.DeleteAction for element Delete: java.lang.IllegalArgume
ntException: Unconditional Delete not supported java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:620)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:637)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at net.corda.core.utilities.KotlinUtilsKt.contextLogger(KotlinUtils.kt:42)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:108)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:107)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.corda.cliutils.CliWrapperBase$Companion.getLogger(CordaCliWrapper.kt:65535)
at net.corda.cliutils.CliWrapperBase$Companion.access$getLogger$p(CordaCliWrapper.kt:107)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:142)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:106)
at picocli.CommandLine.execute(CommandLine.java:1173)
at picocli.CommandLine.access$800(CommandLine.java:141)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:73)
at net.corda.node.Corda.main(Corda.kt:13)
Caused by: java.lang.IllegalArgumentException: Unconditional Delete not supported
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.(DeleteAction.java:71)
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.createDeleteAction(DeleteAction.java:212)
... 43 more
2019-10-28 16:30:47,606 main ERROR Null object returned for Delete in DefaultRolloverStrategy.
2019-10-28 16:30:47,736 main ERROR Delete contains invalid attributes "IfFileName", "IfLastModified"
2019-10-28 16:30:47,737 main ERROR Missing Delete conditions: unconditional Delete not supported
2019-10-28 16:30:47,739 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.rolling.action.DeleteAction for element Delete: java.lang.IllegalArgume
ntException: Unconditional Delete not supported java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:620)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:637)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at net.corda.core.utilities.KotlinUtilsKt.contextLogger(KotlinUtils.kt:42)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:108)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:107)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.corda.cliutils.CliWrapperBase$Companion.getLogger(CordaCliWrapper.kt:65535)
at net.corda.cliutils.CliWrapperBase$Companion.access$getLogger$p(CordaCliWrapper.kt:107)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:142)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:106)
at picocli.CommandLine.execute(CommandLine.java:1173)
at picocli.CommandLine.access$800(CommandLine.java:141)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:73)
at net.corda.node.Corda.main(Corda.kt:13)
Caused by: java.lang.IllegalArgumentException: Unconditional Delete not supported
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.(DeleteAction.java:71)
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.createDeleteAction(DeleteAction.java:212)
... 43 more
I got latest verison of corda samples. (from master branch). I encounter the same problem with other branches.
My jdk version is 1.8.0_212.
I used cordapp-examples project
How can I solve this problem?
It looks to me like you are pulling in JAR files from somewhere other than those specified by the Corda build.
The default branch for the samples is release-V4 and that is the one I'm using. I run the following and it works fine:
git clone https://github.com/corda/samples
cd cordapp-example
gradlew deployNodes
I'd check that your classpath variable isn't set (as this will cause additional JAR files in those directories to be included when running Corda) by running :
echo %CLASSPATH%
Additionally, from the command-line I'd run:
java -version
where java
To make sure the version of java you think you're picking up is the one you are picking up.
I had a similar issue related to log4j:
the log4j2 error unable to invoke factory method in class class RollingFileApender
Error while generating node info file
To fix this (on windows), I took the following steps:
Right click on MyPC
Click advanced system settings
Click environment variables
Change JAVA_HOME to point to same jdk directory being used in IntelliJ for corDapp. (I changed mine from OpenJDK\jdk-13.0.1 to C:\Program Files\Java\jdk1.8.0_231)
Restart IntelliJ and rerun ./gradlew deployNodes
The problem was about the regional settings of my computer.
By defining an Environment variable
JAVA_TOOL_OPTIONS=-Duser.language=en -Duser.country=US -Duser.region=US -Dfile.encoding=UTF-8 -Duser.variant=US
I solved the problem.
Thanks all for your attention.

teradata export from hive to teradata class not found

I am trying to export from hive table to teradata using TDCH connector, I am getting below errror:-
15/05/07 08:01:03 INFO tool.ConnectorExportTool: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/MetaException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.teradata.connector.common.tool.ConnectorJobRunner.runJob(ConnectorJobRunner.java:81)
at com.teradata.connector.common.tool.ConnectorExportTool.run(ConnectorExportTool.java:61)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at com.teradata.hadoop.tool.TeradataExportTool.main(TeradataExportTool.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.metastore.api.MetaException
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 java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 13 more
I understand from error that hive-metastore jar is missing. But it is already there in hive/lib folder
hive-metastore.jar -> hive-metastore-0.9.0.jar
Is already present in the path: /usr/hdp/2.2.4.2-2/hive/lib
You have to define environment variables LIB_JARS and HADOOP_CLASSPATH.
You can use the environment variable LIB_JARS with the parameter -libjars
You can find an example under https://developer.teradata.com/sites/all/files/Teradata%20Connector%20for%20Hadoop%20Tutorial%20v1%200%20final.pdf.
According to the README, following jars are necessairy:
Hive Job(version 0.11.0 as example):
a) hive-metastore-0.11.0.jar
b) hive-exec-0.11.0.jar
c) hive-cli-0.11.0.jar
d) libthrift-0.9.0.jar
e) libfb303-0.9.0.jar
f) jdo2-api-2.3-ec.jar
g) slf4j-api-1.6.1.jar
h) datanucleus-core-3.0.9.jar
i) datanucleus-rdbms-3.0.8.jar
j) commons-dbcp-1.4.jar
k) commons-pool-1.5.4.jar
l) antlr-runtime-3.4.jar
m) datanucleus-api-jdo-3.0.7.jar
HCatalog Job:
a) above Hive required jar files
b) hcatalog-core-0.11.0.jar
The problem is that org/apache/hadoop/hive/metastore/api/MetaException class is not available to java runtime. can you ensure that the Jar is under valid runtime classpath.
few try outs can be try passing the classpath explicitly to jvm via -cp , alternatively you can try putting the jar in launch directory to ensure its present.
Sometimes you may have all the jar files in your "lib" folder, but for some reason Oozie may not be reading it simply because you have a typo in your job.properties or coordinator.properties. Double check your properties file.
The "job.properties" file should read like the following -
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/apps/myapp/workflow/
The "coordinator.properties" file should read like the following -
oozie.use.system.libpath=true
oozie.coord.application.path=${nameNode}/apps/myapp/workflow/
and your "lib" folder with jars should be at -
/apps/myapp/workflow/lib

Exception error while running a JavaFX2 app with CSS

I am making a text editor app in JavaFX2 on NetBeans. My problem is this: whenever I try to insert the line scene.getStylesheets().add(<classname>.class.getResource("<css file>.css").toExternalForm()); to link the css, and run it, it shows an error: "Exception while running Application"What exactly is this exception? I've tried removing this line, and then the app runs smoothly. Just five-six hours back, I had inserted this same line of code (with correct classes and css file), it was easily able to use the css. But now, I've created another 3 projects to check it, but the app shows the same error and gets removed on removing this code. I create the Css by right-clicking the Source-packages icon > new > Cascading Style Sheets. I fill in all the correct classes and location for css file, yet this happens. Also tried Shift + F11 (clean and rebuild). When I launch the older app(with css), it runs without an error. (BTW I use Win8 Pro x64, if u need it)The output panel stops at Executing com.javafx.main.Main from <location>\Qwerty.jar using platform C:\Program Files\Java\jdk1.7.0_17/bin/java and then shows error:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.javafx.main.Main.launchApp(Main.java:642)
at com.javafx.main.Main.main(Main.java:805)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at qwerty.Qwerty.start(Qwerty.java:36) (LINE 36 is where the reference to css is)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:215)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
... 1 more
Java Result: 1
The issue is explained in the nested excpetion:
Caused by: java.lang.NullPointerException
at qwerty.Qwerty.start(Qwerty.java:36) (LINE 36 is where the reference to css is)
Check if <classname>.class.getResource("<css file>.css") is null. Maybe you're specifing the wrong path or the css is not in the jar?

Copying files from S3 to maprfs on Amazon EMR

Does anyone know if there is a problem using Amazon's S3Distcp tool with MapR running on EMR? I'm trying to use it, but keep getting the following exception in /mnt/var/log/hadoop/steps:
Exception in thread "main" java.lang.RuntimeException: Unable to delete directory hdfs:/tmp/e9333a37-f400-4982-9687-326e33d9b37d/files
at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.deleteRecursive(S3DistCp.java:606)
at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.run(S3DistCp.java:464)
at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.run(S3DistCp.java:216)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at com.amazon.external.elasticmapreduce.s3distcp.Main.main(Main.java:12)
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.apache.hadoop.util.RunJar.main(RunJar.java:186)
Caused by: java.io.IOException: Incomplete HDFS URI, no host: hdfs:/tmp/e9333a37-f400-4982-9687-326e33d9b37d/files
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:85)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1416)
at org.apache.hadoop.fs.FileSystem.access$100(FileSystem.java:69)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:1450)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1432)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:232)
at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.deleteRecursive(S3DistCp.java:603)
the command line I'm using to submit the job step is:
elastic-mapreduce --jobflow $JOB_ID --jar s3://us-east-1.elasticmapreduce/libs/s3distcp/1.latest/s3distcp.jar \
--args '--src,s3n://PVData/raw, \
--dest,/PVData/raw'
For the --dest argument I have tried maprfs:///PVData/raw and hdfs:///PVData/raw as well and they don't work either.
I got an answer to this question over on the MapR forum (http://bit.ly/S7gzcv). The problem was I needed to specify the temp directory as maprfs:///tmp using the --tmpDir argument to s3distcp

running mahout RecommenderJob on EMR

I'm trying to run a RecommenderJob on amazon EMR. I have a jar called SmartJukebox.jar (not runnable) and it contains a class main.TrackRecommander (and that's it).
I created a job flow with the jar:
s3n://smartjukebox/SmartJukebox.jar
and args:
main.TrackRecommander --input s3n://smartjukebox/ratings.csv --output s3n://smartjukebox/output --usersFile s3n://smartjukebox/user.txt.
The class TrackRecommander uses the class RecommenderJob.
I run the job flow and i get this in the error log -
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/mahout/cf/taste/hadoop/item/RecommenderJob
at main.TrackRecommander.main(TrackRecommander.java:136)
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.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.ClassNotFoundException: org.apache.mahout.cf.taste.hadoop.item.RecommenderJob
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 6 more
now i see that the JVM can't find RecommenderJob and i didn't put RecommenderJob in my jar. I thought EMR would have mahout jars built in, but i can't find anything about that.
what is the solution here?
Thanks.
You're problem is exactly what you say: "I didn't put RecommenderJob in my jar." Unless you put those classes in your JAR, of course it can't be found. Why would EMR have this built in? Add the Mahout ".job" file classes to your JAR first.
You will need to create a job jar which contains all the classes required by the code to run which includes the mahout classes too.
Take a look at
https://github.com/tdunning/MiA
Check how to create a job jar using maven assembly plugin in pom.xml and the job.xml in the src/main/resources directory.
IF you exclude the hadoop classes then you can run it on any hadoop instance.

Resources