Hibernate version upgrade

30 views
Skip to first unread message

István Mészáros

unread,
Mar 20, 2019, 1:26:04 PM3/20/19
to jooby-project
Hello all,

in my project I need to use Hibernate 5.3.x, which is incompatible with jooby-hbm because of this:



If I would upgrade the jooby-hbm module and make a PR, would it be accepted?

Thanks,

Istvan

Edgar Espina

unread,
Mar 20, 2019, 1:28:42 PM3/20/19
to István Mészáros, jooby-project
yes! Happy to accept and merge. 

--
You received this message because you are subscribed to the Google Groups "jooby-project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooby-projec...@googlegroups.com.
To post to this group, send email to jooby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooby-project/5634c927-b43a-42d5-a21f-9c0f56064492%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
edgar

István Mészáros

unread,
Mar 21, 2019, 5:25:06 AM3/21/19
to jooby-project
I merged the master to my fork, bit 'm having trouble building the project. The following classes are missing:

import org.jooby.internal.apitool.javadoc.FuzzyDocBaseListener;
import org.jooby.internal.apitool.javadoc.FuzzyDocLexer;
import org.jooby.internal.apitool.javadoc.FuzzyDocParser;
import org.jooby.internal.apitool.javadoc.JavadocLexer;
import org.jooby.internal.apitool.javadoc.JavadocParser;
import org.jooby.internal.apitool.javadoc.JavadocParserBaseListener;
import org.jooby.internal.apitool.javadoc.StatusCodeBaseListener;
import org.jooby.internal.apitool.javadoc.StatusCodeLexer;
import org.jooby.internal.apitool.javadoc.StatusCodeParser;

What could be the issue?

Edgar Espina

unread,
Mar 21, 2019, 7:50:14 AM3/21/19
to István Mészáros, jooby-project
Those are generated by ANTLR. do a mvn clean package

--
You received this message because you are subscribed to the Google Groups "jooby-project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooby-projec...@googlegroups.com.
To post to this group, send email to jooby-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
edgar

István Mészáros

unread,
Mar 21, 2019, 9:29:31 AM3/21/19
to jooby-project
That helped thanks, but now i'm struggling with other test errors. Some i could fix with converting line endings to UNIX style (ResponseTst.js, URLAssetTest.js). But this comes:

