You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "TeslaCN (via GitHub)" <gi...@apache.org> on 2023/04/12 01:36:16 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #25126: Failed to build Agent modules with JDK 20

TeslaCN opened a new issue, #25126:
URL: https://github.com/apache/shardingsphere/issues/25126

   ## Build
   
   ```bash
   JAVA_HOME=$JAVA20_HOME ./mvnw clean install -T1C -f agent/pom.xml -nsu
   ```
   
   
   ```
   Caused by: java.lang.IllegalArgumentException: Java 20 (64) is not supported by the current version of Byte Buddy which officially supports Java 19 (63) - update Byte Buddy or set net.bytebuddy.experimental as a VM property
           at net.bytebuddy.utility.OpenedClassReader.of(OpenedClassReader.java:96)
           at net.bytebuddy.dynamic.scaffold.TypeWriter$Default$ForInlining.create(TypeWriter.java:3948)
           at net.bytebuddy.dynamic.scaffold.TypeWriter$Default.make(TypeWriter.java:2213)
           at net.bytebuddy.dynamic.scaffold.inline.RedefinitionDynamicTypeBuilder.make(RedefinitionDynamicTypeBuilder.java:224)
           at net.bytebuddy.dynamic.scaffold.inline.AbstractInliningDynamicTypeBuilder.make(AbstractInliningDynamicTypeBuilder.java:123)
           at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase.make(DynamicType.java:3668)
           at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.transform(InlineBytecodeGenerator.java:401)
           at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244)
           at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
           at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:541)
           at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
           at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:169)
           at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.triggerRetransformation(InlineBytecodeGenerator.java:280)
           ... 93 more
   ```
   
   
   byte-buddy supports Java 20 since 1.12.18. But after bumped, compile error occurred.
   
   ```
   diff --git a/agent/pom.xml b/agent/pom.xml
   index a8d8f946ebf..a89138394f4 100644
   --- a/agent/pom.xml
   +++ b/agent/pom.xml
   @@ -35,7 +35,7 @@
        </modules>
        
        <properties>
   -        <bytebuddy.version>1.12.12</bytebuddy.version>
   +        <bytebuddy.version>1.12.18</bytebuddy.version>
        </properties>
        
        <dependencyManagement>
   ```
   
   ```
   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project shardingsphere-agent-core: Compilation failure: Compilation failure: 
   [ERROR] /home/wuweijie/projects/shardingsphere/agent/core/src/main/java/org/apache/shardingsphere/agent/core/builder/AgentTransformer.java:[49,14] org.apache.shardingsphere.agent.core.builder.AgentTransformer is not abstract and does not override abstract method transform(net.bytebuddy.dynamic.DynamicType.Builder<?>,net.bytebuddy.description.type.TypeDescription,java.lang.ClassLoader,net.bytebuddy.utility.JavaModule,java.security.ProtectionDomain) in net.bytebuddy.agent.builder.AgentBuilder.Transformer
   [ERROR] /home/wuweijie/projects/shardingsphere/agent/core/src/main/java/org/apache/shardingsphere/agent/core/builder/AgentTransformer.java:[64,5] method does not override or implement a method from a supertype
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #25126: Failed to build Agent modules with JDK 20

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #25126:
URL: https://github.com/apache/shardingsphere/issues/25126#issuecomment-1510269274

   - I have a PR to try and fix this issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] terrymanu closed issue #25126: Failed to build Agent modules with JDK 20

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #25126: Failed to build Agent modules with JDK 20
URL: https://github.com/apache/shardingsphere/issues/25126


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org