Results 1 to 4 of 4

Thread: petclinic security with tomcat and weblogic

  1. #1
    Join Date
    Aug 2004
    Posts
    8

    Default petclinic security with tomcat and weblogic

    hi,
    I have a simple security test with petclinic.

    I add security definitions to security-context-server.xml:

    <bean id="clinicSecurityInterceptor" class="net.sf.acegisecurity.intercept.method.Metho dSecurityInterceptor">
    <property name="authenticationManager"><ref bean="authenticationManager"/></property>
    <property name="accessDecisionManager"><ref bean="accessDecisionManager"/></property>
    <property name="runAsManager"><ref bean="runAsManager"/></property>
    <property name="objectDefinitionSource">
    <value>org.springframework.samples.petclinic.Clini c.getVets=ROLE_TELLER
    org.springframework.samples.petclinic.Clinic.getPe tTypes=ROLE_SUPERVISOR
    </value></property></bean>

    <bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="interceptorNames">
    <list><value>clinicSecurityInterceptor</value></list>
    </property><property name="beanNames"><list><value>hsqlClinic</value></list>
    </property></bean>

    Then I test petclinic-server.war with tomcat4.1.29 and weblogic8.1 respectively

    With tomcat, I can get 'Authentication' from HttpSession and SecureContext on server side, so everything works well.

    however, the same petclinic-server.war with weblogic, the error is coming : A valid SecureContext was not provided in the

    RequestContext
    Thanks for your help!

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Is this from the Spring Rich project?

    Does it work if you just deploy a WAR built again CVS HEAD without modification?

  3. #3
    Join Date
    Aug 2004
    Posts
    8

    Default

    yes,it is from RCP.

    if I deploy petclinic-server.war without modification, the error infomation are as following:

    <2004-10-25 下午16时29分14秒 CST> <Error> <HTTP> <BEA-101216> <Servlet: "ws" fai
    led to preload on startup in Web application: "petclinic-server".
    javax.servlet.ServletException: Error creating bean with name '/Clinic-hessian'
    defined in resource [/WEB-INF/ws-servlet.xml] of ServletContext: Can't resolve r
    eference to bean 'clinic' while setting property 'service'; nested exception is
    org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named '
    clinic' is defined: org.springframework.beans.factory.support.DefaultL istableBea
    nFactory defining beans [/Clinic-hessian,/Clinic-burlap,/RemoteAuthenticationMan
    ager-hessian,/RemoteAuthenticationManager-burlap];

    <2004-10-25 下午16时29分14秒 CST> <Error> <HTTP> <BEA-101165> <Could not load us
    er defined filter: net.sf.acegisecurity.util.FilterToBeanProxy.
    java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoade
    rListener registered?

    however, tomcat works well, no error.

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    It looks as if the root application context isn't getting loaded prior to the dispatcher servlet application context. Usually the ContextLoaderListener is used to load the root application context, or if unsupported by the container, ContextLoaderServlet is used. If ContextLoaderServlet is used, the FilterToBeanProxy definitions in web.xml should each have an "init" initialization parameter set to "lazy".

    Does the normal (Spring core) PetClinic WAR deploy successfully on your WebLogic server?

Similar Threads

  1. Replies: 4
    Last Post: Jun 5th, 2010, 10:47 PM
  2. Weblogic losing flow execution id
    By ruipacheco in forum Web Flow
    Replies: 8
    Last Post: Aug 15th, 2008, 11:34 AM
  3. SWF size limit on Weblogic?
    By ruipacheco in forum Web Flow
    Replies: 4
    Last Post: Sep 19th, 2005, 05:19 AM
  4. Replies: 1
    Last Post: Jun 30th, 2005, 12:56 AM
  5. Acegi Authentication under Weblogic 8.1
    By sjivan in forum Security
    Replies: 2
    Last Post: Oct 19th, 2004, 01:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •