database plugin v2.0.0

Started by Hervé, April 28, 2017, 22:32:29 PM

Previous topic - Next topic

Hervé

Dear all,

I'm please to announce the release 2.0.0 of my database plugin. You may download on GitHub : https://github.com/archi-contribs/database-plugin/tree/master/v2

The TODO list is still huge but I'm quite happy with this version, so it quits its beta status.

The key modifications since the version 1 of my plugin:

  • The database model has been simplified
  • It is possible to share elements, relationships and views between models. A conflict resolution mechanism has been put in place to detect when two models modify components at the same time.
  • Only new and updated components are exported, thus reducing the quantity of data sent to the database during export (use of checksums)
  • It is now possible to choose between exporting the full model or the elements and relationships only
  • The database tables are created automatically if required
  • The plugin updates could now be downloaded and installed automatically from GitHub
  • It is possible to generate a log file (mainly for debugging purpose)
  • ...

Installation instructions :

  • Download the org.archicontribs.database.v2.0.0.jar to Archi's plugin folder and restart Archi.
  • Open the menu Edit / Preferences / Database plugin and provide the details to connect to your database. The database tables will be automatically created.

You will find below some screenshots.

Best regards
Hervé

Phil Beauvoir

Congratulations!

Advertise it on Twitter?

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Hervé


Hervé

Dear all,

As someone asked me by mail, here are some precision regarding the Neo4J support.

At the moment, I deactivated the Neo4J support because Archimate 3 allows relationships on relationships. Unfortunately, Neo4J doesn't.

So what I'm working on: we will end with 2 Neo4J modes :

  • native mode : Archimate relationships are exported as Neo4J relationships (but will not allow relationships on relationships)
                                     (Archimate element)---[Archimate relationship]-->(Archimate element)

  • extended mode : Archimate relationships are exported as Neo4J nodes and the plugin generates relationships "has relation with"
                                     (Archimate element)---[has relation with]-->(Archimate relationship)---[has relation with]-->(Archimate element)
                                     (Archimate element)---[has relation with]-->(Archimate relationship)---[has relation with]-->(Archimate relationship)
                                     (Archimate relationship)---[has relation with]-->(Archimate relationship)---[has relation with]-->(Archimate element)

A flag on the preference page will allow to choose between those two modes.

I will manage 2 cases:

  • if the user selected the extend mode : not a big deal
  • if the user selected the native mode : I will check if some relationship on relation exist in the model

  • if no : everything is ok
  • if yes, I ask the question to the user : either it confirms the native mode but the relationships on relationships will not be exported, either it switches to the extended mode.

I need some more weeks for this.

Best regards
Hervé[/list]

TT

If you are using a MS-SQL server where you have to login with a Domain account, how can you do that?

It looks like you have to add something like 'IntegratedSecurity=true' to the JDBC url, but im not sure.

Im having issues with probably this, since I can't connect to the SQL server. If im using a separate SQL client, then I can login to the server, so the username/password is working.

The tracelog is here when I click 'check' and then I get the error box 'java.lang.NullPointerException' :

2017-05-01 14:32:28 DEBUG   76:DBPreferencePage               - Setting preference store
2017-05-01 14:32:28 DEBUG   87:DBPreferencePage               - Creating field editors on preference page
2017-05-01 14:32:28 TRACE   89:DBDatabaseEntryTableEditor     - new DBDatabaseEntryTableEditor("databases","")
2017-05-01 14:32:28 TRACE   99:DBDatabaseEntryTableEditor     - doFillIntoGrid()
2017-05-01 14:32:28 TRACE  468:DBDatabaseEntryTableEditor     - doLoad()
2017-05-01 14:32:28 DEBUG  265:DBDatabase                     - Getting databases preferences from preference store
2017-05-01 14:32:30 TRACE  600:DBDatabaseEntryTableEditor     - editCallback()
2017-05-01 14:32:38 TRACE  818:DBDatabaseEntryTableEditor     - checkCallback()
2017-05-01 14:32:38 DEBUG  335:DBDatabase                     - Opening connection to database xxxxxxx : driver=MsSQL, server=xxxx.xxxx.dxxx, port=1433, database=archimate, username=xxxxxx, password=xxxxxx
2017-05-01 14:32:38 DEBUG  371:DBDatabase                     - JDBC connection string = jdbc:sqlserver://xxxxx.xxxx.xxxxx:1433;databaseName=archimate
2017-05-01 14:32:48 ERROR  832:DBDatabaseEntryTableEditor     - Failed to check the database.
java.lang.NullPointerException
   at org.archicontribs.database.DBDatabase.check(DBDatabase.java:458)
   at org.archicontribs.database.preferences.DBDatabaseEntryTableEditor.checkCallback(DBDatabaseEntryTableEditor.java:830)
   at org.archicontribs.database.preferences.DBDatabaseEntryTableEditor.access$8(DBDatabaseEntryTableEditor.java:817)
   at org.archicontribs.database.preferences.DBDatabaseEntryTableEditor$13.widgetSelected(DBDatabaseEntryTableEditor.java:438)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)
   at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1313)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4080)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3706)
   at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
   at org.eclipse.jface.window.Window.open(Window.java:794)
   at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:211)
   at org.eclipse.ui.internal.handlers.ShowPreferencePageHandler.execute(ShowPreferencePageHandler.java:59)
   at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
   at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
   at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
   at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
   at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
   at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
   at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
   at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
   at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
   at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:196)
   at org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler.runCommand(CocoaUIHandler.java:647)
   at org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler.access$5(CocoaUIHandler.java:634)
   at org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler$3.widgetSelected(CocoaUIHandler.java:506)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)
   at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1313)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4080)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3706)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
   at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
   at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
   at com.archimatetool.editor.Application.start(Application.java:87)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1519)


