自 1.5.5 更新到 1.6.1 以来,AppEngine BlobStore 无法上传 blob | getUploads(req) 和 getUploadedBlobs(req) 均失败
我的网站使用 GAE(Java 版本),并使用 Google 插件在 Eclipse 中进行开发。一切都很顺利,实际上该网站已成功部署在 AppEngine 上。当我将插件和 SDK 从 1.5.5 更新到新版本(特别是使用 blobstoreservice)时,问题就开始了。
我无法从请求中获取 BlobKey。
已部署的版本使用,
blobstoreservice.getUpladedBlobs(HttpServletRequest)
但自从更新到 1.6.1 后,
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
尽管编译没有问题,但它抛出了“已弃用”警告。
鉴于我收到了“已弃用”警告,我尝试使用新的推荐方法
blobstoreservice.getUploads(HttpServletRequest)
,但这个方法会抛出 java.lang.NoSuchMethodError ,并且编译时不会出现任何警告。
对发生的事情有什么想法吗?
谢谢
I'm using GAE (Java version) for my website and I'm developing in Eclipse with the Google Plugin. It all worked perfectly and actually the site is successfully deployed on AppEngine. The problem started when I updated the plugin and SDK to the new version from 1.5.5 to 1.6.1 specifically with the blobstoreservice.
I CANT get the BlobKeys from the request.
The deployed version uses
blobstoreservice.getUpladedBlobs(HttpServletRequest)
but since the update to 1.6.1 it throws
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
although it compiles without problems, only a "deprecated" warning.
Given I got the "deperecated" warning I tried with the new recommended method
blobstoreservice.getUploads(HttpServletRequest)
but this one throws java.lang.NoSuchMethodError
and it compiles with NO warnings.
Any ideas of what's happening?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,这并没有花费我太多时间来解决。
显然,问题在于 Google Plugin for Eclipse 没有从 WAR/WEB-INF/lib 目录中删除旧的 AppEngine SDK jar。只需删除与 1.5.5 SDK 相对应的 jar(保留与 1.6.1 相对应的 jar)即可!
最奇怪的事情是,在我的其他应用程序引擎项目上,旧罐子会自动删除。这只是我永远无法理解的那些奇怪的软件故障之一。
OK, this took me not that much time to solve.
Apparently the problem was that the Google Plugin for Eclipse didn't remove the old AppEngine SDK jar from the WAR/WEB-INF/lib directory. Just had to delete the jars corresponding to the 1.5.5 SDK (leaving those corresponding to 1.6.1) and DONE!!!
The strangest thing was that on my other app engine projects the old jars where automatically deleted. Just one of those strange software glitches I'll never understand.