Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Error: Could not find or load main class javacc

avatar
Contributor

Hi Team,

I am trying to install ./build.sh script. I am getting javacc not found. Javac is installed on my node.Please find the error details below. I have downloaded the opentsdb-2.3.0.tar.gz and extracted the zip file. then later compiled the ./build.sh script.

[sg865w@blpd215 64bit]$ cd bin

[sg865w@blpd215 bin]$ ls -lrt | grep java

-rwxr-xr-x 1 bin bin 128695 May 16 2016 javaws

-rwxr-xr-x 1 bin bin 1809 May 16 2016 java-rmi.cgi

-rwxr-xr-x 1 bin bin 2293 May 16 2016 javapackager

-rwxr-xr-x 1 bin bin 7941 May 16 2016 javap

-rwxr-xr-x 1 bin bin 7941 May 16 2016 javah

-rwxr-xr-x 1 bin bin 2293 May 16 2016 javafxpackager

-rwxr-xr-x 1 bin bin 7941 May 16 2016 javadoc

-rwxr-xr-x 1 bin bin 7941 May 16 2016 javac

-rwxr-xr-x 1 bin bin 7734 May 16 2016

java [sg865w@blpd215 bin]$ pwd //opt/app/java/jdk/jdk180_77/64bit/bin

Error:

  • test -f configure
  • test -d build
  • cd build
  • test -f Makefile
  • MAKE=make ++ uname -s
  • '[' Linux = FreeBSD ']'
  • exec make make all-am make[1]: Entering directory /opt/app/opentsdb/opentsdb-2.3.0/build' /usr/bin/java -cp third_party/javacc/javacc-6.1.2.jar javacc -OUTPUT_DIRECTORY:./src/net/opentsdb/query/expression/parser ../src/parser.jj; echo PWD:pwd; Error: Could not find or load main class javacc PWD: /opt/app/opentsdb/opentsdb-2.3.0/build
  • /usr/bin/javac -Xlint -source 6 -encoding utf-8 -d . -cp ../third_party/jexl/commons-logging-1.1.1.jar:../third_party/guava/guava-18.0.jar:../third_party/slf4j/log4j-over-slf4j-1.7.7.jar:../third_party/logback/logback-classic-1.0.13.jar:../third_party/logback/logback-core-1.0.13.jar:../third_party/jackson/jackson-annotations-2.4.3.jar:..
  • /third_party/jackson/jackson-core-2.4.3.jar:../third_party/jackson/jackson-databind-2.4.3.jar:..
  • /third_party/javacc/javacc-6.1.2.jar:../third_party/jexl/commons-jexl-2.1.1.jar:../third_party/jgrapht/jgrapht-core-0.9.1.jar:../third_party/netty/netty-3.9.4.Final.jar:../third_party/slf4j/slf4j-api-1.7.7.jar:../third_party/suasync/async-1.4.0.jar:../third_party/apache/commons-math3-3.4.1.jar:../third_party/hbase/asynchbase-1.7.2.jar:../third_party/protobuf/protobuf-java-2.5.0.jar:../third_party/zookeeper/zookeeper-3.4.6.jar: ../src/core/AggregationIterator.java ../src/core/Aggregator.java ../src/core/Aggregators.java ../src/core/AppendDataPoints.java ../src/core/BatchedDataPoints.java ../src/core/ByteBufferList.java ../src/core/ColumnDatapointIterator.java ../src/core/CompactionQueue.java ../src/core/Const.java ../src/core/DataPoint.java ../src/core/DataPoints.java ../src/core/DataPointsIterator.java ../src/core/Downsampler.java ../src/core/DownsamplingSpecification.java ../src/core/FillingDownsampler.java ../src/core/FillPolicy.java ../src/core/IncomingDataPoint.java ../src/core/IncomingDataPoints.java ../src/core/IllegalDataException.java ../src/core/Internal.java ../src/core/MutableDataPoint.java ../src/core/Query.java ../src/core/QueryException.java ../src/core/RateOptions.java ../src/core/RateSpan.java ../src/core/RowKey.java ../src/core/RowSeq.java ../src/core/SaltScanner.java ../src/core/SeekableView.java ../src/core/Span.java ../src/core/SpanGroup.java ../src/core/TSDB.java ../src/core/Tags.java ../src/core/TsdbQuery.java ../src/core/TSQuery.java ../src/core/TSSubQuery.java ../src/core/WritableDataPoints.java ../src/core/WriteableDataPointFilterPlugin.java ../src/graph/Plot.java ../src/meta/Annotation.java ../src/meta/MetaDataCache.java ../src/meta/TSMeta.java ../src/meta/TSUIDQuery.java ../src/meta/UIDMeta.java ../src/query/QueryUtil.java ../src/query/expression/Absolute.java ../src/query/expression/Alias.java ../src/query/expression/DiffSeries.java ../src/query/expression/DivideSeries.java ../src/query/expression/EDPtoDPS.java ../src/query/expression/Expression.java ../src/query/expression/ExpressionDataPoint.java ../src/query/expression/ExpressionFactory.java ../src/query/expression/ExpressionIterator.java ../src/query/expression/ExpressionReader.java ../src/query/expression/Expressions.java ../src/query/expression/ExpressionTree.java ../src/query/expression/HighestCurrent.java ../src/query/expression/HighestMax.java ../src/query/expression/IntersectionIterator.java ../src/query/expression/ITimeSyncedIterator.java ../src/query/expression/NumericFillPolicy.java ../src/query/expression/MovingAverage.java ../src/query/expression/MultiplySeries.java ../src/query/expression/PostAggregatedDataPoints.java ../src/query/expression/Scale.java ../src/query/expression/SumSeries.java ../src/query/expression/TimeShift.java ../src/query/expression/TimeSyncedIterator.java ../src/query/expression/UnionIterator.java ../src/query/expression/VariableIterator.java ../src/query/filter/TagVFilter.java ../src/query/filter/TagVLiteralOrFilter.java ../src/query/filter/TagVNotKeyFilter.java ../src/query/filter/TagVNotLiteralOrFilter.java ../src/query/filter/TagVRegexFilter.java ../src/query/filter/TagVWildcardFilter.java ../src/query/pojo/Downsampler.java ../src/query/pojo/Expression.java ../src/query/pojo/Filter.java ../src/query/pojo/Join.java ../src/query/pojo/Metric.java ../src/query/pojo/Output.java ../src/query/pojo/Query.java ../src/query/pojo/Timespan.java ../src/query/pojo/Validatable.java ../src/search/SearchPlugin.java ../src/search/SearchQuery.java ../src/search/TimeSeriesLookup.java ../src/stats/Histogram.java ../src/stats/StatsCollector.java ../src/stats/QueryStats.java ../src/tools/ArgP.java ../src/tools/CliOptions.java ../src/tools/CliQuery.java ../src/tools/CliUtils.java ../src/tools/DumpSeries.java ../src/tools/Fsck.java ../src/tools/FsckOptions.java ../src/tools/MetaPurge.java ../src/tools/MetaSync.java ../src/tools/Search.java ../src/tools/StartupPlugin.java ../src/tools/TSDMain.java ../src/tools/TextImporter.java ../src/tools/TreeSync.java ../src/tools/UidManager.java ../src/tree/Branch.java ../src/tree/Leaf.java ../src/tree/Tree.java ../src/tree/TreeBuilder.java ../src/tree/TreeRule.java ../src/tsd/AbstractHttpQuery.java ../src/tsd/AnnotationRpc.java ../src/tsd/BadRequestException.java ../src/tsd/ConnectionManager.java ../src/tsd/DropCachesRpc.java ../src/tsd/GnuplotException.java ../src/tsd/GraphHandler.java ../src/tsd/HttpJsonSerializer.java ../src/tsd/HttpSerializer.java ../src/tsd/HttpQuery.java ../src/tsd/HttpRpc.java ../src/tsd/HttpRpcPlugin.java ../src/tsd/HttpRpcPluginQuery.java ../src/tsd/LineBasedFrameDecoder.java ../src/tsd/LogsRpc.java ../src/tsd/PipelineFactory.java ../src/tsd/PutDataPointRpc.java ../src/tsd/QueryExecutor.java ../src/tsd/QueryRpc.java ../src/tsd/RpcHandler.java ../src/tsd/RpcPlugin.java ../src/tsd/RpcManager.java ../src/tsd/RpcUtil.java ../src/tsd/RTPublisher.java ../src/tsd/SearchRpc.java ../src/tsd/StaticFileRpc.java ../src/tsd/StatsRpc.java ../src/tsd/StorageExceptionHandler.java ../src/tsd/SuggestRpc.java ../src/tsd/TelnetRpc.java ../src/tsd/TreeRpc.java ../src/tsd/UniqueIdRpc.java ../src/tsd/WordSplitter.java ../src/uid/FailedToAssignUniqueIdException.java ../src/uid/NoSuchUniqueId.java ../src/uid/NoSuchUniqueName.java ../src/uid/RandomUniqueId.java ../src/uid/UniqueId.java ../src/uid/UniqueIdFilterPlugin.java ../src/uid/UniqueIdInterface.java ../src/utils/ByteArrayPair.java ../src/utils/ByteSet.java ../src/utils/Config.java ../src/utils/DateTime.java ../src/utils/Exceptions.java ../src/utils/FileSystem.java ../src/utils/JSON.java ../src/utils/JSONException.java ../src/utils/Pair.java ../src/utils/PluginLoader.java ../src/utils/Threads.java ../src/tools/BuildData.java ./src/net/opentsdb/query/expression/parser/*.java javac: file not found: ./src/net/opentsdb/query/expression/parser/*.java Usage: javac <options> <source files> use -help for a list of possible options make[1]: *** [.javac-stamp] Error 2 make[1]: Leaving director
  • /opt/app/opentsdb/opentsdb-2.3.0/build' make: *** [all] Error 2
  • [sg865w@blpd215 opentsdb-2.3.0]$ cat build.sh #!/usr/bin/env bash set -xe test -f configure || ./bootstrap test -d build || mkdir build cd build test -f Makefile || ../configure "$@" MAKE=make [ uname -s = "FreeBSD" ] && MAKE=gmake exec ${MAKE} "$@"

Thanks & Regards

Shyam Gurram

1 ACCEPTED SOLUTION

avatar
Master Mentor

@shyam gurram

Try the following steps (which is a kind of hack)

1. Download from : https://github.com/OpenTSDB/opentsdb/releases/download/v2.3.0/opentsdb-2.3.0.tar.gz

2. Extract it as following:

tar xvzf opentsdb-2.3.0.tar.gz 

3. Now change directory to "opentsdb-2.3.0". Then the hack is to copy the "./third_party" directory inside the "build" directory on your own as following:

# cd opentsdb-2.3.0
# mkdir build
# cp -r third_party ./build
# ./build.sh

.

View solution in original post

5 REPLIES 5

avatar

@shyam gurram

By default current directory will not be in classpath. so you will have to include that as well,

/usr/bin/java -cp third_party/javacc/javacc-6.1.2.jar:. javacc....

Add ":." to the classpath so that I can find the javacc

avatar

@shyam gurram

I don't have any knowledge over openstab but trying to help you in java point of view here. i thought that javacc was not part of the third_party/javacc/javacc-6.1.2.jar file but i was wrong. please ignore my response.

avatar
Contributor

@apappu

Thanks for the reply. I am sorry I didn't get that. Please where I need to add that path.

When I am installing this opentsdb the current directory is /opt/app/opentsdb/opentsdb-2.3.0/build. This build directory is created by the ./build.sh script. So, please help me where I need to add the path and also what path I need to add.

Thanks & Regards

Shyam

avatar
Master Mentor

@shyam gurram

Try the following steps (which is a kind of hack)

1. Download from : https://github.com/OpenTSDB/opentsdb/releases/download/v2.3.0/opentsdb-2.3.0.tar.gz

2. Extract it as following:

tar xvzf opentsdb-2.3.0.tar.gz 

3. Now change directory to "opentsdb-2.3.0". Then the hack is to copy the "./third_party" directory inside the "build" directory on your own as following:

# cd opentsdb-2.3.0
# mkdir build
# cp -r third_party ./build
# ./build.sh

.

avatar
Contributor
@Jay SenSharma

Thanks for the solution and it is working fine.

I am facing one more error. As per the installation document there is a installation step mentioned in the below and also please find the error. Please help me on this. Awaiting for your reply.

Error:

[sg865w@blpd215 opentsdb-2.3.0]$ ./build/tsdb tsdb:

error: unknown command ''

usage: tsdb <command> [args] Valid commands: fsck, import, mkmetric, query, tsd, scan, search, uid, version

Installation Step: You can now execute command-line tool by invoking ./build/tsdb