Git Product home page Git Product logo

Comments (18)

fbiville avatar fbiville commented on August 25, 2024 1

@sey work has started and is tracked by this issue.

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

Hi, thanks for reporting this!

There was a bug (#71) in RC3 when you declared a changelog with the XML schema reference. It is now fixed but not released yet.

In the meantime, you can either:

  • build Liquigraph from sources and use it from there
  • grab the latest SNAPSHOT version
  • do not reference any schema when running with Liquigraph RC3

Does that help?

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

Can you confirm any of the above workarounds solve your issue? Thanks! :)

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

Feel free to reopen this issue if the bug still occurs in the latest versions (see how to proceed above).

from liquigraph.

sujitreddyg avatar sujitreddyg commented on August 25, 2024

Hi,

This bug is still occurring in latest version. I tried with version 3.0.1, please find the log below. Thanks!
Log:

cvc-elt.1.a: Cannot find the declaration of element 'changelog'.
at org.liquigraph.core.io.xml.ChangelogParser.parseChangelog(ChangelogParser.java:65) ~[liquigraph-core-3.0.1.jar:na]
at org.liquigraph.core.io.xml.ChangelogParser.parse(ChangelogParser.java:57) ~[liquigraph-core-3.0.1.jar:na]
at org.liquigraph.core.api.MigrationRunner.parseChangesets(MigrationRunner.java:86) ~[liquigraph-core-3.0.1.jar:na]
at org.liquigraph.core.api.MigrationRunner.runMigrations(MigrationRunner.java:67) ~[liquigraph-core-3.0.1.jar:na]
at org.liquigraph.core.api.Liquigraph.runMigrations(Liquigraph.java:63) ~[liquigraph-core-3.0.1.jar:na]

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

@sujitreddyg if you replace:

<changelog>

with

<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns="https://fbiville.github.io/liquigraph/schema/1.0/liquigraph.xsd">`

What happens?

from liquigraph.

sujitreddyg avatar sujitreddyg commented on August 25, 2024

@fbiville Thanks! I tried with and without xmlns, in both cases we are getting same error. Validation with both ImplicitSchemaValidator and ExplicitSchemaValidator are resulting in same errors. Please let me know if you have any suggestions.

Thanks!

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

How are you using Liquigraph?
Are you using the shell script, the Maven plugin or the core classes directly?
Also, do you have direct access to https://fbiville.github.io/liquigraph/schema/1.0/liquigraph.xsd in your environment?

from liquigraph.

sujitreddyg avatar sujitreddyg commented on August 25, 2024

We are using Liquigraph in Spring Boot web application version 1.4.2.RELEASE - https://projects.spring.io/spring-boot/.
Added to project dependencies using Maven:

<dependency>
   <groupId>org.liquigraph</groupId>
   <artifactId>liquigraph-core</artifactId>
   <version>3.0.1</version>
 </dependency>

Yes, the system has access to that xsd.

Thanks!

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

Not that it is linked to the issue you're having, but I'm afraid that Spring Boot support is not ready yet. We're working on a fix (@mvitz actually is).

Still, I'm not sure what's going on with this.
Could you maybe provide a minimalistic way to reproduce the issue? Thanks in advance!

from liquigraph.

mvitz avatar mvitz commented on August 25, 2024

You should at least show how you are using liquigraph inside your spring-boot application.

from liquigraph.

sujitreddyg avatar sujitreddyg commented on August 25, 2024

Hi,
Sorry for the confusion. Our usage of Liquigraph has nothing to do with Springboot, it’s just our Application runs on Springboot. In @PostConstruct method of Configuration file, we are using this piece of code to start Liquigraph migration:

      org.liquigraph.core.configuration.Configuration configuration = new ConfigurationBuilder()
              .withMasterChangelogLocation("liquigraph/changelog.xml")
              .withUri(”jdbc:neo4j:<uri>")
              .withRunMode()
              .withUsername(”user_name")
              .withPassword(”password")
              .build();

      Liquigraph liquigraph = new Liquigraph();
      liquigraph.runMigrations(configuration);

Thanks!

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

@sujitreddyg I'm afraid this still has to do with the way Spring Boot packages JAR.
Luckily enough, the full-fledged support for Spring Boot has recently landed in Liquigraph 3.x (documentation to be added soon).

If you wanna give it a try before the release, please replace your Liquigraph dependency with something like the following in your pom.xml:

<dependency>
   <groupId>org.liquigraph</groupId>
   <artifactId>liquigraph-spring-boot-starter</artifactId>
   <version>3.0.2-SNAPSHOT</version>
</dependency>

And do not forget to add the SNAPSHOT repository:

     <repositories>
       <repository>
         <id>maven-central-snapshots</id>
         <url>https://oss.sonatype.org/content/repositories/snapshots</url>
         <releases><enabled>false</enabled></releases>
         <snapshots><enabled>true</enabled></snapshots>
       </repository>
     </repositories>

Then, you can follow the example of https://github.com/fbiville/liquigraph-spring-boot-example.

Please note that there even is a simpler way: you can simply add @EnableAutoConfiguration to your Spring Boot application class and declare properties liquigraph.user, liquigraph.password and liquigraph.url (JDBC URL) in your application.properties file and it should just work!

from liquigraph.

mvitz avatar mvitz commented on August 25, 2024

Your description exactly shows the code I'm using in our last neo4j based project. And this normally works.

Does your project consist of several JARs? Maybe the configuration file is in another module than the code that loads the configuration file.

from liquigraph.

sujitreddyg avatar sujitreddyg commented on August 25, 2024

@fbiville Thanks! We will try liquigraph-spring-boot-starter. Sorry for delayed response.

@mvitz We are using spring-boot-maven-plugin to build a single jar. Do you think this might be causing the problem?

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

@sujitreddyg have you had a chance to test the new Spring Boot starter module? This is now nicely documented: http://fbiville.github.io/liquigraph/latest/index.html#spring-boot.

from liquigraph.

fbiville avatar fbiville commented on August 25, 2024

Feel free to comment again if you are still facing issues.

from liquigraph.

sey avatar sey commented on August 25, 2024

Hi there,

I'm facing the exact same issue. Tried with 3.0.4-SNAPSHOT and 3.1.0 on a Spring Boot project.
Tried with explicit and implicit schema validation.
Tried on a separate Java project with just LiquiGraph as a dependency.
Nothing works.

I tried on a different computer (outside of the network where it is not working) and it works, no problems.

I think the validation process as a strong dependency on the Internet access. Even with implicit validation it still goes to the Internet to get the XML Schema definition itself and other stuff.

It would be great to add a property to enable/disable the validation process.

What do you think?

from liquigraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.