arcadedb
arcadedb copied to clipboard
Postgres plugin not activating on windows start file
ArcadeDB Version: 21.10
JDK Version: Oracle 8
OS: Windows 10
Expected behavior
Postgres Protocol plugin started displayed.
Actual behavior
Starting ArcadeDB Server with plugins []... displayed
Steps to reproduce
server.bat -Darcadedb.server.plugins=Postgres
Fond the issue, the commands are passed after the class but they should be before the Java class.
java ... %CMD_LINE_ARGS% com.arcadedb.server.ArcadeDBServer
Ok, tested the unix/macosx/linux version and works. I don't have a Windows quickly to try.
Could you please get the latest distribution from git, build it (mvn clean install -DskipTests
) and then:
server.bat -Darcadedb.server.plugins=Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
Ok, tested the unix/macosx/linux version and works. I don't have a Windows quickly to try.
Could you please get the latest distribution from git, build it (
mvn clean install -DskipTests
) and then:server.bat -Darcadedb.server.plugins=Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
It gives the following error now:
Error: Could not find or load main class Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
Caused by: java.lang.ClassNotFoundException: Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
I guess :
cause troubles under Windows. Could you please try this:
server.bat -Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
I guess
:
cause troubles under Windows. Could you please try this:server.bat -Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
This displays "Starting ArcadeDB Server with plugins []... displayed"
I pushed a fix for that, please let me know if you can retry it after pulling from the latest version..
@lvca apologies I accidentally ran it on the release distribution. On the latest commit in the main branch it results in the same error again as below:
Error: Could not find or load main class Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
Caused by: java.lang.ClassNotFoundException: Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
The weird thing is that is trying to load the class Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
but it should look for com.arcadedb.postgres.PostgresProtocolPlugin
. it's seems the parsing of parameters doesn't work under windows. I'm looking for a windows machine where to run our tests.
Could it be that the command says Postgres:com.arcadedb.postgres.PostgresProtocolPlugin rather than com.arcadedb.postgres.PostgresProtocolPlugin? I ran the latter now but got the following error:
Error: Main method not found in class com.arcadedb.postgres.PostgresProtocolPlugin, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
If you need anymore testing for windows in the short-term let me know
The syntax is <plugin-name>:<class>
, so it's correct Postgres:com.arcadedb.postgres.PostgresProtocolPlugin
. But for some reason, it's not splitting the string.
@Jurgen-Aquilina could you please retry with the latest release? Thanks in advance.
@lvca I tried all the command iterations both on latest in main and latest in windows-issues, but they all return the same errors
If you do this in a command prompt:
set ARCADEDB_SETTINGS=-Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
server.bat
Works? This sets the environment variable and let the script using that instead of receiving as an argument.
Yes that loads the plugin and starts on the latest in the main branch. I will try to actually test if it works properly in the upcoming days as it's crashing due to my 5432 port being occupied by a postgres service which I cannot turn off at the moment.
Thanks for the report. I've changed server.bat and now should work as for documentation.
server.bat -Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
Please, if you can, confirm with the latest version if server.bat now manages correctly settings. Thanks.
Apologies was occupied with other things. On the latest in main branch the provided command returns the ClassNotFoundException again unfortunately.
Class not found with both?
-
server.bat -Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
- set
ARCADEDB_SETTINGS=-Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin";server.bat
Class not found with 1. 2 works
The latest change to server.bat
was to the last line:
call %JAVA% -server %JAVA_OPTS% %ARCADEDB_OPTS_MEMORY% %JAVA_OPTS_SCRIPT% %ARCADEDB_JMX% %ARCADEDB_SETTINGS% %CMD_LINE_ARGS% -cp "%ARCADEDB_HOME%\lib\*" com.arcadedb.server.ArcadeDBServer
As you can see both %ARCADEDB_SETTINGS%
and %CMD_LINE_ARGS%
are before the classpath, so they should both work. Could you please check server.bat in your system the last line is like the one above? Thanks in advance.
Yes my server.bat has the same line
Hi @Jurgen-Aquilina any chance to retry this with the latest snapshot? Thanks in advance.
Problem persists with latest from main branch (SNAPSHOT 21.11.1)
Does anybody have a Windows machine that can help with this? Waiting for the final solution, this works for now: setting the plugin in ARCADEDB_SETTING
environment variable and then run the server:
set ARCADEDB_SETTINGS=-Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
bin\server.bat
For anyone trying this on Windows, note: the workaround does not work in the new Terminal, but does work in the old Command Prompt.
There are bugs with the server.bat, for example, if I want to use a non-default databases location, it would throw errors like
.\arcadedb-23.10.1\bin\server.bat -Dserver.databaseDirectory=Z:\arcadedb\databases
...
ARCADEDB server script path = ...
ARCADEDB home directory = ...
Error: Could not find or load main class Z:\arcadedb\databases
Caused by: java.lang.ClassNotFoundException: Z:\arcadedb\databases
Edit and add the options in the server.bat including postgres plugin settings will be fine, but such would fail with the command line.
I'm using server.sh and it correctly instances the Postgres plugin. By the way, how can we fix the server.bat? Adding quotes for paths?
I just created a PR for you https://github.com/ArcadeData/arcadedb/pull/1333 and this also fixed https://github.com/ArcadeData/arcadedb/issues/173 under windows.