Ehcache( Unable to load Class) - ehcache

Hi All i am facing the issue in which i m not able to load my ehcache.xml file & its giving me error as below
Exception in thread "main" net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was org.terracotta.toolkit.ToolkitInstantiationException: java.lang.RuntimeException: Unable to create toolkit.
at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:90)
at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:157)
at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:180)
at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:129)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:463)
at net.sf.ehcache.CacheManager.init(CacheManager.java:395)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:947)
at BigMemoryDemo.main(BigMemoryDemo.java:8)
Caused by: java.lang.RuntimeException: org.terracotta.toolkit.ToolkitInstantiationException: java.lang.RuntimeException: Unable to create toolkit.
at org.terracotta.modules.ehcache.TerracottaToolkitBuilder.createToolkit(TerracottaToolkitBuilder.java:63)
at org.terracotta.modules.ehcache.TerracottaToolkitBuilder.buildToolkit(TerracottaToolkitBuilder.java:56)
at org.terracotta.modules.ehcache.ToolkitInstanceFactoryImpl.createTerracottaToolkit(ToolkitInstanceFactoryImpl.java:183)
at org.terracotta.modules.ehcache.ToolkitInstanceFactoryImpl.<init>(ToolkitInstanceFactoryImpl.java:119)
at org.terracotta.modules.ehcache.ToolkitInstanceFactoryImpl.<init>(ToolkitInstanceFactoryImpl.java:129)
at org.terracotta.modules.ehcache.EnterpriseToolkitInstanceFactory.<init>(EnterpriseToolkitInstanceFactory.java:23)
at org.terracotta.modules.ehcache.store.EnterpriseTerracottaClusteredInstanceFactory.createToolkitInstanceFactory(EnterpriseTerracottaClusteredInstanceFactory.java:21)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.<init>(TerracottaClusteredInstanceFactory.java:65)
at org.terracotta.modules.ehcache.store.EnterpriseTerracottaClusteredInstanceFactory.<init>(EnterpriseTerracottaClusteredInstanceFactory.java:15)
at net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory.<init>(ExpressEnterpriseTerracottaClusteredInstanceFactory.java:11)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:73)
... 9 more
Caused by: org.terracotta.toolkit.ToolkitInstantiationException: java.lang.RuntimeException: Unable to create toolkit.
at com.terracotta.toolkit.api.TerracottaToolkitFactoryService.createToolkit(TerracottaToolkitFactoryService.java:49)
at org.terracotta.toolkit.ToolkitFactory.create(ToolkitFactory.java:100)
at org.terracotta.toolkit.ToolkitFactory.createToolkit(ToolkitFactory.java:84)
at org.terracotta.modules.ehcache.TerracottaToolkitBuilder.createToolkit(TerracottaToolkitBuilder.java:61)
... 23 more
Caused by: java.lang.RuntimeException: Unable to create toolkit.
at com.terracotta.toolkit.client.TerracottaToolkitCreator.createToolkit(TerracottaToolkitCreator.java:70)
at com.terracotta.toolkit.api.EnterpriseTerracottaToolkitFactoryService.createToolkit(EnterpriseTerracottaToolkitFactoryService.java:17)
at com.terracotta.toolkit.api.TerracottaToolkitFactoryService.createToolkit(TerracottaToolkitFactoryService.java:44)
... 26 more
Caused by: java.lang.RuntimeException: org.terracotta.toolkit.ToolkitRuntimeException: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches.
at com.terracotta.toolkit.client.TerracottaToolkitCreator.initializeDefaultCacheManagerProvider(TerracottaToolkitCreator.java:175)
at com.terracotta.toolkit.client.TerracottaToolkitCreator.createToolkit(TerracottaToolkitCreator.java:55)
... 28 more
Caused by: org.terracotta.toolkit.ToolkitRuntimeException: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches.
at com.terracotta.toolkit.express.TerracottaInternalClientImpl.instantiate(TerracottaInternalClientImpl.java:159)
at com.terracotta.toolkit.client.TerracottaToolkitCreator.initializeDefaultCacheManagerProvider(TerracottaToolkitCreator.java:173)
... 29 more
Caused by: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches.
at net.sf.ehcache.store.restartability.EhcacheRestartability.constructRestartability(EhcacheRestartability.java:189)
at net.sf.ehcache.store.restartability.EhcacheRestartability.startup(EhcacheRestartability.java:94)
at net.sf.ehcache.EnterpriseFeaturesManager.startup(EnterpriseFeaturesManager.java:102)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:520)
at net.sf.ehcache.CacheManager.init(CacheManager.java:395)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1092)
at com.terracotta.toolkit.ToolkitCacheManagerProvider.createDefaultToolkitCacheManager(ToolkitCacheManagerProvider.java:19)
at com.terracotta.toolkit.ToolkitCacheManagerProvider.<init>(ToolkitCacheManagerProvider.java:14)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.terracotta.toolkit.express.TerracottaInternalClientImpl.instantiate(TerracottaInternalClientImpl.java:156)
... 30 more
Note:- It was working fine earlier. I just made one more passive node at TSA. TSA is up & running
This is ehcache.xml file
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd"
name="BigMemoryMax">
<defaultCache
maxEntriesLocalHeap="0"/>
<cache name="PersonCache" maxEntriesLocalHeap="20">
<searchable/>
</cache>
<terracottaConfig url="127.0.0.1:9510" />
</ehcache>

The exact error is at the bottom of the stack trace:
Caused by: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches.
at net.sf.ehcache.store.restartability.EhcacheRestartability.constructRestartability(EhcacheRestartability.java:189)
at net.sf.ehcache.store.restartability.EhcacheRestartability.startup(EhcacheRestartability.java:94)
at net.sf.ehcache.EnterpriseFeaturesManager.startup(EnterpriseFeaturesManager.java:102)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:520)
at net.sf.ehcache.CacheManager.init(CacheManager.java:395)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1092)
This indicates a configuration issue and given that the configuration you give in your question has no disk component, it means that your application is loading a different ehcache.xml.
Normally Ehcache indicates in its logs which configuration file is loaded. If you do not see that, turn logging level to DEBUG for net.sf.ehcache in your logging framework.

Related

StorageBackend version is incompatible with current JanusGraph version

Unable to start gremlin-server due to version mismatch. How can I fix this issue?
Here is the full stack trace
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:121)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:89)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:110)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:354)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:110)
... 3 more
Caused by: org.janusgraph.core.JanusGraphException: StorageBackend version is incompatible with current JanusGraph version: storage [0.2.1] vs. runtime [0.2.0]
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1427)
at org.janusgraph.core.JanusGraphFactory.lambda$open$0(JanusGraphFactory.java:152)
at org.janusgraph.graphdb.management.JanusGraphManager.openGraph(JanusGraphManager.java:210)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:151)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:101)
at org.janusgraph.graphdb.management.JanusGraphManager.lambda$new$0(JanusGraphManager.java:65)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.janusgraph.graphdb.management.JanusGraphManager.<init>(JanusGraphManager.java:64)
... 8 more
Exception in thread "gremlin-server-shutdown" java.lang.NullPointerException
at org.apache.tinkerpop.gremlin.server.GremlinServer.stop(GremlinServer.java:264)
at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$new$0(GremlinServer.java:91)
at java.lang.Thread.run(Thread.java:748)
I am working with janusgraph-0.2.0-hadoop2.zip downloaded from janusgraph website. I don't know why the error says it has janusgraph 0.2.1
Downloading janusgraph-0.2.1-hadoop2.zip and starting cassandra and gremlin-server running
./janusgraph-0.2.1-hadoop2/bin/cassandra
./janusgraph-0.2.1-hadoop2/bin/gremlin-server.sh
resolved the issue
Note : I also modified the /janusgraph-0.2.1-hadoop2/conf/gremlin-server/gremlin-server.yaml and gremlin-server-configuration.yaml files to use conf/janusgraph-cassandra.properties for ConfigurationManagementGraph property.
You need to add the following property in your configuration file. This property will allow upgrade and DB get compatible with the newer version.
graph.allow-upgrade=true
Name
Description
Datatype
Default Value
graph.allow-upgrade
Setting this to true will allow certain fixed values to be updated such as storage-version. This should only be used for upgrading.
Boolean
false

HORTONWORKS - Hbase/Phoenix - WALEditCodec - missing

I am receiving the following error while trying to run Phoenix on top of Hbase:
EXCEPTION #1:
2017-11-07 12:40:12,620 WARN [RS_LOG_REPLAY_OPS-XXX:16020-0]
regionserver.SplitLogWorker: log splitting of
WALs/XXX.XXX.XXX.XXX,16020,1507179047656-
splitting/XXX.XXX.XXX.XXX%2C16020%2C1507179047656.default.1507179049782 failed, returning error
java.io.IOException: Cannot get log reader
at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:355)
at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:267)
at org.apache.hadoop.hbase.wal.WALSplitter.getReader(WALSplitter.java:839)
at org.apache.hadoop.hbase.wal.WALSplitter.getReader(WALSplitter.java:763)
at org.apache.hadoop.hbase.wal.WALSplitter.splitLogFile(WALSplitter.java:297)
at org.apache.hadoop.hbase.wal.WALSplitter.splitLogFile(WALSplitter.java:235)
at org.apache.hadoop.hbase.regionserver.SplitLogWorker$1.exec(SplitLogWorker.java:104)
at org.apache.hadoop.hbase.regionserver.handler.WALSplitterHandler.process(WALSplitterHandler.java:72)
at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:129)
:$
at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:355)
at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:267)
at org.apache.hadoop.hbase.wal.WALSplitter.getReader(WALSplitter.java:839)
at org.apache.hadoop.hbase.wal.WALSplitter.getReader(WALSplitter.java:763)
at org.apache.hadoop.hbase.wal.WALSplitter.splitLogFile(WALSplitter.java:297)
at org.apache.hadoop.hbase.wal.WALSplitter.splitLogFile(WALSplitter.java:235)
at org.apache.hadoop.hbase.regionserver.SplitLogWorker$1.exec(SplitLogWorker.java:104)
at org.apache.hadoop.hbase.regionserver.handler.WALSplitterHandler.process(WALSplitterHandler.java:72)
at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:129)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.UnsupportedOperationException: Unable to find org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
at org.apache.hadoop.hbase.util.ReflectionUtils.instantiateWithCustomCtor(ReflectionUtils.java:36)
at org.apache.hadoop.hbase.regionserver.wal.WALCellCodec.create(WALCellCodec.java:103)
at org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader.getCodec(ProtobufLogReader.java:297)
at org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader.initAfterCompression(ProtobufLogReader.java:307)
at org.apache.hadoop.hbase.regionserver.wal.ReaderBase.init(ReaderBase.java:82)
at org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader.init(ProtobufLogReader.java:164)
at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:303)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.hadoop.hbase.util.ReflectionUtils.instantiateWithCustomCtor(ReflectionUtils.java:32)
... 17 more
APPLIED PATCHES #1:
I have applied the following settings through the Ambari web UI for the advanced Hbase configs as specified by the Hortonworks document:
https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_command-line-upgrade/content/configure-phoenix-25.html
EXCEPTION #2
FATAL [RS_LOG_REPLAY_OPS-XXX:16020-1] conf.Configuration: error parsing conf core-site.xml
java.io.FileNotFoundException: /etc/hadoop/2.6.1.0-129/0/core-site.xml (Too many open files)
APPLIED PATCHES #2
I checked each 'core-site.xml' file on each server that contained a Hbase region server and made sure it ended with a </configuration>. As well as the core-site.xml files in the specified directory '/etc/hadoop/2.6.1.0-129/0/core-site.xml'
Haven't been able to find any other information regarding this issue.
I went into the HDFS and deleted all WAL split logs using the following command:
hdfs dfs -rm -r /apps/hbase/data/WALs/*splitting*
This resolved exception #1. Keep in mind from what I've read this will incur data loss.
For exception #2 I went back and checked the open file limits for each server (ulimit -n) and updated where applicable with respect to the Hortonworks doc:
https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_security/content/kerb-config-limits.html

Apache Drill 1.6.0 failure in starting embedded Drillbit (windows)

I am unable to start Embedded drillbit on windows machine and getting the following error. I have checked for the jars in 3rd party folder where Jackson-databind-2.7.1.jar is present, still it's saying class not found exception. Can you help me here?
Error: Failure in starting embedded Drillbit: UNSUPPORTED_OPERATION ERROR: Failure while attempting to load instance of the class of type org.apache.drill.exec.store.StoragePluginRegistry requested at path drill.exec.storage.registry.
[Error Id: 4e654256-f63d-434f-8f41-981892a776b5 ] (state=,code=0)
java.sql.SQLException: Failure in starting embedded Drillbit: UNSUPPORTED_OPERATION ERROR: Failure while attempting to load instance of the class of type org.apache.drill.exec.store.StoragePluginRegistry requested at path drill.exec.storage.registry.
[Error Id: 4e654256-f63d-434f-8f41-981892a776b5 ]
at org.apache.drill.jdbc.impl.DrillConnectionImpl.(DrillConnectionImpl.java:120)
at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:64)
at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
at net.hydromatic.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:126)
at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
at sqlline.Commands.connect(Commands.java:1083)
at sqlline.Commands.connect(Commands.java:1015)
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 sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
at sqlline.SqlLine.dispatch(SqlLine.java:742)
at sqlline.SqlLine.initArgs(SqlLine.java:528)
at sqlline.SqlLine.begin(SqlLine.java:596)
at sqlline.SqlLine.start(SqlLine.java:375)
at sqlline.SqlLine.main(SqlLine.java:268)
Caused by: org.apache.drill.common.exceptions.UserException: UNSUPPORTED_OPERATION ERROR: Failure while attempting to load instance of the class of type org.apache.drill.exec.store.StoragePluginRegistry requested at path drill.exec.storage.registry.
[Error Id: 4e654256-f63d-434f-8f41-981892a776b5 ]
at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:543)
at org.apache.drill.common.config.DrillConfig.getInstance(DrillConfig.java:88)
at org.apache.drill.exec.server.DrillbitContext.(DrillbitContext.java:85)
at org.apache.drill.exec.work.WorkManager.start(WorkManager.java:105)
at org.apache.drill.exec.server.Drillbit.run(Drillbit.java:110)
at org.apache.drill.jdbc.impl.DrillConnectionImpl.(DrillConnectionImpl.java:118)
... 18 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.drill.common.config.DrillConfig.getInstance(DrillConfig.java:86)
... 22 more
Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ObjectMapper.readerFor(Ljava/lang/Class;)Lcom/fasterxml/jackson/databind/ObjectReader;
at org.apache.drill.exec.serialization.JacksonSerializer.(JacksonSerializer.java:32)
at org.apache.drill.exec.store.sys.PersistentStoreConfig.newJacksonBuilder(PersistentStoreConfig.java:81)
at org.apache.drill.exec.store.StoragePluginRegistryImpl.(StoragePluginRegistryImpl.java:90)
... 27 more
apache drill 1.6.0
"this isn't your grandfather's sql"
The issue is related with the HADOOP_HOME environment variable
If it is set, Embedded Drill does not start properly
My HADOOP_HOME was set because I use sometimes Spark or Hadoop MapReduce on my machine.
So, with
set HADOOP_HOME=
and then
sqlline.bat -u "jdbc:drill:zk=local"
The initialization is completed and the Drillbit starts

Class not found in a MapReduce job

I have a mapreduce job which takes an avro file as input. I export it along with all the required libraries (jar library files) into a jar file. I have 2 different clusters, one is HDInsight simulator and the other one in HDP sandbox. It works fine on the HDP sandbox but it gives me an error on the HDInsight simulator and cannot find AvroInputFormat class. I tried running the job with the -libjar option but it didn't help. Here is the error message:
Error: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.avro.mapred.AvroInputFormat not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1927)
at org.apache.hadoop.mapred.JobConf.getInputFormat(JobConf.java:686)
at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.<init>(MapTask.java:168)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:409)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1594)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.avro.mapred.AvroInputFormat not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1895)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1919)
... 9 more
Caused by: java.lang.ClassNotFoundException: Class org.apache.avro.mapred.AvroInputFormat not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1801)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1893)
... 10 more
This looks weired because it runs fine on one cluster! Does anyone know what can be the problem?

Could not start jstatd on ubuntu server

I want to setup two servers with jstatd running so I can monitoring my applications on the fly. The web server have been up and running, but another server always get some exceptions like this.
Could not bind /JStatRemoteHost to RMI Registry
java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is: java.rmi.UnmarshalException: error
unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException:
sun.jvmstat.monitor.remote.RemoteHost (no security manager: RMI class
loader disabled) at
sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:419)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
at sun.rmi.transport.Transport$1.run(Transport.java:177) at
sun.rmi.transport.Transport$1.run(Transport.java:174) at
java.security.AccessController.doPrivileged(Native Method) at
sun.rmi.transport.Transport.serviceCall(Transport.java:173) at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722) at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377) at
sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source) at
java.rmi.Naming.rebind(Naming.java:177) at
sun.tools.jstatd.Jstatd.bind(Jstatd.java:57) at
sun.tools.jstatd.Jstatd.main(Jstatd.java:143) Caused by:
java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is: java.lang.ClassNotFoundException:
sun.jvmstat.monitor.remote.RemoteHost (no security manager: RMI class
loader disabled) at
sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source) at
sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:409)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
at sun.rmi.transport.Transport$1.run(Transport.java:177) at
sun.rmi.transport.Transport$1.run(Transport.java:174) at
java.security.AccessController.doPrivileged(Native Method) at
sun.rmi.transport.Transport.serviceCall(Transport.java:173) at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722) Caused by:
java.lang.ClassNotFoundException:
sun.jvmstat.monitor.remote.RemoteHost (no security manager: RMI class
loader disabled) at
sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:554)
at
java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:646)
at
java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:311)
at
sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:263)
at
java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1556)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1512)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
... 13 more
I am sure jstatd loaded the policy file which content is
grant codebase "file:${java.home}/../lib/tools.jar" { permission
java.security.AllPermission; };
I cannot figure whats the problem come from, please help.
I had the same problem as you.
As far as I understood the exception occurred on the rmi registry side because it couldn't find the class sun.jvmstat.monitor.remote.RemoteHost located inside tools.jar.
In my case the solution was to specify the java.rmi.server.codebase property when starting rmiregistry. After specifying the codebase property the problem gone.
Please try to start the rmiregistry using the following command for Linux/Solaris:
rmiregistry
-J-Djava.rmi.server.codebase=file:${java.home}/../lib/tools.jar &
or for Windows (though I didn't test it fully)
start rmiregistry
-J-Djava.rmi.server.codebase="%JAVA_HOME%/../lib/tools.jar"
Hope it will help you.

Resources