GithubHelp home page GithubHelp logo

Schema Update error on 1.1.6 about apiman HOT 5 CLOSED

apiman avatar apiman commented on July 25, 2024
Schema Update error on 1.1.6

from apiman.

Comments (5)

EricWittmann avatar EricWittmann commented on July 25, 2024

Two things. First, 1.1.6.Final actually has a bug in the postgresql DDL. However it seems you're just letting hibernate do its thing (which is fine). That said, you can get the corrected DDL here if you wanted:

https://github.com/apiman/apiman/blob/1.1.x/distro/wildfly8/src/main/resources/overlay/apiman/ddls/apiman_postgresql9.ddl

More importantly, there has been a change to the DB support which is probably tripping you up. Some hibernate/db settings have been moved here:

https://github.com/apiman/apiman/blob/1.1.x/distro/wildfly8/src/main/resources/overlay/standalone/configuration/apiman.properties#L20-L22

In particular the JNDI location is now:

java:jboss/datasources/apiman-manager

I hope that helps!

from apiman.

jason-d-hobbs avatar jason-d-hobbs commented on July 25, 2024

Thanks for the rapid reply!

I changed the JNDI name, and set up the apiman.properties file as you indicated. The Hibernate schema update then failed on the svc_gateways table.

I ended up just creating an empty database, switching Hibernate to validate mode, and running the DDL you provided. Now I have 1.1.6 up and running. We are still in the evaluation phase, so there wasn't anything in that db that I couldn't recreate quickly anyway.

Lesson learned: Don't assume I can just upgrade ApiMan and let Hibernate handle the DB updates. There probably needs to be some sort of migration guide (if there isn't already and I missed it) on how to move between point releases and retain the database.

from apiman.

EricWittmann avatar EricWittmann commented on July 25, 2024

Yes - we need to create a comprehensive upgrade guide, but that doesn't exist yet. Interestingly this is the second time today that upgrades have come up. I guess it's time to escalate the task. :)

from apiman.

maslick avatar maslick commented on July 25, 2024

@jason-d-hobbs if you set those two lines in apiman.properties:

apiman.hibernate.connection.datasource=java:jboss/datasources/apiman-manager
apiman.hibernate.dialect=io.apiman.manager.api.jpa.ApimanH2Dialect

does this mean you are no longer using postgres database, but h2 instead?

from apiman.

EricWittmann avatar EricWittmann commented on July 25, 2024

Yeah you definitely need to use the appropriate hibernate dialect for the database you want to use.

from apiman.

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.