This discussion is archived
12 Replies Latest reply: Sep 29, 2009 3:46 AM by 698577 RSS

how to set the init-param debug_mode to "true"

Krr1sh Newbie
Currently Being Moderated
Hi All,
I wrote a custome application that will get invoked when I click the link in the SES search result page.
I could invoke the application. However, getting the following exception when I click one button in my application:
500 Internal Server Error
OracleJSP: An error occurred. Consult your application/system administrator for support. Programmers should consider setting the init-param debug_mode to "true" to see the complete exception message.


How can see the exceptions I am getting. I mean how can I set the init-param debug_mode to "true".

Thanks
Krrish
  • 1. Re: how to set the init-param debug_mode to "true"
    Roger Ford Expert
    Currently Being Moderated
    I think it's in the web.xml file for your application.
  • 2. Re: how to set the init-param debug_mode to "true"
    621284 Newbie
    Currently Being Moderated
    You actually need to set it in global-web-application.xml, which is located in OC4J_HOME/j2ee/home/config/
  • 3. Re: how to set the init-param debug_mode to "true"
    422368 Newbie
    Currently Being Moderated
    I cannot find debug_mode either attribute either in web.xml or global-web-application.xml. Or it could be defined in some other attributes?

    Thanks
  • 4. Re: how to set the init-param debug_mode to "true"
    433460 Newbie
    Currently Being Moderated
    I tried a couple of things. First set a servelt init param in my web.xml called debug_mode to true. It did not work (got the same message about programmers should consider setting debug_mode to true). Then I tried to set it in the deployment plan for my ear as below (I got this from the .xsd of orion-web-app). This does not make a difference either.

    <orion-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd" context-root="ashotplan">
    <web-app-class-loader>
    </web-app-class-loader>
    <ojsp-init debug-mode="true">
    </orion-web-app>

    Is there some documentation about how to set this somewhere? This is with 10.1.3.3 OC4J.
  • 5. Re: how to set the init-param debug_mode to "true"
    Roger Ford Expert
    Currently Being Moderated
    I gave up trying to set this possibly mythical "debug" parameter, but found that all the error information you need is in the "application.log" file of your custom application.

    For example if your application is called "ses_query" and is deployed to the standard SES OC4J location, then the file will be
    $ORACLE_HOME/oc4j/j2ee/OC4J_SEARCH/application-deployments/ses_query/application.log
  • 6. Re: how to set the init-param debug_mode to "true"
    433460 Newbie
    Currently Being Moderated
    Normally application.log is where I look for problems. However this time there's nothing in the application.log file.

    I 'm trying a little experiment with how I build my .ear file. Usually I keep all the dependent jars of my webapp under WEB-INF/lib and then include the .war inside a .ear for command line deployment to Oracle application server (not OC4J standalone). Now I 'm trying place all my dependent library .jar files in the top directory of the .ear and then have a CLASSPATH entry in the .war's META-INF/MANIFEST.MF file to reference those jar files. This way multiple .war files inside my .ear then can reference a common set of jars without having to duplicate then under WEB-INF/lib of each war. Maven2 supports this type of packaging. In some forums this is called "skinny war" packaging.

    With this "skinny war" packaging, my .ear file deploys without errors using admin_client.jar (command line deployment) to the Oracle app server. However when I access the JSF page in one of my apps from the browser, I see this OracleJSP error asking me to set the debug parameter. NOTHING in the application.log file.

    On the application server host I don't have write permissions to all the application server directories (so I can set this debug param in soe global file) . I prefer being able to set this debug flag via my application's deployment plan file or web.xml.

    I have a workaround by making all the .wars inside my .ear "fat" i.e. they will have their own copies of the jars instead of sharing. I guess I can try to setup a OAS shared library and accomplish this too but with the "skinny" war approach the .ear is self contained.
  • 7. Re: how to set the init-param debug_mode to "true"
    636159 Newbie
    Currently Being Moderated
    It's actually not that difficult. Open up your global-web-application.xml file.

    Look for:

    <servlet>
    <servlet-name>jsp</servlet-name>
    ...

    Inside the <servlet> tag, paste the following:

    <init-param><param-name>debug_mode</param-name><param-value>true</param-value></init-param>

    Restart OC4j, and voila!
  • 8. Re: how to set the init-param debug_mode to "true"
    636596 Newbie
    Currently Being Moderated
    Hi,

    may be this one. but, i am not sure.

    $ORACLE_HOME/search/webapp/config directory.
    Set debug=true and restart the Oracle SES middle tier with searchctl restart.
    then u got the oc4j log.

    Regards,
    Deva
  • 9. Re: how to set the init-param debug_mode to "true"
    521430 Newbie
    Currently Being Moderated
    Hi,
    May i know how this issue was resolved.

    thanks,
    Murugesh
  • 10. Re: how to set the init-param debug_mode to "true"
    Roger Ford Expert
    Currently Being Moderated
    See Ashiq's post - two posts back.

    To clarify: Edit
    $ORACLE_HOME/oc4j/j2ee/OC4J_SEARCH/config/global-web-application.xml

    In the section <servlet><servlet-name>jsp<...

    Add an "init-param" section so it looks like this:

    <servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class>
    <init-param>
    <param-name>debug_mode</param-name>
    <param-value>true</param-value>
    </init-param>
    <!-- you can set main_mode to "justrun" to speed up

    Then restart the midtier using "searchctl restart"

    Don't leave this on for production - sometimes it can reveal database passwords!
  • 11. Re: how to set the init-param debug_mode to "true"
    657254 Newbie
    Currently Being Moderated
    thanks thanks thanks :)
  • 12. Re: how to set the init-param debug_mode to "true"
    698577 Newbie
    Currently Being Moderated
    hi,

    How can display the errors in the same jsp page not only in the log file,as in 10.3.1 version ?.

    Edited by: arababah on Sep 29, 2009 3:46 AM