1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Pubsub - web application has security model different from DDOnly.

Discussion in 'JAVA, SOA and Application Development' started by williamshen25, Nov 1, 2013.

  1. Hi guys

    I don't know if this is the right place to post this. I am currently testing out the Weblogic publish / subscribe. I have successfully loaded the deployable-libraries pubsub-1.0.war onto my local weblogic and I used a existing application from online tutorial to test it out. When I attempt to deploy the war file I got the following error message:

    <Nov 1, 2013 11:12:02 AM PDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "PubSubServlet" failed to preload on startup in Web application: "test.war".
    javax.servlet.ServletException: [HTTP Pubsub Server:2150029]ControllerServlet initialization failed: web application has security model different from
    DDOnly. PubSub Server requires a DDOnly model configured for the webapp.

    I am not too sure what went wrong here. Can anybody give me some insight please? Thanks a lot

    Here is how my DD files looks like.

    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app>
    <display-name>CometWEB</display-name>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <login-config>
    <auth-method>BASIC</auth-method>
    </login-config>
    <security-role>
    <role-name>subscriber</role-name>
    </security-role>
    <security-role>
    <role-name>publisher</role-name>
    </security-role>
    </web-app>

    weblogic.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-web-app>
    <library-ref>
    <library-name>pubsub</library-name>
    <specification-version>1.0</specification-version>
    </library-ref>

    <security-role-assignment>
    <role-name>subscriber</role-name>
    <principal-name>Subscriber</principal-name>
    </security-role-assignment>

    </weblogic-web-app>

    weblogic-pubsub.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <wlps:weblogic-pubsub>

    <wlps:channel>
    <wlps:channel-pattern>/hello/**</wlps:channel-pattern>
    <!--since no handler defined, the default handler will be used -->
    </wlps:channel>

    <wlps:channel-constraint>
    <wlps:channel-resource-collection>
    <wlps:channel-resource-name>subscribe</wlps:channel-resource-name>
    <wlps:description>subscribe channel constraint</wlps:description>
    <wlps:channel-pattern>/hello/*</wlps:channel-pattern>
    <wlps:channel-operation>subscribe</wlps:channel-operation>
    <wlps:channel-operation>create</wlps:channel-operation>
    <wlps:channel-operation>publish</wlps:channel-operation>
    </wlps:channel-resource-collection>

    </wlps:channel-constraint>

    </wlps:weblogic-pubsub>