NoClassDefFoundError on a particular class while running gwt:codeserver

71 views
Skip to first unread message

Mukeya Kassindye

unread,
Apr 4, 2024, 3:29:21 PMApr 4
to GWT Users
Hi,

I can't seem to be able to point out what dependency I am missing while trying to run my gwt application in Devmode with gwt:codeserver.
I can  build the program, compile it and deploy it without a problem. However when I am trying to run it in devmode I am having this error :
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl

I have included all dependencies related to hibernate in my pom.xml with the right versions of dependency I believe. 
What am I missing?
 
here is the error log : 

[INFO]          Computing all possible rebind results for 'org.jboss.errai.marshalling.client.api.MarshallerFactory'
[INFO]             Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory
[INFO]                Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator
[INFO]                   Generating Marshallers Bootstrapper...
[INFO]          Computing all possible rebind results for 'org.jboss.errai.ioc.client.container.IOCEnvironment'
[INFO]             Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment
[INFO]                Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator
[INFO]                   Generating Extensions Bootstrapper...
[INFO]          Computing all possible rebind results for 'org.jboss.errai.ioc.client.Bootstrapper'
[INFO]             Rebinding org.jboss.errai.ioc.client.Bootstrapper
[INFO]                Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator
[INFO]                   generating ioc bootstrapping code...
[WARNING] java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl
[WARNING]       at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
[WARNING]       at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
[WARNING]       at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:112)
[WARNING]       at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:86)
[WARNING]       at org.jboss.errai.config.rebind.AbstractAsyncGenerator.startAsyncGeneratorsAndWaitFor(AbstractAsyncGenerator.java:205)
[WARNING]       at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generate(ErraiEntityManagerGenerator.java:113)
[WARNING]       at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[WARNING]       at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
[WARNING]       at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
[WARNING]       at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
[INFO]          Computing all possible rebind results for 'org.jboss.errai.jpa.client.local.ErraiEntityManagerFactory'
[INFO]             Rebinding org.jboss.errai.jpa.client.local.ErraiEntityManagerFactory
[INFO]                Invoking generator org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator
[INFO]                   [ERROR] Error generating GeneratedErraiEntityManagerFactory
[INFO] java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl
[INFO]  at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
[INFO]  at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
[INFO]  at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:112)
[INFO]  at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:86)
[INFO]  at org.jboss.errai.config.rebind.AbstractAsyncGenerator.startAsyncGeneratorsAndWaitFor(AbstractAsyncGenerator.java:205)
[WARNING]       at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
[INFO]  at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generate(ErraiEntityManagerGenerator.java:113)
[WARNING]       at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
[INFO]  at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[INFO]  at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
[WARNING]       at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
[WARNING]       at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:519)
[WARNING]       at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
[WARNING]       at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
[WARNING]       at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
[WARNING]       at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
[INFO]  at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
[INFO]  at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
[INFO]  at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:519)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[WARNING]       at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[WARNING]       at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO]  at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[WARNING]       at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO]  at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[INFO]  at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
[INFO]  at com.google.gwt.dev.jjs.ast.JIfStatement.traverse(JIfStatement.java:53)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[INFO]  at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
[WARNING]       at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[WARNING]       at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
[INFO]  at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
[INFO]  at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
[INFO]  at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:243)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:190)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:131)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:192)
[INFO]  at com.google.gwt.dev.codeserver.Recompiler.doCompile(Recompiler.java:362)
[INFO]  at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:175)
[WARNING]       at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
[WARNING]       at com.google.gwt.dev.jjs.ast.JIfStatement.traverse(JIfStatement.java:53)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[WARNING]       at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[WARNING]       at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
[WARNING]       at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
[WARNING]       at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[WARNING]       at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
[WARNING]       at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.codeserver.Recompiler.recompile(Recompiler.java:134)
[INFO]  at com.google.gwt.dev.codeserver.Outbox.recompile(Outbox.java:135)
[INFO]  at com.google.gwt.dev.codeserver.JobRunner.recompile(JobRunner.java:113)
[INFO]  at com.google.gwt.dev.codeserver.JobRunner.access$000(JobRunner.java:37)
[INFO]  at com.google.gwt.dev.codeserver.JobRunner$2.run(JobRunner.java:90)
[WARNING]       at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[WARNING]       at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
[WARNING]       at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
[WARNING]       at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
[WARNING]       at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
[WARNING]       at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
[WARNING]       at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
[WARNING]       at com.google.gwt.dev.Precompile.precompile(Precompile.java:243)
[WARNING]       at com.google.gwt.dev.Precompile.precompile(Precompile.java:190)
[WARNING]       at com.google.gwt.dev.Precompile.precompile(Precompile.java:131)
[WARNING]       at com.google.gwt.dev.Compiler.compile(Compiler.java:192)
[WARNING]       at com.google.gwt.dev.codeserver.Recompiler.doCompile(Recompiler.java:362)
[WARNING]       at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:175)
[INFO]  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[INFO]  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[WARNING]       at com.google.gwt.dev.codeserver.Recompiler.recompile(Recompiler.java:134)
[WARNING]       at com.google.gwt.dev.codeserver.Outbox.recompile(Outbox.java:135)
[WARNING]       at com.google.gwt.dev.codeserver.JobRunner.recompile(JobRunner.java:113)
[INFO]  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[WARNING]       at com.google.gwt.dev.codeserver.JobRunner.access$000(JobRunner.java:37)
[WARNING]       at com.google.gwt.dev.codeserver.JobRunner$2.run(JobRunner.java:90)
[WARNING]       at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[WARNING]       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[WARNING]       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[WARNING]       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[WARNING]       at java.base/java.lang.Thread.run(Thread.java:829)
[WARNING] Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl
[WARNING]       at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:32)
[INFO]  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[WARNING]       at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:89)
[INFO]  at java.base/java.lang.Thread.run(Thread.java:829)
[INFO] Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl
[INFO]  at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:32)
[WARNING]       at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:166)
[WARNING]       at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
[WARNING]       at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.createHibernateEntityManagerFactory(ErraiEntityManagerGenerator.java:295)
[WARNING]       at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generate(ErraiEntityManagerGenerator.java:119)
[INFO]  at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:89)
[INFO]  at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:166)
[INFO]  at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
[INFO]  at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.createHibernateEntityManagerFactory(ErraiEntityManagerGenerator.java:295)
[INFO]  at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generate(ErraiEntityManagerGenerator.java:119)
[INFO]  at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:66)
[INFO]  at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:54)
[INFO]  ... 4 more
[WARNING]       at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:66)
[INFO]          [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[INFO]             [WARN] org.jboss.errai.jpa.client.local.GeneratedErraiEntityManagerFactory
[INFO]          [ERROR] Could not find org.jboss.errai.jpa.client.local.GeneratedErraiEntityManagerFactory in types compiled from source. Is the source glob too strict?
[INFO]          [ERROR] Errors in 'org/jboss/errai/jpa/client/local/ErraiEntityManagerProducer.java'
[INFO]             [ERROR] Line 38: Rebind result 'org.jboss.errai.jpa.client.local.GeneratedErraiEntityManagerFactory' could not be found
[WARNING]       at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:54)
[WARNING]       ... 4 more
[INFO]          Unification traversed 47958 fields and methods and 4725 types. 4686 are considered part of the current module and 4686 had all of their fields and methods traversed.
[INFO]       [ERROR] Compiler returned false
[INFO]       [WARN] recompile failed
[INFO]       [WARN] continuing to serve previous version


