Getting vlingo to run on YugaByte DB

#1

This is a working thread to get the vlingo platform on YugaByte DB. This requires vlingo-symbio-jdbc to work against YSQL.

Here are the steps I did so far (updating these as I go):

  1. Install YugaByte DB
    Install YugaByte DB on a local machine with YSQL running on port 5433 (the default). Next create the database for running the tests:

    $ psql -U postgres -p 5433 -h 127.0.0.1
    postgres=# create database vlingo_test;
    
  2. Clone the vlingo-symbio-jdbc repo

  3. Build the repo using mvn -DskipTests package

  4. Run the unit tests

0 Likes

#2

Need a little help with building this. I rebased to the latest version of the repo (https://github.com/vlingo/vlingo-symbio-jdbc) and am hitting the following error when trying to build:

$ mvn -DskipTests package
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project vlingo-symbio-jdbc: Compilation failure: Compilation failure:
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresStreamReaderActor.java:[95,33] cannot find symbol
[ERROR] symbol:   class TextEntry
[ERROR] location: interface io.vlingo.symbio.Entry
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresStreamReaderActor.java:[98,16] cannot infer type arguments for io.vlingo.symbio.store.journal.Stream<>
[ERROR] reason: cannot infer type-variable(s) T
[ERROR] (argument mismatch; java.util.List<io.vlingo.symbio.Entry<java.lang.String>> cannot be converted to java.util.List<io.vlingo.symbio.BaseEntry<T>>)
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresJournalReaderActor.java:[156,25] cannot find symbol
[ERROR] symbol:   class TextEntry
[ERROR] location: interface io.vlingo.symbio.Entry
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresJournalActor.java:[224,43] cannot find symbol
[ERROR] symbol:   variable entryData
[ERROR] location: variable entry of type io.vlingo.symbio.Entry<java.lang.String>
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresJournalActor.java:[225,55] cannot find symbol
[ERROR] symbol:   variable metadata
[ERROR] location: variable entry of type io.vlingo.symbio.Entry<java.lang.String>
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresJournalActor.java:[226,43] cannot find symbol
[ERROR] symbol:   variable type
[ERROR] location: variable entry of type io.vlingo.symbio.Entry<java.lang.String>
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresJournalActor.java:[227,40] cannot find symbol
[ERROR] symbol:   variable typeVersion
[ERROR] location: variable entry of type io.vlingo.symbio.Entry<java.lang.String>
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/journal/jdbc/postgres/PostgresJournalActor.java:[238,18] cannot find symbol
[ERROR] symbol:   method __internal__setId(java.lang.String)
[ERROR] location: variable entry of type io.vlingo.symbio.Entry<java.lang.String>
[ERROR] -> [Help 1]

The only changes I have are to src/main/java/io/vlingo/symbio/store/common/jdbc/postgres/PostgresConfigurationProvider.java (these are not causing the issue):

-            "jdbc:postgresql://localhost/",
+            "jdbc:postgresql://localhost:5433/",
             "vlingo_test",  // database name
-            "vlingo_test",  // username
-            "vlingo123",    // password
+            "postgres",  // username
+            "",    // password
0 Likes

#4

Hi Karthik,

[Fixed the XML – didn’t realize it is markdown.]

Sorry, I think you may have gotten a daily snapshot for some refactoring that we are in the middle of. Can you change your pom.xml file to point to Maven Central? See the following:

--------- change this -------------

      <repositories>
        <repository>
          <id>jcenter</id>
          <url>https://jcenter.bintray.com/</url>
        </repository>
      </repositories>

--------- to this -------------

      <repositories>
        <repository>
          <id>central</id>
          <name>Maven Repository Switchboard</name>
          <url>http://repo1.maven.org/maven2</url>
        </repository>
    </repositories>

Let me know if that fixes things.

Vaughn

1 Like

#5

Yup that did it, thanks! Got me unblocked. Running the tests now, will post with an update.

0 Likes

#6

Ok I ran the tests, the only feature we need is INSERT ... ON CONFLICT UPDATE ... by doing the following:

$ mvn test 2>&1 > /tmp/vlingo.log

$ grep 'ERROR:' /tmp/vlingo.log

I see only the following error in the logs:

ERROR: INSERT ON CONFLICT option not supported yet

Let me get back on the timeframe for adding that option.

0 Likes

#7

That’s great news and looking forward to the update!

0 Likes