h,

We have the following code in the upload servlet:

public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
        BlobInfo info = new
BlobInfoFactory().loadBlobInfo(blobstoreService.getUploadedBlobs(req).get("uploader"));
// uploader is the name of the <input type="file" ..>
        //Then we use the persistence manager to store the key
        //info.getBlobKey() .. info.getSize() ..
        //Then redirect to a new servlet to send json to the form complete
handler
}

2010/3/27 Miguel <[email protected]>

> I have the same problem.
> It does not matter the url to the servlet i use to work with de keys
> of the blobs, i always have the same NPC.
>
> Any help about what we are doing wrong ?
>
> Thanks
>
> On 11 feb, 21:21, Stevko <[email protected]> wrote:
> > I'm trying to post files into theblobstoreon my dev station using
> > eclipse.
> > The _BlobInfo_ objects are appearing within the datastore viewer but
> > this exception keep getting thrown for the first time I post the form.
> >
> > Is there anyone with access to UploadBlobServlet.java that can point
> > me to why I'm getting a NPE?
> > --Andy.Stevko
> >
> > Feb 11, 2010 8:06:43 PM com.google.apphosting.utils.jetty.JettyLogger
> > warn
> > WARNING: /_ah/upload/
> > ag5uaW51a3VtZW1vcmllc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGIYIDA
> > java.lang.NullPointerException
> >         at
> >
> com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa
> dBlobServlet.java:
> > 365)
> >         at
> com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
> > $000(UploadBlobServlet.java:72)
> >         at com.google.appengine.api.blobstore.dev.UploadBlobServlet
> > $1.run(UploadBlobServlet.java:100)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at
> >
> com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS
> ervlet.java:
> > 98)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> >         at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > 487)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1093)
> >         at
> >
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat
> ion.java:
> > 67)
> >         at
> >
> com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipel
> ine.java:
> > 122)
> >         at
> com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
> > 110)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1084)
> >         at
> >
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi
> lter.java:
> > 51)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1084)
> >         at
> >
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans
> actionCleanupFilter.java:
> > 43)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1084)
> >         at
> >
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile
> Filter.java:
> > 121)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1084)
> >         at
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> > 360)
> >         at
> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> > 216)
> >         at
> > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> > 181)
> >         at
> > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> > 712)
> >         at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 405)
> >         at
> >
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn
> gineWebAppContext.java:
> > 70)
> >         at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> > 139)
> >         at com.google.appengine.tools.development.JettyContainerService
> > $ApiProxyHandler.handle(JettyContainerService.java:352)
> >         at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> > 139)
> >         at org.mortbay.jetty.Server.handle(Server.java:313)
> >         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > 506)
> >         at org.mortbay.jetty.HttpConnection
> > $RequestHandler.content(HttpConnection.java:844)
> >         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> >         at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> >         at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> >         at
> > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> > 396)
> >         at org.mortbay.thread.BoundedThreadPool
> > $PoolThread.run(BoundedThreadPool.java:442)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to