You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Łukasz Bączek <ba...@poczta.fm> on 2015/01/13 17:05:29 UTC

Firebird, GWT, Dispatch

Hello,
How to configure Shiro with Firebird?

I have the following tables:

CREATE TABLE USERS (
USERSNAME VARCHAR (20) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,
"PASSWORD" VARCHAR (36) CHARACTER SET UTF8 NOT NULL,
PASSWORD_SALT VARCHAR (40) CHARACTER SET UTF8
);

CREATE TABLE USER_ROLES (
USERNAME VARCHAR (20) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,
ROLE_NAME VARCHAR (100) CHARACTER SET UTF8 NOT NULL
);

CREATE TABLE ROLES_PERMISSIONS (
PERMISSION VARCHAR (100) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,
ROLE_NAME VARCHAR (100) CHARACTER SET UTF8 NOT NULL
);

Tables created based on JdbcRealm


My configuration Shiro.ini:

[main]
ds = org.firebirdsql.jdbc.FBDriver
ds.serverName = localhost:3050
ds.user = SYSDBA
ds.password = masterkey
ds.databaseName = WebSKS
jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm
jdbcRealm.dataSource = $ds
jdbcRealm.permissionsLookupEnabled = true
authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
authc.loginUrl = /login/

[urls]
/login/ = authc


I'm just beginning with Shiro :)

RE: Firebird, GWT, Dispatch

Posted by Ken in Nashua <kc...@live.com>.
absolutely...


Date: Tue, 13 Jan 2015 16:04:29 -0500
Subject: Re: Firebird, GWT, Dispatch
From: juanrojas@rhemsolutions.com
To: user@shiro.apache.org

The database field PASSWORD_SALT is not required. http://mobhart.blogspot.com/2012/07/shiro-12-new-passwordservice-and.html
https://stormpath.com/blog/whats-new-apache-shiro-12/
I don't know about Firebird. But I think JdbcRealm should word with any jdbc driver.
2015-01-13 11:05 GMT-05:00 Łukasz Bączek <ba...@poczta.fm>:
Hello,

How to configure Shiro with Firebird?



I have the following tables:



CREATE TABLE USERS (

USERSNAME VARCHAR (20) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,

"PASSWORD" VARCHAR (36) CHARACTER SET UTF8 NOT NULL,

PASSWORD_SALT VARCHAR (40) CHARACTER SET UTF8

);



CREATE TABLE USER_ROLES (

USERNAME VARCHAR (20) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,

ROLE_NAME VARCHAR (100) CHARACTER SET UTF8 NOT NULL

);



CREATE TABLE ROLES_PERMISSIONS (

PERMISSION VARCHAR (100) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,

ROLE_NAME VARCHAR (100) CHARACTER SET UTF8 NOT NULL

);



Tables created based on JdbcRealm





My configuration Shiro.ini:



[main]

ds = org.firebirdsql.jdbc.FBDriver

ds.serverName = localhost:3050

ds.user = SYSDBA

ds.password = masterkey

ds.databaseName = WebSKS

jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm

jdbcRealm.dataSource = $ds

jdbcRealm.permissionsLookupEnabled = true

authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter

authc.loginUrl = /login/



[urls]

/login/ = authc





I'm just beginning with Shiro :)


 		 	   		  

Re: Firebird, GWT, Dispatch

Posted by juan manuel rojas ronquillo <ju...@rhemsolutions.com>.
The database field PASSWORD_SALT is not required.
http://mobhart.blogspot.com/2012/07/shiro-12-new-passwordservice-and.html
https://stormpath.com/blog/whats-new-apache-shiro-12/
I don't know about Firebird. But I think JdbcRealm should word with any
jdbc driver.

2015-01-13 11:05 GMT-05:00 Łukasz Bączek <ba...@poczta.fm>:

> Hello,
> How to configure Shiro with Firebird?
>
> I have the following tables:
>
> CREATE TABLE USERS (
> USERSNAME VARCHAR (20) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,
> "PASSWORD" VARCHAR (36) CHARACTER SET UTF8 NOT NULL,
> PASSWORD_SALT VARCHAR (40) CHARACTER SET UTF8
> );
>
> CREATE TABLE USER_ROLES (
> USERNAME VARCHAR (20) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,
> ROLE_NAME VARCHAR (100) CHARACTER SET UTF8 NOT NULL
> );
>
> CREATE TABLE ROLES_PERMISSIONS (
> PERMISSION VARCHAR (100) CHARACTER SET UTF8 NOT NULL COLLATE UNICODE_CI_AI,
> ROLE_NAME VARCHAR (100) CHARACTER SET UTF8 NOT NULL
> );
>
> Tables created based on JdbcRealm
>
>
> My configuration Shiro.ini:
>
> [main]
> ds = org.firebirdsql.jdbc.FBDriver
> ds.serverName = localhost:3050
> ds.user = SYSDBA
> ds.password = masterkey
> ds.databaseName = WebSKS
> jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm
> jdbcRealm.dataSource = $ds
> jdbcRealm.permissionsLookupEnabled = true
> authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
> authc.loginUrl = /login/
>
> [urls]
> /login/ = authc
>
>
> I'm just beginning with Shiro :)
>

RE: Firebird, GWT, Dispatch

Posted by baczek00 <ba...@poczta.fm>.
Hello,

I have a file Shiro.ini:

[main]
ds = org.firebirdsql.jdbc.FBDataSource
ds.serverName = localhost
ds.user = SYSDBA
ds.password = masterkey
ds.databaseName = WebSKS
jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm
jdbcRealm.dataSource = $ds
jdbcRealm.permissionsLookupEnabled = true 
authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
authc.loginUrl = /login/
 
[urls]
/login/ = authc 
 
[urls]
/ login / = authc

This results in an error such content:

Exception in thread "main" org.apache.shiro.config.ConfigurationException:
Unable to instantiate class [org.firebirdsql.jdbc.FBDataSource] for object
named 'ds'.  Please ensure you've specified the fully qualified class name
correctly.
	at
org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:151)
	at
org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:119)
	at
org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:161)
	at
org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:124)
	at
org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:102)
	at
org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:88)
	at
org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46)
	at
org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
	at
org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
	at pl.cba.lukaszbaczek.ShiroTutorial.App.main(App.java:28)
Caused by: org.apache.shiro.util.UnknownClassException: Unable to load class
named [org.firebirdsql.jdbc.FBDataSource] from the thread context, current,
or system/application ClassLoaders.  All heuristics have been exhausted. 
Class could not be found.
	at org.apache.shiro.util.ClassUtils.forName(ClassUtils.java:148)
	at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:164)
	at
org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:144)
	... 9 more

"Please ensure you've specified the fully qualified class name correctly.."

The text of the above error message is.

I checked and the file FBDataSource.class is in the specified location.




--
View this message in context: http://shiro-user.582556.n2.nabble.com/Firebird-GWT-Dispatch-tp7580404p7580410.html
Sent from the Shiro User mailing list archive at Nabble.com.

RE: Firebird, GWT, Dispatch

Posted by Ken in Nashua <kc...@live.com>.
you cant guess
 		 	   		  

Re: Firebird, GWT, Dispatch

Posted by juan manuel rojas ronquillo <ju...@rhemsolutions.com>.
ds = org.firebirdsql.jdbc.FBDataSource  (I guess)

2015-01-13 16:23 GMT-05:00 baczek00 <ba...@poczta.fm>:

> What we do not know what to enter for Fireberd, here:
>
> ds = org.firebirdsql.jdbc.FBDriver (I do not know if this is good)
>
>
>
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/Firebird-GWT-Dispatch-tp7580404p7580407.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Re: Firebird, GWT, Dispatch

Posted by baczek00 <ba...@poczta.fm>.
What we do not know what to enter for Fireberd, here:

ds = org.firebirdsql.jdbc.FBDriver (I do not know if this is good)



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Firebird-GWT-Dispatch-tp7580404p7580407.html
Sent from the Shiro User mailing list archive at Nabble.com.