Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » MS-SQL jdbc connection bundle(Question about Tutorial "Write a jdbc connection bundle")
icon5.gif  MS-SQL jdbc connection bundle [message #1710112] Sun, 04 October 2015 13:29 Go to next message
David Klein is currently offline David KleinFriend
Messages: 15
Registered: June 2015
Junior Member
Hello everyone,

I followed the tutorial "Write a jdbc connection bundle".

My purpose is to connect to a MS-SQL Database. So I followed the part "Providing JDBC Connector in a Bundle (With Additional Sources)".

I made it through the steps described in the tutorial - yet there is a problem i.e. my class "AbstractMicrosoftSqlService" has three errors

Quote:

On the package line:
The type org.osgi.framework.ServiceRegistration cannot be resolved. It is indirectly referenced from
required .class files

On the class line:
Multiple markers at this line
- The type org.eclipse.core.runtime.IAdaptable cannot be resolved. It is
indirectly referenced from required .class files
- The hierarchy of the type AbstractMicrosoftSqlService is inconsistent


Here is my class:
Quote:
package org.eclipse.scout.rt.jdbc.mssql2008;

import org.eclipse.scout.rt.server.services.common.jdbc.AbstractSqlService;
import org.eclipse.scout.rt.server.services.common.jdbc.style.ISqlStyle;

public abstract class AbstractMicrosoftSqlService extends AbstractSqlService {

protected Class<? extends ISqlStyle> getConfiguredSqlStyle() {
return org.eclipse.scout.rt.jdbc.mssql2008.MicrosoftSqlStyle.class;
}

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

protected String getConfiguredJdbcMappingName() {
return "jdbc:sqlserver://[host][:port];DatabaseName=[database]";
}
}


I tried also to copy the classes from https://www.eclipse.org/forums/index.php/m/1415167/?srch=mssql#msg_1415167
but the same error here.

And here is my manifest.mf:

Quote:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mssql2008
Bundle-SymbolicName: org.eclipse.scout.rt.jdbc.mssql2008
Bundle-Version: 4.2
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: lib/sqljdbc42.jar
Require-Bundle: org.eclipse.scout.rt.server;bundle-version="5.0.0"
Export-Package: org.eclipse.scout.rt.jdbc.mssql2008
Eclipse-RegisterBuddy: org.eclipse.scout.rt.server



I also read that I could be an error with the target? found here: eclipsedriven.blogspot.de/2010/12/fixing-error-type-orgeclipsecoreruntime.html

Furthermore the error stays if the class is not "abstract". (I found different examples)

The structure of my Plug-in Project is attached, I use Windows 10 and the newest Eclipse Scout install.

I would be very happy about any help/ideas!!
Re: MS-SQL jdbc connection bundle [message #1710188 is a reply to message #1710112] Mon, 05 October 2015 08:55 Go to previous messageGo to next message
David Klein is currently offline David KleinFriend
Messages: 15
Registered: June 2015
Junior Member
Hey,

I found a solution to this in the following post: https://www.eclipse.org/forums/index.php/t/823810/

Not sure though if this is the optimal solution Smile

The solution in my case was to add the following two packages to the "imported" list in the manifest of the jdbc bundle:

org.eclipse.core.runtime
org.osgi.framework

I also solved another problem which occured to me in the tutorial mentioned above - namely that the "AbstractMicrosoftSqlService" was not showing up in the Scout Explorer after all (in the context menue of SQL-Services).

This is solved by adding the newly created bundle not only to the servers product dependencies but also to the servers manifest.mf in the "required plug-ins" section.

Greetings
David
Re: MS-SQL jdbc connection bundle [message #1710371 is a reply to message #1710188] Tue, 06 October 2015 09:44 Go to previous messageGo to next message
Matthias Zimmermann is currently offline Matthias ZimmermannFriend
Messages: 208
Registered: June 2015
Senior Member
thanks for sharing your issues and solutions. could you please integrate your findings in the wiki tutorial? that would be great Smile
Re: MS-SQL jdbc connection bundle [message #1710582 is a reply to message #1710371] Wed, 07 October 2015 17:20 Go to previous message
David Klein is currently offline David KleinFriend
Messages: 15
Registered: June 2015
Junior Member
I am not sure that my solutions are the right way - or lets say "technically correct". Should I add them anyways - despite the chance that it is "quick and dirty"?

I would feel much more relieved when a Scout "specialist" could confirm this solution Smile
Previous Topic:Not getting it work
Next Topic:SWT: Alignment of icons in table columns
Goto Forum:
  


Current Time: Mon Dec 09 17:33:11 GMT 2024

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

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

Back to the top