Error when uploading

Just followed the installation instructions for a remote server, and
when running it I get the login screen, then the main screen of the
application (just as I had in the local server), and when I try to
upload the form created at ODK Build I get the following:

Uncaught exception from servlet
java.lang.IllegalArgumentException: Type ("") is not that of an entity
but needs to be for this operation
at
org.datanucleus.jpa.EntityManagerImpl.assertEntity(EntityManagerImpl.java:
867)
at
org.datanucleus.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:
385)
at
org.odk.aggregate.servlet.FormUploadServlet.doPost(FormUploadServlet.java:
161)
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:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
251)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:6784)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:6782)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
474)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
831)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
103)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:418)
at java.lang.Thread.run(Thread.java:636)
Unexpected exception from servlet: java.lang.IllegalArgumentException:
Type ("") is not that of an entity but needs to be for this operation

··· --------------

The same was happening with the local server. Maybe it is something in
the form's XML? I have added the ID where I was supposed to. Here is
the content of the XML File:

<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://
www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://
openrosa.org/javarosa">
<h:head>
<h:title>Build Test Form</h:title>






01/01/01
</Birth Date>





Name





Address





Birth Date










</h:head>
<h:body>












</h:body>
</h:html>


So what is happening? Any ideas?

Thanks in advance.

Helio

hi Helio,

if you try to open your xml file with a browser, you'll see that the
node is not a valid node name....

also, instead of pasting here your stack trace, use dpaste.com and
send here the link. As far as I know, this is the standard way of
posting errors to the list. in any case, I suggest you to always
validate your forms with an xml validator, before posting them here.

I hope it helps,

pau.

··· 2010/9/21 Helio : > Just followed the installation instructions for a remote server, and > when running it I get the login screen, then the main screen of the > application (just as I had in the local server), and when I try to > upload the form created at ODK Build I get the following: > > Uncaught exception from servlet > java.lang.IllegalArgumentException: Type ("") is not that of an entity > but needs to be for this operation > at > org.datanucleus.jpa.EntityManagerImpl.assertEntity(EntityManagerImpl.java: > 867) > at > org.datanucleus.jpa.EntityManagerImpl.persist(EntityManagerImpl.java: > 385) > at > org.odk.aggregate.servlet.FormUploadServlet.doPost(FormUploadServlet.java: > 161) > 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: > 511) > at org.mortbay.jetty.servlet.ServletHandler > $CachedChain.doFilter(ServletHandler.java:1166) > at > com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: > 97) > at org.mortbay.jetty.servlet.ServletHandler > $CachedChain.doFilter(ServletHandler.java:1157) > at > com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: > 35) > at org.mortbay.jetty.servlet.ServletHandler > $CachedChain.doFilter(ServletHandler.java:1157) > at > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: > 43) > at org.mortbay.jetty.servlet.ServletHandler > $CachedChain.doFilter(ServletHandler.java:1157) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: > 388) > at > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: > 216) > at > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: > 182) > at > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: > 765) > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: > 418) > at > com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: > 238) > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: > 152) > at org.mortbay.jetty.Server.handle(Server.java:326) > at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: > 542) > at org.mortbay.jetty.HttpConnection > $RequestHandler.headerComplete(HttpConnection.java:923) > at > com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: > 76) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > at > com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: > 135) > at > com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: > 251) > at com.google.apphosting.base.RuntimePb$EvaluationRuntime > $6.handleBlockingRequest(RuntimePb.java:6784) > at com.google.apphosting.base.RuntimePb$EvaluationRuntime > $6.handleBlockingRequest(RuntimePb.java:6782) > at > com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: > 24) > at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: > 398) > at com.google.net.rpc.impl.Server$2.run(Server.java:852) > at > com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: > 56) > at > com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java: > 576) > at com.google.net.rpc.impl.Server.startRpc(Server.java:807) > at com.google.net.rpc.impl.Server.processRequest(Server.java:369) > at > com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: > 442) > at > com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: > 319) > at > com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: > 290) > at com.google.net.async.Connection.handleReadEvent(Connection.java: > 474) > at > com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: > 831) > at > com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: > 207) > at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: > 103) > at > com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java: > 251) > at com.google.apphosting.runtime.JavaRuntime > $RpcRunnable.run(JavaRuntime.java:418) > at java.lang.Thread.run(Thread.java:636) > Unexpected exception from servlet: java.lang.IllegalArgumentException: > Type ("") is not that of an entity but needs to be for this operation > > -------------- > > The same was happening with the local server. Maybe it is something in > the form's XML? I have added the ID where I was supposed to. Here is > the content of the XML File: > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http:// > openrosa.org/javarosa"> > > Build Test Form > > > > > > > 01/01/01 > > > > > > > Name > > > > > > Address > > > > > > Birth Date > > > > > > > constraint="(. > 1 and . < 30)"/> > > > > > > > > > > > > > > > > > > > > > ------------------- > > So what is happening? Any ideas? > > Thanks in advance. > > Helio > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >