Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] ArrayIndexOutOfBoundsException
[Texo] ArrayIndexOutOfBoundsException [message #1011916] Wed, 20 February 2013 08:58 Go to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 159
Registered: January 2013
Senior Member
Hi Martin,

during our tests with the DataGenerator we had to drop our database schema several times. When the schema is empty and we execute jsonTexoResource.query("select u from User u", new HashMap<String, Object>(), 0, Integer.MAX_VALUE); the server returns an error.
The exception that is thrown on the server side looks like this:
java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.Vector.elementData(Vector.java:730)
	at java.util.Vector.remove(Vector.java:828)
	at org.eclipse.emf.texo.server.service.RetrieveModelOperation.internalExecute(RetrieveModelOperation.java:97)
	at org.eclipse.emf.texo.server.service.UpdateInsertModelOperation.internalExecute(UpdateInsertModelOperation.java:69)
	at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:59)
	at org.eclipse.emf.texo.server.web.WebServiceHandler.doPost(WebServiceHandler.java:111)
	at org.eclipse.emf.texo.server.web.WebServiceHandler.doPut(WebServiceHandler.java:125)
	at org.eclipse.emf.texo.server.web.WebServiceServlet.doPut(WebServiceServlet.java:73)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)


If I execute http://localhost:8080/praesto/jsonws/User just as a GET call, it returns
{
"endRow": "-1",
"_eclass": "response|ResponseType",
"totalRows": "0",
"status": "success",
"startRow": "0",
"data": [(0)],
"_title": "success"
}
so I assume the right behaviour of the query call above should return an empty resource, but shouldn't throw an error, right?

Best regards
Bastian
Re: [Texo] ArrayIndexOutOfBoundsException [message #1011919 is a reply to message #1011916] Wed, 20 February 2013 09:05 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5300
Registered: July 2009
Senior Member
Seems to be a clear bug, will solve that in parallel with the other one you entered.

gr. Martin

On 02/20/2013 02:58 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> during our tests with the DataGenerator we had to drop our database schema several times. When the schema is empty and
> we execute jsonTexoResource.query("select u from User u", new HashMap<String, Object>(), 0, Integer.MAX_VALUE); the
> server returns an error.
> The exception that is thrown on the server side looks like this:
> java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.Vector.elementData(Vector.java:730)
> at java.util.Vector.remove(Vector.java:828)
> at org.eclipse.emf.texo.server.service.RetrieveModelOperation.internalExecute(RetrieveModelOperation.java:97)
> at org.eclipse.emf.texo.server.service.UpdateInsertModelOperation.internalExecute(UpdateInsertModelOperation.java:69)
> at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:59)
> at org.eclipse.emf.texo.server.web.WebServiceHandler.doPost(WebServiceHandler.java:111)
> at org.eclipse.emf.texo.server.web.WebServiceHandler.doPut(WebServiceHandler.java:125)
> at org.eclipse.emf.texo.server.web.WebServiceServlet.doPut(WebServiceServlet.java:73)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
>
> If I execute http://localhost:8080/praesto/jsonws/User just as a GET call, it returns
> {
> "endRow": "-1",
> "_eclass": "response|ResponseType",
> "totalRows": "0",
> "status": "success",
> "startRow": "0",
> "data": [(0)],
> "_title": "success"
> } so I assume the right behaviour of the query call above should return an empty resource, but shouldn't throw an error,
> right?
>
> Best regards
> Bastian


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] ArrayIndexOutOfBoundsException [message #1011935 is a reply to message #1011919] Wed, 20 February 2013 09:37 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 159
Registered: January 2013
Senior Member
Thank you, Martin!

Bastian
Re: [Texo] ArrayIndexOutOfBoundsException [message #1012100 is a reply to message #1011935] Wed, 20 February 2013 16:47 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5300
Registered: July 2009
Senior Member
Hi Bastian,
I published a new build which should solve this issue.

gr. Martin

On 02/20/2013 03:37 PM, Bastian Wagenfeld wrote:
> Thank you, Martin!
>
> Bastian


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] ArrayIndexOutOfBoundsException [message #1012258 is a reply to message #1012100] Thu, 21 February 2013 03:08 Go to previous message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 159
Registered: January 2013
Senior Member
Hi Martin,

thanks for that.I'll test it on monday, but I'm sure it's fixed Smile

Best regards
Bastian
Previous Topic:[Texo] provide a method to get cookie/session data from JsonObjectStore.doHTTPRequest()
Next Topic:[Texo] Map cannot be persisted
Goto Forum:
  


Current Time: Thu Apr 17 05:48:52 EDT 2014

Powered by FUDForum. Page generated in 0.03011 seconds