de-jena / MDO

Model based Data Organizer
Other
1 stars 1 forks source link

Integration of latest 'Gecko EMF Utilties' version #8

Open ideas-into-software opened 12 months ago

ideas-into-software commented 12 months ago

@juergen-albert

PR is in draft mode due to issues which still appear - pending their resolution.

Current state and issues which still appear are:

Until issue with automatic shutdown of app is resolved, it is not possible to diagnose issues which still appear, neither to verify endpoints are working.

Unfortunately, no logs indicating any error as cause for this shutdown are visible in console - the last entries before shutdown, which appear repeatedly (i.e. with each subsequent launch) are:

Loading trees: 42642 (1453ms) finished pool-12-thread-1
Nov 15, 2023 1:51:08 AM de.jena.mdo.data.importer.DataImporter lambda$0
INFO: Closed pushstream for DETECTOR

The java.sql.SQLException: Database 'mdo' not found error mentioned earlier.

java.lang.reflect.InvocationTargetException
    at org.osgi.util.promise.DeferredPromiseImpl.getValue(DeferredPromiseImpl.java:128)
    at org.gecko.emf.persistence.jdbc.streams.JdbcInputStream.loadResource(JdbcInputStream.java:121)
    at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:196)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
    at de.jena.mdo.data.importer.DataImporter.getPushStreamProvider(DataImporter.java:122)
    at de.jena.mdo.data.importer.DataImporter.activate(DataImporter.java:83)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:245)
    at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
    at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:687)
    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:531)
    at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
    at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:354)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1002)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:975)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:785)
    at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1274)
    at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1225)
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1232)
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1152)
    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:959)
    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:895)
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1184)
    at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:116)
    at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
    at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
    at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4863)
    at org.apache.felix.framework.Felix.registerService(Felix.java:3834)
    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:929)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:915)
    at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:984)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:752)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:437)
    at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:445)
    at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:347)
    at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:115)
    at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1723)
    at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1664)
    at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122)
    at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.sql.SQLException: Database 'mdo' not found.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.handleDBNotFound(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
    at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
    at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
    at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
    at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
    at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
    at org.gecko.emf.persistence.jdbc.handler.JdbcURIHandlerImpl.lambda$getConnection$0(JdbcURIHandlerImpl.java:132)
    at org.osgi.util.promise.DeferredPromiseImpl$Submit.run(DeferredPromiseImpl.java:755)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    ... 1 more
Caused by: ERROR XJ004: Database 'mdo' not found.
    at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown Source)
    ... 19 more

Screencast from 11-15-2023 01:46:18 AM.webm

ideas-into-software commented 11 months ago

@juergen-albert

I applied fixes for issues reported earlier after dependencies' metadata updates you mentioned.

Following endpoints were tested and work, i.e. return results:

The only remaining issues, which however seem to have no effect on the endpoints tested, are:

Considering this part was meant as integration of latest 'Gecko EMF Utilties' version, and that is what is done now, is there anything else you'd like me to take care of with this or can we proceed to releasing that latest Gecko EMF Utils, as per item #5 in https://github.com/geckoprojects-org/org.gecko.emf.utils/issues/25#issuecomment-1803546767

juergen-albert commented 11 months ago

Can you do one last thing, before we merge this: Please add the dependencies for your exporters and check if you can get the expected results for e.g. http://localhost:8085/mdo/rest/trees/CityTree if you use the respective ContenTypes as MimeTypes with your requests? As an alternative to the request header, you can also use the QueryParameter mediaType.

For now I just want to see that it works in general. We will decide on the necessary export options that might be useful later.

Please create issues for the two open issues you have mentioned.

ideas-into-software commented 10 months ago

Can you do one last thing, before we merge this: Please add the dependencies for your exporters and check if you can get the expected results for e.g. http://localhost:8085/mdo/rest/trees/CityTree if you use the respective ContenTypes as MimeTypes with your requests? As an alternative to the request header, you can also use the QueryParameter mediaType.

For now I just want to see that it works in general. We will decide on the necessary export options that might be useful later.

Please create issues for the two open issues you have mentioned.

@juergen-albert

Format-specific annotations (@RequireEMFCSV, @RequireEMFODS, @RequireEMFXLSX, @RequireEMFRLang) were added to ModelResource and expected results were returned from http://localhost:8085/mdo/rest/trees/CityTree endpoint using the following curl commands: • curl -H "Accept: application/csv" http://localhost:8085/mdo/rest/trees/CityTree --output CityTree.csv.zipcurl -H "Accept: application/vnd.oasis.opendocument.spreadsheet" http://localhost:8085/mdo/rest/trees/CityTree --output CityTree.odscurl -H "Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" http://localhost:8085/mdo/rest/trees/CityTree --output CityTree.xlsxcurl -H "Accept: text/x-R" http://localhost:8085/mdo/rest/trees/CityTree --output CityTree.RData.zip

In addition, the following issues and comments to existing issues / PRs were added: • https://github.com/de-jena/MDO/pull/7#issuecomment-1870695254https://github.com/de-jena/MDO/issues/6#issuecomment-1870696348https://github.com/de-jena/MDO/issues/9https://github.com/de-jena/MDO/issues/10