Mantis - Resin
Viewing Issue Advanced Details
2173 minor always 11-14-07 07:33 11-28-07 15:38
sam  
ferg  
high  
closed 3.1.3  
fixed  
none    
none 3.1.4  
0002173: database configuration for Sybase in 3.1.3 causes NullPointerException
(rep by B Au)

We are using JConnect 5.5:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.jconnjdbc_5.5/title.htm [^]

The following configuration causes an exception in 3.1.3 but it works in 3.0.23:

<database jndi-name='myPool' max-connections="4">
 <driver type="com.sybase.jdbc2.jdbc.SybDriver">
   <url>jdbc:sybase:Tds:myhost:12345/mydb</url>
   <user>myuser</user>
   <password>mypasswd</password>
 </driver>
</database>

[14:49:34.263] loading driver: com.sybase.jdbc2.jdbc.SybDriver
[14:49:34.335] java.lang.NullPointerException
[14:49:34.335] at com.caucho.config.Config.setAttribute(Config.java:519)
[14:49:34.335] at com.caucho.config.StringAttributeProgram.configure(StringAttributeProgram.java:52)
[14:49:34.335] at
com.caucho.sql.DriverConfig.initDriver(DriverConfig.java:673)
[14:49:34.335] at com.caucho.sql.DBPoolImpl.init(DBPoolImpl.java:916)
[14:49:34.335] at com.caucho.sql.DBPool.init(DBPool.java:633)

As a workaround, <url> can be replaced with:

     <network-protocol>Tds</network-protocol>
     <port-number>12345</port-number>
     <server-name>myhost</server-name>
     <database-name>mydb</database-name>

Notes
(0002532)
ferg   
11-28-07 15:38   
server/4506

The "fix" is just in the error reporting. The driver doesn't appear to have a setURL method, so it's a mistake to have a <url> in the <database>.