You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[provide a description of the issue]
I use spring-boot 2.1.3.RELEASE ,when I run application
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: net/bytebuddy/NamingStrategy$SuffixingRandom$BaseNameResolver
HibernateJpaConfiguration.class needs byte-buddy ,but byte-buddy's scope is "test",So application can not find byte-buddy at runtime,then I remove scope in pom.xml, it's ok
But when I execute "mvn clean package && java -jar xxx.jar " ,it is ok
at the same time ,it‘s also ok using IntelliJ IDEA
Environment
Operating System:archlinux
JDK version: 1.8.0_202
Visual Studio Code version:1.32.3
Java extension version:
Language Support for Java(TM) by Red Hat 0.42.1
Maven for Java 0.15.2
[Loaded net.bytebuddy.implementation.bytecode.Removal from jar:file:/home/lh/Project/JAVA/bim-cloud/bim-cloud-web/target/bim-cloud-web.jar!/BOOT-INF/lib/byte-buddy-1.9.10.jar!/]
spring-boot-maven-plugin package bytebuddy into jar ,but vscode-java-debug can not found bytebuddy in command "java -cp xxx" ,so I add this Item in .classpath .
vscode-java-debug doesn't include the test scope library when calculating the class paths. If you want it in a normal application, you must remove the test scope tag.
Activity
yaohaizh commentedon Apr 3, 2019
Jinbo Wang (@testforstephen) Yan Zhang (@Eskibear) Could you help investigate this problem?
demanLiu commentedon Apr 15, 2019
[Loaded net.bytebuddy.implementation.bytecode.Removal from jar:file:/home/lh/Project/JAVA/bim-cloud/bim-cloud-web/target/bim-cloud-web.jar!/BOOT-INF/lib/byte-buddy-1.9.10.jar!/]
spring-boot-maven-plugin package bytebuddy into jar ,but vscode-java-debug can not found bytebuddy in command "java -cp xxx" ,so I add this Item in .classpath .
I am not clear about the Differences between vscode-java-debug and spring-boot-maven-plugin
testforstephen commentedon May 5, 2019
vscode-java-debug doesn't include the test scope library when calculating the class paths. If you want it in a normal application, you must remove the test scope tag.
testforstephen commentedon Aug 26, 2019
midkiller (@demanLiu) Is this issue still reproducing in the latest java debugger?
demanLiu commentedon Sep 22, 2019
Jinbo Wang (@testforstephen) It seems all right.