Support Questions
Find answers, ask questions, and share your expertise

Error: Could not find or load main class org.apache.metron.rest.MetronRestApplication

Error: Could not find or load main class org.apache.metron.rest.MetronRestApplication

New Contributor

This days (28/09/2017), if you are trying to Install / Upgrade your HCP version towards current HCP-1.3.0.0-51 ( time of this post), during start of metron-rest service you will probably face inside your log file (/var/log/metron/metron-rest.log):

Error: Could not find or load main class org.apache.metron.rest.MetronRestApplication

Which will result in service not starting ofc :)

This is due of command that is executed to start service, by loading into classpath jar $METRON_HOME/lib/metron-rest-0.4.1.1.3.0.0.jar, which doesn't exist, but there is metron-rest-0.4.1.1.3.0.0-51.jar.

Workaround is to 1) copy jar with appropriate name, or 2)create symbolic link:

eg.

ln -s $METRON_HOME/lib/metron-rest-0.4.1.1.3.0.0-51.jar $METRON_HOME/lib/metron-rest-0.4.1.1.3.0.0.jar

Took me some time to debug it, hope this update saves you trouble.

( as far as i understood, soon there will be a hot-fix as well :-) )

2 REPLIES 2
Highlighted

Re: Error: Could not find or load main class org.apache.metron.rest.MetronRestApplication

Explorer

Hi, this was fixed in the current version of Metron. Can you confirm you are not still having this problem?

Highlighted

Re: Error: Could not find or load main class org.apache.metron.rest.MetronRestApplication

New Contributor

Since that post, i did not made any upgrades/changes i am still at version 1.3.0

But i just took a quick look to see if i can notice any changes on repos.

looking @ documentation available.

(eg https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.0/index.html )

which is still latest ( and my currently installed ).

If you look @ documentation section on how to install on ambari managed server, there is hcp mpack, that you have to download.

If you unpack it, you will find file hcp-ambari-mpack-1.3.0.0-51/addon-services/METRON/0.4.1.1.3.0.0/repos/repoinfo.xml

which creates repo for your installation.

baseurl is: http://s3.amazonaws.com/dev.hortonworks.com/HCP/centos6/1.x/BUILDS/1.3.0.0-51 for centos6

or http://s3.amazonaws.com/dev.hortonworks.com/HCP/centos6/1.x/BUILDS/1.3.0.0-51 for centos7

getting rpm, and listing files in it, comparing to what i have installed. No changes to be noticed. So i think that this problem still exists for this version.

Don't have an account?