Announcement Announcement Module
Collapse
No announcement yet.
Realm/Tomcat/Acegi Configuration Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Realm/Tomcat/Acegi Configuration Problem

    hello guys

    i have already resolved how work with acegi (studying) the examples in the forum and the 2 war files in the acegi distribution
    , well i am trying to work now with Realm and i am following the simple steps to do that.

    http://www.acegisecurity.org/docbook...html#ca-tomcat

    well i had the same obvious question that i saw in other post , where is the famous acegisecurity.xml ???

    so found this post http://forum.springframework.org/showthread.php?t=15096 that had the same question

    and 2 possible answer here

    http://forum.springframework.org/showthread.php?t=23046
    http://forum.springframework.org/showthread.php?t=13708

    well how should be this acegisecurity.xml ???? , i make a copy of the second link and place the mentionated file into the
    /conf folder (is just almost how the sample-tutorial - users roles and passwords) (i am using almost the same example)

    the same with the jars , and of course i changed the server.xml

    but when i start up the tomcat i saw this message



    Code:
    21-sep-2006 20:24:20 org.apache.tomcat.util.digester.Digester startElement
    GRAVE: Begin event threw error
    java.lang.NoClassDefFoundError: org/acegisecurity/AuthenticationException
    	at java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
    	at java.lang.Class.getConstructor0(Class.java:2640)
    	at java.lang.Class.newInstance0(Class.java:321)
    	at java.lang.Class.newInstance(Class.java:303)
    	at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
    	at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152)
    	at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1275)
    	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
    	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:220)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:473)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
    how i can resolve this??? , i am following the instructions

    i am working with tomcat 5.5.9 , acegi 1.0.1 and spring 2.0 RC2
    why i want to work with Realm?? , well i am making an integration with struts and i am using "role" in the action's definition
    in the struts-config, i know how to work with realm with struts , but now i want make this integration

    second question:



    Code:
    <Realm className="org.acegisecurity.adapters.catalina.CatalinaAcegiUserRealm"
                 appContextLocation="conf/acegisecurity.xml"
                 key="my_password" />
    sorry for my ignorance, but the key and the password, for what reason is??? , in what moment is used this???
    i am rookie with realm-acegi

    i saw this

    Code:
    Adapters create Authentication objects which are immutable and implement the AuthByAdapter  interface. These objects store the hash of a key that is defined by the adapter. This allows the Authentication object to be validated by the AuthByAdapterProvider. This authentication provider is defined as follows:
    
    <bean id="authByAdapterProvider" class="org.acegisecurity.adapters.AuthByAdapterProvider">
      <property name="key"><value>my_password</value></property>
    </bean>
    i am confuse in this little point, i hope that some good guy can share his knowledge


    thanks so much for advanced
Working...
X