Hervé

Hi TT,

At the moment, I do not support SQL Server Windows Authentication (as nobody required it so far). With the actual version, the only way to connect to connect to a SQL Server is to enable the SQL Server authentication (thus allowing to connect with user password).

Nevertheless, the nullPointerException is a bug in code which is not related to the success or the failure about the SQL Server database connection.

I will publish a new release tonight on GitHub that will integrate the nullPointerException correction, the SQL Server Windows Authentication and few other goodies. When this is done, on next Archi startup, you should see a popup asking if you wish to download and install this new version.

Please do not hesitate to tell me if the new release solves your issue.

Best regards
Hervé

Hervé

Dear all,

I'm pleased to announce the release 2.0.1 of my database plugin. It is available on GitHub https://github.com/archi-contribs/database-plugin/tree/master/v2

The key modifications since the version 2.0.0 of my plugin:

  • Add the ability to export images of views in the database
  • Add a preference to keep the imported model even in case of error
  • Add SQL Server integrated security authentication mode
  • Reduce memory leak
  • Added back Neo4J support (elements and relationships export only)
  • Solve NullPointerException while checking database

For those who already installed the version 2.0.0, the plugin can update itself and update the database structure, either on Archi start (if you selected the corresponding option) either on the preferences page.

For others, you have to download the .jar file and copy it on Archi's plugins folder.


Regarding SQL Server integrated security authentication mode, you also have to manually copy the provided DLL file (which can also be downloaded on Microsoft web site) to Archi's JRE\bin folder.

Best regards
Hervé

Hervé

Dear all,

Following bugs and comments received by mail, I'm please to announce the version 2.0.2 of my database plugin : https://github.com/archi-contribs/database-plugin/tree/master/v2

The key updates are :

  • Solve errors during table creation in PostGreSQL database
  • Solve "Operation not allowed after ResultSet closed" error message on model export
  • Add a menu entry to replace old fashion IDs to Archi 4 IDs (to ensure uniqueness of all components)

The lastest (replacing IDs) concern models that have been created with Archi 3 and converted to Archi 4. Archi 3 used shorts IDs and did not ensure the ID uniqueness across models. As components can now be shares between models, this uniqueness becomes crucial. That's why it is now possible to replace those Archi 3 IDs by new Archi 4 IDs.

Please note that the IDs needs to be replaced before exporting the model to the database.


People who have got the version 2.0.0 or 2.0.1 can update the plugin using the "check for update" button on the preferences page (or selecting the "check for update at startup" option).

Others need to download the JAR file from GitHub and copy it on Archi's plugins folder.

Best regards
Hervé

Hervé

Dear all,

I'm pleased to announce the version 2.0.3 of my database plugin : https://github.com/archi-contribs/database-plugin/tree/master/v2

The key updates are :

  • Export model :
  •      Make conflict management more reliable on PostGreSQL databases
  •      Added a preference to remove the dirty flag on the model after a successful export
  •      Solve bug where count of exported components could be erroneous
  • Import individual component :
  •      Added missing "location" in individual component import window
  •      Add the ability to import several individual components at the same time
  •      The component list in the individual component import window are now sorted alphabetically
  •      Solve bug where the same component could be imported several times
  • Miscellanous :
  •      Allow to specify a database schema in the database configuration
  •      It is now possible to check a database connection without the need to edit their details
  •      Reduce memory consumption
  •      Remove the NOT NULL constraints on some columns because Oracle does not do any difference between an empty string and a null value
  •      Renamed mssql driver to ms-sql to be visually more distinctive from mysql

