Daniel,

Thanks a lot for the help ...

So, first ... I needed to collect _all_ of the proper source code ... core,
web, and spring ... ofcourse, this is for Grails development so doing things
the "Spring" way is a "given".

Shiro and JSecurity are identical at this point. The code was minimally
changed ... but there are some very nice changes.

Yeah. I could stick with the plugin and write my own realm ... but, I'll do
doing that anyway. I want to know how things work ... and there's nothing
like having the source right there. If I want to find out how a method is
implemented ... just hightlight and Command+B ... for me ... I'm using
Netbeans on a Mac.

I'm new to Grails and Spring "Dependency Injection" whatever that means ...

Hibernate ... OK ... Noob! ... I've done a lot of Java JEE programming, but
for the last several years ... like 6 years it's been PHP/CGI and Adobe Flex
...

I'm loving getting back to Java Web programming and Grails ... well, lets
just say ... My Search is Over!

"> I'm not sure where the initialization of a SecurityManager should
happen??"

Ok, that was a NOOB mistake ... without getting ALL of the source and then
having "ShiroGrailsPlugin.groovy" at the root of my project I was lost ...
now it's making a little sense ... check out "ShiroGrailsPlugin.groovy" and
you'll see it's critical to the startup sequence ...

Every software system has a startup sequence, and I've found it for Shiro
under Grails.

My latest Stacktrace represents real progress, I think ... If you, Daniel or
anyone has an idea what I'm not thinking of, to get a complete Shiro install
full source in a Grails application ... please enlighten us ...

The important thing is that I can see the code at ....

at
org.apache.shiro.web.servlet.ShiroFilter.executeChain(ShiroFilter.java:649)

I just don't know what it wants that it cannot, currently, have??

Joet


=========================================================
Server running. Browse to http://localhost:9090/ScoreEZ
  [groovyc] Compiling 40 source files to
/Users/virtuola/.grails/1.1.1/projects/scoreez/classes
2009-08-11 01:38:48,134 [4588...@qtp0-0] ERROR mortbay.log  - /ScoreEZ/
java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
        at
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)
        at
org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper.establishResourceLoader(GrailsLayoutDecoratorMapper.java:229)
        at
org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper.getNamedDecorator(GrailsLayoutDecoratorMapper.java:155)
        at
org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper.getDecorator(GrailsLayoutDecoratorMapper.java:133)
        at
com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper.getDecorator(AbstractDecoratorMapper.java:45)
        at
com.opensymphony.module.sitemesh.mapper.InlineDecoratorMapper.getDecorator(InlineDecoratorMapper.java:41)
        at
org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter$1.selectDecorator(GrailsPageFilter.java:170)
        at
org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:133)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
        at
org.apache.shiro.web.servlet.ShiroFilter.executeChain(ShiroFilter.java:649)
        at
org.apache.shiro.web.servlet.ShiroFilter.doFilterInternal(ShiroFilter.java:589)
        at
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:190)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
        at
org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilterInternal(GrailsReloadServletFilter.java:101)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
        at
org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:65)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
  [groovyc] Compiling 40 source files to
/Users/virtuola/.grails/1.1.1/projects/scoreez/classes
Running Grails application..






Daniel J. Lauk wrote:
> 
> Hello Joe,
> 
>> I'm excited about using Shiro in my new Grails project ...
> 
> I can understand that. I also enjoyed my first Grails experiences very
> much.
> 
>> Everything went great with my testing the plugin "grails install-plugin
>> shiro"
>>
>> But, now I want to customize Shiro so that I can use tables with Table
>> and
>> Column names of my choosing.
> 
> I never used the new Shiro plugin, only the older JSecurity plugin.
> But as Peter Ledbrook said he'd base the Shiro plugin on the JSecurity
> one, I guess things generally work the same way.
> 
>> I got the source from "svn co
>> http://svn.apache.org/repos/asf/incubator/shiro/trunk/";
>>
>> So, I've executed "grails uninstall-plugin shiro" ....
>>
>> And I'm trying to get everything working again in the simple case before
>> I
>> begin customizing, but I can't get beyond the following error ...
> 
> I'd recommend to stick with the plugin until you get comfortable with
> JEE in general and Grails in particular.
> The plugin allows for custom table/column names. All you have to do is
> write your own realm.
> E.g. I generated the realm and domain classes using the plugin's
> quickstart command and then changed pretty much everything inside.
> 
>> I've researched it some, but since I'm new to Grails and the environment
>> ...
> 
> What do you mean with "the environment"? Java Enterprise Edition (JEE,
> "server side java")? Or Grails? Or both? Or the full stack of
> frameworks employed by Grails (most important: Hibernate, and Spring
> Dependency Injection)?
> Coming from a PHP/CGI background, I still lack in-depth JEE knowledge,
> so I won't be any help here.
> 
> Anyway, knowing wich part of "the environment" in particular causes
> you trouble will help us to help you out.
> 
>> I'm not sure where the initialization of a SecurityManager should
>> happen??
> 
> Generally you should try to take advantage of Spring Dependency
> Injection. I don't know, if that's how it's supposed to be done, but
> I'd configure the SecurityManager there. (Note: That's just my
> thoughts. I haven't tried it. I use the grails plugin so I don't have
> to think about such things.)
> For a grails project that would be the file resources.xml (or
> resources.groovy if you prefer Grails' Spring DSL) in the
> grails-app/conf/spring/ directory.
> 
> Cheers,
> DJ
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Shiro-Source%2C-Custom-DB-Architechture-and-Grails-...-tp3421870p3422557.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to