I tried to run a thrift server and client program that was given in the thrift website and I got the below errors.Can anyone please help me out with the errors. coding can be found in : https://thrift.apache.org/tutorial/java
naren@naren:~/Desktop$ javac javaserver.java
javaserver.java:16: error: class JavaServer is public, should be declared in a file named JavaServer.java
public class JavaServer {
^
javaserver.java:1: error: package org.apache.thrift.server does not exist
import org.apache.thrift.server.TServer;
^
javaserver.java:2: error: package org.apache.thrift.server.TServer does not exist
import org.apache.thrift.server.TServer.Args;
^
javaserver.java:3: error: package org.apache.thrift.server does not exist
import org.apache.thrift.server.TSimpleServer;
^
javaserver.java:4: error: package org.apache.thrift.server does not exist
import org.apache.thrift.server.TThreadPoolServer;
^
javaserver.java:5: error: package org.apache.thrift.transport does not exist
import org.apache.thrift.transport.TSSLTransportFactory;
^
javaserver.java:6: error: package org.apache.thrift.transport does not exist
import org.apache.thrift.transport.TServerSocket;
^
javaserver.java:7: error: package org.apache.thrift.transport does not exist
import org.apache.thrift.transport.TServerTransport;
^
javaserver.java:8: error: package org.apache.thrift.transport.TSSLTransportFactory does not exist
import org.apache.thrift.transport.TSSLTransportFactory.TSSLTransportParameters;
^
javaserver.java:11: error: package tutorial does not exist
import tutorial.*;
^
javaserver.java:12: error: package shared does not exist
import shared.*;
^
javaserver.java:18: error: cannot find symbol
public static CalculatorHandler handler;
^
symbol: class CalculatorHandler
location: class JavaServer
javaserver.java:20: error: package Calculator does not exist
public static Calculator.Processor processor;
^
javaserver.java:45: error: package Calculator does not exist
public static void simple(Calculator.Processor processor) {
^
javaserver.java:58: error: package Calculator does not exist
public static void secure(Calculator.Processor processor) {
^
javaserver.java:24: error: cannot find symbol
handler = new CalculatorHandler();
^
symbol: class CalculatorHandler
location: class JavaServer
javaserver.java:25: error: package Calculator does not exist
processor = new Calculator.Processor(handler);
^
javaserver.java:47: error: cannot find symbol
TServerTransport serverTransport = new TServerSocket(9090);
^
symbol: class TServerTransport
location: class JavaServer
javaserver.java:47: error: cannot find symbol
TServerTransport serverTransport = new TServerSocket(9090);
^
symbol: class TServerSocket
location: class JavaServer
javaserver.java:48: error: cannot find symbol
TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));
^
symbol: class TServer
location: class JavaServer
javaserver.java:48: error: cannot find symbol
TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));
^
symbol: class TSimpleServer
location: class JavaServer
javaserver.java:48: error: cannot find symbol
TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));
^
symbol: class Args
location: class JavaServer
javaserver.java:61: error: cannot find symbol
TSSLTransportParameters params = new TSSLTransportParameters();
^
symbol: class TSSLTransportParameters
location: class JavaServer
javaserver.java:61: error: cannot find symbol
TSSLTransportParameters params = new TSSLTransportParameters();
^
symbol: class TSSLTransportParameters
location: class JavaServer
javaserver.java:65: error: cannot find symbol
TServerTransport serverTransport = TSSLTransportFactory.getServerSocket(9091, 0, null, params);
^
symbol: class TServerTransport
location: class JavaServer
javaserver.java:65: error: cannot find symbol
TServerTransport serverTransport = TSSLTransportFactory.getServerSocket(9091, 0, null, params);
^
symbol: variable TSSLTransportFactory
location: class JavaServer
javaserver.java:66: error: cannot find symbol
TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));
^
symbol: class TServer
location: class JavaServer
javaserver.java:66: error: cannot find symbol
TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));
^
symbol: class TSimpleServer
location: class JavaServer
javaserver.java:66: error: cannot find symbol
TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));
^
symbol: class Args
location: class JavaServer
29 errors
naren@naren:~/Desktop$