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

getting Read descriptor path failed #20

Open
RahulNautiyal3110 opened this issue Aug 9, 2021 · 2 comments
Open

getting Read descriptor path failed #20

RahulNautiyal3110 opened this issue Aug 9, 2021 · 2 comments

Comments

@RahulNautiyal3110
Copy link

org.graalvm.polyglot.PolyglotException: Read descriptor path failed: /Users/rahulnautiyal/Documents/target/generated-resources/protobuf/descriptor-sets/karate-grpc.protobin

  • com.github.thinkerou.karate.service.GrpcCall.excute(GrpcCall.java:79)
  • com.github.thinkerou.karate.service.GrpcCall.invoke(GrpcCall.java:56)
  • com.github.thinkerou.karate.GrpcClient.call(GrpcClient.java:45)
  • .:program(Unnamed:1)

anything to resolve it

pom structure


com.intuit.karate
karate-junit5
${karate.version}
test

    <dependency>
        <groupId>com.github.thinkerou</groupId>
        <artifactId>karate-grpc-core</artifactId>
        <version>1.0.1</version>
    </dependency>

    <dependency>
        <groupId>com.github.thinkerou</groupId>
        <artifactId>karate-grpc-proto</artifactId>
        <version>1.0.1</version>
    </dependency>
    <dependency>
    <groupId>com.google.protobuf</groupId>
    <artifactId>protobuf-java</artifactId>
    <version>3.2.0</version>
    </dependency>
</dependencies>

<build>
    <testResources>
        <testResource>
            <directory>src/test/java</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </testResource>
    </testResources>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven.compiler.version}</version>
            <configuration>
                <encoding>UTF-8</encoding>
                <source>${java.version}</source>
                <target>${java.version}</target>
                <compilerArgument>-Werror</compilerArgument>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven.surefire.version}</version>
            <configuration>
                <argLine>-Dfile.encoding=UTF-8</argLine>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.xolstice.maven.plugins</groupId>
            <artifactId>protobuf-maven-plugin</artifactId>
            <version>0.5.0</version>
            <configuration>
                <protocArtifact>com.google.protobuf:protoc:3.5.1</protocArtifact>
                <pluginId>grpc-java</pluginId>
                <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.12.0</pluginArtifact>
                <writeDescriptorSet>true</writeDescriptorSet>
                <descriptorSetFileName>karate-grpc.protobin</descriptorSetFileName>
                <descriptorSetOutputDirectory>${user.home}/.karate-grpc/protobuf-descriptor-sets/</descriptorSetOutputDirectory>
                <protoSourceRoot>${project.basedir}/java/proto</protoSourceRoot>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>compile</goal>
                        <goal>compile-custom</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>kr.motd.maven</groupId>
            <artifactId>os-maven-plugin</artifactId>
            <version>1.6.1</version>
            <executions>
                <execution>
                    <phase>initialize</phase>
                    <goals>
                        <goal>detect</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
@s3naid
Copy link

s3naid commented Aug 24, 2021

This is the path to karate-grpc.protobin:

<descriptorSetOutputDirectory>${user.home}/.karate-grpc/protobuf-descriptor-sets/</descriptorSetOutputDirectory>

Change this to your path and it should work

@iwakura-lain
Copy link

hi,have you solved the problem yet?i met same problem

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

3 participants