Skip to content

Incorrectly reported missing class error on Java nested static class #9938

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

Closed
scabug opened this issue Sep 29, 2016 · 3 comments
Closed

Incorrectly reported missing class error on Java nested static class #9938

scabug opened this issue Sep 29, 2016 · 3 comments

Comments

@scabug
Copy link

scabug commented Sep 29, 2016

I'm receiving this error:

[error] missing or invalid dependency detected while loading class file 'InternalTopic.class'.
[error] Could not access type TopicId in trait com.lightbend.lagom.javadsl.api.broker.Topic,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'InternalTopic.class' was compiled against an incompatible version of com.lightbend.lagom.javadsl.api.broker.Topic.
[error] one error found

For a class that exists. The class in question is here:

https://github.com/lagom/lagom/blob/master/api/src/main/java/com/lightbend/lagom/javadsl/api/broker/Topic.java

You can see its a java interface with a nested class. Then the InternalTopic.scala is here:

trait InternalTopic[Message] extends Topic[Message] {
  final override def topicId(): TopicId = throw new UnsupportedOperationException("Topic#topicId is not permitted in the service's topic implementation")

  final override def subscribe(): Subscriber[Message] =
    throw new UnsupportedOperationException("Topic#subscribe is not permitted in the service's topic implementation.")
}

(full source including imports here: https://github.com/jroper/lagom/blob/4579e11b9d794ff159cee65b6c220b72b0710568/api/src/main/scala/com/lightbend/lagom/internal/api/InternalTopicCall.scala#L50)

The issue can be fixed by replacing the TopicId reference with Topic.TopicId.

@scabug
Copy link
Author

scabug commented Sep 29, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9938?orig=1
Reporter: @jroper
See #1409

@scabug
Copy link
Author

scabug commented Sep 29, 2016

@retronym said:
This might end up being a duplicate of #1409

@som-snytt
Copy link

Duplicates #1409

@som-snytt som-snytt closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2023
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

2 participants