Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353965

Summary: [DB] Make the URI column in the table "cdo_ext_refs" larger
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.dbAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix none

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.