jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-1283

error "org.geotools.renderer.lite.StreamingRenderer - Wrong number of attributes expected 1 got 2"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.2
  • Fix Version/s: 1.6.3
  • Component/s: ArcSDE
  • Labels:
    None
  • Environment:
    Windows XP

Description

For each WMS Request with a ARCSDE FeatureType I receive the following error "org.geotools.renderer.lite.StreamingRenderer - Wrong number of attributes expected 1 got 2"

Log:
35672 [SCHWERWIEGEND] org.geotools.renderer.lite.StreamingRenderer - Wrong number of attributes expected 1 got 2
IllegalAttribute: null , but got null
at org.geotools.feature.DefaultFeature.setAttributes(DefaultFeature.java:263)
at org.geotools.feature.DefaultFeature.<init>(DefaultFeature.java:97)
at org.geotools.feature.DefaultFeatureType.create(DefaultFeatureType.java:171)
at org.geotools.data.crs.ForceCoordinateSystemFeatureReader.next(ForceCoordinateSystemFeatureReader.java:144)
at org.geotools.data.crs.ForceCoordinateSystemFeatureReader.next(ForceCoordinateSystemFeatureReader.java:141)
at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1560)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:711)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:433)
at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:238)
at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:368)
at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:516)
at org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:315)
at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:192)
at org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:52)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:103)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:269)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

With the version 1.5.1 there were no problems.

Best Regards,
Christian

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. GEOS-1979 CQL filters causing StreamingRenderer failure

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Andrea Aime added a comment - 10/Aug/07 12:32 PM

