Using deployment descriptor authentication

Hello,
I'm working on a web application and want to have a login for anyone that accesses the service. Is it possible to use the deployment descriptor to implement security but using my own authentication method? What I want to do is something like this; have my web.xml similar to this:
<security-constraint>
<web-resource-collection>
<web-resource-name>all private</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-page>/login.jsp</form-login-page>
</login-config>
But, in my login.jsp, instead of having <form action="j_security_check" ...
I'll do something like <form action="tryLogin" ... and I'll implement my own login method that will use HttpSession to validate/invalidate the session. The reason I'm trying to do things this way is that I want to have username/password pairs stored on mySQL on my server. I am using the struts framework and the latest version of Tomcat. If anyone knows if this would work or if there is an easier way to do this please let me know!! Thanks!

Yup. It can be done having "tryLogin" as a servlet/jsp which retrives the username and pwd from the request object and connects to db for validating the same

Similar Messages

  • Referencing EJB on remote server AND using deployment descriptor

    We're using Weblogic 6.1sp2 under Windows 2000.
    We have a web application on server A and several EJBs running on server B -
    some of these may in the future be moved to different servers.
    We would like to ensure that this only requires reconfiguring the deployment
    descriptors.
    In our web app, we access the EJB's like this:
    AccountHome accHome = (AccountHome) (new
    InitialContext()).lookup("java:comp/env/ejb/AccountHome")
    - we then map ejb/AccountHome to the JNDI name in the weblogic.xml file in
    the web app - the JNDI name will usually (but not always) be the class name
    of the implementing class, e.g. system.billing.accounting.AccountHome
    However, to make this work when the EJB is on server B, we must put a
    jndi.properties file in the server A classpath containing
    java.naming.provider.url=t3://server_b:7001/
    to point to server B.
    Now, this makes ALL JNDI lookups on server A go to server B - this is not
    what we want. Especially not in the case where some EJB's move to server C -
    B and C may be in separate clusters and will not be clustering the JNDI
    tree. Also, other web applications on the server will need to go to
    different servers.
    Alternatively, we could specify a property set in the InitialContext
    constructor with a provider url. But in that case, the mapping from
    web.xml/weblogic.xml is apparently not applied - or rather, if we look up
    "java:comp/env/ejb/AccountHome", weblogic maps it to
    "system.billing.accounting.AccountHome" and then tries to look it up on the
    local machine, server A.
    If we look up "system.billing.accounting.AccountHome", it does correctly
    look it up on the server specified in the provider url and finds the entry.
    However, this would mean that we would have to specify the exact jndi name.
    In addition, we would have to hard-code the server name for each lookup.
    An alternative would be to "copy" the JNDI entries from server B to server A
    (or to some other shared, global JNDI registry). But these would need to be
    kept in sync - especially since server B is really a cluster, where
    different servers may come online at different times and register their EJBs
    as clusterable, so the stubs would need to be continously updated.
    My best idea is to bypass the whole web.xml/weblogic.xml mapping scheme and
    just add our own config file with stuff like
    <mappings>
    <map entry="java:comp/env/ejb/AccountHome">
    <jndi-properties>
    java.naming.provider.url=t3://server_b:7001/
    java.naming.security.principal=jndiuser
    java.naming.security.credentials=mysecretpassword
    </jndi.properties>
    <jndi-name>sysmte.billing.accounting.AccountHome</jndi-name>
    </map>
    </mappings>
    We then need to wrap all the lookups in our own lookup mechanism which first
    checks the config file to find any mappings.
    However, this seems like reinventing the wheel and will also confuse most
    deployment tools etc.
    Does anybody have any suggestions where we
    1. Don't put a jndi.properties file in the server classpath
    2. Lookup ejb's using "java:comp/env/ejb/SomeEJB" - not the JNDI name.
    3. Don't hardcode the server names in the application - but potentially
    in the deployment descriptor.
    4. Can look up different EJB's on different machines
    Niels Harremoës

    There is an article on dev2dev that may explain what you are seeing...
    http://dev2dev.bea.com/articlesnews/discussion/thread.jsp?thread=142
    HTH
    dwfa
    "Niels Ull Harremoës" <[email protected]> wrote in message
    news:[email protected]...
    It turns out that we can make it work by entering the url of the server in
    the weblogic.xml entry - e.g. instead of having
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountHome</ejb-ref-name>
    <jndi-name>system.billing.accounting.AccountHome</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    we enter
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountHome</ejb-ref-name>
    <jndi-name>t3://server_b:7001/system.billing.accounting.AccountHome</jndi-na
    me>
    </ejb-reference-description>
    </reference-descriptor>
    However, we are unsure on whether this will establish a new JNDIconnection
    to server_b on every lookup? And it's not documented anywhere?
    Does anybody have any other suggestions?
    "Niels Ull Harremoës" <[email protected]> wrote in message
    news:[email protected]...
    We're using Weblogic 6.1sp2 under Windows 2000.
    We have a web application on server A and several EJBs running on serverB -
    some of these may in the future be moved to different servers.
    We would like to ensure that this only requires reconfiguring thedeployment
    descriptors.
    In our web app, we access the EJB's like this:
    AccountHome accHome = (AccountHome) (new
    InitialContext()).lookup("java:comp/env/ejb/AccountHome")
    - we then map ejb/AccountHome to the JNDI name in the weblogic.xml file
    in
    the web app - the JNDI name will usually (but not always) be the classname
    of the implementing class, e.g. system.billing.accounting.AccountHome
    However, to make this work when the EJB is on server B, we must put a
    jndi.properties file in the server A classpath containing
    java.naming.provider.url=t3://server_b:7001/
    to point to server B.
    Now, this makes ALL JNDI lookups on server A go to server B - this is
    not
    what we want. Especially not in the case where some EJB's move to serverC -
    B and C may be in separate clusters and will not be clustering the JNDI
    tree. Also, other web applications on the server will need to go to
    different servers.
    Alternatively, we could specify a property set in the InitialContext
    constructor with a provider url. But in that case, the mapping from
    web.xml/weblogic.xml is apparently not applied - or rather, if we look
    up
    "java:comp/env/ejb/AccountHome", weblogic maps it to
    "system.billing.accounting.AccountHome" and then tries to look it up onthe
    local machine, server A.
    If we look up "system.billing.accounting.AccountHome", it does correctly
    look it up on the server specified in the provider url and finds theentry.
    However, this would mean that we would have to specify the exact jndiname.
    In addition, we would have to hard-code the server name for each lookup.
    An alternative would be to "copy" the JNDI entries from server B to
    server
    A
    (or to some other shared, global JNDI registry). But these would need tobe
    kept in sync - especially since server B is really a cluster, where
    different servers may come online at different times and register theirEJBs
    as clusterable, so the stubs would need to be continously updated.
    My best idea is to bypass the whole web.xml/weblogic.xml mapping schemeand
    just add our own config file with stuff like
    <mappings>
    <map entry="java:comp/env/ejb/AccountHome">
    <jndi-properties>
    java.naming.provider.url=t3://server_b:7001/
    java.naming.security.principal=jndiuser
    java.naming.security.credentials=mysecretpassword
    </jndi.properties>
    <jndi-name>sysmte.billing.accounting.AccountHome</jndi-name>
    </map>
    </mappings>
    We then need to wrap all the lookups in our own lookup mechanism whichfirst
    checks the config file to find any mappings.
    However, this seems like reinventing the wheel and will also confuse
    most
    deployment tools etc.
    Does anybody have any suggestions where we
    1. Don't put a jndi.properties file in the server classpath
    2. Lookup ejb's using "java:comp/env/ejb/SomeEJB" - not the JNDIname.
    3. Don't hardcode the server names in the application - butpotentially
    in the deployment descriptor.
    4. Can look up different EJB's on different machines
    Niels Harremoës

  • Setting an Authentication Level for a WS using Deployment Descriptor Files

    Hi
    I'm developing WS with authentication level BASIC but I have some problem deploying it.
    I read from https://cw.sdn.sap.com/cw/docs/DOC-106319  how to setting authentication level using annotation, but I cannot use annotation because my WS are cross-platform (they can be executed on SAP NetWeaver AS, JBoss, IBM WebSphere).
    My WS is based on a stateless EJB Session 2.1.
    My ejb-jar contains security-role-ref.
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
         <enterprise-beans>
              <session id="AsyncOrd10">
                   <description>AsyncOrd10</description>
                   <ejb-name>AsyncOrd10</ejb-name>
                   <local-home>com.dat.now.ws.ord.AsyncOrd10Home</local-home>
                   <local>com.dat.now.ws.ord.AsyncOrd10</local>
                   <service-endpoint>com.dat.now.ws.ord.AsyncOrd10WS</service-endpoint>
                   <ejb-class>com.dat.now.ws.ord.AsyncOrd10EJB</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <resource-ref id="AsyncOrd10Ref">
                        <description>Reference to the DataSource used by AsyncOrd10</description>
                        <res-ref-name>jdbc/AsyncOrd10</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                   </resource-ref>
                   <security-role-ref id="SecurityRoleRef_AsyncOrd10">
                        <role-name>everyone</role-name>
                        <role-link>everyone</role-link>
                   </security-role-ref>
              </session>
         </enterprise-beans>
         <assembly-descriptor id="assembly-descriptor_ID">
              <security-role id="SecurityRole_everyone">
                   <role-name>everyone</role-name>
              </security-role>
              <security-role id="SecurityRole_sysadm">
                   <role-name>sysadm</role-name>
              </security-role>
              <method-permission id="MethodPermission_AsyncOrd10">
                   <role-name>everyone</role-name>
                   <method id="MethodElement_AsyncOrd10">
                        <ejb-name>AsyncOrd10</ejb-name>
                        <method-name>*</method-name>
                   </method>
              </method-permission>
              <container-transaction id="container-transaction_AsyncOrd10">
                   <method id="AsyncOrd10_methods">
                        <ejb-name>AsyncOrd10</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>

    for JBoss I can set in the jboss.xml the auth-method (under the port-component)
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss>
         <security-domain>java:/jaas/absolut</security-domain>
         <enterprise-beans>
              <session>
                   <ejb-name>AsyncOrd10</ejb-name>
                   <local-jndi-name>com.dat.now.ws.ord.AsyncOrd10</local-jndi-name>
                   <port-component>
                   <port-component-name>AsyncOrd10WSPort</port-component-name>
                        <port-component-uri>AsyncOrd10</port-component-uri>
                        <auth-method>BASIC</auth-method>
                   </port-component>
                   <resource-ref>
                        <res-ref-name>jdbc/AsyncOrd10</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <jndi-name>java:/now</jndi-name>
                   </resource-ref>
              </session>
         </enterprise-beans>
    </jboss>
    For IBM WebSphere I should use an additional step in the deploy
    Maybe I missing something in the ejb-j2ee-engine.xml ?
    this is it :
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-j2ee-engine>
         <enterprise-beans>
              <enterprise-bean>
                   <ejb-name>AsyncOrd10</ejb-name>
                   <jndi-name>com.dat.now.ws.ord.AsyncOrd10</jndi-name>
                   <resource-ref>
                        <res-ref-name>jdbc/AsyncOrd10</res-ref-name>
                        <res-link>now</res-link>
                   </resource-ref>
              </enterprise-bean>
         </enterprise-beans>
    <security-permission>
    <security-role-map>
    <role-name>everyone</role-name>
    <server-role-name>all</server-role-name>
    </security-role-map>
    <security-role-map>
    <role-name>sysadm</role-name>
    <server-role-name>administrators</server-role-name>
    </security-role-map>
    </security-permission>
    </ejb-j2ee-engine>
    Thanks

  • Injecting ejb impossible using deployment descriptor ?

    Hi.
    I wanted to inject an EJB reference into a JSF manged bean. @EJB annotation worked, but then I tried <ejb-reb> and <injection-target> and EJB reference wasn't injected.
    Looking at the specification, it seems that this is not supported. Is there any other possibility or am I forced to use annotations?

    Hi.
    I wanted to inject an EJB reference into a JSF manged bean. @EJB annotation worked, but then I tried <ejb-reb> and <injection-target> and EJB reference wasn't injected.
    Looking at the specification, it seems that this is not supported. Is there any other possibility or am I forced to use annotations?

  • How to specify the security policy "Allow access to everyone" for security role in Deployment descriptor

    Hi,
    I am migrating a web application from Websphere to Weblogic. The web application has a security role defined in web.xml (Use LDAP for authentication).
    security-role>
            <description>Authenticated</description>
            <role-name>Authenticated</role-name>
        </security-role>
    This role is mapped to a special subject "All authenticated user in appliation realm" in WAS.
    In weblogic, I have the following setting in weblogic.xml
    <wls:security-role-assignment>
            <wls:role-name>Authenticated</wls:role-name>
            <wls:externally-defined />
        </wls:security-role-assignment>
    And after deploy the application, have to manually add a security role and add the security policy "Allow access to everyone" to this role.
    I am wondering if this setting can be specified in  for example weblogic.xml so just deploy web applicaiton using deployment descriptor, and I don't need write script to do that .
    Thanks

    Hi,
    You need to have Back End support to achieve this. In Back End you need to create two groups . You need to know what joins has to be made for which group (which is more important) and also make session variable for the userrole (with SQL supporting it). In the BMM layer, we need to put the security join conditions in the 'where clause'.
    And make a common report. User loggin in with the respective userid will have userrole and joins assigned in the Back end. And they will be viewing the report according to their access.
    Hope this will solve your problem.
    Regards
    MuRam

  • DPL8007: Unsupported deployment descriptors element message-destination?

    Hi All,
    I am not able to run a working Java EE 5 JMS tutorial in jdk1.6.0_25, GF3.1 (bundled with Netbeans 7.0 on Windows XP) despite having re-created the whole project from scratch. Below is the code snippets of various components of the project:
    C:\Documents and Settings\jack\JMSEnterpriseProject\JMSEnterpriseProject-ejb\src\java\com\ensode\mdb\MessageReceiverBean.java
    @MessageDriven(mappedName = "jms/myQueue", activationConfig = {
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    public class MessageReceiverBean implements MessageListener {
        @Override
        public void onMessage(Message message) {
            TextMessage textMessage = (TextMessage) message;
            try {
                System.out.println("Received message:" + textMessage.getText());           
            } catch (JMSException ex) {
                Logger.getLogger(MessageReceiverBean.class.getName()).log(Level.SEVERE, null, ex);
    C:\Documents and Settings\jack\JMSEnterpriseProject\JMSEnterpriseProjectApplicationClient\src\java\com\ensode\jms
    public class Main {
        @Resource(name = "jms/myQueue")
        private static Queue myQueue;
        @Resource(name = "jms/myQueueConnectionFactory")
        private static ConnectionFactory myQueueConnectionFactory;
        public static void main(String[] args) throws JMSException {
            new Main().sendJMSMessageToMyQueue("NetBeans makes JMS trivial!");
        private Message createJMSMessageForjmsMyQueue(Session session,
                Object messageData) throws JMSException {
            TextMessage textMessage = session.createTextMessage();
            textMessage.setText((String) messageData);
            return textMessage;
        private void sendJMSMessageToMyQueue(Object messageData) throws
                JMSException {
            Connection connection = null;
            Session session = null;
            try {
                connection = myQueueConnectionFactory.createConnection();
                session = connection.createSession(false,
                        javax.jms.Session.AUTO_ACKNOWLEDGE);
                MessageProducer messageProducer = session.createProducer(myQueue);
                messageProducer.send(createJMSMessageForjmsMyQueue(session,
                        messageData));
            } finally {
                if (session != null) {
                    session.close();
                if (connection != null) {
                    connection.close();
    C:\Documents and Settings\jack\JMSEnterpriseProject\JMSEnterpriseProject-ejb\setup\glassfish-resources.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
    <resources>
      <admin-object-resource enabled="true" jndi-name="jms/myQueue" object-type="user" res-adapter="jmsra" res-type="javax.jms.Queue">
        <property name="Name" value="myQueue"/>
      </admin-object-resource>
      <connector-resource enabled="true" jndi-name="jms/myQueueConnectionFactory" object-type="user" pool-name="jms/myQueueConnectionFactory">
        <description/>
      </connector-resource>
      <connector-connection-pool associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-definition-name="javax.jms.QueueConnectionFactory" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="true" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="jms/myQueueFactoryPool" ping="false" pool-resize-quantity="2" pooling="true" resource-adapter-name="jmsra" steady-pool-size="8" validate-atmost-once-period-in-seconds="0"/>
      <connector-resource enabled="true" jndi-name="jms/myQueueFactory" object-type="user" pool-name="jms/myQueueFactoryPool"/>
      <connector-connection-pool associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-definition-name="javax.jms.ConnectionFactory" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="true" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="jms/myQueueConnectionFactory" ping="false" pool-resize-quantity="2" pooling="true" resource-adapter-name="jmsra" steady-pool-size="8" validate-atmost-once-period-in-seconds="0"/>
    </resources>Yet it was met with the following exception which appears to be an unsupported deployment descriptor generated by Netbeans 7.0:
    _GF3.1 server log_
    WARNING: DPL8007: Unsupported deployment descriptors element message-destination value null
    _Application Client Outpu
    t_10/05/2011 2:59:45 AM com.sun.enterprise.deployment.util.ComponentValidator accept
    WARNING: DPL8007: Unsupported deployment descriptors element message-destination value null
    com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref jms/[email protected]@null into class com.ensode.jms.Main
    Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/jms/myQueue' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root exception is javax.naming.NameNotFoundException: No object bound for java:comp/env/jms/myQueue [Root exception is java.lang.NullPointerException]]glassfish-resources.xml used to reside in C:\Documents and Settings\jack\JMSEnterpriseProject\ setup\ sun-resources.xml back in GF2.1.
    Deployment was successful which resulted in the following resources created:
    Connector Resources => jms/myQueueConnectionFactory, jms/myQueueFactory.
    Connector Connection Pools => jms/myQueueFactoryPool, jms/myQueueConnectionFactory.
    Admin Object Resources => jms/myQueue.
    Your assistance would be very much appreciated.
    Thanks,
    Jack

    Hi,
    The same unsupported deployment descriptor persists despite having removed C:\Documents and Settings\jack\JMSEnterpriseProject\JMSEnterpriseProject-ejb\setup\glassfish-resources.xml with the following exception:
    10/05/2011 11:41:22 PM com.sun.enterprise.deployment.util.ComponentValidator accept
    WARNING: DPL8007: Unsupported deployment descriptors element message-destination value null
    10/05/2011 11:41:28 PM org.hibernate.validator.util.Version <clinit>
    INFO: Hibernate Validator 4.1.0.Final
    10/05/2011 11:41:28 PM org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA
    INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
    10/05/2011 11:41:29 PM com.sun.messaging.jms.ra.ResourceAdapter start
    INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version:  4.5  (Build 29-b) Compile:  Wed Feb  9 22:53:30 PST 2011
    10/05/2011 11:41:29 PM com.sun.messaging.jms.ra.ResourceAdapter start
    INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is REMOTE, connection mode is TCP
    10/05/2011 11:41:29 PM com.sun.messaging.jms.ra.ResourceAdapter start
    INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:REMOTE
    com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref jms/[email protected]@null into class com.ensode.jms.Main
         at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:698)
         at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:468)
         at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:215)
         at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:207)
         at org.glassfish.appclient.client.acc.AppClientContainer$ClientMainClassSetting.getClientMainClass(AppClientContainer.java:619)
         at org.glassfish.appclient.client.acc.AppClientContainer.getMainMethod(AppClientContainer.java:511)
         at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:405)
         at org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:319)
         at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:278)
         at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:76)
         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:597)
         at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
    Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/jms/myQueue' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root exception is javax.naming.NameNotFoundException: No object bound for java:comp/env/jms/myQueue [Root exception is java.lang.NullPointerException]]
         at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
         at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:597)
         ... 15 more
    Caused by: javax.naming.NameNotFoundException: No object bound for java:comp/env/jms/myQueue [Root exception is java.lang.NullPointerException]
         at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:242)
         at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:498)
         ... 18 more
    Caused by: java.lang.NullPointerException
         at javax.naming.InitialContext.getURLScheme(InitialContext.java:269)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:318)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:82)
         at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:772)
         at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:740)
         at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:172)It is running on Windows 7 as opposed to XP earlier on.
    Is it possible that this is a bug since all JMS resources have been declared without using deployment descriptor at all?
    Thanks,
    Jack

  • RDBMSRealm ACL why if in deployment descriptors?

    I was planning on using deployment descriptors for my ACL. I have users and
    groups in my database and this maps just fine for the RDBMS schema. Why then
    do I need ACLs in the schema? I have them in my deployment descriptors! I'm
    getting errors like column not found, etc when it tries to load my realm
    (obviously, I don't have ACL set up in database). Is there a way around
    this?
    thanks,
    Mike Lee
    Architect
    AfterBOT
    [email protected]
    Just remove nospam_ to email me

    You can not do this. Per J2EE is exactly how WLS works under the hood for
    ACL deployment descriptors. It does not use container managed ACL through
    RDBMSRealm for anything that a deployment descriptor can do (ie: ejb-jar.xml
    and web.xlm security-contraint)
    Michael Lee
    "Michael Lee" <[email protected]> wrote in message
    news:3d6d0765$[email protected]..
    It turns out that it just wants an entry in the schema in the RDBMS setup.I
    created a table that mapped to it just to be safe. If there are no entries
    in the ACL table then thats ok, it just means that there are no ACL
    constraints (outside of what you put on deployment descriptors of course).
    This is all working now! Yay!
    Now I'm looking at taking the ACL information out of the deployment
    descriptors (web.xml and ejb-jar.xml) and putting them in the ACL_ENTRIESin
    the RDBMSRealm. I don't know if this can be done but if it can it would be
    very nice for configurability. I could then write JSPs for the customer to
    change the security of the system.
    Michael Lee
    "Michael Lee" <[email protected]> wrote in message
    news:[email protected]..
    I was planning on using deployment descriptors for my ACL. I have usersand
    groups in my database and this maps just fine for the RDBMS schema. Whythen
    do I need ACLs in the schema? I have them in my deployment descriptors!I'm
    getting errors like column not found, etc when it tries to load my realm
    (obviously, I don't have ACL set up in database). Is there a way around
    this?
    thanks,
    Mike Lee
    Architect
    AfterBOT
    [email protected]
    Just remove nospam_ to email me

  • Passing Deployment Descriptor value to transformation - Important

    All,
    Version: 10.1.3.4
    I have a requirement to get run time value and access it inside transformation (xslt). Hence I used deployment descriptor, but I'm stuck on how to access this value inside transformation. I tried ora:getPreference to use it inside Assign activity and successfully done this, but cudn't do the same inside transformation. Any pointers would be of great help.
    rgds
    sen

    Hi,
    Ya, i'm looking for such doc. Can you please share it if you have?
    I followed this (http://soacrux.blogspot.com/2010/08/passing-bpel-variable-contents-into.html) blog. For bpel 10g, is it mandatory to keep the XSLTParameters.xsd? If i use this xsd and create a variable of the xsd type, during deployment jdev throws an error
    Error(64):
    *[Error ORABPEL-10010]: unresolved element*
    *[Description]: in line 64 of "D:\Application1\BPELProcess1\bpel\BPELProcess1.bpel", XML element "{http://schemas.oracle.com/service/bpel/common}parameters" of variable "Variable_3" is not defined.*
    *[Potential fix]: Make sure the XML element "{http://schemas.oracle.com/service/bpel/common}parameters" is defined in one of WSDLs that are referenced by the deployment descriptor.*
    rgds
    sen
    Edited by: Sen2008 on Jan 22, 2012 12:58 AM

  • Deployment descriptor Using weblogic Builder

    Hi
    I am new to Ejb,
    So kindly help me. can we create Deployment Descriptor from CMP bean,using Weblogic Builder.
    Thanks
    Satya
    Edited by: satya22 on Dec 11, 2007 10:37 AM

    satya22 wrote:
    Hi
    I am new to Ejb,Please let me know can we create an Deployment Descriptor
    Using Weblogic Builder for an CMP Bean
    ThanksHow many things are wrong here, hmmm.
    1. Your subject line is useless
    2. You posted in the wrong forum
    3. You posted about an unrelated technology
    4. You didn't make any attempt to do the task yourself
    5. You probably haven't searched for an answer on Google
    ....did I miss anything?

  • How to use weblogic.DDconverter Tool to upgrade Deployment Descriptors.

    Hi,
    I want to know how to use weblogic.DDconverter Tool to upgrade Deployment Descriptors using EAR of previous verisons(JDK and weblogic).
    Regards,
    Neeraj

    Looks like the protocol is not correct (Unable to connect to 'http://localhost:7001': Destination unreachable)
    Could you try the t3 protocol, for example,
    java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password welcome1 -listapps

  • How to do JAAS and J2EE Deployment Descriptor ACL in WLS

    The examples on this website and shipped with WLS stink. Does there exist a GOOD
    example of how to
    Log in with a form
    authenticate (I guess using j_security_check to hook into the web.xml security)
    then pull a user from a database and use the roles defined there for authorization
    in the rest of the system?
    The weblogic examples are from java clients to RMI (ya, thats handy). They also
    sit alone. They dont say how to hook them into weblogic. They say to use JAAS
    but they have just JAAS examples! No hooking of it into an EJB, servlet, etc!
    They also dont show how to hook that code into WLS to use it as your security
    module!
    Help, I'm at a loss.
    They recommend using JAAS but their documentation and examples of doing so suck
    or are non existant. We have a complex real world product and need examples of
    the same. Stupid, stand alone examples that teach nothing do no help.
    frustrated at BEA for their poor documentation and support,
    Mike

    Also, I use struts....
    In struts you have to extend the Action class which then calls the perform()
    method on your servlet.
    So to call an EJB I have to have my servlet implement PrivilegedAction?
    If so, then this wants a run() method. Struts calls perform so that means
    I'm going to have to make another class to call from my servlet with a run
    method()? Or I'm going to have my servlet implement PrivledgedAction and
    call Security.runAs()?
    What if I just want to call the EJB from my servlet and put my security
    credentials in the JNDI lookup? I want the container to use the roles of the
    user in the JNDI lookup to authorize methods based on the deployment
    descriptors.
    thanks,
    Mike
    "Vimala Ranganathan" <[email protected]> wrote in message
    news:[email protected]...
    Hi Micheal,
    Attached is an exmaple of JAAS login and invoking an EJB.
    Let me know if this turns out to be useful.
    Regarding the form based authentication, Could you be more clear on whatissue you are
    facing?
    Just as note, when you use form based login, WLS would authenticate theuser against
    the realm
    WLS is setup for, which could be a file Realm, or a RDBMS realm (in whichcase users
    and groups are from database)
    Roles cannot be defined at the database level. This needs to be atapplication level
    which you can define in web.xml or
    console(in 7.0)
    If you need any specific help or more information please let me know.
    Vimala
    Michael Lee wrote:
    The examples on this website and shipped with WLS stink. Does there
    exist a GOOD
    example of how to
    Log in with a form
    authenticate (I guess using j_security_check to hook into the web.xmlsecurity)
    then pull a user from a database and use the roles defined there forauthorization
    in the rest of the system?
    The weblogic examples are from java clients to RMI (ya, thats handy).They also
    sit alone. They dont say how to hook them into weblogic. They say to useJAAS
    but they have just JAAS examples! No hooking of it into an EJB, servlet,etc!
    They also dont show how to hook that code into WLS to use it as yoursecurity
    module!
    Help, I'm at a loss.
    They recommend using JAAS but their documentation and examples of doingso suck
    or are non existant. We have a complex real world product and needexamples of
    the same. Stupid, stand alone examples that teach nothing do no help.
    frustrated at BEA for their poor documentation and support,
    Mike

  • Deployment descriptor error for an EJB 3.0 entity bean module

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

  • Challenges in deployment descriptors

    We currently have an EJB (called CD) that is contacted "remotely" by a web service
    (called CA) for some processing. The two (CD and CA) are deployed on different
    WLS8.1SP1 domains. CD is currently deployed as an EJB jar file (cd.jar) whereas
    CA is part of an EAR file and is deployed as an application. We ran into the necessity
    of making CD as part of EAR (much like CA). However, as part of the CA package,
    there is currently an initialization class (we're using a servlet) that saves
    some entries in JNDI for both CA and CD. We want to mimic the functionality of
    that class in CD when we create the ear for it.
    I just ran into some settings that could be made in the weblogic-application.xml
    deployment descriptor as follows:
    <startup-class>startup class name</startup-class>
    We're hoping this can help us mimic CA's init process. However, we need to pass
    that class some parameters upon load (which in the case of CA was done by using
    the <init-param> in its web.xml). We came across the following tag:
    <application-param>
         <param-name>someparam</param-name>
         </param-value>somevalue</param-value>
    </application-param
    However, we have the following questions:
    1. How do we make the startup class fetch those param values at load time? (for
    CA, the servlet was using the appPropLoc = getInitParameter("someparam") in its
    init method
    2. We needed to perform the remote lookup from CA to CD. Would enclosing CD in
    an EAR affect our ability to do so? If so, then how do we go about doing that?
    Thanks much,
    Sami

    Hi sami,
    Enclosing the EJB (CD) in an EAR file is not going to stop you from Remotely accessing
    it.
    As CD and CA are in different application package and moreover in different JVM,
    you have to package the interface classes as client jar with in CA for type casting.
    Joe
    "sami titi" <[email protected]> wrote:
    >
    We have resolved the first part of this problem by using a startup servlet
    much
    like we do in CA. However, we still face the issue of question number
    2 below.
    Please provide some feedback.
    Thanks,
    Samir
    "sami titi" <[email protected]> wrote:
    We currently have an EJB (called CD) that is contacted "remotely" by
    a web service
    (called CA) for some processing. The two (CD and CA) are deployed on
    different
    WLS8.1SP1 domains. CD is currently deployed as an EJB jar file (cd.jar)
    whereas
    CA is part of an EAR file and is deployed as an application. We raninto
    the necessity
    of making CD as part of EAR (much like CA). However, as part of the
    CA package,
    there is currently an initialization class (we're using a servlet) that
    saves
    some entries in JNDI for both CA and CD. We want to mimic the functionality
    of
    that class in CD when we create the ear for it.
    I just ran into some settings that could be made in the weblogic-application.xml
    deployment descriptor as follows:
    <startup-class>startup class name</startup-class>
    We're hoping this can help us mimic CA's init process. However, weneed
    to pass
    that class some parameters upon load (which in the case of CA was done
    by using
    the <init-param> in its web.xml). We came across the following tag:
    <application-param>
         <param-name>someparam</param-name>
         </param-value>somevalue</param-value>
    </application-param
    However, we have the following questions:
    1. How do we make the startup class fetch those param values at load
    time? (for
    CA, the servlet was using the appPropLoc = getInitParameter("someparam")
    in its
    init method
    2. We needed to perform the remote lookup from CA to CD. Would enclosing
    CD in
    an EAR affect our ability to do so? If so, then how do we go about doing
    that?
    Thanks much,
    Sami

  • How to edit deployment descriptor in weblogic 9.0?

    Hi ,
    I need to edit the values of certain environment variables mentioned in the deployment descriptor of a ejb module.
    In weblogic 7,its a straight forward method in which we have the option to edit the deployment descriptor in weblogic console.
    But I'm not sure how the same can be done in weblogic 9.0.
    Please guide me..!!! its urgent...
    Thanks,
    Smita

    If you want to edit the actual deployment descriptor (ie as a developer) than using any text editor or using an IDE like WebLogic Workshop/Eclipse etc would be the way to go.
    If you're trying to change values in an already deployed application, then configuration and tunables can be changed in the admin console. These write the changes to a separate file called a deployment plan. It allows you to change performance and environment settings without disturbing the original EAR file.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Problem configuring SOA suite to use OID for authentication

    We are in the process of rebuilding our environment to use the full SOA suite with our OID server for authentication (was previously just BPEL using AD directly), and have encountered several problems (below). We have rebuilt the OID server, and reinstalled the SOA suite into a clean ORACLE_HOME to no avail.
    We first rebuilt the OID server using the following steps (derived from Oracle® Internet Directory Administrator's Guide):
    1)     Create the Import and Export profiles for AD synchronization. We did this using the Directory Integration and Provisioning Server Administration tool under “Active Directory Configuration”
    2)     Modify the map file to specify the correct OU mappings between AD and OID.
    3)     Update the profile with the new map file using “dipassistant.bat mp”
    4)     Bootstrap the import profile using “dipassistant.bat bootstrap”
    5)     Start a new instance of the Integration server (odisrv) running on config set 1 (the config set containing the Active Directory import/export profiles) using “oidctl”
    6)     Set the Import profile to Enable. The OID server does not export changes to AD in our current configuration, so the Export profile is left on disable (and not bootstrapped)
    At this point it appears that the AD synchronizes correctly into our new OID server.
    Next we installed the SOA suite:
    1)     We ran “irca.bat” on our database server to create the ORABPEL, ORAESB, and ORAWSM schemas and associated integration repository structure.
    2)     After launching the SOA suite installer, we selected Advanced Install.
    3)     On the next screen, we selected J2EE Server, Web Server, and SOA Suite.
    4)     We then provided the credentials for our Oracle database, and the passwords for ORABPEL, ORAESB, and ORAWSM.
    5)     We configured our new AS instance as an administration instance, but did not opt to use from a separate HTTP server, and did not make this instance part of an OAS cluster topology.
    And finally, we configured our new SOA suite instance to use OID for authentication (using the instructions in Oracle® BPEL Process Manager Administrator's Guide section 2.1.3):
    1)     Used the configure_oid.bat command to seed OID with required users only.
    2)     Logged into the OracleAS Control Console
    3)     Chose the oc4j_soa instance, then Administration->Security->Identity Management
    4)     Configured the OID server using a non-ssl connection and the cn=orcladmin account.
    5)     When prompted, chose to reconfigure all applications in the oc4j_soa instance to OID, but not to use SSO for any of them.
    6)     Copied the contents of ORACLE_HOME\j2ee\home\config\jazn.xml to ORACLE_HOME\j2ee\oc4j_soa\config\jazn.xml
    7)     Restarted the application server.
    After this procedure, we encountered the following issues:
    1)     The BPEL console appears to authenticate users correctly out of OID, but no users have access to the default domain, including bpeladmin and oc4jadmin. All users receive a similar access denied message when attempting to log into the BPEL Admin Console.
    2)     We cannot upload a BPEL process to our new server via JDeveloper’s standard BPEL deployment mechanisms. The connection appears to be working properly and passes all tests, but on uploading a process we get a Java AccessDeniedException. ESB appears to be functioning properly, and accepts uploaded projects without issue.

    Bassman,
    We recently configured our SOA Suite to use OID and SSO. We had the same issues you are having, and we found the resolutions in a blog from Jaas Poot (http://blog.jpoot.com/category/oracle-appserver/oid-ldap/). For the BPEL domain access, this involved going to the data-sources.xml file and changing the database passwords from using ->pwForOrabpel for the orabpel schema and ->pwForOraesb for the oraesb schema to the real passwords; the blog explains more about this.
    The blog also covers the JDeveloper deployment issue, and another issue we encountered, where we couldn't access the BPEL Admin console. All of these were resolved following the steps in the blog.
    Hope this helps
    Candace

Maybe you are looking for

  • Att: Steve - Customer's Deserve FREE Video Support (NOT DVD RELATED)

    So in the end Steve, you cannot refute my logic on a factual basis, you can, and have only, disagreed with it based on YOUR perceptions. Perceptions that are fallible, just as my own are to a lesser or greater extent, based on the fact that your mind

  • How to activate completion for PHP in TextMate or  BBEDIT?

    Hi, I plan to use TEXTMATE or BBEDIT to program with PHP but I don't know how to install the Bundle or the plug-in for PHP Completion. I downloaded the plug-in PHPCodecompletion.tmbu and zipped it into user/library/application support/textMate/Bundle

  • Process chain name required for a infopackage

    Hi, Is there a table in BW that stores the process chain name and IP's in it. We need to find the names of process chains based on the Info package names. Regards, Adarsh Mhatre

  • 'Microsoft.SharePoint.Taxonomy.ScriptForWebTaggingUI' is null or not an object

    This is regarding SharePoint 2010 Search Refiners for people search. When I click on Show More option in Job Title or Building name Refiner, it doesn't expand and all I see is javascript error popping in IE status bar. 'Microsoft.SharePoint.Taxonomy.

  • Invalid Serial Number CS2

    I get a pop up window that says Personalize your software and when I put in the serial number it says it is invalid. I haven't changed computers or done anything. I used the program on Wed and then on Friday I went to use it again and that is when it