You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ken in Nashua <kc...@live.com> on 2013/03/29 05:34:44 UTC

grid exception - not sure if bug or not

Folks,

I dont think i am doing anything too special with grid.

But it is giving me an exception.

I am happy to post usage of this component if anyone thinks its worth looking into.

All I did was add a couple entities and then click my LIST link... and bang.

Any thoughts ?

Thanks

Ken

An unexpected application exception has occurred.org.apache.tapestry5.internal.services.RenderQueueExceptionRender queue error in BeginRender[List:grid.rows]: Index: 1, Size: 1activeComponentsList (class org.tynamo.examples.pphl.pages.List)List:layout (class org.tynamo.examples.pphl.components.Layout)
classpath:org/tynamo/examples/pphl/pages/List.tml, line 11<t:layout title="title" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" xmlns:p="tapestry:parameter">2		<p:subMenuBlock>3		<ul id="local">4			<li>5				<t:pagelink class="newlink" page="Add" context="beanType">${newlinkMessage}</t:pagelink>6			</li>List:grid (class org.apache.tapestry5.corelib.components.Grid)
classpath:org/tynamo/examples/pphl/pages/List.tml, line 127		</ul>8	</p:subMenuBlock>9
10	<h1>${title}</h1>11
12
	<t:grid t:id="grid" source="source" row="bean" inPlace="true" 
add="__id__" reorder="__id__" t:mixins="tynamo/BeanModelAdvisor">13		<p:__id__header>14		</p:__id__header>15
16		<p:__id__cell>17			<t:pagelink t:page="Show" context="showPageContext"><t:tynamo.identifier object="bean"/></t:pagelink>List:grid.table (class org.apache.tapestry5.corelib.components.Any)
classpath:org/apache/tapestry5/corelib/components/Grid.tml, line 51<div class="t-data-grid" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">2
3    <div t:id="pagerTop"/>4
5    <table t:id="table">6        <thead t:id="columns"/>7        <tbody>8            <tr t:id="rows"/>9        </tbody>10    </table>List:grid.rows (class org.apache.tapestry5.corelib.components.GridRows)
classpath:org/apache/tapestry5/corelib/components/Grid.tml, line 83    <div t:id="pagerTop"/>4
5    <table t:id="table">6        <thead t:id="columns"/>7        <tbody>8            <tr t:id="rows"/>9        </tbody>10    </table>11
12    <div t:id="pagerBottom"/>13
locationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 8org.apache.tapestry5.ioc.internal.util.TapestryExceptionIndex: 1, Size: 1locationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 8java.lang.IndexOutOfBoundsExceptionIndex: 1, Size: 1Filter stack frames
Stack trace

java.util.ArrayList.RangeCheck(ArrayList.java:547)

java.util.ArrayList.get(ArrayList.java:322)

org.tynamo.TynamoGridDataSource.getRowValue(TynamoGridDataSource.java:66)

org.apache.tapestry5.corelib.components.Grid$CachingDataSource.getRowValue(Grid.java:318)

org.apache.tapestry5.corelib.components.GridRows.setupForRow(GridRows.java:297)

org.apache.tapestry5.corelib.components.GridRows.beginRender(GridRows.java:318)

org.apache.tapestry5.corelib.components.GridRows.beginRender(GridRows.java)

org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)

org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)

org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:209)

org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)

org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)

org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)

org.apache.tapestry5.beanvalidator.BeanValidatorModule$2.renderMarkup(BeanValidatorModule.java:119)

net.atos.kawwaportal.components.services.KawwaPortalComponentsModule$1.renderMarkup(KawwaPortalComponentsModule.java:91)

org.apache.tapestry5.services.TapestryModule$31.renderMarkup(TapestryModule.java:1994)

org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1978)

net.atos.kawwaportal.components.services.KawwaPortalComponentsModule$3.renderMarkup(KawwaPortalComponentsModule.java:117)

org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1960)

org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1945)

org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1931)

org.got5.tapestry5.jquery.services.js.JSModule$1.renderMarkup(JSModule.java:40)

org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1913)

org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1894)

net.atos.kawwaportal.components.services.KawwaPortalComponentsModule$2.renderMarkup(KawwaPortalComponentsModule.java:101)

org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)

org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)

org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)

org.apache.tapestry5.services.TapestryModule$38.handle(TapestryModule.java:2222)

org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)

org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)

org.tynamo.security.SecurityComponentRequestFilter.handlePageRender(SecurityComponentRequestFilter.java:49)

org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)

org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)

org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)

org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)

org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)

org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)

org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)

org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)

org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)

org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)

org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)

org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)

org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:26)

org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)

org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)

org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:55)

org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:53)

org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)

org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)

org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380)

org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:53)

org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)

org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
Tapestry FrameworkTapestry Version5.3.6Application Version1.0-SNAPSHOT-1364530983016RequestContext Pathnone (deployed as root)Request Path/list/playerLocaleen_USSecurefalseServer NamelocalhostHeadersAccepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Encodinggzip, deflateAccept-Languageen-US,en;q=0.5Connectionkeep-aliveCookieJSESSIONID=ut9rlcpwp58v1ltbr45ahz7exHostlocalhost:8080Refererhttp://localhost:8080/player/60User-AgentMozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0Context Attributescom.sun.jsp.tagFileJarUrlsCache{}com.sun.jsp.taglibraryCache{}javax.servlet.context.tempdirC:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\target\workorg.apache.tapestry5.application-registryorg.apache.tapestry5.ioc.internal.RegistryWrapper@733e41Sessionorg.apache.shiro.subject.support.DefaultSubjectContext_AUTHENTICATED_SESSION_KEYtrueorg.apache.shiro.subject.support.DefaultSubjectContext_PRINCIPALS_SESSION_KEYadministratororg.apache.shiro.web.session.HttpServletSession.HOST_SESSION_KEY127.0.0.1sso:org.apache.tapestry5.alerts.AlertStorageorg.apache.tapestry5.alerts.AlertStorage@7f705esso:org.tynamo.examples.pphl.model.AdminLayoutorg.tynamo.examples.pphl.model.AdminLayout@1sso:org.tynamo.examples.pphl.model.HitCounterorg.tynamo.examples.pphl.model.HitCounter@1sso:org.tynamo.examples.pphl.model.Personadministrator, administrator : email  administratorsso:org.tynamo.examples.pphl.prototype.CurrentUseradministrator, administrator : email  administratorstate:Home::cursor0state:Home::itemsPerPage5state:Home::tableColumns3state:Home:gallery:collectiona, a : email  aq, q : email  qw, w : email  ws, s : email  se, e : email  ert, r : email  tz, z : email  zx, x : email  xc, c : email  cd, d : email  dt, t : email  ty, y : email  yu, u : email  ub, b : email  bn, n : email  naa, aa : email  aass, ss : email  ssmars, mars : email  marsff, ff : email  fffyyy, yyy : email  yyyqm, mm : email  mmmsss, sss : email  sssqqq, qq : email  qqrr, rr : email  rrgg, gg : email  gghhh, hhh : email  hhhxxxxxxx, xxxxxxxx : email  xxxxxxxxcccccccc, ccccccc : email  cccccccddddddd, dddddddd : email  ddddddddbbbbbb, bbbbbbbb : email  bbbbbtttt, ttt : email  tttfffff, fffff : email  fffffvvv, vvv : email  vvvkk, kk : email  kkuu, uu : email  uui, i : email  iii, ii : email  iiiii, iii : email  iiipl, pl : email  plsc, sc : email  sczzzzzzzz, zzzzzzzz : email  zzzzzzzzxxxxxx, xxxxxxxxxx : email  xxxxxxxxddddddddddd, dddddddd : email  ddddddddddddffffffff, fffffffff : email  ffffffffstate:List:grid:currentPage1System PropertiesMAVEN_OPTS
-Xdebug
awt.toolkit
sun.awt.windows.WToolkit
classworlds.conf
C:\Prototype\Mavenized\Product\.metadata\.plugins\org.maven.ide.eclipse\launches\m2conf327722338150886465.tmp
downloadJavadocs
true
downloadSources
true
file.encoding
Cp1252
file.encoding.pkg
sun.io
file.separator
\
guice.disable.misplaced.annotation.check
true
java.awt.graphicsenv
sun.awt.Win32GraphicsEnvironment
java.awt.printerjob
sun.awt.windows.WPrinterJob
java.class.path
C:\DEVTOOLS\apache-maven-3.0.3\boot\plexus-classworlds-2.4.jar
java.class.version
50.0
java.endorsed.dirs
C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\endorsed
java.ext.dirs
C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home
C:\DEVTOOLS\sun\jdk1.6.0_32\jre
java.io.tmpdir
C:\Users\Owner\AppData\Local\Temp\
java.library.path
C:\DEVTOOLS\sun\jdk1.6.0_32\bin

