Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Server Plugins(Where to put server plugins)
Server Plugins [message #736939] Fri, 14 October 2011 13:41 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 310
Registered: August 2011
Senior Member
Hi,

I have some additional plug-is created with normal plug-in development tools.

1: Do I have to do anything else then specify them as required plug-ins.

2: Where do I put these plug-ins so that during development my scout server can find them.

Regards Bertin
Re: Server Plugins [message #736981 is a reply to message #736939] Fri, 14 October 2011 14:37 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 100
Registered: March 2010
Senior Member
1. that is sufficient. You can specify them as required bundles or add import dependencies as you like.

2. when running the application in development mode you probably use a *.product configuration. (dev-test.product or similar). There you add the plugins as well in the Tab "Plugins" or "Dependencies" (in new eclipse).

3. when running in production eclipse supports either for strict or lazy config.
More detail is in the eclipse platform / runtime help.
strict: use a configuration/org.eclipse.equinox.simpleconfigurator/bundles.info specifying exactly which plugins to use.
lazy: add the org.eclipse.update.configurator bundle and you're done since that one just loads all in the /plugins folder.

Did that help?
Re: Server Plugins [message #737006 is a reply to message #736981] Fri, 14 October 2011 15:09 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 310
Registered: August 2011
Senior Member
Thanks,

one step further. It can find the bundles now, not the class inside. As far as I can see the class is in the bundle ().



Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.eclipse.scout.rt.server.services.common.jdbc.internal.pool.SqlConnectionBuilder.createJdbcConnection(SqlConnectionBuilder.java:35)
at org.eclipse.scout.rt.server.services.common.jdbc.internal.pool.SqlConnectionPool.leaseConnection(SqlConnectionPool.java:102)
at org.eclipse.scout.rt.server.services.common.jdbc.AbstractSqlService.leaseConnectionInternal(AbstractSqlService.java:609)
... 61 more
Re: Server Plugins [message #738769 is a reply to message #737006] Sun, 16 October 2011 18:31 Go to previous messageGo to next message
Andreas Hoegger is currently offline Andreas HoeggerFriend
Messages: 178
Registered: February 2010
Senior Member
My guess is you are writing your own jdbc connection (db support
bundle). If so following these steps:

1. create a plugin project lets say 'org.eclipse.scout.rt.jdbc.microsoft'.

2. create the folder 'org.eclipse.scout.rt.jdbc.microsoft/lib' put the
jdbc driver jar (lets say sqljdbc.jar) in there.

3. open 'org.eclipse.scout.rt.jdbc.microsoft/META-INF/MANIFEST.MF'.
Switch to the 'Runtime' tab and add the sqljdbc.jar to the 'Classpath' box.

4. open 'org.eclipse.scout.rt.jdbc.microsoft/META-INF/MANIFEST.MF'.
Switch to the 'Dependencies' tab and add 'org.eclipse.scout.rt.server'
to the 'Required Plug-ins' box.

5. open 'org.eclipse.scout.rt.jdbc.microsoft/META-INF/MANIFEST.MF'.
Switch to the 'MANIFEST.MF' tab and add the line:
'Eclipse-RegisterBuddy: org.eclipse.scout.rt.server' (without the ').

6. create a new class
'org.eclipse.scout.rt.jdbc.microsoft.AbstractMicrosoftSqlService' like:

public abstract class AbstractMicrosoftSqlService extends
AbstractSqlService {

@Override
protected String getConfiguredJdbcDriverName() {
return "com.microsoft.jdbc.sqlserver.SQLServerDriver";
}

@Override
protected String getConfiguredJdbcMappingName() {
return "jdbc:microsoft:sqlserver://<servername>:<port>";
}
}

7. Open the '*.product' files of your server bundle. Switch to the
'Dependencies' tab and add the created plugin
'org.eclipse.scout.rt.jdbc.microsoft'. (If you do not need the derby sql
service you can remove the bundle 'org.eclipse.scout.rt.jdbc.derby' from
the dependencies).

8. Switch to the Scout perspective and create a new Sql Service
'server/Common Services/Sql Services'. Use 'AbstractMicrosoftSqlService'
as a super type.

9. Override the 'getConfiguredJdbcMappingName' and replace <servername>
and <port>. If username and password is required override the methods
'getConfiguredUsername' and 'getConfiguredPassword'.

In some case you need also to write your own SQL Style (see
getConfiguredSqlStyle). For more information take a look at
org.eclipse.scout.rt.jdbc.derby bundle.

Hope it helped...

-andreas


On 14.10.2011 17:09, bertin wrote:
> Thanks,
>
> one step further. It can find the bundles now, not the class inside. As
> far as I can see the class is in the bundle ().
>
>
>
> Caused by: java.lang.ClassNotFoundException:
> com.microsoft.sqlserver.jdbc.SQLServerDriver
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
> at
> org.eclipse.scout.rt.server.services.common.jdbc.internal.pool.SqlConnectionBuilder.createJdbcConnection(SqlConnectionBuilder.java:35)
>
> at
> org.eclipse.scout.rt.server.services.common.jdbc.internal.pool.SqlConnectionPool.leaseConnection(SqlConnectionPool.java:102)
>
> at
> org.eclipse.scout.rt.server.services.common.jdbc.AbstractSqlService.leaseConnectionInternal(AbstractSqlService.java:609)
>
> ... 61 more
>
Re: Server Plugins [message #739163 is a reply to message #738769] Mon, 17 October 2011 06:49 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 119
Registered: November 2010
Senior Member
Andreas Hoegger wrote on Sun, 16 October 2011 20:31
My guess is you are writing your own jdbc connection (db support bundle).


There is an other input from Lukas Huser on the forum:
build your own fragment containing the MySql jdbc driver

I opened new HowTo page on the wiki: Scout/HowTo/Write_a_jdbc_connection_bundle

I wonder how it is possible to merge both how to (fragment, plug-in ?)...
Re: Server Plugins [message #741768 is a reply to message #736939] Wed, 19 October 2011 22:03 Go to previous message
Lukas Huser is currently offline Lukas HuserFriend
Messages: 42
Registered: March 2010
Member
Jeremie, thanks for creating the how-to. I have updated your wiki article and incorporated my earlier forum post.

Greetings,
Lukas
Previous Topic:Connection to database does not work
Next Topic:Delete
Goto Forum:
  


Current Time: Sun Dec 21 16:48:15 GMT 2014

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

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