Justin,

Thanks for the suggestion. I loaded geoserver 2.0.2 on a dev machine and installed the MySQL plugin. Creating a data store and layer appears to work fine in this version.
Thanks!

Ryan

On 10/26/2010 9:23 AM, Justin Deoliveira wrote:
Thanks for the info Ryan.

So I tried this out and it worked fine... so i am not sure what is going on. My guess it that perhaps your build of geoserver is somewhat old and this issue has been solved this then.

Can you grab the latest nightly build from http://gridlock.opengeo.org and try with that.

Thanks.

-Justin

On Tue, Oct 26, 2010 at 7:27 AM, Ryan Williams <[email protected] <mailto:[email protected]>> wrote:

    Hi Justin,

    Here's how I created the table in mySQL and inserted some fake
    points; I did this in the mySQL query browser:

        Create Table `gis_test` (id integer, g GEOMETRY);
        INSERT INTO `gis_test` VALUES (1,GeomFromText('POINT(1 1) '));
        INSERT INTO `gis_test` VALUES (2,GeomFromText('POINT(1 2) '));
        INSERT INTO `gis_test` VALUES (3,GeomFromText('POINT(2 1) '));

    Here's the error I get when I attempt to calculate bounds.
    1030656266 [btpool0-40] ERROR org.apache.wicket.RequestCycle -
    java.lang.NullPointerException


    at
    
org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:471)

    at
    
org.geoserver.web.data.resource.BasicResourceConfig$1.onSubmit(BasicResourceConfig.java:123)

    at
    
org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:94)

    at
    
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:128)

    at
    org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:163)

    at
    
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:297)

    at
    
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:104)

    at
    
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)

    at
    
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239)

    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316)

    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)

    at org.apache.wicket.RequestCycle.request(RequestCycle.java:532)

    at
    org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)

    at
    org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

    at
    
org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)

    at
    
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

    at
    
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

    at
    
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)

    at
    
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)

    at
    
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)

    at
    
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

    at
    org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

    at
    
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

    at
    
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

    at
    
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)

    at
    
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)

    at
    
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    
org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)

    at
    
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

    at
    org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)

    at
    org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)

    at
    
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

    at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)

    at
    
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

    at
    
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)

    at
    
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

    at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)

    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:726)

    at
    org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

    at
    
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

    at
    
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

    at
    org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

    at org.mortbay.jetty.Server.handle(Server.java:324)

    at
    org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

    at
    
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)

    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)

    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

    at
    org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

    at
    
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)



    On 10/25/2010 7:55 PM, Justin Deoliveira wrote:
    Hi Ryan,

    Can you include the java stack trace you get when you attempt to
    calculate the bounds? Also if you could include a little sql
    script to create the table and populate it with a few records
    that would help a lot.

    Thanks.

    -Justin


        Hi all,

        I'm working on getting Geoserver (2.0.SNAPSHOT)  to connect
        to a mySQL
        database as a store / data source and publish a layer from that.
        I've successfully connected to the mySQL database and created
        a store in
        Geoserver. however, I'm not able to successfully publish a
        layer from
        that table.
        I get to the layer configuration screen, in the 'Data' tab,
        and I'm not
        able to successfully set the Coordinate Reference Systems. I
        set the
        Declared SRS to EPSG:4326, SRS handling to 'force declared'.
        If I click
        the 'compute  from data' link I get a big Java error. If I click
        'compute from native' nothing happens (obviously,  because
        there are no
        native bounds set yet)
        I've read that mySQL is not 'spatially aware' and so it
        doesn't know
        anything about it's SRS or it's bounds. So then, do I need to
        manually
        enter in the bounding box numbers?
        I've found several docs on how to create a mySQL data source,
        but none
        on the nuances of actually publishing a layer from that source.

        I have added a geometry type column in the mySQL table and
        used some
        mySQL functions to put points in that column based on a lat
        and a lon
        field in the same table.
        I understand mySQL isn't the best option for spatial data,
        but I'm
        trying to integrate with an existing application that has
        everything
        stored in mySQL, and there's no chance of changing that.

        Thanks,
        Ryan

        --
        Ryan Williams, GISP
        GIS Analyst / Programmer
        PAQ Interactive Inc.
        Monticello, IL



        
------------------------------------------------------------------------------
        Nokia and AT&T present the 2010 Calling All Innovators-North
        America contest
        Create new apps & games for the Nokia N8 for consumers in
         U.S. and Canada
        $10 million total in prizes - $4M cash, 500 devices, nearly
        $6M in marketing
        Develop with Nokia Qt SDK, Web Runtime, or Java and Publish
        to Ovi Store
        http://p.sf.net/sfu/nokia-dev2dev
        _______________________________________________
        Geoserver-users mailing list
        [email protected]
        <mailto:[email protected]>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users




-- Justin Deoliveira
    OpenGeo - http://opengeo.org
    Enterprise support for open source geospatial.


-- Ryan Williams, GISP
    GIS Analyst / Programmer
    PAQ Interactive Inc.
    Monticello, IL
    www.paqinteractive.com  <http://www.paqinteractive.com>




--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


--
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
Monticello, IL
www.paqinteractive.com

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to