-
Notifications
You must be signed in to change notification settings - Fork 25
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
Missing dependency error not displaying #689
Comments
Got an example class so I can replicate? The missing dependency message is usually quite descriptive, so this feels like something else is the problem. |
Yeah, the error message still works for me. [ERROR] /M:/Dev/avaje-helidon-nima-api-example/src/main/java/com/jojo/helidon/api/Example.java:[6,8] No dependency provided for com.jojo.helidon.api.DependencyClass on com.jojo.helidon.api.Example
[ERROR] Dependencies [com.jojo.helidon.api.DependencyClass] are not provided - there are no @Singleton, @Component, @Factory/@Bean that currently provide this type. If this is an external dependency consider specifying via @External Tried field/constructor/method injection, but I am unable to replicate your issue. |
@re-thc got anything to add? I can't publish a fix if I can't replicate the issue. |
Happy to close. It triggers if the class is coming from another project/module/jar and no longer exists. Maybe too convoluted to cater for. |
can you run with |
@re-thc can you explain exactly how you got this? Edge case it may be, but if it happened once it'll happen again to somebody else.
what do you mean no longer exists? |
It happens if you reference a class that no longer exists. You do get class not found exceptions also. When there's a long chain of errors it's possible to miss it so was originally confused by this particular error.
Say it gets deleted or renamed. |
Really need the stack trace for this one. Can you provide it? |
@re-thc we should be able to fix it if you provide a stack trace |
@rbygrave, I figured out how to replicate it using JPMS. All you have to do is remove |
If I declare an
@Inject
without a matching@Singleton
or similar, I get the following error:Caused by: java.lang.NullPointerException: Cannot invoke "String.lastIndexOf(int)" because "fullType" is null
It was pretty hard to realize from that what was missing. Would be good if this error was caught to provide a better message so we can see what to do.
Thanks!
The text was updated successfully, but these errors were encountered: