Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法初始化类com.google.gdata.client.youtube.youtube服务_Java_Grails - Fatal编程技术网

Java 无法初始化类com.google.gdata.client.youtube.youtube服务

Java 无法初始化类com.google.gdata.client.youtube.youtube服务,java,grails,Java,Grails,我正在使用grails和googleyoutubeapi()获取用户上传的视频的详细信息。但一旦我尝试将YouTube服务类初始化为: String emailID="XXXX@gmail.com"//this is the id with which i registered for developer key String DeveloperKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" //developer key given by google YouTu

我正在使用grails和googleyoutubeapi()获取用户上传的视频的详细信息。但一旦我尝试将YouTube服务类初始化为:

String emailID="XXXX@gmail.com"//this is the id with which i registered for developer key
String DeveloperKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" //developer key given by google
YouTubeService service=new YouTubeService(emailID,DeveloperKey)
//I am done using appName,clientId(given by google) as the first parameter to the 
YouTubeService but nothing helped
它给了我以下错误:

Class java.lang.ClassNotFoundException
Message com.google.gdata.data.media.MediaMultipart
//I can see this MediaMultipart file in the said destination in one of the included jars.
Originally it was complaining about com.google.collections.common.Maps but then i
added google.collections.1-rc.jar. I also tried adding guava.jar as read from various
forums but that could not solve my problem 
如果重新加载页面,错误将更改为

Class java.lang.NoClassDefFoundError
Message Could not initialize class com.google.gdata.client.youtube.YouTubeService

我已经包括了所有必需的jar(),但是这个问题没有得到解决。请帮助。

尝试添加
javax.mail
com.google.guava
gdata java客户端所需的依赖项