Karel,
I think this is an Ant problem. When I run 'ant -lib <set of libraries
needed for hibernate spatial> <my schema gen target>' I generate the
schema; when I run 'ant <my schema gen target>' I'm getting the same
error as before. Now, I'm pretty sure that I'm including all needed
JARs in target definition in ant file but for some reason, this JARs
are not passed to the target. Now I'm trying to overcome this
problem... maybe claspath is wrong at the momen od declaration of
Hibernate expoert schema target? to resolve this, one solution could
be to run somehow ant from _within_ ant build file with CLASSPATH
explicitly set to one with which all works... I'm curious if anyone
had the similar problem.
But, when I examined the generated schema, it seems that the schema
generated by Hibernate's export schema tool is not complete? I have
declared one column as Polygon and this column in SQL schema is being
declared as of type 'geometry'... shouldn't it be something more like
'MDSYS.SDO_GEOMETRY' and then this to initialize spatial module:
INSERT INTO USER_SDO_GEOM_METADATA
VALUES (
'<table name>',
'<column name>',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('Longitude', -180, 180, 10), -- 10 meters tolerance
MDSYS.SDO_DIM_ELEMENT('Latitude', -90, 90, 10) -- 10 meters tolerance
),
8307 -- SRID for ''Longitude / Latitude (WGS 84)' coordinate system
);
> Can you verify that the Hibernate spatial oracle provider jar is on
> the classpath? It looks like the spatial extension bootstrap class
> can't locate any providers.
>
> Regards,
>
> Karel
>
> On 11 Jun 2008, at 12:08, Coquelicot wrote:
>
>> Hi Andy,
>>
>> I was using org.hibernatespatial.oracle.OracleSpatial10gDialect. I
>> have a confirmation of this when I run Ant in debug mode.
>>
>> Are you also running Ant to generate the schemas? Which options are
>> you passing to the task? I pass only 'hibernate.properties', not the
>> XML configuration file.
>>
>> cheers,
>>
>> --
>> Lukasz
>>
>>
>> ===============================
>>
>> Hi,
>>
>> Can you actually confirm what you are setting hibnerate.dialect
>> to ? It
>> should be either org.hibernatespatial.postgis.PostgisDialect or
>> org.hibernatespatial.oracle.OracleSpatial10gDialect. Although I
>> only used
>> the hbm2ddl task to create a very simple schema, it did it
>> correctly under
>> both Oracle and Postgis/Postgres.
>>
>> Cheers,
>>
>> Andy
>> _______________________________________________
>> hibernatespatial-users mailing list
>>
hibernatespatial-users@...
>>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/>> hibernatespatial-users
>
>
>
> ------------------------------
>
> _______________________________________________
> hibernatespatial-users mailing list
>
hibernatespatial-users@...
>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users>
>
> End of hibernatespatial-users Digest, Vol 10, Issue 4
> *****************************************************
>
--
Lukasz
_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@...
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users