This happens when the renderer asks for one attribute only, and the datastore returns 2.... Saul (cc'ed) do you have any idea why this is happening?

Show
Andrea Aime added a comment - 10/Aug/07 12:32 PM This happens when the renderer asks for one attribute only, and the datastore returns 2.... Saul (cc'ed) do you have any idea why this is happening?
Hide
Permalink
Saul Farber added a comment - 10/Aug/07 12:53 PM

My best guess is that there is an sde-managed rowid column on the table. Probably called "OBJECTID". The ArcSDE datastore plugin requires that it be fetched (as it's used as the fid for the feature). The easiest way to deal with this in geoserver is to make sure that 'minoccurs=1' is set on the OBJECTID attribute in the geoserver featureTypeConfig UI.

I'm working on having the ArcSDE datastore be smarter about being able to fetch the ID of the feature, but not have it appear in the list of returned attributes (if it wasn't requested). However, I'm not there yet.

For now, that's the workaround (if, indeed, this is the problem!)

If that's not the problem, then we'll need to keep trying more things.

--saul

Show
Saul Farber added a comment - 10/Aug/07 12:53 PM My best guess is that there is an sde-managed rowid column on the table. Probably called "OBJECTID". The ArcSDE datastore plugin requires that it be fetched (as it's used as the fid for the feature). The easiest way to deal with this in geoserver is to make sure that 'minoccurs=1' is set on the OBJECTID attribute in the geoserver featureTypeConfig UI. I'm working on having the ArcSDE datastore be smarter about being able to fetch the ID of the feature, but not have it appear in the list of returned attributes (if it wasn't requested). However, I'm not there yet. For now, that's the workaround (if, indeed, this is the problem!) If that's not the problem, then we'll need to keep trying more things. --saul
Hide
Permalink
Christian Holzner added a comment - 11/Aug/07 12:00 PM

I tested with the following Schema.xml:

<xs:complexType name = "SDE.SDE.TBLKNOTEN_Type" >
<xs:complexContent >
<xs:extension base = "gml:AbstractFeatureType" >
<xs:sequence >
<xs:element nillable = "false" name = "OBJECTID" maxOccurs = "1" type = "xs:int" minOccurs = "1" />
<xs:element nillable = "true" name = "KNOTENID" maxOccurs = "1" type = "xs:int" minOccurs = "0" />
<xs:element nillable = "true" name = "SHAPE" maxOccurs = "1" type = "gml:PointPropertyType" minOccurs = "0" />
<xs:element nillable = "true" name = "GEAENDERTAM" maxOccurs = "1" type = "xs:dateTime" minOccurs = "0" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

Get still the same error message:

GetMap Request
version: 1.1.1
output format: image/png
width height: 256,256
bbox: Env[658000.0 : 660000.0, 5159000.0 : 5161000.0]
layers: topp:SDE.SDE.TBLKNOTEN
styles: point
17985 [INFO] org.geotools.data.arcsde.ArcSDEQuery - No FID attribute was contained in your query. Appending the discovered one to the list
of columns to be fetched.
18360 [SCHWERWIEGEND] org.geotools.renderer.lite.StreamingRenderer - Wrong number of attributes expected 1 got 2
IllegalAttribute: null , but got null
at org.geotools.feature.DefaultFeature.setAttributes(DefaultFeature.java:263)
at org.geotools.feature.DefaultFeature.<init>(DefaultFeature.java:97)
....

Christian

Show
Christian Holzner added a comment - 11/Aug/07 12:00 PM I tested with the following Schema.xml: <xs:complexType name = "SDE.SDE.TBLKNOTEN_Type" > <xs:complexContent > <xs:extension base = "gml:AbstractFeatureType" > <xs:sequence > <xs:element nillable = "false" name = "OBJECTID" maxOccurs = "1" type = "xs:int" minOccurs = "1" /> <xs:element nillable = "true" name = "KNOTENID" maxOccurs = "1" type = "xs:int" minOccurs = "0" /> <xs:element nillable = "true" name = "SHAPE" maxOccurs = "1" type = "gml:PointPropertyType" minOccurs = "0" /> <xs:element nillable = "true" name = "GEAENDERTAM" maxOccurs = "1" type = "xs:dateTime" minOccurs = "0" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> Get still the same error message: GetMap Request version: 1.1.1 output format: image/png width height: 256,256 bbox: Env[658000.0 : 660000.0, 5159000.0 : 5161000.0] layers: topp:SDE.SDE.TBLKNOTEN styles: point 17985 [INFO] org.geotools.data.arcsde.ArcSDEQuery - No FID attribute was contained in your query. Appending the discovered one to the list of columns to be fetched. 18360 [SCHWERWIEGEND] org.geotools.renderer.lite.StreamingRenderer - Wrong number of attributes expected 1 got 2 IllegalAttribute: null , but got null at org.geotools.feature.DefaultFeature.setAttributes(DefaultFeature.java:263) at org.geotools.feature.DefaultFeature.<init>(DefaultFeature.java:97) .... Christian
Hide
Permalink
Paul Grimwood added a comment - 22/Aug/07 11:38 PM

I am seeing the same error message in 1.5.3 and the suggetsed workaround of setting OBJECTID to min of 1 dd not help.

Show
Paul Grimwood added a comment - 22/Aug/07 11:38 PM I am seeing the same error message in 1.5.3 and the suggetsed workaround of setting OBJECTID to min of 1 dd not help.
Hide
Permalink
Tyler Erickson added a comment - 07/Sep/07 4:40 PM

I am also seeing the same error message in the nightly build for 090607. I tried all of the following element defintions for the objectid, and all produced the same error.

<xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "false" maxOccurs = "0" />
<xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "false" maxOccurs = "1" />
<xs:element type = "xs:int" minOccurs = "1" name = "OBJECTID" nillable = "false" maxOccurs = "1" />
<xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "true" maxOccurs = "0" />
<xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "true" maxOccurs = "1" />
<xs:element type = "xs:int" minOccurs = "1" name = "OBJECTID" nillable = "true" maxOccurs = "1" />

INFO | jvm 1 | 2007/09/07 17:29:52 | GetMap Request
INFO | jvm 1 | 2007/09/07 17:29:52 | version: 1.1.1
INFO | jvm 1 | 2007/09/07 17:29:52 | output format: application/vnd.google-earth.kmz XML
INFO | jvm 1 | 2007/09/07 17:29:52 | width height: 1024,1024
INFO | jvm 1 | 2007/09/07 17:29:52 | bbox: Env[-90.86802666649625 : -77.279850159663, 37.63755114387099 : 47.87206867121623]
INFO | jvm 1 | 2007/09/07 17:29:52 | layers: mtri:SDE_GEOSERVER.DBO.STATES
INFO | jvm 1 | 2007/09/07 17:29:52 | styles: population
INFO | jvm 1 | 2007/09/07 17:29:52 | 1961703 [INFO] org.geotools.arcsde.data.ArcSDEDataStore - getCount
INFO | jvm 1 | 2007/09/07 17:29:52 | 1962125 [INFO] org.geotools.arcsde.data.ArcSDEQuery - No FID attribute was contained in your query. Appending the discovered one to the list of columns to be fetched.
INFO | jvm 1 | 2007/09/07 17:29:52 | 1962141 [SEVERE] org.geotools.renderer.lite.StreamingRenderer - Wrong number of attributes expected 3 got 4

Show
Tyler Erickson added a comment - 07/Sep/07 4:40 PM I am also seeing the same error message in the nightly build for 090607. I tried all of the following element defintions for the objectid, and all produced the same error. <xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "false" maxOccurs = "0" /> <xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "false" maxOccurs = "1" /> <xs:element type = "xs:int" minOccurs = "1" name = "OBJECTID" nillable = "false" maxOccurs = "1" /> <xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "true" maxOccurs = "0" /> <xs:element type = "xs:int" minOccurs = "0" name = "OBJECTID" nillable = "true" maxOccurs = "1" /> <xs:element type = "xs:int" minOccurs = "1" name = "OBJECTID" nillable = "true" maxOccurs = "1" /> INFO | jvm 1 | 2007/09/07 17:29:52 | GetMap Request INFO | jvm 1 | 2007/09/07 17:29:52 | version: 1.1.1 INFO | jvm 1 | 2007/09/07 17:29:52 | output format: application/vnd.google-earth.kmz XML INFO | jvm 1 | 2007/09/07 17:29:52 | width height: 1024,1024 INFO | jvm 1 | 2007/09/07 17:29:52 | bbox: Env[-90.86802666649625 : -77.279850159663, 37.63755114387099 : 47.87206867121623] INFO | jvm 1 | 2007/09/07 17:29:52 | layers: mtri:SDE_GEOSERVER.DBO.STATES INFO | jvm 1 | 2007/09/07 17:29:52 | styles: population INFO | jvm 1 | 2007/09/07 17:29:52 | 1961703 [INFO] org.geotools.arcsde.data.ArcSDEDataStore - getCount INFO | jvm 1 | 2007/09/07 17:29:52 | 1962125 [INFO] org.geotools.arcsde.data.ArcSDEQuery - No FID attribute was contained in your query. Appending the discovered one to the list of columns to be fetched. INFO | jvm 1 | 2007/09/07 17:29:52 | 1962141 [SEVERE] org.geotools.renderer.lite.StreamingRenderer - Wrong number of attributes expected 3 got 4
Hide
Permalink
Andrea Aime added a comment - 10/Sep/07 3:52 AM

Hum, we could put a workaround in GeoServer to avoid this, but if a Query asks for just one attribute and the datastore returns two, it's a bug, and it should better be fixed in the ds itself.

Show
Andrea Aime added a comment - 10/Sep/07 3:52 AM Hum, we could put a workaround in GeoServer to avoid this, but if a Query asks for just one attribute and the datastore returns two, it's a bug, and it should better be fixed in the ds itself.
Hide
Permalink
Paul Grimwood added a comment - 23/Oct/07 6:15 PM

In case there has been progress on this issue that hasn't been documented here - does anyone have any solution to this problem?

Show
Paul Grimwood added a comment - 23/Oct/07 6:15 PM In case there has been progress on this issue that hasn't been documented here - does anyone have any solution to this problem?
Hide
Permalink
Gabriel Roldán added a comment - 25/Feb/08 6:13 AM

This problem is solved in trunk (1.7.x) where FID handling has been reworked. We're going to back port to the stable 1.6.x series as soon as possible

Show
Gabriel Roldán added a comment - 25/Feb/08 6:13 AM This problem is solved in trunk (1.7.x) where FID handling has been reworked. We're going to back port to the stable 1.6.x series as soon as possible
Hide
Permalink
Gabriel Roldán added a comment - 01/Apr/08 3:05 PM

fixed as per GEOT-1719

Show
Gabriel Roldán added a comment - 01/Apr/08 3:05 PM fixed as per GEOT-1719

People

  • Assignee:
    Gabriel Roldán
    Reporter:
    Christian Holzner
Vote (1)
Watch (6)

Dates

  • Created:
    10/Aug/07 12:21 PM
    Updated:
    10/Jun/08 9:34 AM
    Resolved:
    01/Apr/08 3:05 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.