eXist-db / exist

eXist Native XML Database and Application Platform
https://exist-db.org
GNU Lesser General Public License v2.1
429 stars 179 forks source link

eXist doesn't start #2819

Open Unixcision opened 5 years ago

Unixcision commented 5 years ago

What is the problem

eXist-db doesn't start, even if I execute it with command prompt.

What did you expect

eXist-db getting started

Describe how to reproduce or add a test

Don't know because I think I'm the only one with this problem.

Context information

Please always add the following information

adamretter commented 5 years ago

The log file you posted is just the detail of log4j startup, which doesn't help here.

How are you starting eXist-db?

Do you have any other versions of Java installed apart from 8?

Unixcision commented 5 years ago

The log file you posted is just the detail of log4j startup, which doesn't help here.

How are you starting eXist-db?

Do you have any other versions of Java installed apart from 8?

Okay I will delete it. I tried both using console and both double clicking the file, no success. No, only 8 211. I have jre folder in Program Files and Program FIles x86, Jdk only in Program Files, maybe this can be the problem, but dont know.

adamretter commented 5 years ago

Can you try this:

  1. open a cmd.exe
  2. cd to where you installed eXist-db e.g. cd c:\eXist-db
  3. Tell us the output of running: java -version
  4. Tell us the output of running: echo %JAVA_HOME%
  5. Tell us the output of running: echo %EXIST_HOME%
  6. Try running bin\startup.bat, if eXist-db does not start, can you let us know what the output to the console is, and also the output to exist.log.

Thanks

Unixcision commented 5 years ago

Hi adamretter, 3.-

java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) Client VM (build 25.211-b12, mixed mode, sharing)

4.- C:\Program Files\Java\jdk1.8.0_162\bin 5.- c:\eXist-db 6.- system cannot find the path specified image

image

Thanks for your help!

adamretter commented 5 years ago

To just check. You are still trying with 4.7.0?

Can you edit startup.bat to add a REM in front of the line @echo off e.g.,

REM @echo off

The re-run startup.bat and show us the output.

Unixcision commented 5 years ago
C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>rem

C:\eXist-db\bin>rem In addition to the other parameter options for the Jetty container

C:\eXist-db\bin>rem pass -j or --jmx to enable JMX agent.  The port for it can be specified

C:\eXist-db\bin>rem with optional port number e.g. -j1099 or --jmx=1099.

C:\eXist-db\bin>rem

C:\eXist-db\bin>set JMX_ENABLED=0

C:\eXist-db\bin>set JMX_PORT=1099

C:\eXist-db\bin>set JAVA_ARGS=

C:\eXist-db\bin>for /F "delims=" %G IN ("C:\Program Files\Java\jdk1.8.0_162\bin") DO SET "JAVA_HOME=%~G"

C:\eXist-db\bin>SET "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162\bin"

C:\eXist-db\bin>for /F "delims=" %G IN ("C:\eXist-db") DO SET "EXIST_HOME=%~G"

C:\eXist-db\bin>SET "EXIST_HOME=C:\eXist-db"

C:\eXist-db\bin>set JAVA_RUN="java"

C:\eXist-db\bin>if not "C:\Program Files\Java\jdk1.8.0_162\bin" == "" (
set JAVA_RUN="C:\Program Files\Java\jdk1.8.0_162\bin\bin\java"
 goto gotJavaHome
)

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set EXIST_HOME=c:\eXist-db

C:\eXist-db\bin>if not "c:\eXist-db" == "" goto gotExistHome

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>set JAVA_OPTS="-Xms128m -Xmx2048m -Dfile.encoding=UTF-8"

C:\eXist-db\bin>for /F "tokens=*" %x IN ("") DO SET "CMD_LINE_ARGS=%x"

C:\eXist-db\bin>set BATCH.D="c:\eXist-db\bin\batch.d"

C:\eXist-db\bin>call "c:\eXist-db\bin\batch.d"\get_opts.bat

System cannot find the path specified
adamretter commented 5 years ago

It looks like the quoting on these lines of startup.bat is the issue:

for /f "tokens=*" %%x IN ("%*") DO SET "CMD_LINE_ARGS=%%x"
set BATCH.D="%EXIST_HOME%\bin\batch.d"
call %BATCH.D%\get_opts.bat %CMD_LINE_ARGS%
call %BATCH.D%\check_jmx_status.bat

What happens if you change that to:

for /f "tokens=*" %%x IN ("%*") DO SET "CMD_LINE_ARGS=%%x"
set BATCH.D=%EXIST_HOME%\bin\batch.d
call "%BATCH.D%\get_opts.bat" %CMD_LINE_ARGS%
call "%BATCH.D%\check_jmx_status.bat"
Unixcision commented 5 years ago

