Re: Running Server Node in UNIX
Hello, please try the following: java -cp /opt/lib/*:/path-to-your-working-directory-where-class-files-are-stored/ com.cache.init.ServerNodeCodeStartup I think that these links will be very helpful for you: https://stackoverflow.com/questions/219585/including-all-the-jars-in-a-directory-within-the-java-classpath https://docs.oracle.com/javase/10/tools/java.htm#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE__BABDJJFI Thanks. вт, 17 июл. 2018 г. в 18:35, Skollur : > Running below command in UNIX and getting error.it runs fine in windows > in eclipse..any help on this? > > 1. java -cp /opt/lib/*.jar:/opt/com/test/cache/*.*:/opt/com/test/config/*.* > ServerNodeCodeStartup Error: Could not find or load main > class > ServerNodeCodeStartup > > 2. java -cp /opt/lib/*.jar:/opt/com/test/cache/*.*:/opt/com/test/config/*.* > com.test.cache.ServerNodeCodeStartup Error: Could not find or > load main class ServerNodeCodeStartup > > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
Re: Running Server Node in UNIX
Running below command in UNIX and getting error.it runs fine in windows in eclipse..any help on this? 1. java -cp /opt/lib/*.jar:/opt/com/test/cache/*.*:/opt/com/test/config/*.* ServerNodeCodeStartup Error: Could not find or load main class ServerNodeCodeStartup 2. java -cp /opt/lib/*.jar:/opt/com/test/cache/*.*:/opt/com/test/config/*.* com.test.cache.ServerNodeCodeStartup Error: Could not find or load main class ServerNodeCodeStartup -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Running Server Node in UNIX
is any help on this? -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Running Server Node in UNIX
Thank you. I have all jars in lib as below and added to the cp command. lib folder - ./lib/ignite-indexing-2.5.0.jar ./lib/ignite-rest-http-2.5.0.jar ./lib/mssql-jdbc-6.4.0.jre8.jar ./lib/ignite-slf4j-2.5.0.jar ./ib/...jar source code compiled as below structure(.class) -com/cache/constant/*.class -com/cache/domain/*.class -com/cache/load/*.class -com/cache/init/ServerNodeCodeStartup.class Tried both below. 1)java -cp ./opt/lib/*.jar com/cache/init/ServerNodeCodeStartup and output Error: Could not find or load main class com.cache.init.ServerNodeCodeStartup 2)cd /com/cache/init/ Tried java -cp ./opt/lib/*.jar ServerNodeCodeStartup and output Error: Could not find or load main class ServerNodeCodeStartup -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Running Server Node in UNIX
You cannot include JARs into another JAR, Java is not going to add them to classpath. You should list all required JARs in the '-cp' parameter, or create an uber-JAR with all the dependencies unpacked there. -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Running Server Node in UNIX
I don't have IGNITE_HOME set up from my windows- eclipse and able to run without any issue. I have ignite-core, ignite-spring, ignite-indexing and ignite-rest-http in the pom.xml. I am trying to run same structure in UNIX. I have required libs in the jar. Is anything am i missing? -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Running Server Node in UNIX
Hi, Did you add to IGNITE_HOME to the path? https://apacheignite.readme.io/docs/getting-started#section-with-default-configuration In case if you are going to create maven project then you still need to download the binaries and set the IGNITE_HOME: https://ignite.apache.org/download.cgi BR, Andrei -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Running Server Node in UNIX
Hello, I am trying to run Ignite in Unix and getting below error. Same program runs works from Eclipse. Command: java -cp /opt/cache/ignite-cache.jar com/test/cache/init/ServerNodeCodeStartup Packaged into ignite-cache.jar Class Structure: -com/test/cache/*.classes -lib/*.jar -META-INF Output : Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinder at com.idb.cache.init.ServerNodeCodeStartup.main(ServerNodeCodeStartup.java:15) Caused by: java.lang.ClassNotFoundException: org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 1 more == -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/