6 Replies Latest reply on Feb 22, 2019 9:12 PM by Gianni Ceresa

    Restarting PGX server using start_server is throwing exception

    mohanr.k

      I configured pgx.conf file to load graph data from property graph tables and started it. Looks like it started properly because I didn't see any errors on console window.

       

      Now I realized I missed vertex loading property (use_vertex_property_value_as_label) in graph config file so I killed the server by pressing Ctrl+C and then made the required changes to graph config file. I am seeing below exception when I restart the server after this change.

       

      16:55:14.051 [main] ERROR oracle.pgx.rest.PgxContextListener - java.lang.IllegalArgumentException: java.util.concurrent.ExecutionException: oracle.pgx.common.ParallelExecutionException: java.lang.IllegalArgumentException: Adding a string for earlier idx.

      java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: java.util.concurrent.ExecutionException: oracle.pgx.common.ParallelExecutionException: java.lang.IllegalArgumentException: Adding a string for earlier idx.

      at java.util.concurrent.CompletableFuture.reportGet(Unknown Source) ~[?:1.8.0_201]

      at java.util.concurrent.CompletableFuture.get(Unknown Source) ~[?:1.8.0_201]

      at oracle.pgx.api.PgxFuture.get(PgxFuture.java:99) ~[pgx-api-3.1.0.jar:3.1.0]

      at oracle.pgx.api.ServerInstance.startEngine(ServerInstance.java:848) ~[pgx-api-3.1.0.jar:3.1.0]

      at oracle.pgx.rest.PgxContextListener.contextInitialized(PgxContextListener.java:25) [classes/:?]

      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4627) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5091) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_201]

      at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) [?:1.8.0_201]

      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_201]

      at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) [?:1.8.0_201]

      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at org.apache.catalina.startup.Tomcat.start(Tomcat.java:371) [tomcat-embed-core-9.0.8.jar:9.0.8]

      at oracle.pgx.server.Server.start(Server.java:144) [pgx-server-3.1.0.jar:3.1.0]

      at oracle.pgx.server.Main.main(Main.java:21) [pgx-server-3.1.0.jar:3.1.0]

        • 1. Re: Restarting PGX server using start_server is throwing exception
          Gianni Ceresa

          Hi,

          As posted in the other thread, could you please give all the details you can about your environment and version and what you did?

          How to Ask Questions in Developer Community Spaces

          • 2. Re: Restarting PGX server using start_server is throwing exception
            mohanr.k

            Configuration file(TestData.json) used to load graph properties is given below. Details about pgx.conf are provided in other thread.

            {

              "jdbc_url": "jdbc:oracle:thin:@<hostname>:1521:pgdb",

              "username": "scott",

              "password": "tiger",

              "format": "pg",

              "db_engine": "rdbms",

              "name": "TestData",

              "vertex_props": [

            { "name": "name", "type": "string" },

            { "name": "type", "type": "string" },

            ],

              "edge_props": [

              { "name": "created_on", "type": "timestamp" },

            ],

              "loading": {

                "load_edge_label": true,

            "load_vertex_labels":true,

            "use_vertex_property_value_as_label":"name"   //This line has been added for 2nd run

              }

            }

             

            As highlighted above graph config file doesn't contain "use_vertex_property_value_as_label":"name" property when I first started PGX server using start_server.bat. Later I realized that I need to add this property to config file so I killed the PGX server by pressing Ctrl+C and then updated the config file with missing property. Now when I start PGX server using start_server.bat its throwing the exception shown above

            • 3. Re: Restarting PGX server using start_server is throwing exception
              Gianni Ceresa

              Ok,

              I see what you try to do there. I had a chat a year ago with PMs and architects of PGX and their position was more that there isn't much difference between a label and a property, and having only the properties and not the label for the nodes wasn't an issue as everything still work.

               

              The only little difference is in your PGQL queries where instead of "(n:label)" you need to use something like "(n WITH property_name = value)".

              In my memory in a old (2.3 or there around) version of PGX I couldn't make it work properly that option to identify a property which will become the label when loaded.

              I never tried anymore after as I just started writing all my queries with the "WITH" syntax instead.

               

              I will try again on my 3.1.1 and see if it works better or not now.

              • 4. Re: Restarting PGX server using start_server is throwing exception
                mohanr.k

                Thank you.

                 

                I tried with PGX 3.2.0 on windows. I observed this issue there also. Looks like the issue is with adding property use_vertex_property_value_as_label to config file.

                 

                Let me know if it works for you

                • 5. Re: Restarting PGX server using start_server is throwing exception
                  Gianni Ceresa

                  I was testing on PGX 3.1.1 (linux) by loading a graph and I didn't have any error but I also didn't have any label

                  There is a thing which I saw: the table storing vertices in 3.1.1 is different than the previous 2.x.x versions. There is now a VL column which looks like the EL one of the edges tables. I tried entering content there but still didn't have any label loaded.

                   

                  So ... still don't know how to get labels for properties.

                  Will dig a bit more into it over the coming days (also because with that different structure of database tables I need to rewrite some parts of my coming presentations about PGX )

                  • 6. Re: Restarting PGX server using start_server is throwing exception
                    Gianni Ceresa

                    After a bunch of tests I got some vertex labels loaded in my graph.

                     

                    The config generated during the load is the following one:

                    {
                    "error_handling": {},
                    "vertex_id_type": "long",
                    "max_num_connections": 4,
                    "format": "pg",
                    "attributes": {},
                    "password": "*******",
                    "db_engine": "RDBMS",
                    "vertex_props": [{
                    "name": "name",
                    "type": "string"
                    }, {
                    "name": "type",
                    "type": "string"
                    }],
                    "name": "test01",
                    "loading": {
                    "load_edge_label": true,
                    "load_vertex_labels": true,
                    "use_vertex_property_value_as_label": "type"
                    },
                    "edge_props": [],
                    "jdbc_url": "jdbc:oracle:thin:@localhost:1521/ORCLPDB1",
                    "username": "scott"
                    }
                    

                     

                    I also get the same result removing the definition of the "type" vertex property and by removing "load_vertex_labels" as well.

                     

                    On the other hand although there is clearly a column to store labels for vertices in the database I still couldn't find a way to get it loaded so far.