GeezerVison is showing github.com — Dependeny Error- NoClass DefFoundError -va.lang.NoClassDefFoundError: com/google/auth/Servi ceAccountSigner · Issue #731 · GoogleCloudPlatform/java-docs-samples
Dependeny Error- NoClass DefFoundError -va.lang.NoClassDefFoundError: com/google/auth/Servi ceAccountSigner #731
Description
I am trying to run the language-entities project and finding below runtime errors while executing the app .
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/auth/Servi
ceAccountSigner
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.google.api.gax.core.GoogleCredentialsProvider.getCredentials(Goog
leCredentialsProvider.java:54)
at com.google.cloud.language.v1.LanguageServiceClient.(LanguageSer
viceClient.java:124)
at com.google.cloud.language.v1.LanguageServiceClient.create(LanguageSer
viceClient.java:112)
at com.google.cloud.language.v1.LanguageServiceClient.create(LanguageSer
viceClient.java:103)
at com.google.cloud.language.samples.Analyze.main(Analyze.java:60)
Caused by: java.lang.ClassNotFoundException: com.google.auth.ServiceAccountSigne
r
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
Also mainClass in POM is not pointed to right file
https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/language/analysis/pom.xml#L56
Pls check and update POM dependencies with necessary exclusions if required.
Activity
dineshchandra18 commented on Jun 30, 2017
Hi Guys , Did you get a chance to look into above issue ?
gguuss commented on Jul 6, 2017
@dineshchandra18 I'm not sure how you're encountering this issue, did you try following the instructions in the README.md file? I just was able to run the sample with the basic settings, e.g.:
Build the sample
mvn clean compile assembly:single
Run the sample against basic text
java -cp target/language-entities-1.0-jar-with-dependencies.jar \
com.google.cloud.language.samples.Analyze \
syntax \
"The quick brown fox jumped over the lazy dog."
See the output
Found 10 tokens.
TextSpan
Text: The
BeginOffset: 0
Lemma: The
PartOfSpeechTag: DET
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 3
Label: DET
TextSpan
Text: quick
BeginOffset: 4
Lemma: quick
PartOfSpeechTag: ADJ
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 3
Label: AMOD
TextSpan
Text: brown
BeginOffset: 10
Lemma: brown
PartOfSpeechTag: ADJ
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 3
Label: AMOD
TextSpan
Text: fox
BeginOffset: 16
Lemma: fox
PartOfSpeechTag: NOUN
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: SINGULAR
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 4
Label: NSUBJ
TextSpan
Text: jumped
BeginOffset: 20
Lemma: jump
PartOfSpeechTag: VERB
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: INDICATIVE
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: PAST
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 4
Label: ROOT
TextSpan
Text: over
BeginOffset: 27
Lemma: over
PartOfSpeechTag: ADP
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 4
Label: PREP
TextSpan
Text: the
BeginOffset: 32
Lemma: the
PartOfSpeechTag: DET
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 8
Label: DET
TextSpan
Text: lazy
BeginOffset: 36
Lemma: lazy
PartOfSpeechTag: ADJ
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 8
Label: AMOD
TextSpan
Text: dog
BeginOffset: 41
Lemma: dog
PartOfSpeechTag: NOUN
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: SINGULAR
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 5
Label: POBJ
TextSpan
Text: .
BeginOffset: 44
Lemma: .
PartOfSpeechTag: PUNCT
Aspect: ASPECT_UNKNOWN
Case: CASE_UNKNOWN
Form: FORM_UNKNOWN
Gender: GENDER_UNKNOWN
Mood: MOOD_UNKNOWN
Number: NUMBER_UNKNOWN
Person: PERSON_UNKNOWN
Proper: PROPER_UNKNOWN
Reciprocity: RECIPROCITY_UNKNOWN
Tense: TENSE_UNKNOWN
Voice: VOICE_UNKNOWN
DependencyEdge
HeadTokenIndex: 4
Label: P
jabubake commented on Jul 25, 2017
kurtisvg commented on Jun 10, 2019
Notice: this issue has been closed because it has been inactive for 685 days. You may reopen this issue if it has been closed in error.
Metadata
Metadata
Development
No branches or pull requestsIssue actions