I ran into the same problem with the same configuration. I used jtds driver (version 1.2).
If anybody known the solution, please post it here.
I had the same problem with:
4.0.3SP1, portal 2.2
RDBMS: Microsoft SQL Server, version: 9.0.1399
JDBC driver: Microsoft SQL Server 2005 JDBC Driver - Beta 1, version: 18.104.22.168
I'm using the jtds driver 1.2. an one of you post your datasource descriptor, so I can have a look.
I used the destriptor which comes with the portal bundle named "portal-sqlserver-ds.xml". I used "out of box" destriptor without any changes (even login name and password was the same).
Here is the context of the descriptor:
<?xml version="1.0" encoding="UTF-8"?>
ok. I'm looking at it now, but it may be a while. I'm on SQLExpress, which had TCP/IP disabled by default.
I'm able to connect now and reproduce the errors.
There is a temporary fix here: http://jira.jboss.com/jira/browse/JBPORTAL-540
I cannot commit the code until I verify it works on other DB vendors, and removing the constraint does not affect data integrity.