Skip to content

Integration of latest 'Gecko EMF Utilties' version#8

Open
ideas-into-software wants to merge 5 commits into
de-jena:mainfrom
ideas-into-software:latest-geckoEMFUtil
Open

Integration of latest 'Gecko EMF Utilties' version#8
ideas-into-software wants to merge 5 commits into
de-jena:mainfrom
ideas-into-software:latest-geckoEMFUtil

Conversation

@ideas-into-software

@ideas-into-software ideas-into-software commented Nov 15, 2023

Copy link
Copy Markdown

@juergen-albert

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

Current state and issues which still appear are:

  • application launched via /de.jena.mdo.runtime/de.jena.mdo.runtime_local.bndrun automatically shuts down after several seconds; see screencast attached; therefore, it is not possible to diagnose errors via console (gogo shell nor Felix webconsole), neither check if endpoints listed in /readme.md are working, until this is resolved;

  • this is after having added de.jena.mdo.jdbc.example to runrequires of /de.jena.mdo.runtime/de.jena.mdo.runtime_base.bndrun and resolved successfully; reason for adding this is java.sql.SQLException: Database 'mdo' not found. error (full stack trace below), which I got when running via /de.jena.mdo.runtime/de.jena.mdo.runtime_local.bndrun, so I compared against /de.jena.mdo.jdbc.example/launch-derby.bndrun and this was the only bundle missing;

  • other issues which were visible at that time were similar to those mentioned in our email / Slack exchange earlier, i.e.

    • Failed activation for 2 out of 3 MDODataImporter references - i.e. only MDODataImporter~trafficToAsset was ACTIVE, the other two, MDODataImporter~treeToTrees and MDODataImporter~treeToAsset, failed activation;

    • Failed activation also in (new one) TrafficConfigurator;

    • Unsatisfied references in PiveauAdapter and PiveauRestConnector, as well as (new one) de.jena.mdo.jdbc.example.TrafficComponent;

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

 - Fix for issue with Swagger Jakarta dependencies' OSGi metadata -
included rebuilt Swagger Jakarta dependencies in local repository until
released

 - Updated relevant bnd/bndrun files

 - Minor encoding-related fix

Signed-off-by: Michael H. Siemaszko <mhs@into.software>
Signed-off-by: Michael H. Siemaszko <mhs@into.software>
Signed-off-by: Michael H. Siemaszko <mhs@into.software>
 - Fixes for issues after dependencies' metadata updates

Signed-off-by: Michael H. Siemaszko <mhs@into.software>
@ideas-into-software ideas-into-software marked this pull request as ready for review December 11, 2023 00:32
@ideas-into-software

Copy link
Copy Markdown
Author

@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 geckoprojects-org/org.gecko.emf.utils#25 (comment)

@juergen-albert

Copy link
Copy Markdown
Collaborator

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.

Signed-off-by: Michael H. Siemaszko <mhs@into.software>
@ideas-into-software

ideas-into-software commented Dec 27, 2023

Copy link
Copy Markdown
Author

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.zip
curl -H "Accept: application/vnd.oasis.opendocument.spreadsheet" http://localhost:8085/mdo/rest/trees/CityTree --output CityTree.ods
curl -H "Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" http://localhost:8085/mdo/rest/trees/CityTree --output CityTree.xlsx
curl -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:
#7 (comment)
#6 (comment)
#9
#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants