-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Using XDoclet and Hibernating a PGpoint
PostPosted: Thu Nov 04, 2004 11:27 am 
Newbie

Joined: Thu Nov 04, 2004 10:35 am
Posts: 5
I can't get the mapping file generated correctly using xdoclet. The problem is with the 'coordinate' property highlighted below. The mapping file generated doesn't include the sql-type tag. I have to manually do this as a workaround.

The second problem I'm experiencing is to actually get hibernate to save the 'position' class, with the coordinate property as type point. The error I get is also included below.

Hope this is enough info. Please help.

Thanx.

Hibernate version:
2.1.3
Mapping documents:

Position.java

package com.vhr.util;

import org.postgresql.geometric.PGpoint;

/**
* @hibernate.class table="position"
*/
public class Position {
private Long id;

/**
* Meters above sea-level
*/
private int altitude;

/**
* Coordinate in degrees
*/
private org.postgresql.geometric.PGpoint coordinate;

/**
* @param coordinate
* @param altitude
*/
public Position(org.postgresql.geometric.PGpoint coordinate, int altitude) {
this.coordinate = coordinate;
this.altitude = altitude;
}

/**
* @param coordinate
*/
public Position(org.postgresql.geometric.PGpoint coordinate) {
this.coordinate = coordinate;
this.altitude = 0;
}

/**
* @param latitude
* @param longitude
* @param altitude
*/
public Position(double longitude, double latitude, int altitude) {
this.coordinate = new org.postgresql.geometric.PGpoint();
// System.out.println("Longitude " + longitude + " Latitude " + latitude + " Altitude " + altitude);
this.coordinate.x = longitude;
this.coordinate.y = latitude;
this.altitude = altitude;
}

/**
* @param latitude
* @param longitude
*/
public Position(double longitude, double latitude) {
this.coordinate = new org.postgresql.geometric.PGpoint(longitude, latitude);
// this.coordinate.x = longitude.doubleValue();
// this.coordinate.y = latitude.doubleValue();
this.altitude = 0;
}

public Position() {
this.coordinate = new org.postgresql.geometric.PGpoint();
}

/**
* @hibernate.id generator-class="sequence" column="position_id"
* @return java.lang.Long
*/
public Long getId() {
return id;
}

/**
* @param aId
*/
public void setId(Long aId) {
id = aId;
}

/**
* @return double
*/
public double getLatitude() {
return this.coordinate.y;
}

/**
* @param latitude
*/
public void setLatitude(double latitude) {
this.coordinate.y = latitude;
}

/**
* @return Double
*/
public double getLongitude() {
return this.coordinate.x;
}

/**
* @param latitude
* @param longitude
*/
public void setLongitude(double longitude) {
this.coordinate.x = longitude;
}

/**
* @return int
* @hibernate.property column="altitude"
*/
public int getAltitude() {
return altitude;
}

/**
* @param altitude
*/
public void setAltitude(int altitude) {
this.altitude = altitude;
}

/**
* @param coordinate
*/
public void setCoordinate(org.postgresql.geometric.PGpoint coordinate) {
this.coordinate = coordinate;
}

/**
* @return com.vhr.util.GeoPoint
* @hibernate.property column="coordinate" sql-type="point"
*
*/
public org.postgresql.geometric.PGpoint getCoordinate() {
return this.coordinate;
}

/**
* @return String
*/
public String toString() {
return "Longitude: " + coordinate.x + ", Latitude: " + coordinate.y + ", Altitude: " + altitude;
}
}

position.hbm (generated)

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping
>
<class
name="com.vhr.util.Position"
table="position"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>

<id
name="id"
column="position_id"
type="java.lang.Long"
>
<generator class="sequence">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-Position.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>

<property
name="altitude"
type="int"
update="true"
insert="true"
access="property"
column="altitude"
/>

<property
name="coordinate"
type="org.postgresql.geometric.PGpoint"
update="true"
insert="true"
access="property"
column="coordinate"
/>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Position.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>

position.hbm (modified)

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping
>
<class
name="com.vhr.util.Position"
table="position"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>

<id
name="id"
column="position_id"
type="java.lang.Long"
>
<generator class="sequence">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-Position.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>

<property
name="altitude"
type="int"
update="true"
insert="true"
access="property"
column="altitude"
/>

<property
name="coordinate"
type="org.postgresql.geometric.PGpoint"
update="true"
insert="true"
access="property"
>
<column
name="coordinate"
sql-type="point"
/>
</property>


<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Position.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

creating a position

TrimTracStatus trimTracStatus = new TrimTracStatus();
PGpoint point = new PGpoint();
// First check to see if this rowSet contains a position. Note that the position contained within the
// trimTracStatus object will set it's values to default if the status message does not contain a position
if(rowSet.containsKey("position") && (!((String)rowSet.get("position")).equals(""))){
try{
point.setValue((String)rowSet.get("position"));
// Create a new position with values read from the server
Position position = new Position(point,Double.valueOf(((String)rowSet.get("altitude")).length()>0?(String)rowSet.get("altitude"):"0").intValue());
// Set the trimTracStatus position to the newly created position
trimTracStatus.setPosition(position);
}catch(java.sql.SQLException e){
System.err.println("Error converting position string into postgreSQL point format: " + e);
}
}

Adding and saving position

com.vhr.TrimTrac trimTrac = (com.vhr.TrimTrac) sess.createQuery(hql).setMaxResults(1).uniqueResult();

if (trimTrac != null) {
trimTrac.addTrimTracStatus(trimtracStatus);
sess.save(trimtracStatus);
}

Full stack trace of any exception that occurs:

SEVERE: could not insert: [com.vhr.util.Position#24]
java.sql.SQLException: ERROR: Bad point external representation '\254\355\000\005sr\000 org.postgresql.geometric.PGpoint\003j\302\372\367\015\207\276\002\000\002D\000\001xD\000\001yxr\000\034org.postgresql.util.PGobject|\316\311.\367\2345F\002\000\002L\000\004typet\000\022Ljava/lang/String;L\000\005valueq\000~\000\002xpt\000\005pointp@;(G\260\230\271\240\3009[\021\227\327\370z'
at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:287)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:104)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43)
at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:517)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50)
at org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:273)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:468)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2407)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2360)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2229)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at com.vhr.runners.GsmLink.run(GsmLink.java:162)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)

Name and version of the database you are using:

(PostgreSQL) 7.3.6

The generated SQL (show_sql=true):

Although show_sql=true, no sql seem to show up. I'm propable looking in the wrong place...

Debug level Hibernate log excerpt:

Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.3
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.postgresql.Driver, hibernate.cglib.use_reflection_optimizer=false, hibernate.cache.provider_class=net.sf.ehcache.hibernate.Provider, hibernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=username, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:postgresql:hibernate, hibernate.show_sql=true, hibernate.connection.password=password, hibernate.connection.pool_size=1}
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: using java.io streams to persist binary types
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: AccountDetails.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.AccountDetails -> accountdetails
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Address.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.util.Address -> address
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Client.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.Client -> client
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Distributor.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.stock.Distributor -> distributor
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Company.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.stock.Company -> company
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: EmploymentDetails.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.EmploymentDetails -> employmentdetails
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Franchise.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.Franchise -> franchise
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: GsmSim.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.GsmSim -> gsmsim
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Installer.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.stock.Installer -> installer
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: InsurancePolicy.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.InsurancePolicy -> insurancepolicy
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Note.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.util.Note -> note
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: NoteList.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.util.NoteList -> notelist
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Operator.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.security.Operator -> operator
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollection
INFO: Mapping collection: com.security.Operator.roles -> operatorrole
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Person.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.util.Person -> person
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindJoinedSubclass
INFO: Mapping joined-subclass: com.vhr.Driver -> Driver
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindJoinedSubclass
INFO: Mapping joined-subclass: com.vhr.NextOfKin -> NextOfKin
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Role.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.security.Role -> role
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollection
INFO: Mapping collection: com.security.Role.operators -> operatorrole
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: StockList.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.stock.StockList -> stocklist
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: TrackingDevice.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.TrackingDevice -> trackingdevice
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindJoinedSubclass
INFO: Mapping joined-subclass: com.vhr.TrimTrac -> TrimTrac
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindJoinedSubclass
INFO: Mapping joined-subclass: com.vhr.ThalesTrac -> ThalesTrac
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Vehicle.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.Vehicle -> vehicle
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Position.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.util.Position -> position
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: DeviceStatus.hbm.xml
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.vhr.DeviceStatus -> devicestatus
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindJoinedSubclass
INFO: Mapping joined-subclass: com.vhr.TrimTracStatus -> TrimTracStatus
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-many association mappings
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.stock.Distributor.installers -> installer
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.stock.Company.distributors -> distributor
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.stock.Company.vehicles -> vehicle
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.stock.Company.clients -> client
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.stock.Installer.trackingDevices -> trackingdevice
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.util.NoteList.notes -> note
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.Driver.nextOfKins -> NextOfKin
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.stock.StockList.trackingDevices -> trackingdevice
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
INFO: Mapping collection: com.vhr.TrimTrac.deviceStatuses -> TrimTracStatus
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-one association property references
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
Nov 4, 2004 3:31:14 PM net.sf.hibernate.dialect.Dialect <init>
INFO: Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximim outer join fetch depth: 1
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Use outer join fetching: true
Nov 4, 2004 3:31:14 PM net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Nov 4, 2004 3:31:14 PM net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 1
Nov 4, 2004 3:31:14 PM net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: org.postgresql.Driver at URL: jdbc:postgresql:hibernate
Nov 4, 2004 3:31:14 PM net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=postgres, password=}
Nov 4, 2004 3:31:14 PM net.sf.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Use scrollable result sets: true
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Use JDBC3 getGeneratedKeys(): false
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: false
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: echoing all SQL to stdout
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {no='N', yes='Y'}
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: cache provider: net.sf.ehcache.hibernate.Provider
Nov 4, 2004 3:31:14 PM net.sf.hibernate.cfg.Configuration configureCaches
INFO: instantiating and configuring caches
Nov 4, 2004 3:31:14 PM net.sf.ehcache.config.Configurator configure
WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/opt/tomcat/webapps/ROOT/WEB-INF/lib/ehcache-0.7.jar!/ehcache-failsafe.xml
Nov 4, 2004 3:31:14 PM net.sf.ehcache.hibernate.Plugin <init>
WARNING: Could not find configuration for hibernate.test.com.security.Operator.roles. Configuring using the defaultCache settings.
Nov 4, 2004 3:31:14 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Nov 4, 2004 3:30:42 PM net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: no JNDI name configured
Nov 4, 2004 3:30:42 PM net.sf.hibernate.cache.UpdateTimestampsCache <init>
INFO: starting update timestamps cache at region: net.sf.hibernate.cache.UpdateTimestampsCache
Nov 4, 2004 3:30:42 PM net.sf.ehcache.hibernate.Plugin <init>
WARNING: Could not find configuration for net.sf.hibernate.cache.UpdateTimestampsCache. Configuring using the defaultCache settings.
Nov 4, 2004 3:30:42 PM net.sf.hibernate.cache.QueryCache <init>
INFO: starting query cache at region: net.sf.hibernate.cache.QueryCache
Nov 4, 2004 3:30:42 PM net.sf.ehcache.hibernate.Plugin <init>
WARNING: Could not find configuration for net.sf.hibernate.cache.QueryCache. Configuring using the defaultCache settings.
Nov 4, 2004 3:30:42 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: null
Nov 4, 2004 3:30:42 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 04, 2004 11:42 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
Hibernate plugin for xdoclet 2.0 supports @hibernate.column
tag which will put columns inside property mapping

Your tags shall look like

---%<----------

@hibernate.property
@hibernate.column name="coordinate" sql-type="point"
--%<------------

For your reference:

http://docs.codehaus.org/display/XDOCLE ... ate.column

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 05, 2004 5:11 am 
Newbie

Joined: Thu Nov 04, 2004 10:35 am
Posts: 5
Thank you very much, that sorted the xdoclet issue. The problem still remains saving the PGpoint to posgreSQL. Any suggestions on that?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 05, 2004 5:25 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
christo wrote:
Thank you very much, that sorted the xdoclet issue. The problem still remains saving the PGpoint to posgreSQL. Any suggestions on that?


Could it be that you need custom type? I'm not current on postgres and spatial data types...

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.