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)
Signup
GeoTools
  • GeoTools
  • GEOT-802

"No CRS for srid.."

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.2.M1, 2.2.M2
  • Fix Version/s: None
  • Component/s: jdbc-oracle plugin
  • Labels:
    None
  • Environment:
    jdk1.5.0_05, WinXP

Description

The method below inside OracleDataStore.java makes query like: "select wktext from cs_srs ...."

as cs_srs table is an object of MDSYS scheme, an exception occurs - "No CRS for srid ...." as you can see in the code.
/////////////////original method:

protected CoordinateReferenceSystem determineCRS(int srid ) throws IOException {
Connection conn = getConnection(Transaction.AUTO_COMMIT);;
String wkt=null;
try

{ Statement st = conn.createStatement(); st.execute("select wktext from cs_srs where srid = "+srid ); ////// the line needs to be changed ResultSet set = st.getResultSet(); if( !set.next() ) return null; wkt = set.getString(1); return CRS.parseWKT( wkt ); }

catch( FactoryException parse)

{ throw (IOException) new IOException( "Unabled to parse WKTEXT into a CRS:"+wkt ).initCause( parse ); }


catch( SQLException sql )

{ throw (IOException) new IOException( "No CRS for srid "+srid ).initCause( sql ); }
}


I've replaced the query with "select wktext from mdsys.cs_srs ...." , recompiled the OracleDataStore.java file put it into oracle-spatial.jar and now it works fine for me.


/////////////////modified method:
protected CoordinateReferenceSystem determineCRS(int srid ) throws IOException {
Connection conn = getConnection(Transaction.AUTO_COMMIT);;
String wkt=null;
try { Statement st = conn.createStatement(); st.execute("select wktext from mdsys.cs_srs where srid = "+srid ); ///// changed line ResultSet set = st.getResultSet(); if( !set.next() ) return null; wkt = set.getString(1); return CRS.parseWKT( wkt ); }
catch( FactoryException parse){ throw (IOException) new IOException( "Unabled to parse WKTEXT into a CRS:"+wkt ).initCause( parse ); }
catch( SQLException sql ){ throw (IOException) new IOException( "No CRS for srid "+srid ).initCause( sql ); }

}

i don't exactly know if im right about it being a bug...cause in uDig project i connected to Oracle without any problems like this, may be they changed that or maybe im making a mistake.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
Hide
Permalink
Justin Smith added a comment - 23/Mar/06 5:16 PM
This might also be fixed by updating your Oracle configuration to have a synonym for "cs_srs" as "mdsys.cs_srs".
Show
Justin Smith added a comment - 23/Mar/06 5:16 PM This might also be fixed by updating your Oracle configuration to have a synonym for "cs_srs" as "mdsys.cs_srs".
Hide
Permalink
Andrea Aime added a comment - 23/May/10 5:18 AM
Oracle-NG does not suffer from this issue
Show
Andrea Aime added a comment - 23/May/10 5:18 AM Oracle-NG does not suffer from this issue
Hide
Permalink
Andrea Aime added a comment - 28/Nov/10 2:57 AM
Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
Show
Andrea Aime added a comment - 28/Nov/10 2:57 AM Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

People

  • Assignee:
    Andrea Aime
    Reporter:
    Vitaliy
Vote (1)
Watch (1)

Dates

  • Created:
    30/Jan/06 7:19 AM
    Updated:
    28/Nov/10 2:57 AM
    Resolved:
    23/May/10 5:18 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.