Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Getting UnsupportedOperationException While running OCL query on mongodb
[CDO] Getting UnsupportedOperationException While running OCL query on mongodb [message #1759632] Fri, 14 April 2017 07:42 Go to next message
pradeep potti is currently offline pradeep pottiFriend
Messages: 3
Registered: April 2017
Junior Member
Hi all,

I'm working on some project using CDO . i try OCL query on mongoDB But on server side I got Exception

Exception in thread "OCLExtentIterator" java.lang.UnsupportedOperationException: Not yet implemented
at org.eclipse.emf.cdo.server.internal.mongodb.MongoDBStoreAccessor.handleRevisions(MongoDBStoreAccessor.java:105)
at org.eclipse.emf.cdo.server.ocl.CDOExtentCreator.handleRevisions(CDOExtentCreator.java:173)
at org.eclipse.emf.cdo.server.ocl.CDOExtentCreator.createExtent(CDOExtentCreator.java:147)
at org.eclipse.emf.cdo.server.ocl.CDOExtentCreator$Lazy$1$1.handlePersistentState(CDOExtentCreator.java:318)
at org.eclipse.emf.cdo.server.ocl.CDOExtentCreator$Lazy$1$1.run(CDOExtentCreator.java:262)


For query ==>
CDOQuery cdoQuery = transaction.createQuery("ocl", "Company.allInstances()->select(company:Company | company.name = 'TEST')");
List<Company> result1 = cdoQuery.getResult(Company.class);


Can any one please help me to resolve this exception


Thanks,
Pradeep.
Re: [CDO] Getting UnsupportedOperationException While running OCL query on mongodb [message #1759802 is a reply to message #1759632] Tue, 18 April 2017 15:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I'm guessing a bit. but:

allInstances() is quite challenging since it requires an iteration over many, possibly all, instances within some extent to select the relevant elements. The extent is ill-defined, but the basic OCL support takes it as all EObjects in all Resources in the containing ResourceSet. CDO has its own interpretation presumably corresponding to all EObjects in the database.

IIRC a bug in respect of whether all exact types or all conformant types for abstract types should be returned was fixed. allInstances() must have worked at that time, so it's unlikely to be a fundamental CDO/OCL limitation.

Probably it's just the mongoDB integration that has neglected to implement the required iterator.

Please raise a CDO bug with a repro.

Regards

Ed Willink
Re: [CDO] Getting UnsupportedOperationException While running OCL query on mongodb [message #1759841 is a reply to message #1759802] Wed, 19 April 2017 03:44 Go to previous message
pradeep potti is currently offline pradeep pottiFriend
Messages: 3
Registered: April 2017
Junior Member
Thank you Willink

Regards,
Pradeep.
Previous Topic:[Xcore] access field instead of getter
Next Topic:[CDO] MYSQL-OCL SemanticException
Goto Forum:
  


Current Time: Sat Apr 20 03:19:00 GMT 2024

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

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

Back to the top