Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » DataSourceSecurityFilter ClassNotFoundException
DataSourceSecurityFilter ClassNotFoundException [message #915505] Mon, 17 September 2012 12:31 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi,

I have an application up and running and it works fine (it loads data from the database). So I think everything works OK with the database driver.

When I turn the DataSourceSecurityFilter on, and try to login, I get an ClassNotFoundException on com.microsoft.sqlserver.jdbc.SQLServerDriver.

My config file looks like
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#active=true
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcMappingName=jdbc:sqlserver://xxxx;databaseName=xxx
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcUsername=xxxx
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcPassword=xxxx
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#selectUserPass=SELECT name FROM con_account WHERE name=? and password=?

It picks-up this configuartion so I think it is OK.

So what else do I have to do to make it find the class SQLServerDriver for the authentication process

Regards Bertin
Re: DataSourceSecurityFilter ClassNotFoundException [message #915572 is a reply to message #915505] Mon, 17 September 2012 14:52 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
This should work. I do the same thing with an Oracle Database.

1.
Are you sure that your fragment/plugin containing com.microsoft.sqlserver.jdbc.SQLServerDriver is loaded when the server is running (-> OSGi). You can configure this with your *.product file.

2.
Are you sure that org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter is correct (it has changed with 3.7.2. See Bug 361256 or migrate from 3.7 to 3.8)

I have no other idea.
Re: DataSourceSecurityFilter ClassNotFoundException [message #930620 is a reply to message #915572] Tue, 02 October 2012 13:46 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi,

we still don't have it running with security enabled.

What do you mean with:

Are you sure that your fragment/plugin containing com.microsoft.sqlserver.jdbc.SQLServerDriver is loaded when the server is running (-> OSGi). You can configure this with your *.product file.

Regards Bertin
Re: DataSourceSecurityFilter ClassNotFoundException [message #931495 is a reply to message #930620] Wed, 03 October 2012 09:02 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
you want to use com.microsoft.sqlserver.jdbc.SQLServerDriver as jdbc driver.

Where is this class?
With "Open Type" window (CTR-Shift-T), when you enter "SQLServerDriver" do you see it?

The corresponding Plugin or Fragment needs to be available in your Scout Application (As you would do for any RCP Application - this is not something specific to Eclipse Scout. In the JavaSE world, this correspond to adding a Jar on the classpath).

=> Add JDBC Drivers for Eclipse Scout (So far I know, there is no support for microsoft SQL Server on the marketplace)
=> Write a jdbc connection bundle

icon7.gif  Re: DataSourceSecurityFilter ClassNotFoundException [message #932659 is a reply to message #915505] Thu, 04 October 2012 09:58 Go to previous message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi, it finally works on my development environment with security enabled.

Thanks for the help because your tip : Where is this class?
With "Open Type" window (CTR-Shift-T), when you enter "SQLServerDriver" do you see it?

Did not gave any results.

So what exactly the problem was I don't know but what I did was:

Changed eclipse settings to make eclipse work on 1.7.0_06 (was 1.6 version)
Followed the tutorial "Providing JDBC Connector in a Fragment Bundle"

And now I could see the class with (CTR-Shift-T). But it still not worked (class not found exception at runtime).

So I tried to use the Driver directly in my code which did not work. The compiler gave a quick fix to export the class form the fragment. After that it worked.

Regards Bertin



Previous Topic:Problem with Scout Tutorials
Next Topic:Wizard test
Goto Forum:
  


Current Time: Thu Apr 18 09:03:46 GMT 2024

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

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

Back to the top