Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Wrong bundle is used as server bundle(SDK problem)
Wrong bundle is used as server bundle [message #1403488] Thu, 24 July 2014 07:42 Go to next message
Dennis Geesen is currently offline Dennis GeesenFriend
Messages: 46
Registered: June 2014
Member
Hi there,

I created my own JDBC bundle to load some own MySQL stuff. This works fine, but now the SDK takes this "com.example.jdbc.mysql" bundle as my server-bundle and the actual server bundle (com.example.server) is a "sub-component" of "com.example.jdbc.mysql".
This results into wrong destinations - e.g. when the search form wizard creates some services for the server.

The scout explorer looks as follows for the scout project:
com.example
|- com.example.client
|- com.example.shared
|- com.example.jdbc.mysql
   |- com.example.server
      |- ServerSession
      |- Services
      |- Lookup Services
      |- ....
   |- Services
   |- Lookup Services
   |- Common Services
   |- Libraries


so my question is: how does the SDK detect a server bundle. could it be that it is done via the manifest and the defined plug-in dependencies? Because my jdbc-bundle needs the org.eclipse.scout.rt.server for buddy class loading (to find and load the jdbc driver)...
Re: Wrong bundle is used as server bundle [message #1403560 is a reply to message #1403488] Thu, 24 July 2014 12:01 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 232
Registered: September 2011
Senior Member
Hi Dennis,

You are right, the tree is calculated using the dependencies of your bundle. And because your server bundle uses the mysql bundle, the server bundle is correctly shown below it.
If you don't like this view, you can configure the view of the scout explorer using the small triangle in the top right corner of the scout explorer view and customize the plugins shown.

In the wizards that create elements in the server plugin you can use drag-and-drop to move the elements into the right plugins.

If you don't want to do that everytime, you can define a target platform that includes the mysql plugin as binary jar file. Then you don't need it anymore in your workspace and binary bundles are never used in the wizards.

Hope this helps

Kind regards
matthias
Re: Wrong bundle is used as server bundle [message #1403563 is a reply to message #1403560] Thu, 24 July 2014 12:28 Go to previous messageGo to next message
Dennis Geesen is currently offline Dennis GeesenFriend
Messages: 46
Registered: June 2014
Member
Hi,

Thanks for the answer. The problem is not how it is shown. The problem is, the wizards don't work, because they create some stubs in the jdbc bundle and some other stubs in the server bundle. When I create a form, the formdata is generated into the jdbc-bundle, but without any annotations or methods/fields and this causes a missing service registration. I guess, this is due to the missing entries, because there the jdbc bundle does not use any extension points... Since the created forms and data classes are therefore corrupt, drag'n'drop does not work anymore... So all advantages of the scout sdk is gone and I have to correct all clases by hand - which is really annoying

Tried the "export as binary and import through the target platform" already, but this does not work. Because now I have no server part (either the server nor the jdbc bundle) in the scout view. In this case no com.example.server - just the client and shared component...

Next, I will try to transform the jdbc bundle into a fragment and hope that this will work...
Re: Wrong bundle is used as server bundle [message #1403569 is a reply to message #1403563] Thu, 24 July 2014 12:47 Go to previous messageGo to next message
Dennis Geesen is currently offline Dennis GeesenFriend
Messages: 46
Registered: June 2014
Member
For those how (will) get same problems: A fragment also does not work because the dependencies or the imports between the Scout framework, the server bundle and the fragment can not be resolved (due to cycles...)
My solution for now: moving all from the jdbc-plugin directly into the server bundle.
Re: Wrong bundle is used as server bundle [message #1403601 is a reply to message #1403563] Thu, 24 July 2014 14:33 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Dennis Geesen wrote on Thu, 24 July 2014 14:28
Thanks for the answer. The problem is not how it is shown. The problem is, the wizards don't work, because they create some stubs in the jdbc bundle and some other stubs in the server bundle. When I create a form, the formdata is generated into the jdbc-bundle, but without any annotations or methods/fields and this causes a missing service registration. I guess, this is due to the missing entries, because there the jdbc bundle does not use any extension points... Since the created forms and data classes are therefore corrupt, drag'n'drop does not work anymore... So all advantages of the scout sdk is gone and I have to correct all clases by hand - which is really annoying


You can control where the elements are generated in the Step 2 of the "New Form" wizard. Have you tried it?

index.php/fa/18627/0/

You speak from missing stuff. Have you checked in the Error Log View if the SDK creates errors or warnings?

If so, we would be interested to improve Scout SDK.
Re: Wrong bundle is used as server bundle [message #1403668 is a reply to message #1403601] Fri, 25 July 2014 07:49 Go to previous messageGo to next message
Dennis Geesen is currently offline Dennis GeesenFriend
Messages: 46
Registered: June 2014
Member
That's what I said: Since the bundles are messy, the wizards don't work.

I went into further investigation, starting from an empty scout project.
The problem occurs when there are the follwing dependencies (in addition to the default dependencies):
the com.example.bundlebug.jdbc bundle depends on
- com.example.bundlebug.shared
- org.eclipse.scout.rt.server
the com.example.bundlebug.server depends on:
- com.example.bundlebug.jdbc

Then this looks like here:
index.php/fa/18631/0/

When I create a new form - lets say TestForm - the wizard shows:
index.php/fa/18632/0/



The TestFormData is not correctly annotated:

package com.example.bundlebug.shared.forms;

import org.eclipse.scout.rt.shared.data.form.AbstractFormData;

public class TestFormData extends AbstractFormData{

public TestFormData(){
}
}


The structure is now as follows:

index.php/fa/18633/0/


As you can see in the image following is wrong/missing:
- TestForm is missing and not created
- TestService is at the wrong place (which was obviously already in the wizard wrong)
- TestService is not registered in the extension point

Note that I search for the TestForm, so it is missing classes and we can exclude a scout-explorer-bug...

And yes, an error is thrown into the console (after clicking ok on the wizard):

org.eclipse.scout.sdk.ui
Error
Fri Jul 25 09:38:12 CEST 2014
org.eclipse.scout.sdk.ui.wizard.form.FormNewWizard.performFinish(FormNewWizard.java:245)
exception during perfoming finish of wizard.

java.lang.NullPointerException
at org.eclipse.scout.sdk.util.pde.PluginModelHelper$PluginXmlPart.addSimpleExtension(PluginModelHelper.java:688)
at org.eclipse.scout.sdk.util.ScoutUtility.registerServiceClass(ScoutUtility.java:193)
at org.eclipse.scout.sdk.operation.service.ServiceNewOperation.run(ServiceNewOperation.java:150)
at org.eclipse.scout.sdk.operation.service.ProcessServiceNewOperation.run(ProcessServiceNewOperation.java:120)
at org.eclipse.scout.sdk.operation.form.FormStackNewOperation.run(FormStackNewOperation.java:131)
at org.eclipse.scout.sdk.ui.wizard.form.FormNewWizard.performFinish(FormNewWizard.java:241)
at org.eclipse.scout.sdk.ui.wizard.AbstractWorkspaceWizard$P_PerformFinishOperation.run(AbstractWorkspaceWizard.java:152)
at org.eclipse.scout.sdk.jobs.OperationJob.run(OperationJob.java:95)
at org.eclipse.scout.sdk.jobs.AbstractWorkspaceBlockingJob.doRun(AbstractWorkspaceBlockingJob.java:64)
at org.eclipse.scout.sdk.jobs.AbstractWorkspaceBlockingJob.run(AbstractWorkspaceBlockingJob.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Re: Wrong bundle is used as server bundle [message #1403679 is a reply to message #1403668] Fri, 25 July 2014 09:28 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Thanks for the feedback. With the information you have provided, I could reproduce your case.

1/ I will inform the SDK Team, they should have a look at the NullPointerException.
I created Bug 440424 to track it.


2/ With the current state, in the second step of the wizard, you can drag and drop the items:

index.php/fa/18635/0/

If you put the "TestService" and the "Service Registration" items to your server node (com.example.server) it will work.
Re: Wrong bundle is used as server bundle [message #1403716 is a reply to message #1403679] Fri, 25 July 2014 14:09 Go to previous messageGo to next message
Dennis Geesen is currently offline Dennis GeesenFriend
Messages: 46
Registered: June 2014
Member
Ah, didn't know that it is possible to move items in the wizard. Since I merged the jdbc stuff into the server bundle, I don't have the problems anymore...
However, this is just a work around and does not directly solve the bug Wink
Re: Wrong bundle is used as server bundle [message #1403876 is a reply to message #1403716] Mon, 28 July 2014 11:53 Go to previous message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 232
Registered: September 2011
Senior Member
Hi Dennis & Jérémie,

This error happens when a service registration (or any other extension) should be added to a plugin not having a plugin.xml file. As a workaround until the bug is fixed just manually create the missing plugin.xml files.

For more details please see Bug 440424. Will be fixed for Luna SR1 release.

Kind regards and thank you for pointing that issue out!
matthias
Previous Topic:How to delete row on TablePage
Next Topic:How to work with PostgreSQL?
Goto Forum:
  


Current Time: Fri Apr 19 00:13:51 GMT 2024

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

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

Back to the top