[ERROR] Failures: 
[ERROR]   Issue1070.shouldContainsSwaggerResponseDescription:45 expected:<{[
  "swagger" : "2.0",
  "tags" : [ {
    "name" : "Rates",
    "description" : "Top\nSubTop1"
  }, {
    "name" : "Currencies",
    "description" : "Top\nSubTop2"
  } ],
  "consumes" : [ "application/json" ],
  "produces" : [ "application/json" ],
  "paths" : {
    "/v2/currencies/rates" : {
      "get" : {
        "tags" : [ "Rates" ],
        "summary" : "yadayada",
        "description" : "",
        "operationId" : "getRates",
        "parameters" : [ ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "schema" : {
              "type" : "string"
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Rates" ],
        "summary" : "yadayada2",
        "description" : "",
        "operationId" : "deleteRates",
        "parameters" : [ ],
        "responses" : {
          "200" : {
            "description" : "```200``` OK",
            "schema" : {
              "type" : "string"
            }
          }
        }
      }
    },
    "/v2/currencies/{isoCode}" : {
      "get" : {
        "tags" : [ "Currencies" ],
        "summary" : "Gets the currency for a given ISO code",
        "description" : "",
        "operationId" : "getCurrencies",
        "parameters" : [ ],
        "responses" : {
          "200" : {
            "description" : "....",
            "schema" : {
              "type" : "string"
            }
          }
        }
      }
    }
  }]
}> but was:<{[
  "swagger" : "2.0",
  "tags" : [ {
    "name" : "Rates",
    "description" : "Top\nSubTop1"
  }, {
    "name" : "Currencies",
    "description" : "Top\nSubTop2"
  } ],
  "consumes" : [ "application/json" ],
  "produces" : [ "application/json" ],
  "paths" : {
    "/v2/currencies/rates" : {
      "get" : {
        "tags" : [ "Rates" ],
        "summary" : "yadayada",
        "description" : "",
        "operationId" : "getRates",
        "parameters" : [ ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "schema" : {
              "type" : "string"
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Rates" ],
        "summary" : "yadayada2",
        "description" : "",
        "operationId" : "deleteRates",
        "parameters" : [ ],
        "responses" : {
          "200" : {
            "description" : "```200``` OK",
            "schema" : {
              "type" : "string"
            }
          }
        }
      }
    },
    "/v2/currencies/{isoCode}" : {
      "get" : {
        "tags" : [ "Currencies" ],
        "summary" : "Gets the currency for a given ISO code",
        "description" : "",
        "operationId" : "getCurrencies",
        "parameters" : [ ],
        "responses" : {
          "200" : {
            "description" : "....",
            "schema" : {
              "type" : "string"
            }
          }
        }
      }
    }
]
}>



Then i thought I'll skip all modules just build jooby-hbm, as written in the readme:

mvn install -pl jooby-hbm -am

But then i get:

C:\dev\java\jdk1.8.0_60\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\dev\projects\jooby "-Dmaven.home=C:\Users\MYSELF\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Users\MYSELF\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Users\MYSELF\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\lib\idea_rt.jar=52855:C:\Users\MYSELF\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\MYSELF\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.3.5 install -pl jooby-hbm -am
[INFO] Scanning for projects...
[ERROR] [ERROR] Could not find the selected project in the reactor: jooby-hbm @ 
[ERROR] Could not find the selected project in the reactor: jooby-hbm -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:

Process finished with exit code 1



What am i missing?

Edgar Espina

unread,
Mar 21, 2019, 9:39:39 AM3/21/19
to István Mészáros, jooby-project
yea never use the single project build... but try this:

- mvn clean install -DskipTests
- mvn install -pl jooby-hbm -am




For more options, visit https://groups.google.com/d/optout.


--
edgar

István Mészáros

unread,
Mar 21, 2019, 10:00:29 AM3/21/19
to jooby-project
mvn clean install -DskipTests worked well, all modules built.

mvn install -pl jooby-hbm -am still does not work, same message as before (this must be executed in project root, right?).

But mvn install or package works now in the hbm subfolder, it builds and tests fine, so i guess i can proceed now.. thanks!

And sorry, I'm not so familiar with maven magic :D

Paul Hammant

unread,
Mar 21, 2019, 10:02:04 AM3/21/19
to Edgar Espina, István Mészáros, jooby-project
Well you can do single module builds just fine of course, but only AFTER you've done a 'mvn clean install -DskipTests' from root (after a git-pull).

István Mészáros

unread,
Mar 21, 2019, 12:12:15 PM3/21/19
to jooby-project
I created the PR, but the build failed. At first sight it's not so obvious what the problem could be, but i'll have a look on it tomorrow. Thanks for the help so far.

Edgar Espina

unread,
Mar 21, 2019, 12:55:53 PM3/21/19
to István Mészáros, jooby-project
does the jooby-hbm build successfully? If so, don;'t worry going to look later

On Thu, Mar 21, 2019 at 1:12 PM István Mészáros <contact....@gmail.com> wrote:
I created the PR, but the build failed. At first sight it's not so obvious what the problem could be, but i'll have a look on it tomorrow. Thanks for the help so far.

--
You received this message because you are subscribed to the Google Groups "jooby-project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooby-projec...@googlegroups.com.
To post to this group, send email to jooby-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
edgar

István Mészáros

unread,
Mar 21, 2019, 1:48:51 PM3/21/19
to jooby-project
Yes it does. I even tried the packaged artifact in my project, verified it uses 5.3.9, and works just fine.

István Mészáros

unread,
Mar 21, 2019, 3:40:30 PM3/21/19
to jooby-project
The direct problem is that the EntityListener in the test case does not have a no-arg constructor. In the Hibernate user guide they mention that it should be a class with a no-arg constructor.

My best guess is that for some reason GuiceBeanManager is not used at all, or not used for construction? I'll investigate further tomorrow.

Edgar Espina

unread,
Mar 21, 2019, 4:26:18 PM3/21/19
to István Mészáros, jooby-project
Cool! Thank you

On Thu, Mar 21, 2019, 16:40 István Mészáros <contact....@gmail.com> wrote:
The direct problem is that the EntityListener in the test case does not have a no-arg constructor. In the Hibernate user guide they mention that it should be a class with a no-arg constructor.

My best guess is that for some reason GuiceBeanManager is not used at all, or not used for construction? I'll investigate further tomorrow.

--
You received this message because you are subscribed to the Google Groups "jooby-project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooby-projec...@googlegroups.com.
To post to this group, send email to jooby-...@googlegroups.com.

István Mészáros

unread,
Mar 22, 2019, 6:44:55 AM3/22/19
to jooby-project
After some digging I found out that the BeanManager was really not picked up. It has to be registered at bootstrap time. That way it works fine, now all tests are passing.


Reply all
Reply to author
Forward
0 new messages