Sitelet https://github.com/googleapis/google-cloud-java/issues/943
Skip to content

UnsupportedClassVersionError when testing gcloud-java-logging #943

Description

@mziccard

If I try to run tests for gcloud-java-logging (mvn test) I get the following exception:

java.lang.UnsupportedClassVersionError: com/google/logging/v2/LoggingServiceV2Grpc$LoggingServiceV2 : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at com.google.cloud.logging.spi.v2.LoggingServiceV2ApiTest.startStaticServer(LoggingServiceV2ApiTest.java:40)
        ...

This is probably caused by the fact that grpc-logging-v2:0.0.1 is not compatible with Java7. @garrettjonesgoogle @shinfan could you please fix this? Also please check that also other gcloud-java-logging dependencies are compatible with Java7 (namely grpc-logging-type:0.0.1 and grpc-core-proto:0.0.2, the latest probably just need to be updated to version 0.0.3).

The reason we didn't notice this before is that gcloud-java-logging was not added to our parent pom, thus mvn test run in the root directory did not trigger tests in gcloud-java-logging, this should be fixed as well.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the Cloud Logging API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions