Author Message
Andrew.Prokop
Joined: Oct 28, 2014
Messages: 179
Offline
I created a dynamic task that uses a Google library to access the Google Cloud. I included the following dependency in my pom.xml.

<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-language</artifactId>
<version>0.23.1-beta</version>
</dependency>

In my code I have:

import com.google.cloud.language.v1.Document;
import com.google.cloud.language.v1.Document.Type;
import com.google.cloud.language.v1.LanguageServiceClient;
import com.google.cloud.language.v1.Sentiment;

When the Snap-in/task reaches this line during execution:

LanguageServiceClient language = LanguageServiceClient.create();

I receive: javax.servlet.ServletException java.lang.NoClassDefFoundError: com/google/cloud/language/v1/LanguageServiceClient

Am I naive in thinking that the Google library would be packaged into my jar file? Is there a way to resolve this?
PrakashN
Joined: Jun 30, 2015
Messages: 105
Offline
Andrew,

I think you should have the jar containing the LanguageServiceClient provided for your code to run. Do you have the jar file at your disposal and included? If you need more help resolving this, please send me the code privately - you have my email address - and I can try resolving it for you.

Thanks!
Prakash

Prakash Natarajan System Architecture Consulting Engineer Engagement Designer Avaya
Go to:   
Mobile view