on 2013 Aug 02 7:05 AM
I am developing an application using hibernate.when I try to set the "CONNECTION_AUTHENTICATION" signature via hibernate,it is returning error "node to traverse cannot be null".am i missing something.could you please help me to understand,how to set CONNECTION_AUTHENTICATION in hibernate...
Which JDBC driver are you using with Hibernate - jConnect or the SQL Anywhere JDBC driver?
jConnect: As per the jConnect documentation, there is a connection property SQLINITSTRING
that can be set on the connection. This is then configured via the Hibernate hibernate.connection.SQLINITSTRING
property:
cfg = new Configuration() .setProperty( "hibernate.connection.SQLINITSTRING", "SET TEMPORARY OPTION connection_authentication='Company=MyCo;Application=MyApp;Signature=0fa55159999e14d818e...'");
The JDBC URL is specified as usual.
SQL Anywhere JDBC: This is set via the InitString
connection property on the JDBC URL:
cfg = new Configuration() .setProperty( "hibernate.connection.url", "jdbc:sqlanywhere:UID=dba;PWD=sql;SERVER=demo;InitString=SET TEMPORARY OPTION connection_authentication='Company=MyCo;Application=MyApp;Signature=0fa55159999e14d818e...'");
These properties can also be set via the hibernate.cfg.xml
file, as usual.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.