Getting vlingo to run on YugaByte DB

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

Need a little help with building this. I rebased to the latest version of the repo (GitHub - vlingo/xoom-symbio-jdbc: The VLINGO XOOM SYMBIO implementation for JDBC for Reactive storage using Event-Sourcing, Key-Value, and Object storage.) 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

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

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

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.

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

Hey @Vaughn_Vernon,

Completely forgot about this… gave it another go. Hitting build errors, help please:

[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreDelegate.java:[38,8] io.vlingo.symbio.store.object.jdbc.jpa.JPAObjectStoreDelegate is not abstract and does not override abstract method <E>persistAll(java.util.Collection<java.lang.Object>,java.util.List<io.vlingo.symbio.Source<E>>,long,io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest,java.lang.Object) in io.vlingo.symbio.store.object.ObjectStoreWriter
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreDelegate.java:[77,3] method does not override or implement a method from a supertype
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreDelegate.java:[96,47] name clash: <T,E>persistAll(java.util.Collection<T>,java.util.List<io.vlingo.symbio.Source<E>>,long,io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest,java.lang.Object) in io.vlingo.symbio.store.object.jdbc.jpa.JPAObjectStoreDelegate and <E>persistAll(java.util.Collection<java.lang.Object>,java.util.List<io.vlingo.symbio.Source<E>>,long,io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest,java.lang.Object) in io.vlingo.symbio.store.object.ObjectStoreWriter have the same erasure, yet neither overrides the other
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreDelegate.java:[95,3] method does not override or implement a method from a supertype
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreActor.java:[20,8] io.vlingo.symbio.store.object.jdbc.jpa.JPAObjectStoreActor is not abstract and does not override abstract method <E>persistAll(java.util.Collection<java.lang.Object>,java.util.List<io.vlingo.symbio.Source<E>>,long,io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest,java.lang.Object) in io.vlingo.symbio.store.object.ObjectStoreWriter
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreActor.java:[38,3] method does not override or implement a method from a supertype
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreActor.java:[44,47] name clash: <T,E>persistAll(java.util.Collection<T>,java.util.List<io.vlingo.symbio.Source<E>>,long,io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest,java.lang.Object) in io.vlingo.symbio.store.object.jdbc.jpa.JPAObjectStoreActor and <E>persistAll(java.util.Collection<java.lang.Object>,java.util.List<io.vlingo.symbio.Source<E>>,long,io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest,java.lang.Object) in io.vlingo.symbio.store.object.ObjectStoreWriter have the same erasure, yet neither overrides the other
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/jpa/JPAObjectStoreActor.java:[43,3] method does not override or implement a method from a supertype
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/JDBCObjectStoreActor.java:[25,8] io.vlingo.symbio.store.object.jdbc.JDBCObjectStoreActor is not abstract and does not override abstract method <E>persistAll(java.util.Collection<java.lang.Object>,java.util.List<io.vlingo.symbio.Source<E>>,long,io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest,java.lang.Object) in io.vlingo.symbio.store.object.ObjectStoreWriter
[ERROR] /Users/karthik/code/apps/vlingo-symbio-jdbc/src/main/java/io/vlingo/symbio/store/object/jdbc/JDBCObjectStoreActor.java:[50,3] method does not override or implement a method from a supertype
...

Hi @karthik It’s been a few months since our previous contact. It’s possible that you need to update the full platform source and rebuild, or at least update your pom.xml vlingo-* dependencies to 0.8.3.

If you need to pull the latest platform source you can do the following:

$ cd vlingo-platform
$ ./gradlew
...
$ mvn clean install

The gradlew pulls the latest source from all repositories. The mvn clean install will build the entire platform and install the .jar files into your local Maven repository (~/.m2).

Hi @karthik

I have just published a new release on Bintray and Sonatype (Maven Central lags for some hours). I suggest updating to current release: 0.8.4

Let me know how it goes.

Best,
Vaughn

1 Like