Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

braus
I'm trying to get Hazelcast to work with Shiro and karaf cellar. But when I
follow the steps to connect with hazelcast like shown here:
https://stormpath.com/blog/hazelcast-support-apache-shiro I'm getting a
classNotFoundException for org.apache.shiro.session.mgt.SimpleSession.

I assume by Hazelcast because of this message:
com.hazelcast.nio.serialization.HazelcastSerializationException:
java.lang.ClassNotFoundException: org.apache.shiro.session.mgt.SimpleSession

So then I check if the class exists in the karaf environment using the
command: bundle:find-class org.apache.shiro.session.mgt.SimpleSession

And it exists. So I assume the next step would be to see if the
shiro-hazelcast META-INF imports this package: org.apache.shiro.session.mgt

But it does not, so I now I'm not sure if this fault lies with
shiro-hazelcast for not importing the shiro SimpleSession.

Does anyone know how to make this combination of karaf/shiro/hazelcast work?

Shiro version: 1.5.2

Karaf Version: 4.3.0.RC1

Kind regards :)



--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

fpapon
Hi!

Thanks for your feedback, let me try to reproduce.

regards,
François
[hidden email]
Le 08/04/2020 à 12:20, braus a écrit :
I'm trying to get Hazelcast to work with Shiro and karaf cellar. But when I
follow the steps to connect with hazelcast like shown here:
https://stormpath.com/blog/hazelcast-support-apache-shiro I'm getting a
classNotFoundException for org.apache.shiro.session.mgt.SimpleSession.

I assume by Hazelcast because of this message:
com.hazelcast.nio.serialization.HazelcastSerializationException:
java.lang.ClassNotFoundException: org.apache.shiro.session.mgt.SimpleSession

So then I check if the class exists in the karaf environment using the
command: bundle:find-class org.apache.shiro.session.mgt.SimpleSession

And it exists. So I assume the next step would be to see if the
shiro-hazelcast META-INF imports this package: org.apache.shiro.session.mgt

But it does not, so I now I'm not sure if this fault lies with
shiro-hazelcast for not importing the shiro SimpleSession.

Does anyone know how to make this combination of karaf/shiro/hazelcast work?

Shiro version: 1.5.2

Karaf Version: 4.3.0.RC1

Kind regards :)



--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

braus
Thanks for looking into it :)



--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

braus
In reply to this post by braus
I uploaded my text project to github. You can just build this, drop this in
karaf and it should install.
Don't forget to move the shiro.ini to the etc directory and you should be
able to send a post request to localhost:port/login with username root and
password root


https://github.com/Braus/KarafShiroHazelcast





--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

fpapon
Great!

Thanks
François
[hidden email]
Le 08/04/2020 à 14:38, braus a écrit :
I uploaded my text project to github. You can just build this, drop this in
karaf and it should install.
Don't forget to move the shiro.ini to the etc directory and you should be
able to send a post request to localhost:port/login with username root and
password root


https://github.com/Braus/KarafShiroHazelcast





--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

fpapon
In reply to this post by braus
Hi,

I can reproduce :)

Let me now try to fix, I'll keep you posted!

regards,
François
[hidden email]
Le 08/04/2020 à 14:38, braus a écrit :
I uploaded my text project to github. You can just build this, drop this in
karaf and it should install.
Don't forget to move the shiro.ini to the etc directory and you should be
able to send a post request to localhost:port/login with username root and
password root


https://github.com/Braus/KarafShiroHazelcast





--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

braus
Hi Fpapon,

Thanks for looking into it, I'm very interested in what's going on :)

Kind regards,



--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

braus
In reply to this post by braus
I finally found out what whats wrong.
I accidentally imported Shiro Hazelcast version 1.5.3 in the feature without
noticing it. Giving it the same version(1.5.2) as the rest fixes the
Hazelcast

I was confused because the 1.5.3 version wasn't visible on maven yet.



--
Sent from: http://shiro-user.582556.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Karaf cellar with Hazelcast and shiro, Simplesession not found by karaf

fpapon
Hi,

I'm very sorry, I didn't find enough time take a look...

It's nice that you have found the problem :)

regards,
François
[hidden email]
Le 30/04/2020 à 15:40, braus a écrit :
I finally found out what whats wrong.
I accidentally imported Shiro Hazelcast version 1.5.3 in the feature without
noticing it. Giving it the same version(1.5.2) as the rest fixes the
Hazelcast

I was confused because the 1.5.3 version wasn't visible on maven yet.



--
Sent from: http://shiro-user.582556.n2.nabble.com/