Continuum

sizes incompatible with mssql (Patch Attached)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.3
  • Fix Version/s: 1.1-beta-3
  • Component/s: Database
  • Labels:
    None
  • Environment:
    windows/mssql2000
  • Complexity:
    Intermediate
  • Number of attachments :
    3

Description

This is my configuration:

<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>net.sourceforge.jtds.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:jtds:sqlserver://cordella.mht.stchome.com:1433/continuum</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>continuum</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>continuum</value>
</property>

I get this exception:
3984 [WrapperSimpleAppMain] ERROR JPOX.RDBMS.SCHEMA - An exception was thrown while adding/validating class(es) : The size (8192) given to the column 'COMMENT' exceeds the maximum allowed for any data type (8000).
java.sql.SQLException: The size (8192) given to the column 'COMMENT' exceeds the maximum allowed for any data type (8000).

4000 [WrapperSimpleAppMain] ERROR JPOX.RDBMS.SCHEMA - java.sql.SQLException: The size (8192) given to the column 'COMMENT' exceeds the maximum allowed for any data type (8000).

  1. continuum-697.patch
    13/Nov/06 3:53 PM
    2 kB
    Brian Fox
  2. CONTINUUM-697.patch
    19/Sep/07 4:56 AM
    2 kB
    Teodoro Cue Jr.
  3. CONTINUUM-697.patch
    19/Sep/07 3:04 AM
    1 kB
    Teodoro Cue Jr.

Activity

Hide
Brian Fox added a comment -

Attaching Patch file. To make this work on sql server 2005 the max sizes just need to be decreased from 8192 to 8000.

Show
Brian Fox added a comment - Attaching Patch file. To make this work on sql server 2005 the max sizes just need to be decreased from 8192 to 8000.
Hide
Jesse McConnell added a comment -

I don't think we want to solve this with this kinda approach, as noted on the mailing list we are probably better off trying to either store this as some kinda BLOB/CLOB deal, or just write out to disk like brett was thinking.

unless this is critical, I am going to move it out to the next alpha for now

Show
Jesse McConnell added a comment - I don't think we want to solve this with this kinda approach, as noted on the mailing list we are probably better off trying to either store this as some kinda BLOB/CLOB deal, or just write out to disk like brett was thinking. unless this is critical, I am going to move it out to the next alpha for now
Hide
Teodoro Cue Jr. added a comment -

Here's one solution using ORMs(http://www.jpox.org/docs/1_1/metadata.html#File_Types) in JPOX.

The solution would affect all the databases but Brian though can maybe patch a copy of Continuum, build it and use that with MSSQL.

If we're looking at ORMs as a long term solution, we need to add the property Mapping when using MSSQL databases. So far, I can only see this happening in the code. Test the driver and if it's an MSSQL one, include the property Mapping when creating the PersistenceManager. Any ideas as to how we can add a dynamic entry on application.xml? Such that when a user deploys Continuum with MSSQL, he/she can add the Mapping property.

Show
Teodoro Cue Jr. added a comment - Here's one solution using ORMs(http://www.jpox.org/docs/1_1/metadata.html#File_Types) in JPOX. The solution would affect all the databases but Brian though can maybe patch a copy of Continuum, build it and use that with MSSQL. If we're looking at ORMs as a long term solution, we need to add the property Mapping when using MSSQL databases. So far, I can only see this happening in the code. Test the driver and if it's an MSSQL one, include the property Mapping when creating the PersistenceManager. Any ideas as to how we can add a dynamic entry on application.xml? Such that when a user deploys Continuum with MSSQL, he/she can add the Mapping property.
Hide
Teodoro Cue Jr. added a comment -

Wasn't able to include the other fields. Sorry...

Show
Teodoro Cue Jr. added a comment - Wasn't able to include the other fields. Sorry...
Hide
Emmanuel Venisse added a comment -

Thanks Teodoro, I applied your patch.
The mapping property in application.xml must be uncommented to use Continuum with mssql

Show
Emmanuel Venisse added a comment - Thanks Teodoro, I applied your patch. The mapping property in application.xml must be uncommented to use Continuum with mssql
Hide
Thomas Marti added a comment -

Oracle has exactly the same problem except that the maximum length is 4000. Using CLOB here seems like a more universal solution. Not?

Show
Thomas Marti added a comment - Oracle has exactly the same problem except that the maximum length is 4000. Using CLOB here seems like a more universal solution. Not?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: