[Geoserver-users] getting data from OracleDB in production

Hi Eija,

We had this error in the 1.7 Versions as we were trying to connect as
non-schema owners, in 2.0 it seems to be working for us out of the box, in
1.7 we installed a patch for it.
The problem seems to lie within these 2 error messages:
Caused by: java.io.IOException: Error looking up primary key
Caused by: java.sql.SQLException: ORA-01031: insufficient privileges

Can you doublecheck that you have an entry in the ALL_SDO_GEOM_METADATA and
SDO_GEOM_METADATA tables and that you have primary keys specified in your
tables?
Those would be the most obvious errors that these messages would come from.
If its not those it would be interesting to see what it does on Oracle side
when you try to add a table.

Julian

Eija wrote:

Hi,

I've installed Geoserver 2.0 and I've got it to work with Oracle XE on the
same computer. Now I would like to get data from Oracle EE which is the
production database. The tables hav been created with AutoCad Map and I
have found some old (geoserver 1.3) information that it might be a
problem. Besides that no spatial index has been created.

When I tried fetching data with geoserver 1.7 yesterday, it seemed to
work, but no data was visible. Trying to access that data today with
geoserver 2.0 which is installed locally on my workstation it's a lot
worse. I can create a datastore, and I see the tables when I try to add a
layer. When i choose a table to add I get a wicked error, and I'm asking
if I can get help here or should I post it as bug report?

Oops, something went wrong...
Sorry, something unexpected happened on the server.

Here's an error report you can include in a JIRA bug report about this
issue:

java.lang.RuntimeException: Error occurred while building the resources
for the configuration page
  at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:192)
  at
org.geoserver.web.data.layer.NewLayerPage$3.onClick(NewLayerPage.java:163)
  at
org.geoserver.web.wicket.SimpleAjaxLink$1.onClick(SimpleAjaxLink.java:44)
  at
org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:65)
  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.doGet(WicketServlet.java:124)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  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.doGet(FrameworkServlet.java:501)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  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.headerComplete(HttpConnection.java:828)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
  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)
Caused by: java.io.IOException: Error looking up primary key
  at org.geotools.jdbc.JDBCDataStore.getPrimaryKey(JDBCDataStore.java:811)
  at org.geotools.jdbc.JDBCFeatureSource.<init>(JDBCFeatureSource.java:76)
  at
org.geotools.jdbc.JDBCDataStore.createFeatureSource(JDBCDataStore.java:650)
  at
org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:356)
  at
org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:321)
  at
org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:620)
  at
org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:324)
  at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:188)
  ... 71 more
Caused by: java.sql.SQLException: ORA-01031: insufficient privileges

  at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
  at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
  at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
  at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
  at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
  at
oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1614)
  at
oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1579)
  at
oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3485)
  at org.geotools.jdbc.JDBCDataStore.getPrimaryKey(JDBCDataStore.java:788)
  ... 78 more

--
View this message in context: http://www.nabble.com/getting-data-from-OracleDB-in-production-tp26062237p26098100.html
Sent from the GeoServer - User mailing list archive at Nabble.com.