I can't login to Sybase using hibernate??? I've been using Oracle fine, but switching to Hibernate I can't get the settings correct. I'm trying the Hiberante unit test:
ant junitsingle -Dtestname="org.hibernate.test.collection.CollectionTest"
with these changes to the default hibernate.properties
## Sybase
hibernate.dialect org.hibernate.dialect.SybaseDialect
hibernate.connection.driver_class com.sybase.jdbc2.jdbc.SybDriver
hibernate.connection.url jdbc:sybase:Tds:134.120.126.32:5000/workflow
hibernate.connection.username workflow
hibernate.connection.password ******* (real one in file)
and commented HSQL
## HypersonicSQL
#hibernate.dialect org.hibernate.dialect.HSQLDialect
#Ehibernate.connection.driver_class org.hsqldb.jdbcDriver
#hibernate.connection.username sa
#hibernate.connection.password
#hibernate.connection.url jdbc:hsqldb:hsql://localhost
#hibernate.connection.url jdbc:hsqldb:test
#hibernate.connection.url jdbc:hsqldb:.
I'm getting the following message all over the place and the unit test fails
junitsingle:
[junit] Running org.hibernate.test.collection.CollectionTest
[junit] 15:06:18,135 INFO Environment:464 - Hibernate 3.0.5
[junit] 15:06:18,150 INFO Environment:482 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.sybase.jdbc2.jdbc.SybDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.max_fetch_depth=1, hibernate.dialect=org.hibernate.dialect.SybaseDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=workflow , hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:sybase:Tds:134.120.126.32:5000/workflow, hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1}
[junit] 15:06:18,154 INFO Environment:509 - using java.io streams to persist binary types
[junit] 15:06:18,157 INFO Environment:510 - using CGLIB reflection optimizer
[junit] 15:06:18,166 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
[junit] 15:06:18,275 INFO Configuration:427 - Mapping resource: org/hibernate/test/collection/UserPermissions.hbm.xml
[junit] 15:06:18,789 INFO HbmBinder:260 - Mapping class: org.hibernate.test.collection.User -> Users
[junit] 15:06:18,836 INFO HbmBinder:1218 - Mapping collection: org.hibernate.test.collection.User.permissions -> permissions
[junit] 15:06:18,839 INFO HbmBinder:1218 - Mapping collection: org.hibernate.test.collection.User.emailAddresses -> emailAddresses
[junit] 15:06:18,842 INFO HbmBinder:1218 - Mapping collection: org.hibernate.test.collection.User.sessionData -> sessionData
[junit] 15:06:18,863 INFO Dialect:92 - Using dialect: org.hibernate.dialect.SybaseDialect
[junit] 15:06:18,941 INFO Configuration:875 - processing extends queue
[junit] 15:06:18,943 INFO Configuration:879 - processing collection mappings
[junit] 15:06:18,960 INFO Configuration:888 - processing association property references
[junit] 15:06:18,961 INFO Configuration:917 - processing foreign key constraints
[junit] 15:06:19,356 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
[junit] 15:06:19,358 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
[junit] 15:06:19,359 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
[junit] 15:06:19,373 INFO DriverManagerConnectionProvider:80 - using driver: com.sybase.jdbc2.jdbc.SybDriver at URL: jdbc:sybase:Tds:134.120.126.32:5000/workflow
[junit] 15:06:19,375 INFO DriverManagerConnectionProvider:86 - connection properties: {user=workflow , password=****}
[junit] 15:06:19,676 WARN SettingsFactory:103 - Could not obtain connection metadata
[junit] java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
[junit] at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:546)
[junit] at com.sybase.jdbc2.tds.Tds.processLoginAckToken(Tds.java:3653)
[junit] at com.sybase.jdbc2.tds.Tds.doLogin(Tds.java:510)
[junit] at com.sybase.jdbc2.tds.Tds.login(Tds.java:432)
[junit] at com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:247)
[junit] at com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:223)
[junit] at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:198)
[junit] at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:132)
[junit] at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:179)
[junit] at java.sql.DriverManager.getConnection(DriverManager.java:525)
[junit] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[junit] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
[junit] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
[junit] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
[junit] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
[junit] at org.hibernate.test.TestCase.buildSessionFactory(TestCase.java:96)
[junit] at org.hibernate.test.TestCase.setUp(TestCase.java:119)
[junit] at junit.framework.TestCase.runBare(TestCase.java:125)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
I've tested the connection from the same machine with Sybases IsqlApp (java program that uses the same getConnection(server,props) that Hibernate uses....
java IsqlApp -S jdbc:sybase:Tds:134.120.126.32:5000/workflow -U workflow -P *******
Anybody seen this?
Thanks
|