cancel
Showing results for 
Search instead for 
Did you mean: 

ASS Solr failed to start

lie16
Champ in-the-making
Champ in-the-making

I am trying to start ASS solr for the first time and I had the problem like below link

alfresco-solr-6-6-5-not-start-invalid-version-of-java-11-0-9-1 

I already try with JDk 10 / 11.0.1 / 11.0.7 and the result is

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Could not find or load main class \
Caused by: java.lang.ClassNotFoundException: \

And when trying to start with JDK 1.8 it's still resulting in an error

Error: Could not find or load main class \

I found that the error happen in bellow line

echo %SOLR_PORT%>"%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port
  "%JAVA%" %SERVEROPT% %SOLR_JAVA_MEM% %START_OPTS% ^
    -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^
    -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" ^
    -Djetty.host=%SOLR_JETTY_HOST% -Djetty.port=%SOLR_PORT% -Djetty.home="%SOLR_SERVER_DIR%" ^
    -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%"

Which JDK I should use, and what I should do?

6 REPLIES 6

angelborroy
Community Manager Community Manager
Community Manager

This is a known bug for Jetty (the server running SOLR):

https://github.com/eclipse/jetty.project/issues/2090

No Java version including a "9" in the release number can be used.

Java 11 is required for ASS Solr, so try downgrading Java 11 to some previous version.

Hyland Developer Evangelist

lie16
Champ in-the-making
Champ in-the-making

I already try with java 1.8.0 the warning is gone, but error still show up

Error: Could not find or load main class \

Detail is in original post.

angelborroy
Community Manager Community Manager
Community Manager

Java 11 is required.

Hyland Developer Evangelist

lie16
Champ in-the-making
Champ in-the-making

Look I already try with jdk 11.00, 11.01, 11.02, 11.09 and all still showing the same error.

Thx for your reply angelboroy. I already know what's wrong. It's not the config just the documentation about how to run space are not allowed apparently.

angelborroy
Community Manager Community Manager
Community Manager

Can you include in this post the link to the documentation you are referring?

Hyland Developer Evangelist

markelvy
Champ in-the-making
Champ in-the-making

While executing, when JVM does not find a .class file with the specified name then a run time error occurs saying “Could not found or load main class”. The reason why this happens is mostly due to:

  • Wrong Class Name
  • Invalid Classpath

Main class could not be found when there is typo or wrong syntax in the fully qualified java class name or it does not exist in the provided classpath. You must ensure that you add the location of your .class file to your classpath. So, if its in the current folder, add . to your classpath. Note that the Windows classpath separator is a semi-colon( Smiley Wink . If you want to execute the main() method in MainClass, you must use the full class name, including package name, in the java command.