And this is what my pom.xml looks like :

<dependencies>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <exclusions>
        <exclusion>
          <!-- Contains a ServletContainerInitializer that breaks the EmbeddedWildFlyLauncher during GWT Super Dev Mode -->
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>apache-jsp</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- GWT -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
    </dependency>

    <!-- Change to runtime when running gwt:codeserver to avoid gwt common.collect module error-->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-gwt</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.google.j2objc</groupId>
      <artifactId>j2objc-annotations</artifactId>
      <optional>false</optional>
      <version>3.0.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.errorprone</groupId>
      <artifactId>error_prone_annotations</artifactId>
      <version>2.26.1</version>
    </dependency>

    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <scope>provided</scope>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
      <scope>provided</scope>
      <version>1</version>
    </dependency>
    <dependency>
      <groupId>jakarta.validation</groupId>
      <artifactId>jakarta.validation-api</artifactId>
      <classifier>sources</classifier>
      <scope>provided</scope>
      <version>3.0.2</version>
    </dependency>
    <dependency>
      <groupId>jakarta.validation</groupId>
      <artifactId>jakarta.validation-api</artifactId>
      <scope>provided</scope>
      <version>3.0.2</version>
    </dependency>


    <!-- API, java.xml.bind module -->
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <version>2.3.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml</groupId>
      <artifactId>classmate</artifactId>
      <version>1.7.0</version>
    </dependency>

    <!-- Runtime, com.sun.xml.bind module -->
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <version>2.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate.orm</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>6.4.4.Final</version>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <classifier>sources</classifier>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Errai -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-javaee-all</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-jboss-as-support</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ioc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-jpa-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-javax-enterprise</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-navigation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-data-binding</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ui</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-codegen-gwt</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-tools</artifactId>
    </dependency>

    <!-- Used for EmbeddedWildFlyLauncher during GWT Super Dev Mode -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-jboss</artifactId>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.spec.javax.transaction</groupId>
      <artifactId>jboss-transaction-api_1.2_spec</artifactId>
      <!-- change to scope runtime when running gwt:codeserver -->
      <!-- <scope>provided</scope> -->
      <scope>runtime</scope>
      <version>1.1.1.Final</version>
    </dependency>
    <dependency><groupId>org.jboss.spec.javax.interceptor</groupId>
      <artifactId>jboss-interceptors-api_1.2_spec</artifactId>
      <!-- <scope>runtime</scope> -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    ...
  </build>
</project>


Jens

unread,
Apr 5, 2024, 4:44:47 AMApr 5
to GWT Users
Maybe your hibernate is too new? https://docs.jboss.org/errai/latest/errai/reference/html_single/#_errai_jpa indicates that Hibernate 4.1.1 should be used.

-- J.

Thomas Broyer

unread,
Apr 5, 2024, 9:06:46 AMApr 5
to GWT Users
On Thursday, April 4, 2024 at 9:29:21 PM UTC+2 dja...@gmail.com wrote:
Hi,

I can't seem to be able to point out what dependency I am missing while trying to run my gwt application in Devmode with gwt:codeserver.
I can  build the program, compile it and deploy it without a problem. However when I am trying to run it in devmode I am having this error :
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl

I have included all dependencies related to hibernate in my pom.xml with the right versions of dependency I believe. 
What am I missing?

If it builds but does not "run" then it's likely a dependency scoping issue: https://tbroyer.github.io/gwt-maven-plugin/codeserver.html
Your Hibernate dependencies have <scope>provided</scope> so I would bet on that.

Mukeya Kassindye

unread,
Apr 15, 2024, 5:08:15 AMApr 15
to GWT Users
Hi everyone,

@Tbroyer : I ended up change the scope of my hibernate dependencies to runtime and now it is working fine.
@Jens, just by changing the scope to runtime, with the version I specified. it is working.

thanks all for the tips.
Reply all
Reply to author
Forward
0 new messages