People who have got the version 2.0.0 to 2.0.1 can update the plugin using the "check for update" button on the preferences page (or selecting the "check for update at startup" option).

Others need to download the JAR file from GitHub and copy it on Archi's plugins folder.

Best regards
Hervé

Hervé

Dear all,

Few people are helping me with my plugin testing and also are requesting new functionality which is good because it helps me to deliver a plugin which is more and more reliable  ;D

I'm please to announce the release 2.0.4 of my database plugin which is available on GitHub : https://github.com/archi-contribs/database-plugin/tree/master/v2

As usual now, people who have already installed my plugin version 2.0.0 (or newer) can automatically install this new release using the "update" button located on the preference page.

The key updates are:
Export model:
  * Solve bug where export conflicts were not detected correctly on MySQL databases
* Import individual component:
  * The import type (shared or copy) can now be changed directly on the import window
* Preference page:
  * Correct traversal order of fields on preference page
  * The default database port is automatically filled-in when port field is empty or equals 0
  * The default for new databases is to not export view images
  * When saving preferences while editing database properties, the plugin now asks if the updates need to be saved or discarded
* Miscellaneous:
  * Rewrite of the checksum calculation procedure to ensure it is always the same length
  *   Rewrite of the views connections import procedure to ensure that they are imported in the same order as in the original model
  *   This leads to 2 new columns (source_connections and target_connections) in the view_objects and views_connections database tables
                                 
There are still few known bugs :
* Import individual component:
  * images are not imported
  * view references are not imported correctly
  * importing elements "in a view" create all the corresponding objects in the top left corner of the view
  * clicking on the "cancel" button during the export or the import of a model is not well managed

For information, my short term TODO list includes :
* Import individual component:
  * allow to import elements recursively
  * allow to select all the classes of one group in a single click
  * when the user right clicks on a folder, automatically select the class corresponding to the folder (views, components, ...)
* Export model:
  * show up all the component properties in the conflict resolution table
* Get component history:
  * allow to export individual component, or update it from the database, directly from the history window
  * allow to get the database history
  * Miscellaneous:
  * add a preference to show or hide the debug information on the right click menu rather than depend on the logging level
  * add an option to check for relationships that are in the database but would not be in the in memory model
  * add a progressbar on the "please wait while checking components to export" window
  * find a way to manage images from the database the same way it is done on disk
  * create a new windows that will show up detailed statistics about the model
  * add more jdbc drivers (mongodb, odbc, etc ...)

Of course, should you discover an anomaly or require some more functionality, please do not hesitate to drop me a line

Best regards
Hervé

Phil Beauvoir

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Hervé

Dear all,

I'm pleased to announce the release 2.0.6 of my database plugin which is available to GitHub : https://github.com/archi-contribs/database-plugin/tree/master/v2

As usual now, people who have already installed my plugin version 2.0.0 (or newer) can automatically install this new release using the "update" button located on the preference page.

The key updates are:

  • Solve bug when views are shared between several models
  • Solve bug in components counting prior to import them, which can cause false error messages
  • Solve bug in import folders which could lead to import children before parents
    • The import SQL requests have been rewritten because of Oracle specificities

    Of course, should you discover an anomaly or require some more functionality, please do not hesitate to drop me a line

    Best regards
    Hervé

Phil Beauvoir

Good job, Hervé...  Again! :)
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Hervé

Dear all,

I'm pleased to announce the version 2.0.7 of my database plugin which is available on GitHub : https://github.com/archi-contribs/database-plugin/tree/master/v2

As usual now, people who have already installed my plugin version 2.0.0 (or newer) can automatically install this new release using the "update" button located on the preference page.

The key updates are:

  • Rollback to single thread as multi-threading causes to many side effects and does not accelerate the import and export duration as expected
  • Improve the internal checksum mechanism
  • Add an option to show up ID and checksum in context menu rather than relying on the logger mode
  • Import model:

    • Solve bug where the filter field was not working as expected
    • Change the filter request to be case insensitive
  • Export model:

    • Use of a Tree rather than a Table to show up conflicts
    • show up more information about conflicting components
    • The conflict detection and resolution is now more reliable

Of course, should you wish to comment or require some functionality, please do not hesitate to drop me a line

Best regards
Hervé

MarcF88

Never did I think this plugin was for me, until I discovered that it did just what I need: allow elements of one model to be used in another model! This shared mode is just what the doctor ordered. Terrific.

If only I could figure out how to use it. What I do, I create a new empty model, export it to a database (SQLite, check shared mode), create a second empty model, export it to the same database, and then I would expect somehow to be able to drag elements from model #1 onto a view of model #2. Unfortunately no.

Am I doing something wrong? Is this not the way shared mode works? Pray tell!