Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO]Net4J Oracle Adaptor - schema generation exception([CDO]Net4J Oracle Adaptor - schema generation exception)
[CDO]Net4J Oracle Adaptor - schema generation exception [message #1012959] Fri, 22 February 2013 14:19 Go to next message
Andrew Whelan is currently offline Andrew WhelanFriend
Messages: 71
Registered: October 2012
Location: Syracuse NY
Member
Hello,

I am trying to use the Net4J Oracle Adapter with CDO. We are using the DBStore. I am using the M5 integration branch
http://download.eclipse.org/modeling/emf/cdo/drops/S20130205-0640/

I was able to get the EMF Library model working that is used for tutorials like http://www.rcp-vision.com/?p=1285&lang=en

That is working using the Net4J Oracle adapter. I am, however working on a project with a much larger model. I have this larget model working fine using the Net4J MySQL Adaptor, DBStore, and, of course, a MySQL database.

But not so for an Oracle database using the Net4J Oracle Adapter (using the DBStore). When I add the first record to the database, CDO attempts to generate the database on the fly. During this process I get the following

org.eclipse.net4j.db.DBException: DBTable exists: Exception. Does anyone have any suggestions?

The com.src.ewir.nighthawk.cdointerface.* stuff is my code. All it is doing is adding a record to CDOResource that is created from a CDOTransaction and then CDOTransaction.commit() is attempted. That's when the following happens. Note that the schema does not exist before the commit is attempted. The DBTable exists: Exception happens anyway. It looks like it happens while generating the database schema.

java.io.IOException: Could not create new resource:
at com.src.ewir.nighthawk.cdointerface.utils.Database.create(Database.java:142)
at com.src.ewir.nighthawk.cdointerface.handlers.SaveToDatabaseHandler$1.run(SaveToDatabaseHandler.java:93)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Caused by: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.db.DBException: DBTable exists: eavcore_properties_Real_FLS105
at org.eclipse.net4j.spi.db.DBSchema.addTable(DBSchema.java:73)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractListTableMapping.initTable(AbstractListTableMapping.java:91)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractListTableMapping.<init>(AbstractListTableMapping.java:83)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.BranchingListTableMapping.<init>(BranchingListTableMapping.java:50)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateListMapping(HorizontalBranchingMappingStrategy.java:68)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createListMapping(AbstractMappingStrategy.java:627)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.createListMappings(AbstractHorizontalClassMapping.java:233)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.initFeatures(AbstractHorizontalClassMapping.java:159)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.<init>(AbstractHorizontalClassMapping.java:106)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.<init>(HorizontalBranchingClassMapping.java:206)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateClassMapping(HorizontalBranchingMappingStrategy.java:62)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createClassMapping(AbstractMappingStrategy.java:506)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapClasses(AbstractMappingStrategy.java:492)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:470)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:457)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createMapping(AbstractMappingStrategy.java:430)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.createMapping(HorizontalMappingStrategy.java:144)
at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writePackageUnits(DBStoreAccessor.java:829)
at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:83)
at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:151)
at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:531)
at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:46)
at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:917)
at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:910)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:295)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:97)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:84)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1181)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1205)
at com.src.ewir.nighthawk.cdointerface.utils.Database.create(Database.java:140)
... 2 more
Re: [CDO]Net4J Oracle Adaptor - schema generation exception [message #1012965 is a reply to message #1012959] Fri, 22 February 2013 14:38 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
I think there is a sort of name clashes: Could you check what name is used in the MySQL db?
In your MySQL db, there must be more than one table names that start with "eavcore_properties_Real".
Re: [CDO]Net4J Oracle Adaptor - schema generation exception [message #1013146 is a reply to message #1012959] Fri, 22 February 2013 22:12 Go to previous messageGo to next message
Andrew Whelan is currently offline Andrew WhelanFriend
Messages: 71
Registered: October 2012
Location: Syracuse NY
Member
Hi Erdal,

Thanks for the quick response!

I am trying to use Oracle after having used MySQL successfully. The MySQL database did have more than one table that started with eavcore_properties_Real.

To make a long story short, our model has RealPropertyValue, Real2PropertyValue, Real3PropertyValue, and Real5PropertyValue elements. For the MySQL database CDO Generated serveral tables for each of these.

The MySQL database implementation of CDO seemed to work ok, although I have to admit, now that I look at the tables that were generated, I am a bit confused by it.

Our top level model element has as child elements. List of Citation, Note, and Comment elements (there are others but we will limit it to those for the sake of brevity).

The tables CDO generated include an eavcore_properties_real3_propertyvalue table, but there are also eavcore_properties_real3_propertyvalue_comment_list, eavcore_properties_real3_propertyvalue_note_list, eavcore_properties_real3_propertyvalue_citation_list tables. I'm not really sure what is going on there.

The eavcore_properties_real3_propertyvalue table works just fine though Smile

Now on the Oracle side we have the following tables generated: eavcore_properties_real_cls115

And then

eavcore_properties_real_fls105, eavcore_properties_real_fls106, eavcore_properties_real_fls107, eavcore_properties_real_fls107, eavcore_properties_real_fls108, eavcore_properties_real_fls109, eavcore_properties_real_fls110, eavcore_properties_real_fls111.

There was what was created during the episode that caused the exception. So I'm thinking CDO got confused and started recycling names on eavcore_properties_real_fls105? Keep in mind the same client code was able to generate code for MySQL (even though I don't following the table structure that was generated), but can't for Oracle.

Any ideas?
Re: [CDO]Net4J Oracle Adaptor - schema generation exception [message #1014654 is a reply to message #1012959] Tue, 26 February 2013 08:15 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 22.02.2013 15:19, schrieb Andrew Whelan:
> Hello,
>
> I am trying to use the Net4J Oracle Adapter with CDO. We are using the DBStore. I am using the M5 integration branch
> http://download.eclipse.org/modeling/emf/cdo/drops/S20130205-0640/
>
> I was able to get the EMF Library model working that is used for tutorials like http://www.rcp-vision.com/?p=1285&lang=en
>
> That is working using the Net4J Oracle adapter. I am, however working on a project with a much larger model. I have
> this larget model working fine using the Net4J MySQL Adaptor, DBStore, and, of course, a MySQL database.
>
> But not so for an Oracle database using the Net4J Oracle Adapter (using the DBStore). When I add the first record to
> the database, CDO attempts to generate the database on the fly. During this process I get the following
>
> org.eclipse.net4j.db.DBException: DBTable exists: Exception. Does anyone have any suggestions?
> The com.src.ewir.nighthawk.cdointerface.* stuff is my code. All it is doing is adding a record to CDOResource that is
> created from a CDOTransaction and then CDOTransaction.commit() is attempted. That's when the following happens. Note
> that the schema does not exist before the commit is attempted. The DBTable exists: Exception happens anyway. It looks
> like it happens while generating the database schema.
>
> java.io.IOException: Could not create new resource:
> at com.src.ewir.nighthawk.cdointerface.utils.Database.create(Database.java:142)
> at com.src.ewir.nighthawk.cdointerface.handlers.SaveToDatabaseHandler$1.run(SaveToDatabaseHandler.java:93)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>
> Caused by: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.db.DBException: DBTable
> exists: eavcore_properties_Real_FLS105
Oracle has an anachronistic low limit on name lengths (30 chars). That's why the DBStore almost always falls back to
names with a generated unique ID suffix to disambiguate shortened names. The name above results from:

1) "eavcore_properties", the package name (you didn't set qualifiedNames to false)
2) "Real", the class name
3) "FLS105", the disambiguator, where the "F" is for feature (always many-valued), the rest is the ID of the feature in
the ext-refs table with "L" for a long ID and the "S" as a replacement for "-" (minus)

It seems that the 30 chars limit is properly respected and it's highly unlikely that the same class (Real) has so many
features that another one can have an ID such as "-1053".

Another explanation could be that two of your client sessions accidentally try to commit the same new package at the
same time. Stefan (cc'ed) and I just discussed a solution (an RW lock) for a different problem that could help here, too.

Have you already tried the IRepository.setInitialPackages(EPackage...) method? Maybe that gives some more hints.

I don't have Oracle installed so I have to rely on you debugging through the code and inspect the schema in Oracle.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> at org.eclipse.net4j.spi.db.DBSchema.addTable(DBSchema.java:73)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractListTableMapping.initTable(AbstractListTableMapping.java:91)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractListTableMapping.<init>(AbstractListTableMapping.java:83)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.BranchingListTableMapping.<init>(BranchingListTableMapping.java:50)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateListMapping(HorizontalBranchingMappingStrategy.java:68)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createListMapping(AbstractMappingStrategy.java:627)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.createListMappings(AbstractHorizontalClassMapping.java:233)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.initFeatures(AbstractHorizontalClassMapping.java:159)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.<init>(AbstractHorizontalClassMapping.java:106)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.<init>(HorizontalBranchingClassMapping.java:206)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateClassMapping(HorizontalBranchingMappingStrategy.java:62)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createClassMapping(AbstractMappingStrategy.java:506)
> at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapClasses(AbstractMappingStrategy.java:492)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:470)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:457)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createMapping(AbstractMappingStrategy.java:430)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.createMapping(HorizontalMappingStrategy.java:144)
> at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writePackageUnits(DBStoreAccessor.java:829)
> at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:83)
> at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:151)
> at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:531)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:46)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
> at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
> at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:917)
> at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:910)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:295)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:97)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> at
> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:84)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1181)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1205)
> at com.src.ewir.nighthawk.cdointerface.utils.Database.create(Database.java:140)
> ... 2 more
>


Re: [CDO]Net4J Oracle Adaptor - schema generation exception [message #1014667 is a reply to message #1014654] Tue, 26 February 2013 08:49 Go to previous messageGo to next message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
Hi,

just to complement:
> Another explanation could be that two of your client sessions
> accidentally try to commit the same new package at the same time. Stefan
> (cc'ed) and I just discussed a solution (an RW lock) for a different
> problem that could help here, too.

That issue is discussed in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401763

Cheers,
Stefan




Am 26.02.13 09:15, schrieb Eike Stepper:
> Am 22.02.2013 15:19, schrieb Andrew Whelan:
>> Hello,
>>
>> I am trying to use the Net4J Oracle Adapter with CDO. We are using the
>> DBStore. I am using the M5 integration branch
>> http://download.eclipse.org/modeling/emf/cdo/drops/S20130205-0640/
>>
>> I was able to get the EMF Library model working that is used for
>> tutorials like http://www.rcp-vision.com/?p=1285&lang=en
>>
>> That is working using the Net4J Oracle adapter. I am, however working
>> on a project with a much larger model. I have this larget model
>> working fine using the Net4J MySQL Adaptor, DBStore, and, of course, a
>> MySQL database.
>>
>> But not so for an Oracle database using the Net4J Oracle Adapter
>> (using the DBStore). When I add the first record to the database, CDO
>> attempts to generate the database on the fly. During this process I
>> get the following
>>
>> org.eclipse.net4j.db.DBException: DBTable exists: Exception. Does
>> anyone have any suggestions?
>> The com.src.ewir.nighthawk.cdointerface.* stuff is my code. All it is
>> doing is adding a record to CDOResource that is created from a
>> CDOTransaction and then CDOTransaction.commit() is attempted. That's
>> when the following happens. Note that the schema does not exist before
>> the commit is attempted. The DBTable exists: Exception happens anyway.
>> It looks like it happens while generating the database schema.
>>
>> java.io.IOException: Could not create new resource:
>> at
>> com.src.ewir.nighthawk.cdointerface.utils.Database.create(Database.java:142)
>>
>> at
>> com.src.ewir.nighthawk.cdointerface.handlers.SaveToDatabaseHandler$1.run(SaveToDatabaseHandler.java:93)
>>
>> at
>> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>>
>>
>> Caused by: org.eclipse.emf.cdo.util.CommitException: Rollback in
>> DBStore: org.eclipse.net4j.db.DBException: DBTable exists:
>> eavcore_properties_Real_FLS105
> Oracle has an anachronistic low limit on name lengths (30 chars). That's
> why the DBStore almost always falls back to names with a generated
> unique ID suffix to disambiguate shortened names. The name above results
> from:
>
> 1) "eavcore_properties", the package name (you didn't set qualifiedNames
> to false)
> 2) "Real", the class name
> 3) "FLS105", the disambiguator, where the "F" is for feature (always
> many-valued), the rest is the ID of the feature in the ext-refs table
> with "L" for a long ID and the "S" as a replacement for "-" (minus)
>
> It seems that the 30 chars limit is properly respected and it's highly
> unlikely that the same class (Real) has so many features that another
> one can have an ID such as "-1053".
>
> Another explanation could be that two of your client sessions
> accidentally try to commit the same new package at the same time. Stefan
> (cc'ed) and I just discussed a solution (an RW lock) for a different
> problem that could help here, too.
>
> Have you already tried the IRepository.setInitialPackages(EPackage...)
> method? Maybe that gives some more hints.
>
> I don't have Oracle installed so I have to rely on you debugging through
> the code and inspect the schema in Oracle.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>> at org.eclipse.net4j.spi.db.DBSchema.addTable(DBSchema.java:73)
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractListTableMapping.initTable(AbstractListTableMapping.java:91)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractListTableMapping.<init>(AbstractListTableMapping.java:83)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.BranchingListTableMapping.<init>(BranchingListTableMapping.java:50)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateListMapping(HorizontalBranchingMappingStrategy.java:68)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createListMapping(AbstractMappingStrategy.java:627)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.createListMappings(AbstractHorizontalClassMapping.java:233)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.initFeatures(AbstractHorizontalClassMapping.java:159)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.<init>(AbstractHorizontalClassMapping.java:106)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.<init>(HorizontalBranchingClassMapping.java:206)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateClassMapping(HorizontalBranchingMappingStrategy.java:62)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createClassMapping(AbstractMappingStrategy.java:506)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapClasses(AbstractMappingStrategy.java:492)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:470)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:457)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createMapping(AbstractMappingStrategy.java:430)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.createMapping(HorizontalMappingStrategy.java:144)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writePackageUnits(DBStoreAccessor.java:829)
>>
>> at
>> org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:83)
>>
>> at
>> org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:151)
>>
>> at
>> org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:531)
>>
>> at
>> org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:46)
>>
>> at
>> org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
>>
>> at
>> org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
>>
>> at
>> org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:917)
>>
>> at
>> org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:910)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:295)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:97)
>>
>> at
>> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
>>
>> at
>> org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
>>
>> at
>> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
>>
>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
>> at
>> org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
>>
>> at
>> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
>>
>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
>> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>>
>> at
>> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:84)
>>
>> at
>> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1181)
>>
>> at
>> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1205)
>>
>> at
>> com.src.ewir.nighthawk.cdointerface.utils.Database.create(Database.java:140)
>>
>> ... 2 more
>>
>
Re: [CDO]Net4J Oracle Adaptor - schema generation exception [message #1014851 is a reply to message #1014654] Tue, 26 February 2013 15:35 Go to previous messageGo to next message
Andrew Whelan is currently offline Andrew WhelanFriend
Messages: 71
Registered: October 2012
Location: Syracuse NY
Member
Oracle has an anachronistic low limit on name lengths (30 chars). That's why the DBStore almost always falls back to
names with a generated unique ID suffix to disambiguate shortened names. The name
above results from:

1) "eavcore_properties", the package name (you didn't set qualifiedNames to false)

I'm not sure how to set qualifiedNames to false. Could this possibly help? If it will I will definately toy with it a bit.

2) "Real", the class name
3) "FLS105", the disambiguator, where the "F" is for feature (always many-valued), the rest is the ID of the feature in
the ext-refs table with "L" for a long ID and the "S" as a replacement for "-" (minus)

It seems that the 30 chars limit is properly respected and it's highly unlikely that the same class (Real) has so many
features that another one can have an ID such as "-1053".

No, it shouldn't have that many features.

Another explanation could be that two of your client sessions accidentally try to commit the same new package at the
same time. Stefan (cc'ed) and I just discussed a solution (an RW lock) for a different problem that could help here, too.

No, there is only one client being used when this is being tried. I'm trying to get Oracle functionality working with the first time, so one client.

Have you already tried the IRepository.setInitialPackages(EPackage...) method? Maybe that gives some more hints.

I'm not entirely sure what you mean by this, but if it might help......do tell!


I don't have Oracle installed so I have to rely on you debugging through the code and inspect the schema in Oracle.

Cheers
/Eike
Re: [CDO]Net4J Oracle Adaptor - schema generation exception [message #1014881 is a reply to message #1014851] Tue, 26 February 2013 16:33 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 26.02.2013 16:35, schrieb Andrew Whelan:
> Oracle has an anachronistic low limit on name lengths (30 chars). That's why the DBStore almost always falls back to
> names with a generated unique ID suffix to disambiguate shortened names. The name above results from:
>
> 1) "eavcore_properties", the package name (you didn't set qualifiedNames to false)
>
> I'm not sure how to set qualifiedNames to false. Could this possibly help? If it will I will definately toy with it a
> bit.
>
> 2) "Real", the class name
> 3) "FLS105", the disambiguator, where the "F" is for feature (always many-valued), the rest is the ID of the feature
> in the ext-refs table with "L" for a long ID and the "S" as a replacement for "-" (minus)
>
> It seems that the 30 chars limit is properly respected and it's highly unlikely that the same class (Real) has so many
> features that another one can have an ID such as "-1053".
>
> No, it shouldn't have that many features.
>
> Another explanation could be that two of your client sessions accidentally try to commit the same new package at the
> same time. Stefan (cc'ed) and I just discussed a solution (an RW lock) for a different problem that could help here, too.
>
> No, there is only one client being used when this is being tried. I'm trying to get Oracle functionality working with
> the first time, so one client.
>
> Have you already tried the IRepository.setInitialPackages(EPackage...) method? Maybe that gives some more hints.
>
> I'm not entirely sure what you mean by this, but if it might help......do tell!
Call it with your package(s) before you activate the repository the first time.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Exception thrown with EMF 2.9 and RAP 2.0
Next Topic:[TENEO] Load Read-only database into XMI
Goto Forum:
  


Current Time: Tue Apr 23 13:10:33 GMT 2024

Powered by FUDForum. Page generated in 0.03368 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top