Answer the question
In order to leave comments, you need to log in
Why parsing with selenium library doesn't work on server?
In general, I completed part of the project - parsing individual pages (it was necessary to load pages with js scripts). Everything worked fine in a separate project and when transferred to the main one (all libraries and code are exactly the same) - the code refused to work on the server.
The only thing is that geckodriver was replaced with a Linux version.
What could be the cause of this error? I looked at other resources for solutions cited as an example - it did not help.
Error code:
[email protected]:~/tlgbot# java -jar main.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver
at tlg.pBot.main.main(main.java:14)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.WebDriver
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
Answer the question
In order to leave comments, you need to log in
Because when IDEA runs the program, it makes sure that the CLASSPATH has all the required dependencies. When you launch, you will have to do it yourself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question