Subject firebirdsql 1.5.5 failed with UTF-8 and UNICODE_FSS
Author tsangccn
Hello,

I am using Fedora Core 4 Linux, JDK 1.5.0_04, JBoss 4.0.2 and
FirebirdSQL-1.5.5. My database is created with default character set
UNICODE_FSS. Using the following testing environment:

(A) locale of OS is UTF-8, the following command is issued before
starting JBoss
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

(B) locale of OS is not UTF-8, the following command is issued before
starting JBoss
export LANG=en_US
export LC_ALL=en_US

And I have tested with my ds.xml for firebirdsql.rar with or without
the property

<config-property name="Encoding">UNICODE_FSS</config-property>

I have the following result:

| with the property | without the property
----+-----------------------+-------------------------
(A) | NullPointerException | unicode data OK
| |
(B) | unicode data OK | unicode data garbaged

I think the result is OK except the NullPointerException. It may be a
bug. The server.log for the NullPointerException is as follows:

2005-10-12 19:05:15,505 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Starting
jboss.jca:service=ManagedConnectionFactory,name=TestDS
2005-10-12 19:05:15,748 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Not setting
config property 'BlobBufferLength'
2005-10-12 19:05:15,748 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Not setting
config property 'Database'
2005-10-12 19:05:15,748 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Not setting
config property 'TransactionIsolation'
2005-10-12 19:05:15,749 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Not setting
config property 'Encoding'
2005-10-12 19:05:15,749 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Not setting
config property 'Password'
2005-10-12 19:05:15,765 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] setting property:
TransactionIsolationName to value TRANSACTION_READ_COMMITTED
2005-10-12 19:05:15,766 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] set property
TransactionIsolationName to value TRANSACTION_READ_COMMITTED
2005-10-12 19:05:15,767 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Not setting
config property 'UserName'
2005-10-12 19:05:15,776 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] setting property:
UserName to value sysdba
2005-10-12 19:05:15,787 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] set property
UserName to value sysdba
2005-10-12 19:05:15,797 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] setting property:
Password to value masterkey
2005-10-12 19:05:15,797 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] set property
Password to value masterkey
2005-10-12 19:05:15,807 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] setting property:
Database to value nsl02/3050:/home/databases/test.gdb
2005-10-12 19:05:15,807 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] set property
Database to value nsl02/3050:/home/databases/test.gdb
2005-10-12 19:05:15,817 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] setting property:
Encoding to value UNICODE_FSS
2005-10-12 19:05:15,828 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] set property
Encoding to value UNICODE_FSS
2005-10-12 19:05:15,829 DEBUG
[org.jboss.resource.connectionmanager.RARDeployment] Started
jboss.jca:service=ManagedConnectionFactory,name=TestDS
2005-10-12 19:05:15,829 DEBUG [org.jboss.system.ServiceController]
Starting dependent components for:
jboss.jca:service=ManagedConnectionFactory,name=TestDS dependent
components: [ObjectName:
jboss.jca:service=ManagedConnectionPool,name=TestDS
State: CREATED
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=TestDS
Depends On Me:
jboss.jca:service=TxCM,name=TestDS
]
2005-10-12 19:05:15,829 DEBUG [org.jboss.system.ServiceController]
starting service jboss.jca:service=ManagedConnectionPool,name=TestDS
2005-10-12 19:05:15,830 DEBUG
[org.jboss.resource.connectionmanager.JBossManagedConnectionPool]
Starting jboss.jca:service=ManagedConnectionPool,name=TestDS
2005-10-12 19:05:15,851 DEBUG
[org.jboss.resource.connectionmanager.JBossManagedConnectionPool]
Started jboss.jca:service=ManagedConnectionPool,name=TestDS
2005-10-12 19:05:15,852 DEBUG [org.jboss.system.ServiceController]
Starting dependent components for:
jboss.jca:service=ManagedConnectionPool,name=TestDS dependent
components: [ObjectName: jboss.jca:service=TxCM,name=TestDS
State: CREATED
I Depend On:
jboss.jca:service=ManagedConnectionPool,name=TestDS
jboss.jca:service=CachedConnectionManager
jboss:service=TransactionManager
Depends On Me:
jboss.jca:service=ConnectionFactoryBinding,name=TestDS
]
2005-10-12 19:05:15,852 DEBUG [org.jboss.system.ServiceController]
starting service jboss.jca:service=TxCM,name=TestDS
2005-10-12 19:05:15,853 DEBUG
[org.jboss.resource.connectionmanager.TxConnectionManager] Starting
jboss.jca:service=TxCM,name=TestDS
2005-10-12 19:05:15,865 DEBUG
[org.jboss.resource.connectionmanager.TxConnectionManager] Started
jboss.jca:service=TxCM,name=TestDS
2005-10-12 19:05:15,866 DEBUG [org.jboss.system.ServiceController]
Starting dependent components for: jboss.jca:service=TxCM,name=TestDS
dependent components: [ObjectName:
jboss.jca:service=ConnectionFactoryBinding,name=TestDS
State: CREATED
I Depend On:
jboss.jca:service=TxCM,name=TestDS
]
2005-10-12 19:05:15,866 DEBUG [org.jboss.system.ServiceController]
starting service jboss.jca:service=ConnectionFactoryBinding,name=TestDS
2005-10-12 19:05:15,867 DEBUG
[org.jboss.resource.connectionmanager.ConnectionFactoryBindingService]
Starting jboss.jca:service=ConnectionFactoryBinding,name=TestDS
2005-10-12 19:05:15,876 ERROR
[org.jboss.resource.connectionmanager.ConnectionFactoryBindingService]
Starting failed jboss.jca:service=ConnectionFactoryBinding,name=TestDS
java.lang.NullPointerException
at
org.firebirdsql.jgds.ParameterBufferBase$StringArgument.hashCode(ParameterBufferBase.java:249)
at java.util.AbstractList.hashCode(AbstractList.java:630)
at
org.firebirdsql.jgds.ParameterBufferBase.hashCode(ParameterBufferBase.java:155)
at
org.firebirdsql.jca.FBConnectionRequestInfo.hashCode(FBConnectionRequestInfo.java:143)
at
org.firebirdsql.jca.FBManagedConnectionFactory.hashCode(FBManagedConnectionFactory.java:308)
at java.util.HashMap.hash(HashMap.java:264)
at java.util.WeakHashMap.put(WeakHashMap.java:393)
at
org.firebirdsql.jca.FBManagedConnectionFactory.start(FBManagedConnectionFactory.java:810)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createConnectionFactory(FBManagedConnectionFactory.java:344)
at
org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.createConnectionFactory(ConnectionFactoryBindingService.java:182)
at
org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.startService(ConnectionFactoryBindingService.java:71)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
at $Proxy0.start(Unknown Source)


Please help.

Thanks
C. N.