C:\Windows\Sun\Java\bin

C:\Windows\system32

C:\Windows

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\bin

C:/Program Files (x86)/Java/jre7/bin/client

C:/Program Files (x86)/Java/jre7/bin

C:/Program Files (x86)/Java/jre7/lib/i386

C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common

C:\Windows\system32

C:\Windows

C:\Windows\System32\Wbem

C:\Windows\System32\WindowsPowerShell\v1.0\

C:\Program Files (x86)\Common Files\Ulead Systems\MPEG

C:\Program Files (x86)\Common Files\HP\Digital Imaging\bin

C:\Program Files (x86)\HP\Digital Imaging\bin\

C:\Program Files (x86)\HP\Digital Imaging\bin\Qt\Qt 4.3.3

C:\Program Files\SlikSvn\bin

C:\Program Files\TortoiseSVN\bin

C:\DEVTOOLS\sun\jdk1.6.0_32\bin

C:\DEVTOOLS\apache-maven-3.0.3\bin

C:\MySQL-5.1.46-winx64\bin

C:\Program Files\SlikSvn\bin

C:\USB.Corsair.Survivor\DEVTOOLS\CygWin\bin

C:\apache-tomcat-6.0.26\bin

C:\DEVTOOLS\bat

C:\DEVTOOLS\bat\util

C:\DEVTOOLS\eclipse\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\bin

C:\DEVTOOLS\eclipse




.
java.runtime.name
Java(TM) SE Runtime Environment
java.runtime.version
1.6.0_32-b05
java.specification.name
Java Platform API Specification
java.specification.vendor
Sun Microsystems Inc.
java.specification.version
1.6
java.vendor
Sun Microsystems Inc.
java.vendor.url
http://java.sun.com/
java.vendor.url.bug
http://java.sun.com/cgi-bin/bugreport.cgi
java.version
1.6.0_32
java.vm.info
mixed mode
java.vm.name
Java HotSpot(TM) Client VM
java.vm.specification.name
Java Virtual Machine Specification
java.vm.specification.vendor
Sun Microsystems Inc.
java.vm.specification.version
1.0
java.vm.vendor
Sun Microsystems Inc.
java.vm.version
20.7-b02
line.separator



m2eclipse.workspace.state
C:\Prototype\Mavenized\Product\.metadata\.plugins\org.maven.ide.eclipse\workspacestate.properties
maven.home
C:\DEVTOOLS\apache-maven-3.0.3
maven.test.skip
true
org.mortbay.jetty.Request.maxFormContentSize
9758122
os.arch
x86
os.name
Windows 7
os.version
6.1
path.separator
;
sun.arch.data.model
32
sun.boot.class.path
C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\resources.jar

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\rt.jar

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\sunrsasign.jar

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\jsse.jar

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\jce.jar

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\charsets.jar

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\lib\modules\jdk.boot.jar

C:\DEVTOOLS\sun\jdk1.6.0_32\jre\classes
sun.boot.library.path
C:\DEVTOOLS\sun\jdk1.6.0_32\jre\bin
sun.cpu.endian
little
sun.cpu.isalist
pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop
windows
sun.io.unicode.encoding
UnicodeLittle
sun.java.command
org.codehaus.plexus.classworlds.launcher.Launcher -DMAVEN_OPTS=-Xdebug 
-DdownloadSources=true -DdownloadJavadocs=true -B -X -e 
-Dmaven.test.skip=true -s 
C:\DEVTOOLS\apache-maven-3.0.3\conf\settings.xml jetty:run
sun.java.launcher
SUN_STANDARD
sun.jnu.encoding
Cp1252
sun.management.compiler
HotSpot Client Compiler
sun.os.patch.level
Service Pack 1
tapestry.compress-whitespace
false
tapestry.production-mode
false
user.country
US
user.dir
C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl
user.home
C:\Users\Owner
user.language
en
user.name
Owner
user.timezone
America/New_York
user.variant



 		 	   		  

RE: grid exception - not sure if bug or not

Posted by Ken in Nashua <kc...@live.com>.
Folks,

This is fixed... I was specifying bogus schema on my collection methods in my person object.

False alarm...

- cheers

 		 	   		  

RE: grid exception - not sure if bug or not

Posted by Ken in Nashua <kc...@live.com>.
My prepared list is counting two but returning 1 and the other null when getInstances is called

So it is looking more like ... well not sure yet


    public void prepare(int startIndex, int endIndex, List<SortConstraint> sortConstraints)
    {
        this.startIndex = startIndex;
        preparedResults = persistenceService.getInstances(entityType, startIndex, (endIndex - startIndex) + 1);
    }

    public Object getRowValue(int index)
    {
        return preparedResults.get(index - startIndex);
    }
 		 	   		  

RE: grid exception - not sure if bug or not

Posted by Ken in Nashua <kc...@live.com>.
Here is the grid usage...

I have two entities in the database

and its failing on the third row iteration when getting row values

someone is passing in a bad endIndex

kawwa, tapestry or tynamo... not sure

But I will keep looking


package org.tynamo;

import org.apache.tapestry5.grid.GridDataSource;
import org.apache.tapestry5.grid.SortConstraint;
import org.tynamo.services.PersistenceService;

import java.util.List;

/**
 * A simple implementation of {@link org.apache.tapestry5.grid.GridDataSource} based on a Tynamo PersistenceService and a known
 * entity class.  This implementation does support multiple {@link org.apache.tapestry5.grid.SortConstraint sort
 * constraints}; however it assumes a direct mapping from sort constraint property to Hibernate property.
 * <p/>
 * This class is <em>not</em> thread-safe; it maintains internal state.
 * <p/>
 * Typically, an instance of this object is created fresh as needed (that is, it is not stored between requests).
 */
public class TynamoGridDataSource implements GridDataSource
{

    private final PersistenceService persistenceService;

    private final Class entityType;

    private int startIndex;

    private List preparedResults;

    public TynamoGridDataSource(PersistenceService persistenceService, Class entityType)
    {
        this.persistenceService = persistenceService;
        this.entityType = entityType;
    }

    /**
     * Returns the total number of rows for the configured entity type.
     */
    public int getAvailableRows()
    {
        return persistenceService.count(entityType);
    }

    /**
     * Prepares the results, performing a query (applying the sort results, and the provided start and end index). The
     * results can later be obtained from {@link #getRowValue(int)} }.
     *
     * @param startIndex      index, from zero, of the first item to be retrieved
     * @param endIndex        index, from zero, of the last item to be retrieved
     * @param sortConstraints zero or more constraints used to set the order of the returned values
     */
    public void prepare(int startIndex, int endIndex, List<SortConstraint> sortConstraints)
    {
        this.startIndex = startIndex;
        preparedResults = persistenceService.getInstances(entityType, startIndex, (endIndex - startIndex) + 1);
    }

    /**
     * Returns a row value at the given index (which must be within the range defined by the call to {@link
     * #prepare(int, int, java.util.List)} ).
     *
     * @param index of object
     * @return object at that index
     */
    public Object getRowValue(int index)
    {
        return preparedResults.get(index - startIndex);
    }

    /**
     * Returns the entity type, as provided via the constructor.
     */
    public Class getRowType()
    {
        return entityType;
    }
}

 		 	   		  

RE: grid exception - not sure if bug or not

Posted by Ken in Nashua <kc...@live.com>.
all my LIST capabilities now are taken out.
I cannot list anything upon re-entry of the web app.