[resolved] ServletAuthentication weak() method in Weblogic 9.2 return false

I am working on migrating Weblogic custom Authentication provider from version 8.1.5 to 9.2.3
I recompiled the login modules implementation with necessary changes and JDK 1.5.0_12. It's deployed fine.
In login servelet I have the following code
ServletAuthentication sa = new ServletAuthentication(LOGIN_USERNAME_LABEL, LOGIN_PASSWORD_LABEL);
int authenticated = sa.weak(request, response);
The problem is, this code always return
ServletAuthentication.FAILED_AUTHENTICATION
instead of
ServletAuthentication.AUTHENTICATED
I debug through the implementation modules, all values passing from form and values returned form database were all correct, but result of weak() is not correct.
Anyone resolved similar issue before? any help will be appreciated.
Edited by: manetora on Jul 22, 2009 12:58 PM

The problem was solved.
When I deploy Custom Authentication Provider, I set the Control Flag to "SUFFICIENT"
Control flag for Default Weblogic Authentication Provider was set to "REQUIRED" by default.
This give error and return failed value when validating user login.
Custom Authentication Provider passed, but Default Weblogic Authentication Provider was not.
Fixing it by set control flag for both to "SUFFICIENT"!

Similar Messages

  • How to specify realm name when calling weak( ) method on ServletAuthentication class?

    I've created a bunch of custom realms and for a specific user logon (form based "uname" and "pword"), the system knows exactly which custom realm to look up against. However, in using ServletAuthentication class, one can only specify realm name in strong(req, res, realmName), not the weak() method. Any clue?
    -john

    Hi John,
    Did you find the answer to this question? I'm having a similar problem when calling the ServletAuthentication.assertIdentity() method.
    Cheers,
    Vidar

  • How to use ServletAuthentication.weak(...)

    In order to have my application (behind a servlet) decide when to collect
    user credentials and when to login (authenticate), it appeared from the
    javadoc
    and from other postings and responses I've seen that I should be able to use
    the
    weblogic.servlet.security.ServletAuthentication class
    Well, I tried it last night and was sure it was working, but now the ONLY
    time it's returning AUTHENTICATED status is if I'm already logged in, via
    that browser/session using HTTP Basic Auth (I setup a security constraint
    for SnoopServlet that requires basic auth login, and I added the following
    code to a copy - SnoopServlet2 that does not require authentication (no
    security constraint)). Only if I login via basic auth for SnoopServlet can
    I then run SnoopServlet2 and have the below weak() authentication call
    succeed. If I start up a new browser (thus no authentication) and try
    SnoopServlet2 first I get FAILED_AUTHENTICATION every time,
    until I login via SnoopServlet (even via a different account) and then come
    back and try SnoopServlet2 with the below weak() call with either the same
    user as I used for SnoopServlet or a different user.
    Should I be able to programatically authenticate (and have the WebLogic
    session treat me as authenticated after that) like this or is that not
    supported?
    If it should work, what am I doing wrong? Do I need to call some other
    setup first if I'm programatically authenticating within a servlet that's
    not
    forcing authentication via security constraint? NOTE: I'm doing this
    through
    a caching realm which is using the WL6.0SP1 LDAP realm, which are working
    through HTTP Basic Auth for servlets with security constraints.
    // Call the password based (weak) authentication method
    int status =
    weblogic.servlet.security.ServletAuthentication.weak(user,pwd,
    req);
    switch (status) {
    case
    weblogic.servlet.security.ServletAuthentication.AUTHENTICATED:
    out.println("<h3>AUTHENTICATED</h3>");
    break;
    case
    weblogic.servlet.security.ServletAuthentication.FAILED_AUTHENTICATION:
    out.println("<h3>FAILED AUTHENTICATION</h3>");
    break;
    default:
    out.println("<h3>Unknown Authentication Status: " + status +
    "</h3>");
    Thanks,
    ..Mike
    [email protected]

    I believe I have this working better now (but could still use some info on
    whether
    this is a supported method of authenticating instead of using HTTP Basic
    Auth
    or Forms support, where my servlet authenticates a user based on info it
    retrieves
    and then that user (based on their WL authenticated session) is
    automatically
    authenticated for other servlets that are protected by security
    constraints... The
    javadoc says a bit about how to use this API, but not much about it's
    intended
    use, behavior, gotchas...
    Anyway, what I did to get it working (without previously having
    authenticated) was:
    weblogic.servlet.security.ServletAuthentication.weak(user,pwd,
    req.getSession(true));
    instead of:
    weblogic.servlet.security.ServletAuthentication.weak(user,pwd,
    req);
    It looks like the latter call (that I tried first) doesn't set up the
    session for you if
    you don't already have one... The first call above, makes sure you have a
    session
    and passes that in instead of the request.
    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    In order to have my application (behind a servlet) decide when to collect
    user credentials and when to login (authenticate), it appeared from the
    javadoc
    and from other postings and responses I've seen that I should be able touse
    the
    weblogic.servlet.security.ServletAuthentication class
    Well, I tried it last night and was sure it was working, but now the ONLY
    time it's returning AUTHENTICATED status is if I'm already logged in, via
    that browser/session using HTTP Basic Auth (I setup a security constraint
    for SnoopServlet that requires basic auth login, and I added the following
    code to a copy - SnoopServlet2 that does not require authentication (no
    security constraint)). Only if I login via basic auth for SnoopServletcan
    I then run SnoopServlet2 and have the below weak() authentication call
    succeed. If I start up a new browser (thus no authentication) and try
    SnoopServlet2 first I get FAILED_AUTHENTICATION every time,
    until I login via SnoopServlet (even via a different account) and thencome
    back and try SnoopServlet2 with the below weak() call with either the same
    user as I used for SnoopServlet or a different user.
    Should I be able to programatically authenticate (and have the WebLogic
    session treat me as authenticated after that) like this or is that not
    supported?
    If it should work, what am I doing wrong? Do I need to call some other
    setup first if I'm programatically authenticating within a servlet that's
    not
    forcing authentication via security constraint? NOTE: I'm doing this
    through
    a caching realm which is using the WL6.0SP1 LDAP realm, which are working
    through HTTP Basic Auth for servlets with security constraints.
    // Call the password based (weak) authentication method
    int status =
    weblogic.servlet.security.ServletAuthentication.weak(user,pwd,
    req);
    switch (status) {
    case
    weblogic.servlet.security.ServletAuthentication.AUTHENTICATED:
    out.println("<h3>AUTHENTICATED</h3>");
    break;
    case
    weblogic.servlet.security.ServletAuthentication.FAILED_AUTHENTICATION:
    out.println("<h3>FAILED AUTHENTICATION</h3>");
    break;
    default:
    out.println("<h3>Unknown Authentication Status: " + status+
    "</h3>");
    Thanks,
    ..Mike
    [email protected]

  • ServletAuthentication.weak() makes isUserInRole() always return false

    I have a problem with SSO and authentification. If I authenticate with the weak()
    method(have tried alle of them) authentication works fine and it seem to be single
    signed-on, but
    if we call the isUserInRole() method it always return false.
    If I try to "call" pages from the client the declerativ security-constraints also
    works fine preventing the user from accessing the pages. It is only when we use
    the forward() method that we also use isUserInRole() to check if the user is permitted
    to be forwarded(). WLS 6.1 sp2 tells us that the user is never in Role, no matter
    what, if we use the weak() method to authenticate.
    If I switch to using a j_sec_check form to authenticate the isUserInRole() works
    fine. I can't use j_sec_check as a permanent solution though, because I need to
    do a lot of pre- and post- processing in the login/authenication process.
    Have any of you figured out a solution to this problem? Shouldn't isUserInRole()
    work the same way regardless of if you logged in using SA.weak() or a j_security_check
    form?

    Hi ,
    If I switch to using a j_sec_check form to authenticate the isUserInRole()works
    fine. I can't use j_sec_check as a permanent solution though, because Ineed to
    do a lot of pre- and post- processing in the login/authenication process.You can use the j_security_check and still do the pre and post processing as
    you want.
    You have to following code,
    package examples.servlets;
    import java.io.PrintStream;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import weblogic.servlet.security.AuthFilter;
    public class AuthFilterImpl extends AuthFilter
    public AuthFilterImpl()
    System.out.println("New AuthFilterImpl has been created.");
    public void doPreAuth(ServletRequest servletrequest, ServletResponse
    servletresponse)
    System.out.println("AuthFilterImpl.doPreAuth has been called.");
    System.out.println("Password is " +
    servletrequest.getParameter("j_password"));
    public boolean doSuccessAuth(ServletRequest servletrequest,
    ServletResponse servletresponse)
    System.out.println("AuthFilterImpl.doSuccessAuth has been called.");
    return true;
    public void doFailAuth(ServletRequest servletrequest, ServletResponse
    servletresponse)
    System.out.println("AuthFilterImpl.doFailAuth has been called.");
    In your weblogic.xml have this entry,
    <weblogic-web-app>
    <auth-filter>
    examples.servlets.AuthFilterImpl
    </auth-filter>
    </weblogic-web-app>
    I am not sure about problem with SA.weak().
    -utpal
    "Morten" <[email protected]> wrote in message
    news:[email protected]...
    >
    I have a problem with SSO and authentification. If I authenticate with theweak()
    method(have tried alle of them) authentication works fine and it seem tobe single
    signed-on, but
    if we call the isUserInRole() method it always return false.
    If I try to "call" pages from the client the declerativsecurity-constraints also
    works fine preventing the user from accessing the pages. It is only whenwe use
    the forward() method that we also use isUserInRole() to check if the useris permitted
    to be forwarded(). WLS 6.1 sp2 tells us that the user is never in Role, nomatter
    what, if we use the weak() method to authenticate.
    If I switch to using a j_sec_check form to authenticate the isUserInRole()works
    fine. I can't use j_sec_check as a permanent solution though, because Ineed to
    do a lot of pre- and post- processing in the login/authenication process.
    Have any of you figured out a solution to this problem? Shouldn'tisUserInRole()
    work the same way regardless of if you logged in using SA.weak() or aj_security_check
    form?

  • GET makes ServletAuthentication.weak() fail

    Hi,
    I have a strange problem. I've written a servlet, which calls
    ServletAuthentication.weak( ... ). My servlet implements both doGet and
    doPost, where both methods call a handleRequest() method.
    I've then made a FORM, where the user can write his username and password.
    The FORM uses POST.
    When I use the FORM, to access my servlet, it works. When i use GET, it
    doesn't.
    What's happening is, that the call to weak(...) calls up in the realm, but
    the realm doesn't call the authenticate code on my implementation of
    RDBMSRealm.
    Hmmm .. does anybody know of any differences between GET and POST request,
    with respect to authentication realm in WLS?
    I'm using:
    -WLS6.1
    -RDBMSRealm
    Any comments appreciated!
    Regards, Per Olesen

    Hi,
    I have a strange problem. I've written a servlet, which calls
    ServletAuthentication.weak( ... ). My servlet implements both doGet and
    doPost, where both methods call a handleRequest() method.
    I've then made a FORM, where the user can write his username and password.
    The FORM uses POST.
    When I use the FORM, to access my servlet, it works. When i use GET, it
    doesn't.
    What's happening is, that the call to weak(...) calls up in the realm, but
    the realm doesn't call the authenticate code on my implementation of
    RDBMSRealm.
    Hmmm .. does anybody know of any differences between GET and POST request,
    with respect to authentication realm in WLS?
    I'm using:
    -WLS6.1
    -RDBMSRealm
    Any comments appreciated!
    Regards, Per Olesen

  • Can not resolve symbol in method showMessageDialog

    I tried to dispaly a mesg using JOptionPane, it gives error mesg like
    HWS.java:27: cannot resolve symbol
    symbol : method showMessageDialog (<anonymous java.awt.event.ActionListener>,j
    ava.lang.String,java.lang.String,int)
    location: class javax.swing.JOptionPane
    JOptionPane.showMessageDialog (this, "The","Exit", JOptionPane.INFORMATION_M
    ESSAGE);
    ^
    pls help.
    Sabarish
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class HWS extends JFrame{
    public HWS() {
    super("Learning...");
    setSize(300,300);
    JLabel label2 = new JLabel("Jegan Rao");
    JButton button = new JButton("Click here");
    Container pane = getContentPane();
    pane.setLayout(new FlowLayout());
    pane.add(button);
    pane.add(label2);
    ActionListener al = new ActionListener(){
    public void actionPerformed (ActionEvent ae){
    JOptionPane.showMessageDialog (this, "The","Exit", JOptionPane.INFORMATION_MESSAGE);
    button.setHorizontalAlignment(JButton.CENTER);
    button.addActionListener(al);
    button.setVerticalAlignment(JButton.CENTER);
    label2.setHorizontalAlignment(JLabel.CENTER);
    label2.setVerticalAlignment(JLabel.CENTER);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    pack();
    setVisible(true);
    public static void main(String [] args){
    HWS h = new HWS();
    }

    Please post code using the code tags. There is a code button when you enter text for your message. Click on it then paste your code between the tags.
    All of the JOptionPane showMessageDialog() methods require a Component as the first object argument. Your code calls showMessageDialog from inside an actionPerformed() method, which is inside an ActionListener. So 'this' is an ActionListener, not a JFrame or other Component.
    Are you sure you want to call up a dialog in an actionPerformed() method? This method is called from the event thread, and blocks this thread until the dialog completes. This means no events can occur until the dialog completes, but it may require an event to complete the dialog.

  • Why do we use ejbCreate() method? what does it returns?

    why do we use ejbCreate() method? what does it returns?

    People think its easier to get answers handed tothem
    instead of looking...I do my best to disabuse them of that notion.I've given up on that idea, too much hard work.
    Instead I've just written off the entire current generation of schoolkids as useless, good only for (at most) menial labour.

  • Help! isReachable method returns false while port 7 was prohibited

    SUN said about isReachable method as follow :
    A typical implementation will use ICMP ECHO REQUESTs if the privilege can be obtained, otherwise it will try to establish a TCP connection on port 7 (Echo) of the destination host.
    but when I prohibited port 7 of the destination host, the isReachable method only returns false while I can ping successfully.
    ta

    Hi Kevin,
    This forum is exclusively for discussion on Sun Java Studio Creator. I however found this thread which discusses about the isReachable method on the Java Programming forum.:
    http://forum.java.sun.com/thread.jspa?threadID=628686
    Please take a look at the thread as it might help you.
    Cheers
    Giri :-)
    Creator Team

  • Init method in Weblogic 5.1 gives  problem

              I have used init method in 4.5
              the same method gives problem in 5.1
              C:\weblogic\myserver\classfiles\jsp_servlet\_addcontract.java:89: The method void init(javax.servlet.ServletConfig) declared in class jsp_servlet._addcontract cannot override the final method of the same signature declared in class weblogic.servlet.jsp.JspBase. Final methods cannot be overridden.
              probably occurred due to an error in /addContract.jsp line 11:
              

    Use jspInit method.
              harish <[email protected]> wrote:
              > I have used init method in 4.5
              > the same method gives problem in 5.1
              > C:\weblogic\myserver\classfiles\jsp_servlet\_addcontract.java:89: The method void init(javax.servlet.ServletConfig) declared in class jsp_servlet._addcontract cannot override the final method of the same signature declared in class weblogic.servlet.jsp.JspBase. Final methods cannot be overridden.
              > probably occurred due to an error in /addContract.jsp line 11:
              Dimitri
              

  • Disable HTTP Methods from Weblogic 8.1 SP6

    Hi... I want to disable some HTTP Methods (such as DELETE, PUT, TRACE) from my Weblogic. I have a lot of deployed applications and I want to avoid request to dev team edit each web.xml file. Is there any way to disable them at weblogic level? Thanks in advance

    Nodemanager listens over SSL in WLS 8.1 SP6, you cant change it to listen over plain.
    Its possible only in later versions.
    Make the Nodemanger run over SSL.
    You might find this blog useful.
    http://secure-zone.blogspot.com/2010/03/ssl-exceptions-in-admin-server-and-node.html
    HTH,
    Faisal

  • Problems with post-method in weblogic-server 6.0

    Hello,
              I tried to implement a servlet in Visual Cafe working with weblogic 6.0.
              As I used the get-method it worked fine, but as I used the post-method
              I got the following java.lang.IllegalArgumentException:
              bad URLMatchMap path:''
              Does anybody know about this error and where I would have to set the
              path-variable. I have already registered the servlet in web.xml
              Thanx for your help
              Thorsten
              

              Try installing SP1. In SP1 a bug regarding POST using HTTPS has been fixed. Check
              the bug id 041234 in this link
              http://edocs.bea.com/wls/docs60/notes/bugfixes2.html#1073617
              Shiva.
              "Raju" <[email protected]> wrote:
              > Hi,
              >>
              >> We are using Weblogic server 6.0 with out service pack 1.0.
              >>
              >> I am having problem with Https POST, i am using port 7002. and when
              >i use
              >> https post servlet hangs for lot of time. But when i use Https using
              >GET,it
              >> works fine.
              >>
              >> Did any one face the problems.
              >>
              >> Thanks in Advance.
              >>
              >> Raju
              >>
              >
              >
              >
              

  • How to resolve BEA KODO license on WebLogic Server

    Using BEA Workshop Studio 3.2 you can create Kodo provided JPA project. As part of the project creation the BEA Kodo license (license.bea) file is included within Project/src folder, so that it is available in the classpath. While running the project on WebLogic server you might face license error "kodo.persistence.PersistenceException: No product license key was found..."
    The fix for this issue is to merge the kodo license.bea content into WebLogic server license.bea file.
    Edit WebLogic-server-Home\license.bea file
    Edit Project\src\license.bea file, copy the content <license-group.. > .. </license-group> and paste inside WebLogic-server-Home\license.bea file NOTE: Paste the kodo license content within enclosing <bea-licenses> ... </bea-licenses> but outside of <license-group format="1.0" product="WebLogic Platform" release="xx"> tag.
    With this you should be able to run the kodo project on WebLogic server.

    follow this doc http://docs.oracle.com/cd/E35287_01/fusionapps.7964/e14849.pdf
    mark if it helps

  • Cannot resolve symbol: symbol: method getContentPane()

    ok, here is my code, why am I getting this error??
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class Jsmileface extends Applet implements ActionListener
         JButton pressButton = new JButton("Press Me");
         private AudioClip sound;
         public void init()
              sound = getAudioClip(getCodeBase(), "HaveANiceDay.wav");
              Container con = getContentPane();
              con.setLayout(new FlowLayout());
              con.add(pressButton);
              pressButton.addActionListener(this);
         public void paint(Graphics g)
                   g.setColor(Color.yellow);
                   g.fillOval(50,50,100,100);
                   g.setColor(Color.black);
                   g.fillOval(75,75,10,10);
                   g.fillOval(100,75,10,10);
                   g.drawArc(75,75,50,50,200,140);          
         public void start()
                   sound.loop();
         public void stop ()
                   sound.stop();
              public void actionPerformed(ActionEvent r)
                   Object source = r.getSource();
                   if (source == pressButton)
                             repaint();
    }     

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Jsmileface extends JApplet implements ActionListener{
    JButton pressButton = new JButton("Press Me");
    private java.applet.AudioClip sound;
    private String str = "";
       public void init(){
          sound = getAudioClip(getCodeBase(), "HaveANiceDay.au");
          Container con = getContentPane();
          con.setLayout(new FlowLayout());
          JPanel pan = new JPanel();
          pan.add(pressButton);
          con.add(pan);
          pressButton.addActionListener(this);
          sound.loop();
         public void paint(Graphics g)     {
          g.setColor(Color.yellow);
          g.fillOval(50,50,100,100);
          g.setColor(Color.black);
          g.drawString(str,60,170);
          g.fillOval(75,75,10,10);
          g.fillOval(100,75,10,10);
          g.drawArc(75,75,50,50,200,140);
       public void destroy(){
          sound.stop();
       public void actionPerformed(ActionEvent r){
          Object source = r.getSource();
          if (source == pressButton){
             str = "Button pressed";
             repaint();
    }

  • Problem calling a method in a servlet witch returns remote ejb

    Hi, I have a problem combining servlets ands ejbs, I expose my problem :
    What I have :
    1 . I have a User table into a SGBD with two attributes login and pass.
    2 . I have a UserBean linked to User table with a remote interface
    3 . I have a stateless UserSessionBean with a remote interface
    4 . I have a UserServlet linked to a jsp page which allows me to add users
    5 . I use Jboss
    What is working ?
    1 - I have a method newUser implemented in my UserSessionBean :
    public class UserSessionBean implements SessionBean {
      private SessionContext sessionContext;
      private UserRemoteHome userRemoteHome;
      public void ejbCreate() throws CreateException {
      // Initialize UserRemoteHome
      // Method to add a new user
      public UserRemote newUser(String login, String password) {
            UserRemote newUser = null;
            try {
                newUser = userRemoteHome.create(login, password);
            } catch (RemoteException ex) {
                System.err.println("Error: " + ex);
            } catch (CreateException ex) {
                System.err.println("Error: " + ex);
            return newUser;
    }2 - When I test this method with a simple client it works perfectly :
    public class TestEJB {
        public static void main(String[] args) {
            Context initialCtx;
            try {
                // Create JNDI context
                // Context initialization
                // Narrow UserSessionHome
                // Create UserSession
                UserSession session = sessionHome.create();
                // Test create
                UserRemote newUser = session.newUser("pierre", "hemici");
                if (newUser != null) {
                    System.out.println(newUser.printMe());
            } catch (Exception e) {
                System.err.println("Error: " + e);
                e.printStackTrace();
    Result : I got the newUser printed on STDOUT and I check in the User table (in the SGBD) if the new user has been created.
    What I want ?
    I want to call the newUser method from the UserServlet and use the RemoteUser returned by the method.
    What I do ?
    The jsp :
    1 - I have a jsp page where a get information about the new user to create
    2 - I put the login parameter and the password parameter into the request
    3 - I call the UserServlet when the button "add" is pressed on the jsp page.
    The Servlet :
    1 - I have a method doInsert which call the newUser method :
    public class UserServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html";
        // EJB Context
        InitialContext ejbCtx;
        // Session bean
        UserSession userSession;
        public void init() throws ServletException {
            try {
                // Open JNDI context (the same as TestClient context)
                // Get UserSession Home
                // Create UserSession
                userSession = userSessionHome.create();
            } catch (NamingException ex) {
                System.out.println("Error: " + ex);
            } catch (RemoteException ex) {
                System.out.println("Error: " + ex);
            } catch (CreateException ex) {
                System.out.println("Error: " + ex);
        protected void service(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
         * Does insertion of the new user in the database.
        public void doInsert(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
            try {
                // Get parameters to create the newUser
                String login = req.getParameter("login");
                String password = req.getParameter("password");
               // Create the newUser
                System.out.println("Calling newUser before");
                UserRemote user = userSession.newUser(login, password);
                System.out.println("Calling newUser after");
            } catch (Exception e) {
        // Clean up resources
        public void destroy() {
    Result :
    When I run my jsp page and click on the "add" button, I got the message "Calling newUser before" printed in STDOUT and the error message :
    ERROR [[userservlet]] Servlet.service() for servlet userservlet threw exception
    javax.servlet.ServletException: loader constraints violated when linking javax/ejb/Handle class
         at noumea.user.UserServlet.service(UserServlet.java:112)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    Constat :
    I checked into my SGBD and the new user has been created.
    The error appears only when the method return Remote ejbs, if I return simples objects (Strings, int..) it works.
    What can I do to resolve this problem ?
    Thank you.

    "Why do you want to servlet to gain access to another EJB through the stateless session bean. Why cant the servlet call it directly ?"
    Because I want to access to the informations included in the entity bean UserBean (which is remote).
    You said that it is a bad design, but how can I access to my UserBean ejbs from the session bean if I don't do that ?
    For example I want a List of all users to be seen in a jsp page :
    1 - I call the method getUserList which returnsan ArrayList of UserRemote.
    2 - I iterate over the ArrayList to get the users parameters to be seen.
    As the other example (newUser), when I do
    ArrayList users = (ArrayList) userSession.getUserList(); with the simple client it works, but in the servlet I got the same error.
    But, if I call directly the findAll method (as you'are saying) in the servlet
    ArrayList users = (ArrayList) userRemoteHome.findAll(); it works...
    I think that if my servlet calls directly entity ejbs, I don't need UserSession bean anymore. Is that right ?
    I precise that my design is this :
    jsp -> servlet -> session bean -> entity bean -> sgbd
    Is that a bad design ? Do I need the session bean anymore ?
    Thank you.

  • TestPool method of data source is returning some strange value!!

    Hi All
    I am trying test a data source connection using the mbean api: testPool. It is giving me some weird output like:
    <method $Proxy18.testPool of $Proxy18 instance 5>
    My code:
         connect('weblogic', 'weblogic1', 't3://localhost:7101')
         serverRuntime()     
         dsMBeans = cmo.getJDBCServiceRuntime().getJDBCDataSourceRuntimeMBeans()
         ds_name = "ApplicationDB"
         for ds in dsMBeans:     
              if (ds_name == ds.getName()):
                   print 'DS name is: '+ds.getName()
                   print 'State is ' +ds.getState()
                   print ds.testPool
    I get the following output:
    DS name is: ApplicationDB
    State is Running
    <method $Proxy18.testPool of $Proxy18 instance 5>
    What does '<method $Proxy18.testPool of $Proxy18 instance 5>' mean?

    Hi,
    If you want to Test the DataSource then ...please change the last line as :
    print ds.testPool()
    Example: Below
    connect('weblogic', 'weblogic', 't3://localhost:7001')
    serverRuntime()
    dsMBeans = cmo.getJDBCServiceRuntime().getJDBCDataSourceRuntimeMBeans()
    ds_name = "testDS"
    for ds in dsMBeans:
         if (ds_name == ds.getName()):
             print 'DS name is: '+ds.getName()
             print 'State is ' +ds.getState()
    <font color=maroon>*         print ds.testPool()*</font>
    <BR>
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

Maybe you are looking for

  • Language files for non-official Skype languages av...

    Skype bundles a number of languages with the standard installation file but there are more languages available for the interface. Some of these are really hard to find on the forum or web so to make life easier, some translators have opened a project

  • How to share a folder with java? in netbios in windows

    hi. I want to write a programa that user can select a directory than click the share button and the directory will be shared to other pcs. the other pcs can acces this directory like \\servername\shareddirectory the question is this. how can i share

  • Nano does not appear in Itunes. Most of the time.

    Ah, I need help. I received my Ipod nano on Tuesday, and here it is Saturday, and it still isn't working properly. What it can't do: - Itunes does not recognize the Ipod Nano; under preferences, it says that no Ipod is connected - Cannot be found in

  • MM invoice.

    Pricing procedure is as below: Z0PL - List price - 100 Z0SR - Recylce fee - 16 Net value -116 The Purchaser order created against thirdpary sales order . I.e. it is having accounting assignment details and Items are not GR based IV selected. Step1) W

  • How to create new event in new hard drive

    i brought new mac n im doing editing in fcp x since 2 weeks, so i have only 1 tera hard driveand its almost full. now i need to do lot more. so im thinking to have extra hard drive. n my qestion is that can i use any hard drive or i need to have only