It looks like the quoting on these lines of startup.bat is the issue:

for /f "tokens=*" %%x IN ("%*") DO SET "CMD_LINE_ARGS=%%x"
set BATCH.D="%EXIST_HOME%\bin\batch.d"
call %BATCH.D%\get_opts.bat %CMD_LINE_ARGS%
call %BATCH.D%\check_jmx_status.bat

What happens if you change that to:

for /f "tokens=*" %%x IN ("%*") DO SET "CMD_LINE_ARGS=%%x"
set BATCH.D=%EXIST_HOME%\bin\batch.d
call "%BATCH.D%\get_opts.bat" %CMD_LINE_ARGS%
call "%BATCH.D%\check_jmx_status.bat"
C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>rem

C:\eXist-db\bin>rem In addition to the other parameter options for the Jetty container

C:\eXist-db\bin>rem pass -j or --jmx to enable JMX agent.  The port for it can be specified

C:\eXist-db\bin>rem with optional port number e.g. -j1099 or --jmx=1099.

C:\eXist-db\bin>rem

C:\eXist-db\bin>set JMX_ENABLED=0

C:\eXist-db\bin>set JMX_PORT=1099

C:\eXist-db\bin>set JAVA_ARGS=

C:\eXist-db\bin>for /F "delims=" %G IN ("C:\Program Files\Java\jdk1.8.0_162\bin") DO SET "JAVA_HOME=%~G"

C:\eXist-db\bin>SET "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162\bin"

C:\eXist-db\bin>for /F "delims=" %G IN ("c:\eXist-db") DO SET "EXIST_HOME=%~G"

C:\eXist-db\bin>SET "EXIST_HOME=c:\eXist-db"

C:\eXist-db\bin>set JAVA_RUN="java"

C:\eXist-db\bin>if not "C:\Program Files\Java\jdk1.8.0_162\bin" == "" (
set JAVA_RUN="C:\Program Files\Java\jdk1.8.0_162\bin\bin\java"
 goto gotJavaHome
)

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set EXIST_HOME=c:\eXist-db

C:\eXist-db\bin>if not "c:\eXist-db" == "" goto gotExistHome

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>set JAVA_OPTS="-Xms128m -Xmx2048m -Dfile.encoding=UTF-8"

C:\eXist-db\bin>for /F "tokens=*" %x IN ("") DO SET "CMD_LINE_ARGS=%x"

C:\eXist-db\bin>set BATCH.D=c:\eXist-db\bin\batch.d

C:\eXist-db\bin>call "c:\eXist-db\bin\batch.d\get_opts.bat"
System cannot find the path specified
Unixcision commented 5 years ago

I think I'm going to get crazy ahahah

adamretter commented 5 years ago

And what happens if you change:

call "%BATCH.D%\get_opts.bat" %CMD_LINE_ARGS%

to just:

call %BATCH.D%\get_opts.bat %CMD_LINE_ARGS%

Unixcision commented 5 years ago

And what happens if you change:

call "%BATCH.D%\get_opts.bat" %CMD_LINE_ARGS%

to just:

call %BATCH.D%\get_opts.bat %CMD_LINE_ARGS%

Similar problem

C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>rem

C:\eXist-db\bin>rem In addition to the other parameter options for the Jetty container

C:\eXist-db\bin>rem pass -j or --jmx to enable JMX agent.  The port for it can be specified

C:\eXist-db\bin>rem with optional port number e.g. -j1099 or --jmx=1099.

C:\eXist-db\bin>rem

C:\eXist-db\bin>set JMX_ENABLED=0

C:\eXist-db\bin>set JMX_PORT=1099

C:\eXist-db\bin>set JAVA_ARGS=

C:\eXist-db\bin>for /F "delims=" %G IN ("C:\Program Files\Java\jdk1.8.0_162\bin") DO SET "JAVA_HOME=%~G"

C:\eXist-db\bin>SET "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162\bin"

C:\eXist-db\bin>for /F "delims=" %G IN ("C:\eXist-db") DO SET "EXIST_HOME=%~G"

C:\eXist-db\bin>SET "EXIST_HOME=C:\eXist-db"

C:\eXist-db\bin>set JAVA_RUN="java"

C:\eXist-db\bin>if not "C:\Program Files\Java\jdk1.8.0_162\bin" == "" (
set JAVA_RUN="C:\Program Files\Java\jdk1.8.0_162\bin\bin\java"
 goto gotJavaHome
)

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set EXIST_HOME=c:\eXist-db

C:\eXist-db\bin>if not "c:\eXist-db" == "" goto gotExistHome

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>set JAVA_OPTS="-Xms128m -Xmx2048m -Dfile.encoding=UTF-8"

C:\eXist-db\bin>for /F "tokens=*" %x IN ("") DO SET "CMD_LINE_ARGS=%x"

C:\eXist-db\bin>set BATCH.D=c:\eXist-db\bin\batch.d

C:\eXist-db\bin>call c:\eXist-db\bin\batch.d\get_opts.bat

C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>set CHECK_PORT=0

C:\eXist-db\bin>for /F "tokens=*" %x IN ("") DO SET "SUB_CMD_LINE_ARGS=%x"

C:\eXist-db\bin>if "" == "" goto :eof

C:\eXist-db\bin>call "c:\eXist-db\bin\batch.d\check_jmx_status.bat"

C:\eXist-db\bin>rem $Id$

C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>set JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

C:\eXist-db\bin>if 0 == 0 goto :EOF

C:\eXist-db\bin>"C:\Program Files\Java\jdk1.8.0_162\bin\bin\java" ""-Xms128m -Xmx2048m -Dfile.encoding=UTF-8""  -Dexist.home="c:\eXist-db" -jar "c:\eXist-db\start.jar" jetty
System cannot find the path specified
adamretter commented 5 years ago

No. A different problem it got much further. Can you try manipulating the last line in startup.bat to also remove quotes from "%JAVA_OPTS%"

Unixcision commented 5 years ago

No. A different problem it got much further. Can you try manipulating the last line in startup.bat to also remove quotes from "%JAVA_OPTS%"

Still same problem, I dont know why I always the only one in getting strange errors that nobody have :(

C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>rem

C:\eXist-db\bin>rem In addition to the other parameter options for the Jetty container

C:\eXist-db\bin>rem pass -j or --jmx to enable JMX agent.  The port for it can be specified

C:\eXist-db\bin>rem with optional port number e.g. -j1099 or --jmx=1099.

C:\eXist-db\bin>rem

C:\eXist-db\bin>set JMX_ENABLED=0

C:\eXist-db\bin>set JMX_PORT=1099

C:\eXist-db\bin>set JAVA_ARGS=

C:\eXist-db\bin>for /F "delims=" %G IN ("C:\Program Files\Java\jdk1.8.0_162\bin") DO SET "JAVA_HOME=%~G"

C:\eXist-db\bin>SET "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162\bin"

C:\eXist-db\bin>for /F "delims=" %G IN ("C:\eXist-db") DO SET "EXIST_HOME=%~G"

C:\eXist-db\bin>SET "EXIST_HOME=C:\eXist-db"

C:\eXist-db\bin>set JAVA_RUN="java"

C:\eXist-db\bin>if not "C:\Program Files\Java\jdk1.8.0_162\bin" == "" (
set JAVA_RUN="C:\Program Files\Java\jdk1.8.0_162\bin\bin\java"
 goto gotJavaHome
)

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set EXIST_HOME=c:\eXist-db

C:\eXist-db\bin>if not "c:\eXist-db" == "" goto gotExistHome

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>rem will be set by the installer

C:\eXist-db\bin>set MX=2048

C:\eXist-db\bin>set JAVA_OPTS="-Xms128m -Xmx2048m -Dfile.encoding=UTF-8"

C:\eXist-db\bin>for /F "tokens=*" %x IN ("") DO SET "CMD_LINE_ARGS=%x"

C:\eXist-db\bin>set BATCH.D=c:\eXist-db\bin\batch.d

C:\eXist-db\bin>call c:\eXist-db\bin\batch.d\get_opts.bat

C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>set CHECK_PORT=0

C:\eXist-db\bin>for /F "tokens=*" %x IN ("") DO SET "SUB_CMD_LINE_ARGS=%x"

C:\eXist-db\bin>if "" == "" goto :eof

C:\eXist-db\bin>call "c:\eXist-db\bin\batch.d\check_jmx_status.bat"

C:\eXist-db\bin>rem $Id$

C:\eXist-db\bin>REM @echo off

C:\eXist-db\bin>set JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

C:\eXist-db\bin>if 0 == 0 goto :EOF

C:\eXist-db\bin>"C:\Program Files\Java\jdk1.8.0_162\bin\bin\java" "-Xms128m -Xmx2048m -Dfile.encoding=UTF-8"  -Dexist.home="c:\eXist-db" -jar "c:\eXist-db\start.jar" jetty
System cannot find the path specified
adamretter commented 5 years ago

You still have too many quotes I think (I am no Windows batch expert), you need something like:

"C:\Program Files\Java\jdk1.8.0_162\bin\bin\java" -Xms128m -Xmx2048m -Dfile.encoding=UTF-8  -Dexist.home="c:\eXist-db" -jar "c:\eXist-db\start.jar" jetty