WLST, how do I suppress unwanted stack traces and make WLST less verbose?

Hi everyone,
I've just started out with WLST but have ended up somewhat confused. My script works as intended but is very verbose.
Suppose I want to log in:
try:
     connect(user, "wrong_password", url)
except WLSTException, err:
     print str(err)
     print "Run with option \"-h\" for help"The password is wrong so I get something like this printed out by me:
{noformat}
Error occured while performing connect : User: wm714, failed to be authenticated. Use dumpStack() to view the full stacktrace
{noformat}
But I also get a totally unwanted Java stack trace (before my message):
{noformat}This Exception occurred at Fri May 21 15:49:01 CEST 2010.
javax.naming.AuthenticationException [Root exception is java.lang.SecurityException: User: wm714, failed to be authenticated.]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:42)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:783)
at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:677)
{noformat}
I don't want to confuse the user with all that! I found this:
http://objectmix.com/weblogic/529822-wlst-exception-handling-unwanted-stack-trace.html
Which discusses WLS.commandExceptionHandler.setSilent(1) I'm running on WLS 10.3.0.0 and can execute that statement but it has no effect. I didn't even know about the WLS-object and I can find no documentation on commandExceptionHandler.
On the matter of verbosity, is there any way to get rid of stuff like:
Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)I avoid using the "interactive" commands like cd and use stuff like getMBean("domainRuntime:/ServerRuntimes/" + appServer.getName()
+ "/JMSRuntime/" + appServer.getName() + ".jms/JMSServers") but I still get the clutter printed out.
Thanks!

Workaround:
wlstOut = tempfile.mktemp(suffix="_wlst.txt")
redirect(wlstOut, "false")
... do useful stuff
stopRedirect()
os.remove(wlstOut)I would have preffered to turn off the messages (yes I could try /dev/null) but this will do. A funny thing is that the stack trace I wrote about doesn't appear in the log file. Somehow "redirect" must have a nice side effect.
/Roger

Similar Messages

  • Oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters

    Dear Guru's,
    I am not able to solve the above issue for last couple of days.
    I am newbie to the webservice
    My Issue...
    I am using Jdeveloper 11.1.2.4.0 Release 2
    1. Using Jdev I built one small Web Service with two methods.
            While testing the Webservice...
                   I passed User Id as Parameter and it successfully return the values (user id, user name and description) from fnd_user table
    2. I created another application to consume the web service i created.
                   1. I added the webservice SOAP and added the method.
                   2. Created a jsf page and drag and drop the parameter and return values to the jsf page.
    3. While executing the created jsf page I received the error message as below
    "oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters are {0=Attribute, 1=UserName, 2=UserName}"
    Even I know that this issue is repeated one in our forum, I was not able to solve this issue.
    Can anybody help to solve this issue.
    Thanks and Regards,
    Durai S E

    Dear Guru's,
    I am not able to solve the above issue for last couple of days.
    I am newbie to the webservice
    My Issue...
    I am using Jdeveloper 11.1.2.4.0 Release 2
    1. Using Jdev I built one small Web Service with two methods.
            While testing the Webservice...
                   I passed User Id as Parameter and it successfully return the values (user id, user name and description) from fnd_user table
    2. I created another application to consume the web service i created.
                   1. I added the webservice SOAP and added the method.
                   2. Created a jsf page and drag and drop the parameter and return values to the jsf page.
    3. While executing the created jsf page I received the error message as below
    "oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters are {0=Attribute, 1=UserName, 2=UserName}"
    Even I know that this issue is repeated one in our forum, I was not able to solve this issue.
    Can anybody help to solve this issue.
    Thanks and Regards,
    Durai S E

  • HT3702 I would like to remove the credit card info from my account and only use iTunes prepaid cards. How do I take care of this and make sure that payment will be taken from iTunes cards? Thanks

    I would like to remove credit card info from account and only use iTunes prepaid cards. How do I take care of this and make sure payments are takin from the iTunes cards? Also, I need to change my last name and address on account.

    Hi Alexis ...
    I need to change my last name and address on account.
    Help here >  How to change the name you use for your Apple ID
    I would like to remove credit card info from account and only use iTunes prepaid cards.
    Help here >  Create an iTunes App Store account without a credit card

  • How do i delete my icloud account and make a new one

    How do i delete my icloud account and make a new one

    You can't delete it. You can only stop using it or you can modify it.
    apple id.apple.com

  • How can I click on a button and make a text box appear or disappear

    How can I click on a button and make a text box appear or disappear?
    Thanks ahead of time for your help,
    Doug

    Hi Denes,
    I just thought that the example you pointed the OP to, is far more complex than what I understood he needs. The OP was talking about using a button, which I thought was a very basic and simple case. Your example is much more complicated. If memory serves, the radio group item, at the time (prior to 3.1 fieldset) behaved differently, so you needed to create a new value retrieving function, and then was the need to preserve the items show/hide status upon reloading the page. In short, I thought maybe I didn’t see the complexity in the OP post, but it seems that his requirement was indeed a simple one.
    Regards,
    Arie.

  • HT4865 right now i share an icloud with my sisters phone how do i log out of hers and make my own for my own phone without deleting either of our apps etc?

    right now i share an icould with my sister's phone how do i log out of hers and make my own for my phone without deleting either of our apps etc on our phone?

    You don't need to worry about apps.  You can continue to share the same ID for the iTunes and App stores but in order to create a new iCloud account you will need to use a different ID (it doesn't need to be the same as your iTunes ID).
    To migrate your phone to your own account,  if you have any photos in photo stream that you want to save on your phone, open your my photo stream album and save them to the camera roll by tapping Edit, then tap all the photos you want to save, tap Share and tap Save to Camera Roll. 
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  Your sister's phone will not be effected by this.)  When prompted about what to do with the iCloud data, be sure to select Keep On My iPhone.  Next, set up your new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.
    Once your phone is on its own account, you can go to icloud.com on your computer, sign into your account and manually delete any of your sister's data from your account.  She can also delete any of your data from her account.

  • Suppressing complete stack trace in getMessage()

    How do I get the message (using getMessage() method on the trapped exception) from
    a remotely thrown (inside of an ejb) exception. The getMessage returns the COMPLETE
    stack dump and somewhere in the deep, mentions in the passing , a "nested exception".
    I want this "nested exception"'s message. I have turned off the "Implement Stack
    Traces" option in the debug screen of the server. What else do I need to do? What
    am I doing wrong.
    Thanks

    Try posting in WebLogic Server forum:
    WebLogic Server - General

  • Unwanted stack trace in weblogic.log for thrown JSP Exceptions

    We are throwing a JSP exception within a custom tag when data validation
              errors occur; the errorPage for the JSP page is then invoked to show the
              appropriate errors. However, in the weblogic.log, a stack trace is shown
              indicating the exception (example below). We do not want this stack track
              shown unless there is a real "error" in our system vs. invoking the
              errorPage to show "application" errors. Is there any way to supress this,
              as we are not explicitly causing this to happen. It appears to be a
              weblogic feature. This causes us problems in finding true system errors
              that might be occurring due to these non-problems showing up in the
              weblogic.log.
              Thanks for the help.
              John Bauer
              Wed Dec 20 15:34:49 EST 2000:<E> <ServletContext-General> exception raised
              on '/test/test.jsp'
              javax.servlet.ServletException: runtime failure in custom tag 'testtag'
              at jsp_servlet._test._test._jspService(_test.java:89)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :124)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:
              60)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:
              07)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager
              java:251)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:369)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              Code)
              

    The design of the data entry pages is such that the error page is the same
              page as the data entry page, and a validation JSP tag validates the data and
              if it finds a problem, it will set some variables and throw a JSP exception
              to redisplay the page. Unfortunately, we are forced to live with this
              design. Are you aware of any mechanism to suppress the automatic logging of
              thrown JSP exceptions in the weblogic log?
              Thanks,
              JDB
              Cameron Purdy <[email protected]> wrote in message
              news:[email protected]...
              > Exception handling for custom tags is very poorly handled right now. For
              > one thing, WL hides the actual exception.
              >
              > However, the way that you are doing this seems very odd. The error page
              is
              > for server errors, not user typos.
              >
              > Peace,
              >
              > --
              > Cameron Purdy
              > Tangosol, Inc.
              > http://www.tangosol.com
              > +1.617.623.5782
              > WebLogic Consulting Available
              >
              >
              > "John Bauer" <[email protected]> wrote in message
              > news:[email protected]...
              > > We are throwing a JSP exception within a custom tag when data validation
              > > errors occur; the errorPage for the JSP page is then invoked to show the
              > > appropriate errors. However, in the weblogic.log, a stack trace is
              shown
              > > indicating the exception (example below). We do not want this stack
              track
              > > shown unless there is a real "error" in our system vs. invoking the
              > > errorPage to show "application" errors. Is there any way to supress
              this,
              > > as we are not explicitly causing this to happen. It appears to be a
              > > weblogic feature. This causes us problems in finding true system errors
              > > that might be occurring due to these non-problems showing up in the
              > > weblogic.log.
              > >
              > > Thanks for the help.
              > > John Bauer
              > >
              > > Wed Dec 20 15:34:49 EST 2000:<E> <ServletContext-General> exception
              raised
              > > on '/test/test.jsp'
              > > javax.servlet.ServletException: runtime failure in custom tag 'testtag'
              > > at jsp_servlet._test._test._jspService(_test.java:89)
              > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > > at
              > >
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > > :124)
              > > at
              > >
              >
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > > l.java:
              > > 60)
              > > at
              > >
              >
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > > l.java:
              > > 07)
              > > at
              > >
              >
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              > > Manager
              > > java:251)
              > > at
              > >
              >
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:369)
              > > at
              > > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
              > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              Compiled
              > > Code)
              > >
              > >
              >
              >
              

  • How to get the complete Stack-Trace ?

    Hi,
    I'm getting the following error on the screen.
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement " INSERT INTO OTA.OTA_QUESTIONS(QUESTION_ID,TEXT,ALLOW_HTML_FLAG,OBJECT_VERSION_NUMBER,BUSINESS_GROUP_ID,START_DATE_ACTIVE) VALUES (:1,:2,:3,:4,:5,:6)".
    I want to get the complete stack-trace. I turned on the screen log, but still not getting the error-stack. Can anyone lemme know, how to get the complete error-stack ? This error is raised from a seeded page.
    Thanks,
    Guna.

    This is a developer raised exception and not a standard expection(depends on a profile), that is why you cannot see the error stack.You have to put system.out.println, to debug.You get such errors when there is some fundamental mistake and not framework exception.
    As the error says look into the query and see all bind variables are setting properly.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Stack traces and Errors - Portal

    Hello,
    I would like to know what information does the stack trace contain? Is this information, sensitive, can it lead to security threat?
    Errors presented on the portal screen, e.g. 500 Internal Server Error can that lead to security threat?
    If yes, What kind of error message can be presented and how can that be configured in portal?
    Thank you in advance.
    Best regards,
    Dharmi

    Hi,
    it's not a problem to change default error pages (see this [wiki|http://wiki.sdn.sap.com/wiki/display/EP/CustomizingErrorMessagesinPortal]). So you can minimize the risk of leaking sensitive information pretty easily. The users will get less scared  of error messages as well
    Cheers

  • General Stack Trace and Exception Question

    I hope this is the correct forum to post to ... well here goes...
    The Big Picture:
    I�m using the org.xml.sax package (along with their subsequent �helper� and �ext� packages) to parse huge XML files.
    Some references:
    DefaultHandler -> org.xml.sax.DefaultHandler (Default base class for SAX2 event handlers)
    CustomHandler -> mypackage.CustomHandler (which extends the above DefaultHandler)
    SAXException -> org.xml.sax.SAXException (thrown by many methods defined in the DefaultHandler)
    The story:
    I�ve made a class which extends the DefaultHandler class; (CustomHandler). The DefaultHandler class has a bunch of methods declared in it that I overwrite, which all claim to throw these SAXExceptions. My overwritten methods defined in CustomHandler had also been written to throw those SAXExceptions.
    My Overwritten Methods: (you�ll see why the �throw� part is commented a little later)
    //Methods in SAX DocumentHandler
        public void startDocument(){//throws SAXException{
        public void endDocument(){//throws SAXException{
        public void startElement(String uri, String localName, String qName, Attributes attrs){//throws SAXException{
        public void endElement(String uri, String localName, String qName){//throws SAXException{
        public void characters(char buf[], int offset, int len){//throws SAXException{
    The Code Executes like This:
    try{
         File xmlFile = new File(getFileName());
         CustomHandler myHandler = new CustomHandler();
         saxParser.parse(xmlFile, myHandler); //<- Important Line
         myHandler.reportSomeXmlInfoAboutTheFile(); //<- Ignore this command
    }catch(ParserConfigurationException pce){
                pce.printStackTrace();       
    }catch(SAXException sax){
                sax.printStackTrace();
    }catch(IOException ioe){
                ioe.printStackTrace();
    }Sample Stack Trace: (The ArrayIndexOutOfBoundsException was set up to be thrown for the sake of discussion)
    java.lang.ArrayIndexOutOfBoundsException: 5
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)
    at saxparserexercise.DriverClass.exercise(DriverClass.java:58) //<- Last (un Native to ME � not java) execution stack point
    at saxparserexercise.Main.<init>(Main.java:38)
    at saxparserexercise.Main.main(Main.java:59)
    The Problem:
    Its about my stack traces� they all map through the above noted �Important Line� instead of through my overwritten methods in CustomHandler (where I cause the ArrayIndexOutOfBoundsException) So, therefore I thought I�d try commenting out those �throws SAXException� parts in the method declarations of my CustomHandler class� Diddn�t change a thing. Thus my question is�
    The Question:
    What changes or modifications can I make such that the Stack Trace I receive will map to exactly where the problem occurs in my code� does that make sense?

    I suspect it may be because your version of Catalina was compiled without debugger support. From what I remember this strips line numbers from generated class files.
    You'll need to download either a debug-enabled version of Catalina, or pull down the source and rebuild the system.
    Unless I'm barking up the wrong tree.
    J

  • How to set up an address book and make labels with numbers or pages?

    How do you set up an address book and make labels with numbers or pages?

    Create an Apple ID - My Apple ID

  • How do I cut out imported objects and make background transparent?

    Illustrator CS3.
    I have embedded a jpeg picture which I need to cut out and make the background transparent. How do I do this? An opacity mask? How do I create a mask the same shape as the object I need to cut out? The object needs central pieces cut out too. Please help!

    Opacity mask of clipping path are the two ways to do this in Illustrator. Photoshop is the ideal program for this task.

  • Deleted recently added playlist how do i add back to playlist and make destination playlist for imports

    i deleted recently added playlist and want to add back, and make it destination for imported songs how do i do

    Howdy Mark,
    The Recently Added playlist is a Smart Album that has specific settings to automatically add new content to that playlist. It can be recreated manually if accidentally deleted, you can use this article named Archived - iTunes: How to create a Smart Playlist found here http://support.apple.com/kb/HT1801.
    Choose File > New Smart Playlist.
    To have iTunes add songs that match specific criteria, make sure to select "Match the following rule," then make your selections from the pop-up menus.
    For example, you might want iTunes to only add songs that are by a particular artist, or songs with at least a four-star rating.
    To add additional matching criteria, click the Add + button.
    Here are the parameters to use when you create the new Smart Album:
    1. Check the box that says Match the Following rule:
    2. Change the first set of criteria to Date Added, In the Last, 2, weeks.
    3. Add another line for criteria by clicking the + button
    4. The second set of criteria should be as follows. Media Kind, is not, podcast.
    5. Uncheck Limit To, and Match only checked items, and check Live Updating.
    That when that is done you will have a new smart playlist that you can rename to Recently Added by double clicking the smart album name.
    All the very best,
    Sterling

  • How do I fix Oracle Apache Trace and Track vulnerability?

    Hi All,
    After a vulnerability scan of our Oracle 10g (10.1.2.0.2) OID & Portal environments and Oracle 6i (9.0.2.2) Forms & Reports machines, I found a vulnerability with Trace & Track (http://www.kb.cert.org/vuls/id/867593) on these machines. The proposed fix for Apache is as follows:
    Apache HTTP Server
    To disable HTTP TRACE support, set TraceEnable Off.
    Alternatively, use the Apache mod_rewrite module to deny HTTP TRACE requests or to permit only the methods needed to meet site requirements and policy. TRACE requests can be disabled with the following mod_rewrite syntax:
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^TRACE
    RewriteRule .* - [F]
    However, this did not resolve the vulnerability. I realize that Oracle has modified Apache and so a non-standard approach may be required. Does anyone know of a fix for either version of Oracle (10g or 6i)?
    Thanks in advance!
    Sunil

    You need to put this in the Virtual host tag for it to work.

Maybe you are looking for

  • Session TimeOuts

    Hi again, Thanks for the response on my application model question. Here's another one : Is there a way to set a timeout on a query to a DBMS using the DBSession (or some other way) ? Or must I rely on a timeout setting in the DBMS ? Thanks. Christia

  • Trouble with bt sport app

    Is anyone else having trouble opening bt sport app?? Solved! Go to Solution.

  • Acrobat Professional Issue

    Hello, I'm having problems converting word documents to PDFs. I get the message - 'cannot find file specified'. After about 20-30 attempts, my PC decides to convert. Any ideas? Any help would be much appreicatiated, thanks in advance, Archonophios

  • Trouble connecting from Perl (and perhaps other API) to 11gR2

    1. I can connect to my instance via sqlplus 2. I can tnsping the SID I want to connect to 3. DB is alive But my Perl script reports: ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach) Please help me diagnos

  • How do you get JSF to output a blank td

    Hi Folks ! I am trying to get a row output from JSF panelgrid like this: <td class="ruler"></td> f:verbatim that outputs <td> doesn't have styleClass atribute. Any help would be appreciated. thanks, -Sanjay