Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353965 - [DB] Make the URI column in the table "cdo_ext_refs" larger
Summary: [DB] Make the URI column in the table "cdo_ext_refs" larger
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.db (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 02:46 EDT by Eike Stepper CLA
Modified: 2012-09-21 06:52 EDT (History)
0 users

See Also:


Attachments
Fix (4.33 KB, patch)
2011-08-05 02:49 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2011-08-05 02:46:33 EDT
Cloned from: 351393: [DB] Make the URI column in the table "cdo_ext_refs" larger
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351393

Build Identifier: 

Hello,

When trying to commit a newly created legacy object referencing an element in another model with an URI longer than 255 characters, I have the following exception : 

Rollback in DBStore: org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: Value too long for column URI VARCHAR(255): ...my long uri... (284); SQL statement:
INSERT INTO cdo_external_refs(id,uri,committime) VALUES (?, ?, ?) [90005-117]

at org.eclipse.emf.cdo.server.internal.db.ExternalReferenceManager.insertNew(ExternalReferenceManager.java:252)

at org.eclipse.emf.cdo.server.internal.db.ExternalReferenceManager.mapURI(ExternalReferenceManager.java:105)

at org.eclipse.emf.cdo.server.internal.db.ExternalReferenceManager.mapExternalReference(ExternalReferenceManager.java:87)


Is there any way to customize the default mapping between URIs and column to make it use more that 255 characters ? As I'm in legacy mode, I cannot do it with annotations on my metamodel.


This bug follows this topic on the forum : http://www.eclipse.org/forums/index.php/m/693495/#msg_693495

Reproducible: Always

Steps to Reproduce:
1. commit a newly created legacy object referencing an element in another model, which is not stored in the repository, with an URI longer than 255 characters
Comment 1 Eike Stepper CLA 2011-08-05 02:49:29 EDT
Created attachment 200954 [details]
Fix
Comment 2 Eike Stepper CLA 2011-08-05 02:52:06 EDT
Committed revision 8865:
- branches/4.0-maintenance/plugins/org.eclipse.emf.cdo.server.db
- branches/4.0-maintenance/plugins/org.eclipse.emf.cdo.tests
Comment 3 Eike Stepper CLA 2011-08-05 02:52:24 EDT
Resolved
Comment 4 Eike Stepper CLA 2012-09-21 06:52:24 EDT
Closing.