Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnablePrivateAccessProcessor Unable to get public no-arg constructor #302

Open
chenww opened this issue Nov 16, 2022 · 3 comments
Open

EnablePrivateAccessProcessor Unable to get public no-arg constructor #302

chenww opened this issue Nov 16, 2022 · 3 comments

Comments

@chenww
Copy link

chenww commented Nov 16, 2022

Help pls as first time to use testable-mock.

Env:

Java15.

     <testable.version>0.7.8</testable.version>
     <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M6</version>
            <configuration>
                <argLine>-javaagent:${settings.localRepository}/com/alibaba/testable/testable-agent/${testable.version}/testable-agent-${testable.version}.jar</argLine>
            </configuration>
        </plugin>

mvn test failed with following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project deploy: Compilation failure
[ERROR] Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: com.alibaba.testable.processor.EnablePrivateAccessProcessor Unable to get public no-arg constructor
@linfan
Copy link
Collaborator

linfan commented Nov 17, 2022

Thanks for raising this issue. I'll prepare a java 15 environment and try my luck : )

It would be very helpful if you can:

  • try make a simple demo which can reproduce the issue
    or
  • try if this issue reproducible upon jdk 1.8, that is the version we currently most tested

@ddfeiyu
Copy link

ddfeiyu commented Jan 6, 2023

@linfan

Java17也出现这个问题

<testable.version>0.7.3</testable.version>
<dependency>
  <groupId>com.alibaba.testable</groupId>
  <artifactId>testable-all</artifactId>
  <version>${testable.version}</version>
  <scope>test</scope>
</dependency>
org.apache.maven.plugins maven-surefire-plugin -javaagent:${settings.localRepository}/com/alibaba/testable/testable-agent/${testable.version}/testable-agent-${testable.version}.jar

@absolutelyZero
Copy link

@linfan

Java11 也出现这个问题

<testable.version>0.7.9</testable.version>

如何解决?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants