diff --git a/hibernate-spatial/hibernate-spatial.gradle b/hibernate-spatial/hibernate-spatial.gradle index b944deee77..d9c64ddc83 100644 --- a/hibernate-spatial/hibernate-spatial.gradle +++ b/hibernate-spatial/hibernate-spatial.gradle @@ -14,9 +14,6 @@ dependencies { transitive = false } - compile( libraries.slf4j_log4j12) { - transitive = true - } testCompile( libraries.junit ) testCompile( project(':hibernate-testing') ) diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/Log.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/Log.java new file mode 100644 index 0000000000..a7a5b2abdf --- /dev/null +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/Log.java @@ -0,0 +1,13 @@ +package org.hibernate.spatial; + +import org.jboss.logging.BasicLogger; +import org.jboss.logging.MessageLogger; + +/** + * @author Karel Maesen, Geovise BVBA + * creation-date: 1/14/12 + */ +@MessageLogger(projectCode = "HS") +public interface Log extends BasicLogger { + +} diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/LogFactory.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/LogFactory.java new file mode 100644 index 0000000000..15e61d2949 --- /dev/null +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/LogFactory.java @@ -0,0 +1,22 @@ +package org.hibernate.spatial; + +import org.jboss.logging.Logger; + +/** + * A static factory for Logs. + * + *

This class is based on hibernate-ogm LoggerFactory class.

+ * + * @author Karel Maesen, Geovise BVBA + * creation-date: 1/14/12 + */ +public class LogFactory { + + public static Log make() { + Throwable t = new Throwable(); + StackTraceElement directCaller = t.getStackTrace()[1]; + return Logger.getMessageLogger(Log.class, directCaller.getClassName()); + } + + +} diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/cfg/HSConfiguration.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/cfg/HSConfiguration.java index 48e9c05521..1e64f08cd2 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/cfg/HSConfiguration.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/cfg/HSConfiguration.java @@ -27,6 +27,14 @@ */ package org.hibernate.spatial.cfg; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; +import org.hibernate.cfg.Configuration; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -34,15 +42,6 @@ import java.io.InputStream; import java.net.URL; import java.util.Properties; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.Element; -import org.dom4j.io.SAXReader; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.hibernate.cfg.Configuration; - /** * Configuration information for the Hibernate Spatial Extension. * @@ -55,7 +54,7 @@ public class HSConfiguration extends Properties { */ private static final long serialVersionUID = 1L; - private static Logger logger = LoggerFactory.getLogger( HSConfiguration.class ); + private static Log logger = LogFactory.make(); private String source = "runtime configuration object"; diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/oracle/OracleSpatial10gDialect.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/oracle/OracleSpatial10gDialect.java index c78614f6c1..63b84f1fdf 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/oracle/OracleSpatial10gDialect.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/oracle/OracleSpatial10gDialect.java @@ -35,8 +35,6 @@ import org.hibernate.spatial.helper.PropertyFileReader; import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.Type; import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStream; @@ -148,8 +146,7 @@ public class OracleSpatial10gDialect extends Oracle10gDialect implements private final static String CONNECTION_FINDER_PROPERTY = "CONNECTION-FINDER"; - private final static Logger log = LoggerFactory - .getLogger(OracleSpatial10gDialect.class); + private final static Log LOG = LogFactory.make(); private String OGC_STRICT = "OGC_STRICT"; @@ -271,7 +268,7 @@ public class OracleSpatial10gDialect extends Oracle10gDialect implements @Override public String getTypeName(int code, long length, int precision, int scale) throws HibernateException { if (code == 3000) return "SDO_GEOMETRY"; - return super.getTypeName(code, length, precision, scale); //To change body of overridden methods use File | Settings | File Templates. + return super.getTypeName(code, length, precision, scale); } @Override @@ -533,7 +530,7 @@ public class OracleSpatial10gDialect extends Oracle10gDialect implements URL propfile = loader.getResource(propfileLoc); if (propfile != null) { InputStream is = null; - log.info("properties file found: " + propfile); + LOG.info("properties file found: " + propfile); try { loader.getResource(getClass().getCanonicalName()); is = propfile.openStream(); @@ -549,15 +546,15 @@ public class OracleSpatial10gDialect extends Oracle10gDialect implements ConnectionFinder cf = (ConnectionFinder) clazz .newInstance(); OracleJDBCTypeFactory.setConnectionFinder(cf); - log.info("Setting ConnectionFinder to " + ccn); + LOG.info("Setting ConnectionFinder to " + ccn); } catch (ClassNotFoundException e) { - log.warn("Tried to set ConnectionFinder to " + ccn + LOG.warn("Tried to set ConnectionFinder to " + ccn + ", but class not found."); } catch (InstantiationException e) { - log.warn("Tried to set ConnectionFinder to " + ccn + LOG.warn("Tried to set ConnectionFinder to " + ccn + ", but couldn't instantiate."); } catch (IllegalAccessException e) { - log + LOG .warn("Tried to set ConnectionFinder to " + ccn + ", but got IllegalAcessException on instantiation."); @@ -565,7 +562,7 @@ public class OracleSpatial10gDialect extends Oracle10gDialect implements } } catch (IOException e) { - log.warn("Problem reading properties file " + e); + LOG.warn("Problem reading properties file " + e); } finally { try { is.close(); diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/helper/PropertyFileReader.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/helper/PropertyFileReader.java index b2058ac2ed..2700a9c793 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/helper/PropertyFileReader.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/helper/PropertyFileReader.java @@ -28,6 +28,9 @@ */ package org.hibernate.spatial.helper; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -38,9 +41,6 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * Helper class to read settings and properties files. * @@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory; */ public class PropertyFileReader { - private static final Logger log = LoggerFactory.getLogger( PropertyFileReader.class ); + private static final Log LOG = LogFactory.make(); /** * pattern for comment lines. If it matches, it is a comment. @@ -97,7 +97,7 @@ public class PropertyFileReader { this.is.close(); } catch ( IOException e ) { - log.warn( "Exception when closing PropertyFileReader: " + e ); + LOG.warn( "Exception when closing PropertyFileReader: " + e ); } } diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/jts/JTS.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/jts/JTS.java index c7f126ce4d..23c965a6e2 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/jts/JTS.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/jts/JTS.java @@ -29,8 +29,6 @@ package org.hibernate.spatial.jts; import org.hibernate.spatial.jts.mgeom.MGeometryFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * A static utility class @@ -39,8 +37,6 @@ import org.slf4j.LoggerFactory; */ public class JTS { - private static final Logger log = LoggerFactory.getLogger( JTS.class ); - private static MGeometryFactory defaultGeomFactory = new MGeometryFactory(); /** diff --git a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialFunctions.java b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialFunctions.java index f122d07018..db17da4aaa 100644 --- a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialFunctions.java +++ b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialFunctions.java @@ -29,13 +29,13 @@ import com.vividsolutions.jts.geom.Geometry; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; import org.hibernate.spatial.SpatialFunction; import org.hibernate.spatial.testing.SpatialDialectMatcher; import org.hibernate.spatial.testing.SpatialFunctionalTestCase; import org.hibernate.testing.Skip; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.sql.SQLException; import java.util.HashMap; @@ -47,10 +47,10 @@ import java.util.Map; @Skip(condition = SpatialDialectMatcher.class,message = "No Spatial Dialect") public class TestSpatialFunctions extends SpatialFunctionalTestCase { - private static Logger LOGGER = LoggerFactory.getLogger( TestSpatialFunctions.class ); + private static Log LOG = LogFactory.make(); - protected Logger getLogger() { - return LOGGER; + protected Log getLogger() { + return LOG; } @Test diff --git a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialRestrictions.java b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialRestrictions.java index 4e67321900..c1f7484144 100644 --- a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialRestrictions.java +++ b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestSpatialRestrictions.java @@ -29,14 +29,14 @@ import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.criterion.Criterion; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; import org.hibernate.spatial.SpatialFunction; import org.hibernate.spatial.criterion.SpatialRestrictions; import org.hibernate.spatial.testing.SpatialDialectMatcher; import org.hibernate.spatial.testing.SpatialFunctionalTestCase; import org.hibernate.testing.Skip; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.sql.SQLException; import java.util.List; @@ -48,10 +48,10 @@ import static org.junit.Assert.fail; @Skip(condition = SpatialDialectMatcher.class,message = "No Spatial Dialect") public class TestSpatialRestrictions extends SpatialFunctionalTestCase { - private static Logger LOGGER = LoggerFactory.getLogger( TestSpatialRestrictions.class ); + private static Log LOG = LogFactory.make(); - protected Logger getLogger() { - return LOGGER; + protected Log getLogger() { + return LOG; } @Test @@ -222,7 +222,7 @@ public class TestSpatialRestrictions extends SpatialFunctionalTestCase { } } assertEquals( cnt, list.size() ); - LOGGER.info( String.format( "Found %d objects within testsuite-suite polygon.", cnt ) ); + LOG.info( String.format( "Found %d objects within testsuite-suite polygon.", cnt ) ); } private boolean findInList(Integer id, List list) { diff --git a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestStoreRetrieve.java b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestStoreRetrieve.java index 10d688530d..6953ed34ac 100644 --- a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestStoreRetrieve.java +++ b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/integration/TestStoreRetrieve.java @@ -30,13 +30,13 @@ import com.vividsolutions.jts.io.ParseException; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.Transaction; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; import org.hibernate.spatial.testing.SpatialDialectMatcher; import org.hibernate.spatial.testing.SpatialFunctionalTestCase; import org.hibernate.spatial.testing.TestDataElement; import org.hibernate.testing.Skip; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.List; @@ -53,10 +53,10 @@ import static org.junit.Assert.assertTrue; @Skip(condition = SpatialDialectMatcher.class, message = "No Spatial Dialect") public class TestStoreRetrieve extends SpatialFunctionalTestCase { - private static Logger LOGGER = LoggerFactory.getLogger(TestStoreRetrieve.class); + private static Log LOG = LogFactory.make(); - protected Logger getLogger() { - return LOGGER; + protected Log getLogger() { + return LOG; } public void prepareTest(){ diff --git a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/AbstractExpectationsFactory.java b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/AbstractExpectationsFactory.java index 11cadf5da3..24a46b8eb6 100644 --- a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/AbstractExpectationsFactory.java +++ b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/AbstractExpectationsFactory.java @@ -30,8 +30,8 @@ import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.geom.Polygon; import com.vividsolutions.jts.io.ParseException; import com.vividsolutions.jts.io.WKTReader; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; import java.sql.*; import java.util.HashMap; @@ -48,7 +48,7 @@ import java.util.Map; */ public abstract class AbstractExpectationsFactory { - private static final Logger LOGGER = LoggerFactory.getLogger( AbstractExpectationsFactory.class ); + private static final Log LOG = LogFactory.make(); public final static String TEST_POLYGON_WKT = "POLYGON((0 0, 50 0, 100 100, 0 100, 0 0))"; public final static String TEST_POINT_WKT = "POINT(0 0)"; @@ -793,7 +793,7 @@ public abstract class AbstractExpectationsFactory { try { cn = createConnection(); preparedStatement = nativeSQLStatement.prepare( cn ); - LOGGER.info( "Native SQL is: " + preparedStatement.toString() ); + LOG.info( "Native SQL is: " + preparedStatement.toString() ); ResultSet results = preparedStatement.executeQuery(); while ( results.next() ) { int id = results.getInt( 1 ); diff --git a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/DataSourceUtils.java b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/DataSourceUtils.java index 8017fbd265..0dbc985c83 100644 --- a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/DataSourceUtils.java +++ b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/DataSourceUtils.java @@ -28,8 +28,8 @@ package org.hibernate.spatial.testing; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.io.ParseException; import org.apache.commons.dbcp.BasicDataSource; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; import javax.sql.DataSource; import java.io.*; @@ -46,7 +46,7 @@ import java.util.Properties; public class DataSourceUtils { - private static Logger LOGGER = LoggerFactory.getLogger( DataSourceUtils.class ); + private static Log LOG = LogFactory.make(); private final SQLExpressionTemplate sqlExpressionTemplate; @@ -180,7 +180,7 @@ public class DataSourceUtils { PreparedStatement pmt = cn.prepareStatement( "delete from GEOMTEST" ); if ( !pmt.execute() ) { int updateCount = pmt.getUpdateCount(); - LOGGER.info( "Removing " + updateCount + " rows." ); + LOG.info( "Removing " + updateCount + " rows." ); } cn.commit(); pmt.close(); @@ -205,13 +205,13 @@ public class DataSourceUtils { Statement stmt = cn.createStatement(); for ( TestDataElement testDataElement : testData ) { String sql = sqlExpressionTemplate.toInsertSql( testDataElement ); - LOGGER.debug( "adding stmt: " + sql ); + LOG.debug( "adding stmt: " + sql ); stmt.addBatch( sql ); } int[] insCounts = stmt.executeBatch(); cn.commit(); stmt.close(); - LOGGER.info( "Loaded " + sum( insCounts ) + " rows." ); + LOG.info( "Loaded " + sum( insCounts ) + " rows." ); } finally { try { @@ -277,7 +277,7 @@ public class DataSourceUtils { cn = getDataSource().getConnection(); cn.setAutoCommit( false ); PreparedStatement statement = cn.prepareStatement( sql ); - LOGGER.info( "Executing statement: " + sql ); + LOG.info( "Executing statement: " + sql ); statement.execute(); cn.commit(); statement.close(); diff --git a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/SpatialFunctionalTestCase.java b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/SpatialFunctionalTestCase.java index 8313321aa5..c54877051f 100644 --- a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/SpatialFunctionalTestCase.java +++ b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/SpatialFunctionalTestCase.java @@ -5,11 +5,11 @@ import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; +import org.hibernate.spatial.Log; import org.hibernate.spatial.SpatialDialect; import org.hibernate.spatial.SpatialFunction; import org.hibernate.testing.AfterClassOnce; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.slf4j.Logger; import java.sql.SQLException; import java.util.List; @@ -130,7 +130,7 @@ public abstract class SpatialFunctionalTestCase extends BaseCoreFunctionalTestCa return dialect.supportsFiltering(); } - abstract protected Logger getLogger(); + abstract protected Log getLogger(); /** * Adds the query results to a Map. diff --git a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/dialects/sqlserver/convertors/AbstractConvertorTest.java b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/dialects/sqlserver/convertors/AbstractConvertorTest.java index d6ab83111a..68a3fd71aa 100644 --- a/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/dialects/sqlserver/convertors/AbstractConvertorTest.java +++ b/hibernate-spatial/src/matrix/java/org/hibernate/spatial/testing/dialects/sqlserver/convertors/AbstractConvertorTest.java @@ -30,16 +30,17 @@ package org.hibernate.spatial.testing.dialects.sqlserver.convertors; */ import com.vividsolutions.jts.geom.Geometry; +import org.hibernate.spatial.Log; +import org.hibernate.spatial.LogFactory; import org.hibernate.spatial.dialect.sqlserver.convertors.Decoders; import org.hibernate.spatial.dialect.sqlserver.convertors.Encoders; import org.hibernate.spatial.dialect.sqlserver.convertors.OpenGisType; import org.hibernate.spatial.testing.DataSourceUtils; +import org.hibernate.spatial.testing.SpatialFunctionalTestCase; import org.hibernate.spatial.testing.TestData; +import org.hibernate.spatial.testing.TestSupport; import org.hibernate.spatial.testing.dialects.sqlserver.SQLServerExpressionTemplate; import org.hibernate.spatial.testing.dialects.sqlserver.SQLServerTestSupport; -import org.hibernate.spatial.testing.SpatialFunctionalTestCase; -import org.hibernate.spatial.testing.TestSupport; -import org.slf4j.Logger; import java.io.IOException; import java.sql.SQLException; @@ -55,10 +56,12 @@ import static org.junit.Assert.assertTrue; */ public abstract class AbstractConvertorTest extends SpatialFunctionalTestCase { - private DataSourceUtils dataSourceUtils; + private final static Log LOG = LogFactory.make(); private final static TestSupport support = new SQLServerTestSupport(); + private DataSourceUtils dataSourceUtils; + Map decodedGeoms; Map rawResults; Map encodedGeoms; @@ -131,9 +134,8 @@ public abstract class AbstractConvertorTest extends SpatialFunctionalTestCase { } } - //TODO -- add logger. @Override - protected Logger getLogger() { - return null; //To change body of implemented methods use File | Settings | File Templates. + protected Log getLogger() { + return LOG; } } \ No newline at end of file diff --git a/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/MLineStringTest.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/MLineStringTest.java index e9530697a7..e8110bd81a 100644 --- a/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/MLineStringTest.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/MLineStringTest.java @@ -82,7 +82,6 @@ public class MLineStringTest extends TestCase { int l = (int) Math.round( Math.random() * 250.0 ); l = Math.max( 2, l ); - System.out.println( "Size of arbitraryline ==" + l ); mcoar = new MCoordinate[l]; for ( int i = 0; i < mcoar.length; i++ ) { double x = Math.random() * 100000.0; diff --git a/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestEventLocator.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestEventLocator.java index d05ed330e1..ee160b5ce6 100644 --- a/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestEventLocator.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestEventLocator.java @@ -30,14 +30,6 @@ import com.vividsolutions.jts.geom.PrecisionModel; import org.junit.Before; import org.junit.Test; -import org.hibernate.spatial.jts.mgeom.EventLocator; -import org.hibernate.spatial.jts.mgeom.MCoordinate; -import org.hibernate.spatial.jts.mgeom.MCoordinateSequenceFactory; -import org.hibernate.spatial.jts.mgeom.MGeometryException; -import org.hibernate.spatial.jts.mgeom.MGeometryFactory; -import org.hibernate.spatial.jts.mgeom.MLineString; -import org.hibernate.spatial.jts.mgeom.MultiMLineString; - import static junit.framework.Assert.assertEquals; import static org.junit.Assert.assertNotNull; diff --git a/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestMLineStringGetCoordinatesBetween.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestMLineStringGetCoordinatesBetween.java index 6df099141a..d77079b274 100644 --- a/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestMLineStringGetCoordinatesBetween.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/jts/mgeom/TestMLineStringGetCoordinatesBetween.java @@ -31,12 +31,6 @@ import com.vividsolutions.jts.geom.PrecisionModel; import org.junit.Before; import org.junit.Test; -import org.hibernate.spatial.jts.mgeom.MCoordinate; -import org.hibernate.spatial.jts.mgeom.MCoordinateSequenceFactory; -import org.hibernate.spatial.jts.mgeom.MGeometryException; -import org.hibernate.spatial.jts.mgeom.MGeometryFactory; -import org.hibernate.spatial.jts.mgeom.MLineString; - import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.fail; diff --git a/hibernate-spatial/src/test/resources/hibernate.properties b/hibernate-spatial/src/test/resources/hibernate.properties index 4259c678ed..d8bd3fb02f 100644 --- a/hibernate-spatial/src/test/resources/hibernate.properties +++ b/hibernate-spatial/src/test/resources/hibernate.properties @@ -24,31 +24,31 @@ # Default unit/integration test config. -#hibernate.dialect org.hibernate.dialect.H2Dialect -#hibernate.connection.driver_class org.h2.Driver -#hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE -#hibernate.connection.username sa -# -#hibernate.connection.pool_size 5 -# -#hibernate.show_sql false -# -#hibernate.max_fetch_depth 5 -# -#hibernate.cache.region_prefix hibernate.test -#hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory -# -## NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle -#hibernate.jdbc.batch_versioned_data true +hibernate.dialect org.hibernate.dialect.H2Dialect +hibernate.connection.driver_class org.h2.Driver +hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE +hibernate.connection.username sa + +hibernate.connection.pool_size 5 + +hibernate.show_sql false + +hibernate.max_fetch_depth 5 + +hibernate.cache.region_prefix hibernate.test +hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory + +# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle +hibernate.jdbc.batch_versioned_data true ## Configs for spatial databases (used during testing on local dev environment). -hibernate.dialect org.hibernate.spatial.dialect.postgis.PostgisDialect -hibernate.connection.driver_class org.postgresql.Driver -hibernate.connection.url jdbc:postgresql://localhost:5432:hibbrtru -hibernate.connection.username hibbrtru -hibernate.connection.password hibbrtru +#hibernate.dialect org.hibernate.spatial.dialect.postgis.PostgisDialect +#hibernate.connection.driver_class org.postgresql.Driver +#hibernate.connection.url jdbc:postgresql://localhost:5432:hibbrtru +#hibernate.connection.username hibbrtru +#hibernate.connection.password hibbrtru #hibernate.dialect org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect #hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver