Project

General

Profile

Server does not start on migrated project

Added by Antanas Valencius about 3 years ago

I've made a copy of both converted project and sources of FWD on another machine and tried running. ./deploy/server/server.sh throws errors:

./deploy/server/server.log:

Apr 07, 2021 12:26:19 PM com.goldencode.p2j.main.StandardServer bootstrap
INFO: FWD v4.0.0_undefined_undefined_12004 Server starting initialization.
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 1 CA   certificates, 0 objects ignored
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 2 peer certificates, 0 objects ignored
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded auth-mode object
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 5 groups, 0 objects ignored
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 1 processes, 0 objects ignored
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 10 users, 0 objects ignored
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 8 resource plugins, 0 failed
[04/07/2021 12:26:20 EET] (SecurityManager:WARNING) {main} No custom server extension defined in P2J directory
[04/07/2021 12:26:20 EET] (SecurityManager:WARNING) {main} No custom client extension defined in P2J directory
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 1 ACLs for resource type <remoteentrypoint>
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 6 ACLs for resource type <system>
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 1 ACLs for resource type <entrypoint>
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 14 ACLs for resource type <admin>
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 1 ACLs for resource type <trustedspawner>
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 27 ACLs for resource type <net>
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 6 ACLs for resource type <directory>
[04/07/2021 12:26:20 EET] (SecurityManager:INFO) {main} Loaded 3 ACLs for resource type <remotelaunchoption>
[04/07/2021 12:26:20 EET] (SecurityManager:WARNING) {main} Security audit log is disabled
[04/07/2021 12:26:21 EET] (SecurityManager:INFO) {00000000:00000001:standard} No exported entry points defined in the P2J directory
[04/07/2021 12:26:24 EET] (com.goldencode.p2j.persist.ConversionPool:INFO) Runtime conversion pool initialized in 2890 ms.
[04/07/2021 12:26:24 EET] (Scheduler:WARNING) {00000000:00000001:standard} No scheduler configured.
[04/07/2021 12:26:24 EET] (com.goldencode.p2j.persist.TemporaryDatabaseManager:INFO) Using public (shared) temporary database.
[04/07/2021 12:26:24 EET] (com.goldencode.p2j.persist.DatabaseManager:INFO) Using H2 database version 1.4.200 (2019-10-14)
[04/07/2021 12:26:24 EET] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) Metadata server modules: [Myconnection, Connect, Index, DatabaseFeature, Sequence, FieldTrig, Lock, Field, Area, Usertablestat, Tenant, Filelist, FileTrig, File, IndexField, Startup, Db]
[04/07/2021 12:26:24 EET] (com.goldencode.p2j.persist.DatabaseManager:INFO) Database local/_temp/primary initialized in 1 ms.
[04/07/2021 12:26:24 EET] (com.goldencode.p2j.persist.dialect.H2Helper:SEVERE) Error setting P2J-specific collation;  please ensure p2jspi.jar is installed in Java extension directory
com.goldencode.p2j.cfg.ConfigurationException:  Initialization failure
    at com.goldencode.p2j.main.StandardServer.hookInitialize(StandardServer.java:2088)
    at com.goldencode.p2j.main.StandardServer.bootstrap(StandardServer.java:1004)
    at com.goldencode.p2j.main.ServerDriver.start(ServerDriver.java:485)
    at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:444)
    at com.goldencode.p2j.main.ServerDriver.process(ServerDriver.java:209)
    at com.goldencode.p2j.main.ServerDriver.main(ServerDriver.java:863)
Caused by: java.lang.RuntimeException: Error initializing persistence services
    at com.goldencode.p2j.persist.Persistence.initializeInstance(Persistence.java:2885)
    at com.goldencode.p2j.persist.PersistenceFactory.getInstance(PersistenceFactory.java:161)
    at com.goldencode.p2j.persist.DatabaseManager.initialize(DatabaseManager.java:1143)
    at com.goldencode.p2j.persist.Persistence.initialize(Persistence.java:840)
    at com.goldencode.p2j.main.StandardServer$11.initialize(StandardServer.java:1249)
    at com.goldencode.p2j.main.StandardServer.hookInitialize(StandardServer.java:2084)
    ... 5 more
