Quarkus + Spring Data + SQL Server
See original GitHub issueI’m trying to run package
maven goal in my new Quarkus project, that i’m porting from Spring Boot to Quarkus.
But…I’m experiencing this problem during execution ‘package’ phase:
`[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.0.1.Final:build (default) on project configurations: Failed to build a runnable JAR: Failed to augment application classes: Build failure: Build failed due to errors [ERROR] [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#enhancerDomainObjects threw an exception: java.lang.NoSuchMethodError: net.bytebuddy.asm.AsmVisitorWrapper$ForDeclaredMethods.invokable(Lnet/bytebuddy/matcher/ElementMatcher;[Lnet/bytebuddy/asm/AsmVisitorWrapper$ForDeclaredMethods$MethodVisitorWrapper;)Lnet/bytebuddy/asm/AsmVisitorWrapper$ForDeclaredMethods; [ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.PersistentAttributeTransformer.applyTo(PersistentAttributeTransformer.java:181) [ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.doEnhance(EnhancerImpl.java:327) [ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.lambda$enhance$0(EnhancerImpl.java:132) [ERROR] at org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.rewrite(ByteBuddyState.java:141) [ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:132) [ERROR] at io.quarkus.hibernate.orm.deployment.HibernateEntityEnhancer.enhance(HibernateEntityEnhancer.java:86) [ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.enhanceEntities(HibernateOrmProcessor.java:553) [ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.enhancerDomainObjects(HibernateOrmProcessor.java:308) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.lang.reflect.Method.invoke(Method.java:498) [ERROR] at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:941) [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:415) [ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426) [ERROR] at java.lang.Thread.run(Thread.java:748) [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479) [ERROR] -> [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: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Process finished with exit code 1 `
This is my application.properties (there are fictitious data for sensitive data):
quarkus.datasource.url=jdbc:sqlserver://xxx:1433;databaseName=yyy quarkus.datasource.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver quarkus.datasource.username=aaa quarkus.datasource.password=bbb quarkus.datasource.max-size=8 quarkus.datasource.min-size=2 quarkus.hibernate-orm.log.sql=true quarkus.hibernate-orm.dialect=org.hibernate.dialect.SQLServerDialect
and these are my dependency pom:
<dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-spring-data-jpa</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy-jackson</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-spring-di</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-jdbc-mssql</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-spring-web</artifactId> </dependency>
Does anyone have any idea of the reason for the error? Thanks so much
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Great to hear! So I’ll close this issue and be sure to keep an eye on the OpenAPI issue for upcoming Swagger support
It seems that removing the dependencies of swagger works 😃 thanks a lot!