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

Update faq for class not found / method not found #2213

Merged
merged 6 commits into from
Jan 9, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ If a question you have is not answered below, please [submit an issue](/../../is
[How do I configure a proxy?](#how-do-i-configure-a-proxy)\
[How can I examine network traffic?](#how-can-i-examine-network-traffic)\
[How do I view debug logs for Jib?](#how-do-i-view-debug-logs-for-jib)\
[I am seeing `ImagePullBackoff` on my pods.](#i-am-seeing-imagepullbackoff-on-my-pods-in-minikube)
[I am seeing `ImagePullBackoff` on my pods.](#i-am-seeing-imagepullbackoff-on-my-pods-in-minikube)\
[I am seeing `Method Not Found` or `Class Not Found` when building](#i-am-seeing-method-not-found-or-class-not-found-when-building)

---

Expand Down Expand Up @@ -537,6 +538,26 @@ kubectl patch serviceaccount default \

See more at [Using Google Container Registry (GCR) with Minikube](https://ryaneschinger.com/blog/using-google-container-registry-gcr-with-minikube/).

### I am seeing `Method Not Found` or `Class Not Found` when building

Sometimes when upgrading your gradle build plugin versions, you may experience errors due to mismatching versions of dependencies pulled in. For example: [issues/2183](https://github.com/GoogleContainerTools/jib/issues/2183). This can be due to the buildscript classpath loading behavior described [on gradle forums](https://discuss.gradle.org/t/version-is-root-build-gradle-buildscript-is-overriding-subproject-buildscript-dependency-versions/20746/3).
loosebazooka marked this conversation as resolved.
Show resolved Hide resolved

This commonly appears in multi module gradle projects. A solution to this problem is to define all your plugins in the base project and apply them selectively in your subprojects as needed. This should help alleviate the problem of the buildscript classpath using older versions of a library.
loosebazooka marked this conversation as resolved.
Show resolved Hide resolved

`build.gradle` (root)
```
plugins {
id `com.google.cloud.tools.jib` version `x.y.z` apply false
loosebazooka marked this conversation as resolved.
Show resolved Hide resolved
...
}
```

`build.gradle` (sub-project)
```
plugins {
id `com.google.cloud.tools.jib`
loosebazooka marked this conversation as resolved.
Show resolved Hide resolved
}
```

### How can I examine network traffic?

Expand Down