Caused by: com.goldencode.p2j.persist.PersistenceException: Error initializing embedded database
Caused by: org.h2.jdbc.JdbcSQLDataException: Invalid value "en_US_P2J" for parameter "collation"; SQL statement:
set collation "en_US_P2J" [90008-200]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:590)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
    at org.h2.message.DbException.get(DbException.java:205)
    at org.h2.message.DbException.getInvalidValueException(DbException.java:280)
    at org.h2.command.Parser.parseSetCollation(Parser.java:7476)
    at org.h2.command.Parser.parseSet(Parser.java:7246)
    at org.h2.command.Parser.parsePrepared(Parser.java:987)
    at org.h2.command.Parser.parse(Parser.java:843)
    at org.h2.command.Parser.parse(Parser.java:815)
    at org.h2.command.Parser.prepareCommand(Parser.java:738)
    at org.h2.engine.Session.prepareLocal(Session.java:657)
    at org.h2.engine.Session.prepareCommand(Session.java:595)
    at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235)
    at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:164)
    at org.h2.jdbc.JdbcStatement.executeBatch(JdbcStatement.java:768)
    at com.goldencode.p2j.persist.dialect.H2Helper.executeDDL(H2Helper.java:505)
    at com.goldencode.p2j.persist.dialect.H2Helper.prepareDatabase(H2Helper.java:206)
    at com.goldencode.p2j.persist.Persistence.initializeInstance(Persistence.java:2865)
    at com.goldencode.p2j.persist.PersistenceFactory.getInstance(PersistenceFactory.java:161)
    at com.goldencode.p2j.persist.DatabaseManager.initialize(DatabaseManager.java:1143)
    at com.goldencode.p2j.persist.Persistence.initialize(Persistence.java:840)
    at com.goldencode.p2j.main.StandardServer$11.initialize(StandardServer.java:1249)
    at com.goldencode.p2j.main.StandardServer.hookInitialize(StandardServer.java:2084)
    at com.goldencode.p2j.main.StandardServer.bootstrap(StandardServer.java:1004)
    at com.goldencode.p2j.main.ServerDriver.start(ServerDriver.java:485)
    at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:444)
    at com.goldencode.p2j.main.ServerDriver.process(ServerDriver.java:209)
    at com.goldencode.p2j.main.ServerDriver.main(ServerDriver.java:863)

Any help to solve the issues is appreciated.


Replies (4)

RE: Server does not start on migrated project - Added by Igor Skornyakov about 3 years ago

You have to install a custom locale. See Install a Custom Locale

RE: Server does not start on migrated project - Added by Greg Shah about 3 years ago

Actually, that is the "other" collation issue. This one is for the built-in H2 database that is used for temp-tables and some internal processing. The p2jspi.jar from the FWD build does need to be installed as a Java extension. See Text Collator

RE: Server does not start on migrated project - Added by Antanas Valencius about 3 years ago

Greg Shah wrote:

Actually, that is the "other" collation issue. This one is for the built-in H2 database that is used for temp-tables and some internal processing. The p2jspi.jar from the FWD build does need to be installed as a Java extension. See Text Collator

This did solve the issue and the server successfully started.

While trying to run the client (both swing and terminal), I get the following error:

java.lang.UnsatisfiedLinkError: /home/fwd/FWD/platsrc3/deploy/lib/libp2j.so: libncurses.so.5: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)
    at java.lang.Runtime.loadLibrary0(Runtime.java:871)
    at java.lang.System.loadLibrary(System.java:1124)
    at com.goldencode.p2j.main.ClientCore.loadNativeLibrary(ClientCore.java:451)
    at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:208)
    at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:167)
    at com.goldencode.p2j.main.ClientDriver.start(ClientDriver.java:250)
    at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:444)
    at com.goldencode.p2j.main.ClientDriver.process(ClientDriver.java:144)
    at com.goldencode.p2j.main.ClientDriver.main(ClientDriver.java:313)

I did not find any info on this. Also, the file does exist with necessary rights.

RE: Server does not start on migrated project - Added by Greg Shah about 3 years ago

This means that the ncurses installation was not patched OR that the patched version is not found when the Linux loader attempts load libp2j.so. You probably already patched this before you built FWD otherwise it wouldn't have linked the native code properly. So it is likely that the ncurses library got reset to the original system version or your patched version was located during build but can't be located during runtime loading.

The first step is to look at Patching NCURSES and see if anything obvious can be found. If not, I will help you through the diagnosis process.

    (1-4/4)