Calling Application Module in EntityImpl

Is there a possiblity for calling my Application Module in an EntityImpl??

Don't know if it's the correct way, but getDBTransaction().getRootApplicationModule() gets you a reference to the AppModule.
Ronald

Similar Messages

  • Problem in calling application module's custom functions

    i m facing problem in calling application module's custom functions in jsp pages.
    i'll highly appreciate any reply to this mail.
    anant

    Hi,
    I also need to know how to call custom methods
    within an application module implementation.
    I have tried the <jbo:ApplicationModule id=am ...\>
    then later in the JSP <% am.customMethod() %>
    and this does not work. Any hints?I don't know how it works with JSPs, but if you want to call a custom method on a ApplicationModule, you first have to cast it to your custom class type.
    Somethin like this:
    MyAppModule am = (MyAppModule) sessionCookie.useApplicationModule( ... )
    or maybe in your JSP
    <jbo:ApplicationModule id="am">
    <% MyAppModuleClass am = (MyAppModuleClass) am; %>
    I think you forgot to do something like this in your JSP. Note that the code is not tested.
    Hope that helps
    Benjamin

  • Best practice for calling application module methods and plsql code

    In my application I am experiencing problems with connection pooling, I seem to be using a lot of connections in my application when only a few users are using the system. As part of our application we need to call database procedures for business logic.
    Our backing beans, call methods on the application module which in turn call a database procedure. For instance in the backing bean we have code like this to call the application module method.
    // Calling Module to generate new examination/test.
    CIGAppModuleImpl appMod = (CIGAppModuleImpl)Configuration.createRootApplicationModule("ky.gov.exam.model.CIGAppModule", "CIGAppModuleLocal");
    String testId = appMod.createTest( userId, examId, centerId).toString();
    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("tid",testId);
    // Close the call
    System.out.println("Calling releaseRootApplicationModule remove");
    Configuration.releaseRootApplicationModule(appMod, true);
    System.out.println("Completed releaseRootApplicationModule remove");
    return returnResult;
    In the application module method we have the following code.
    System.out.println("CIGAppModuleImpl: Call the database and use the value from the iterator");
    CallableStatement cs = null;
    try{
    cs = getDBTransaction().createCallableStatement("begin ? := macilap.user_admin.new_test_init(?,?,?); end;", 0);
    cs.registerOutParameter(1, Types.NUMERIC);
    cs.setString(2, p_userId);
    cs.setString(3, p_examId);
    cs.setString(4, p_centerId);
    cs.executeUpdate();
    returnResult=cs.getInt(1);
    System.out.println("CIGAppModuleImpl.createTest: Return Result is " + returnResult);
    }catch (SQLException se){
    throw new JboException(se);
    finally {
    if (cs != null) {
    try {
    cs.close();
    catch (SQLException s) {
    throw new JboException(s);
    I have read in one of Steve Muench presentations (Oracle Fusion Applications Team' Best Practises) that calling the createRootApplicationModule method is a bad idea, and to call the method via the binding interface.
    I am assuming calling the createRootApplicationModule uses much more resources and database connections that calling the method through the binding interface such as
    BindingContainer bindings = getBindings();
    OperationBinding ob = bindings.getOperationBinding("customMethod");
    Object result = ob.execute()
    Is this the case? Also is using getDBTransaction().createCallableStatement the best way of calling database procedures. Would it be better to expose plsql packages as webservices and then call them from the applicationModule. Is this more efficient?
    Regards
    Orlando

    Thanks Shay, this is now working.
    I successfully got the binding to the application method in the pagedef.
    I used the following code in my backing bean.
    package view.backing;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    public class Testdatabase {
    private DCBindingContainer bindingContainer;
    public void setBindingContainer (DCBindingContainer bc) {this.bindingContainer = bc;}
    public DCBindingContainer getBindingContainer() {return bindingContainer;}
    public static String validateUser()
    // Calling Module to validate user and return user role details.
    System.out.println("Getting Binding Container from Home Backing Bean");
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    System.out.println("Obtain binding");
    OperationBinding operationBinding = bindings.getOperationBinding("calldatabase");
    System.out.println("Set username parameter");
    operationBinding.getParamsMap().put("p_userId",userId);
    System.out.println("Set password parameter");
    operationBinding.getParamsMap().put("p_testId",examId);
    Object result = operationBinding.execute();
    System.out.println("Obtain result");
    String userRole = result.toString();
    System.out.println("Result is "+userRole);
    }

  • How to call application module from ServletContextListener

    Hi,
    I've got an application that requires authenticated users. However, before the application starts I'd like to do some DB initialization.
    So I created a ServletContextListener and in contextInitialized method I try to createRootApplicationModule.
    Due to authentication / authorization requirements, createRootApplicationModule fails with:
    ov 12, 2008 12:09:33 AM oracle.adf.share.security.authentication.JAASAuthenticationService doLogin
    INFO: LoginContext.login...
    javax.security.auth.login.LoginException: Invalid null input: name
         at javax.security.auth.login.LoginContext.init(LoginContext.java:229)
         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:367)
         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:444)
         at oracle.adf.share.security.authentication.JAASAuthenticationService.doLogin(JAASAuthenticationService.java:102)
         at oracle.adf.share.security.authentication.JAASAuthenticationService.login(JAASAuthenticationService.java:89)
         at oracle.adf.share.security.authentication.JAASAuthenticationService.login(JAASAuthenticationService.java:71)
         at oracle.jbo.common.UserAznUtil.authenticate(UserAznUtil.java:62)
         at oracle.jbo.common.UserAznUtil.authenticateUser(UserAznUtil.java:29)
         at oracle.jbo.server.ApplicationModuleImpl.prepareSession(ApplicationModuleImpl.java:6387)
         at oracle.jbo.server.ApplicationModuleImpl.prepareSession(ApplicationModuleImpl.java:6356)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:171)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8377)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4364)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2421)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2207)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3086)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1395)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1363)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1335)
    Can I somehow explicitly login a valid user or exclude the specific application module from authorization?
    Regards
    J

    Hi,
    no, the function is not related to user session. It's actually data synchronization between two systems.
    We'd prefere to keep it in middle tier, through web services on one side and AM on the other. This way we are platform / RDBMS independent.
    I could use a fake system user, eg. "sync" with password "sysnc", but how do I "log on" such user in my EJB code? If I could somehow access AM login context and call login with username and password...?
    Edit:
    it also puzzles me that it's possible to have a page within the aplication that allows anonymous access. The only difference in security context seem to be _isHttp property. getUserPrincipaly returns JpsAnonymousUserImpl in both cases, IsAuthenticated() is false in both cases...
    Edited by: Jernej Kase on Nov 13, 2008 8:57 PM

  • Call Application Module method(Function) from maanged bean

    Hi Experts,
    JDEV 11.1.2
    I created method in application module which access two parameters and returns a string value, then binded in pagedefinition file as method action.
    Now i wisht to call from a managed bean by passing two parameters , give me a sample code of it..
    Thankz in advance
    PMS
    Edited by: pms on Feb 18, 2012 11:56 AM

    am code
    public void checkLoginCredentials(String ename,String pwd_form)
    System.out.println(ename + " " + pwd_form);
    EmpLoginViewObjImpl vo = (EmpLoginViewObjImpl)getEmpLoginViewObj1();
    //set the bind variable value to last name
    vo.setNamedWhereClauseParam("LastName",pwd_form);
    vo.executeQuery();
    int rowCount=vo.getEstimatedRangePageCount();
    System.out.println("rowCount="+rowCount);
    if(rowCount==0) {
    throw new JboException("Password doesn't match");
    bean code
    public String commandButton_action() ()
    String returnStr="error";
    System.out.println("Inside loginBtn_action");
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("checkLoginCredentails");
    Object result = operationBinding.execute();
    System.out.println(result);
    if (operationBinding.getErrors().isEmpty()) {
    returnStr= "success";
    System.out.println("returnStr= " + returnStr);
    return returnStr;
    }

  • Manage bean methods not able to call application module methods

    Hi,
    I have an ADF application where in my managed bean method needs to call AppModuleImpl methods. I use the code as below:
    public void getSummary() {
    DCBindingContainer binding = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    OperationBinding op = binding.getOperationBinding("getVOData");
    op.execute();
    The code works fine when I run the application in my IntegratedWeblogicServer and I am able to get the data on my .jsp pages.
    I have installed weblogic server on another machine and I need to deploy and run my application on that server. But when I try doing that, the above code is not able to call the AppModule method and I see no data on my page (Also there is no error or exceptin thrown). Seems that the ViewController project is not able to interact with the Model project.
    Is there any extra configuration to be done on the newly installed weblogic server to get this work? Or will some change in the application code help?
    Please suggest.
    Thanks and regards,
    Ansh

    Hi,
    While creating the weblogic domain, we had the following checkboxes checked:
    1. Basic weblogic server domain [wlserver_10.3]
    2. Oracle JRF [oracle_common]
    I hope this is what we need.
    Yes, I also have the adf runtime installed.

  • How do I call an Application Module method from a EntityImpl class?

    Guys and Gals,
    Using Studio Edition Version 11.1.1.3.0.
    I've got a price update form, that when submitted, takes the part numbers and prices in the form and updates the corresponding Parts' price in the Parts table. Anytime this Parts view object's ReplacementPrice attribute is changed, an application module method needs to be called which updates a whole slew of related view objects. I know you can modify view objects via associations (How do I call an Application Module method from a ViewObjectImpl class? but that's not what I'm trying to do. These AppModuleImpl methods are the hub for all price updates, as many different operations may affect related pricing (base price lists, price buckets, etc) and hence, call the updatePartPricing(key) method.
    For some reason, the below code does not call / run / activate the application module's method. The AppModuleDataControl exists and recordPartHistory(key) is registered and public. At runtime, the am.<method> code is simply ignored, and as a weird side-effect, I cannot navigate out of my current page flow.
      public void setReplacementPrice(Number value)
        setAttributeInternal(REPLACEMENTPRICE, value);
        AppModuleImpl am = (AppModuleImpl)this.getDBTransaction().findApplicationModule("AppModuleDataControl");
        Key key = new Key(new Object[]
            { getPartNumber() });
        am.recordPartHistory(key);  // AppModuleImpl method which records pricing history
        am.updatePartPricing(key); // AppModuleImpl method which updates a whole slew of related pricing tables
      }Any ideas?

    Thanks Timo.
    Turns out the code provided was correct, but the AppModuleImpl method being called was not. A dependent ViewObject wasn't returning the row I was expecting. I then tried to perform some operations on that row, which in turn ... just stopped everything, but didn't give me an error.
    It was the lack of the error that threw me off. I had never messed with calling an AppModuleImpl method from the EntityImpl so I assumed that's what was messing up.
    You are correct. It is available from the ViewRow, but I thought it better to put it in the EntityImpl. This method will be called every time the replacement cost is modified. If I didn't put it in the EntityImpl, I'd have to remember to call it every time a replacement cost changed.

  • Calling stored procedures from entity object and application module

    Hello
    I've put in place an EntiyImpl base class containg helper methods to call stored procedures.
    I now need to call stored procedures from the application module.
    Apart from creating an application module base class and duplicating the helper method code is there a way
    to share the helper methods for calling stored procedures between the entity impl and application module impl ?
    Regards
    Paul

    Does the helper code depend on features of a particular entity object instance, beyond its database transaction?
    If so, I'm not sure I see how it could be used from an application module class.
    If not, here's what you do:
    Step 1:
    Parametrize the database transaction--you might even want to. So instead of
    protected myHelperMethod(Object someParam) {
    DBTransaction trans = getDBTransaction();
    change this to
    protected myHelperMethod(DBTransaction trans, Object someParam) {
    Step 2: make the method public and static--once you parameterize the DBTransaction, you should be able to do this.
    public static myHelperMethod(DBTransaction trans, Object someParam) {
    Step 3: Remove the method from your EntityImpl base class into a utility class:
    public abstract class PlSqlUtils {
    private PlSqlUtils() {}
    public static myHelperMethod(DBTransaction trans, Object someParam) {
    When you want to call the method from an application module, entity object, or even view object class, call
    PlSqlUtils.myHelperMethod(getDBTransaction(), paramValue);
    Unlike Transaction.executeCommand(), this lets you provide functionality like setting procedure parameter values, retrieving OUT parameter values, etc.
    Hope this helps,
    Avrom

  • Error While Calling a WebService from Application Module

    Hi all
    I have generated a Proxy from a web Service and i am trying to call the web service from an Application Module it is throwing me error
    JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg= Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    IMy web Service is correct, as i have executed the client and it is working fine, but when i try to class the web service from an external class or from an application module it is throwing me this error. So any light on this issue will be very helpful
    thanks

    Hi,
    did you registered the web service in the external service registration? The "DataAccessException:" is a hint to this issue.
    best regards,
    Rene

  • Error while calling webservice from application module

    Hi all
    I have generated a Proxy from a web Service and i am trying to call the web service from an Application Module it is throwing me error
    JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg= Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    My web Service is correct, as i have executed the client and it is working fine, but when i try to access the web service from an application module it is throwing me this error. So any light on this issue will be very helpful
    thanks

    This forum is for XML DB issues. XML DB is a feature of 9iR2 and later.You need t look in the XML Technology forum

  • Invalid arguments in call for an Application Module

    We are writing a web-app which has two packages in our BC4J project, each with an Application Module. One of these app modules contains business components for objects owned by the user ILOGNET and the other for objects owned by the user EAGLE. We are allowing users to logon and connect to the database as themselves by specifying username and password dynamically as attributes of each instance of both application modules.
    The problem we are having is that for a particular JSP sometimes when we deploy, we get an "invalid arguments in call" error. Other times, it doesn't seem to be a problem. The user I am testing with has Oracle roles that have privileges to view all the necessary objects. I'm just not sure why it seems to be temperamental like this. Does anyone have any ideas ? The code for the problem JSP is shown below.
    Thanks for any help :
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <link rel="stylesheet" type="text/css" href="../style/style.css">
    <TITLE>
    Commenting Subject Administration Portlet
    </TITLE>
    <script language="JavaScript">
    var g_valid = false;
    function get_validate()
    var el_subject = document.getElementById("id_subject");
    el_subject.value = pro_trim(el_subject.value);
    if (el_subject.value == "")
    alert("Subject is a required field");
    g_valid = false;
    else
    g_valid = true;
    function pro_trim(p_in)
    var s_remaining = p_in;
    while (s_remaining.charAt(s_remaining.length - 1) == ' ')
    s_remaining = s_remaining.substring(0, s_remaining.length - 1);
    while (s_remaining.charAt(0) == ' ')
    s_remaining = s_remaining.substring(1, s_remaining.length);
    return s_remaining;
    </script>
    </HEAD>
    <body class="portlet">
    <jbo:ApplicationModule id="am_subjectAdmin" configname="eagle.EagleModule.EagleModuleLocal" releasemode="Stateful" username="<%=request.getRemoteUser()%>" password='<%=(String)session.getValue("PASSWORD")%>' />
    <jbo:DataSource id="ds_enditems" orderbyclause="eiacodxa" rangesize="4" appid="am_subjectAdmin" viewobject="EIACSELECTView" />
    <table class="portlet" width="100%" cellpadding=10 cellspacing=0>
              <tr class="portlet-title">
              <td>
    Commenting Subject Administration Portlet
              </td>
              </tr>
              <tr class="portlet-body" height="100%">
              <td>
    <table width="100%" align="center">
    <tr>
    <td height="50"></td>
    </tr>
    <tr>
    <td>
    <form name="frm_subject" action="cls_comment_subject" method="post" onSubmit="get_validate();return g_valid;">
    <table>
    <tr>
    <td width="150">End Item :</td>
    <td align="left">
    <jbo:InputSelect datasource="ds_enditems" dataitem="Eiacodxa" displaydatasource="ds_enditems" displaydataitem="Eiacodxa" displayvaluedataitem="Eiacodxa" ></jbo:InputSelect>
    </td>
    <td align="right">Subject Type :</td>
    <td align="left">
    <select name="type">
    <option value="C">Comment
    <option value="R">Response
    </select>
    </td>
    <td width="250"></td>
    </tr>
    <tr>
    <td width="150">Subject Title :</td>
    <td colspan="3">
    <input id="id_subject" type="text" name="subject" size="100" maxlength="255">
    </td>
    </tr>
    <tr>
    <td colspan="4" align="right">
    <input type="Submit" value="Submit Subject">
    <input type="Reset" value=" Clear ">
    </td>
    </tr>
    <tr>
    <td height="250">
    </td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </HTML><jbo:ReleasePageResources />
    Regards,
    Joe Mellors

    I'd forgotten all about this until now when it just happened again. Seems strange that it works fine a lot of the time. It only seems to happen with one of the two Application Module's in the project.
    Here is the call stack. I'd appreciate any help.
    Thanks,
    Joe
    JBO-30003: The application pool (eagle.EagleModule.EagleModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:193)
         at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:116)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
         at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:208)
         at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:63)
         at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:53)
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:615)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:815)
         at oracle.jbo.server.NullDBTransactionImpl.initTxn(NullDBTransactionImpl.java:489)
         at oracle.jbo.server.NullDBTransactionImpl.connect(NullDBTransactionImpl.java:367)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:201)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.connect(ApplicationPoolImpl.java:2304)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1096)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
         at oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doStartTag(ApplicationModuleTag.java:181)
         at org.apache.jsp.mp_0005fdt$jsp._jspService(mp_0005fdt$jsp.java:83)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:531)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    ## Detail 0 ##
    java.sql.SQLException: invalid arguments in call
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:185)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:227)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:973)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:197)
         at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:353)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:457)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:332)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:162)
         at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:116)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
         at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:208)
         at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:63)
         at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:53)
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:615)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:815)
         at oracle.jbo.server.NullDBTransactionImpl.initTxn(NullDBTransactionImpl.java:489)
         at oracle.jbo.server.NullDBTransactionImpl.connect(NullDBTransactionImpl.java:367)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:201)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.connect(ApplicationPoolImpl.java:2304)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1096)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
         at oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doStartTag(ApplicationModuleTag.java:181)
         at org.apache.jsp.mp_0005fdt$jsp._jspService(mp_0005fdt$jsp.java:83)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:531)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)

  • Fails to check out an application module error calling web service

    I am using the ServiceFactory code to invoke the TerritoryProposalPublicServiceImpl.findProposals web service method. Weird thing is it invokes the service method for the first time, second time it throws the following error. Please help
    Jul 20, 2011 11:43:59 AM oracle.jbo.client.svc.Proxy invoke
    SEVERE:
    java.lang.reflect.InvocationTargetException
    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 oracle.jbo.client.svc.Proxy.invoke(Proxy.java:64)
    at oracle.jbo.client.svc.ADFProxyInvocationHandler.invoke(ADFProxyInvocationHandler.java:54)
    at $Proxy38.findProposals(Unknown Source)
    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 oracle.jbo.client.svc.ServiceProxyInvocationHandler.invoke(ServiceProxyInvocationHandler.java:58)
    at $Proxy39.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territoryImport.model.Importer.getProposalFromTarget(Importer.java:439)
    at oracle.apps.sales.territoryMgmt.territoryImport.model.Importer.main(Importer.java:76)
    Caused by: javax.ejb.EJBException: EJB Exception: ; nested exception is:
    oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null; nested exception is: oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:121)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:96)
    at $Proxy48.findProposals(Unknown Source)
    ... 15 more
    Caused by: oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null
    at oracle.jbo.service.errors.ServiceExceptionHelper.extractServiceException(ServiceExceptionHelper.java:612)
    at oracle.jbo.server.svc.ServiceImpl.extractServiceException(ServiceImpl.java:1014)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2399)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2323)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl.findProposals(TerritoryProposalPublicServiceImpl.java:138)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:94)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:81)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:112)
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy222.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Exception in thread "main" oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null
    at oracle.jbo.service.errors.ServiceExceptionHelper.extractServiceException(ServiceExceptionHelper.java:612)
    at oracle.jbo.server.svc.ServiceImpl.extractServiceException(ServiceImpl.java:1014)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2399)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2323)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl.findProposals(TerritoryProposalPublicServiceImpl.java:138)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:94)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:81)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:112)
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy222.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Hi Frank,
    This is the service impl class TerritoryProposalPublicServiceImpl for our product's application module "TerritoryProposalPublicServiceAM".
    I added a new service method in this AM. I am using ServiceFactory class to call this method "findProposals()", first time when i run the code it invokes the service correctly, second time it fails throwing this errors.
    I found the place where it is getting exception, these are all frame works classes
    ServiceImpl.invokeCustom() -> calls acquireResources() method -> Calls ServiceConfiguration.getRootApplicationModule(this.getApplicationModuleDefName(), this.getConfigurationName()); -> Calls getApplicationModule()
    Exception is thrown from the line in bold
    Properties props = SDOValueStoreHelper.INSTANCE.getAppModuleSessionProperties();
    props.put(ServiceSessionImpl.SESSION_APPMODULE_NAME, pool.getName());
    props.put(ServiceSessionImpl.SESSION_TRANSACTION_ID, id);
    SessionCookie sess = pool.findOrCreateSessionCookie(id, id, props);
    sess.setEnvInfoProvider(envInfo);
    SDOValueStoreHelper.INSTANCE.setSessionEnv(sess);
    sess.setEnvironment(ServiceSessionImpl.SESSION_APPMODULE_NAME, pool.getName());
    sess.setEnvironment(ServiceSessionImpl.SESSION_TRANSACTION_ID, id);
    appModule = sess.useApplicationModule();
    //bug9215734,
    appModule.getTransaction().setBundledExceptionMode(true);
    Please see if you can figure out why sess.useApplicationModule() not able to find application module.

  • Adding and Calling custom method to the application module or view object

    My project uses jheadstart 10.1.2.
    I want to run "oracle reports" from my uix page. I have coded a method which takes "VOParameter view object" as a parameter to run report.
    I have generated the input page (parameter page) which based on VOParameter view object, by using jheadstart for using jheadstart lov, date etc. advantages. But I dont know how can I add custom method on application module or view object implementation class and custom button on uix page to call from uix page.
    THANKS for your help

    Yes, method binding has been added to the page UI model.
    I have find some clue that When I darg and drop metod as a submitButton, the code "
    <SubmitButton text="runReport" model="${bindings.runReport}" id="runReport0" event="action" />"
    is added to the uix page code. I change this code like this;
    <button text="runReport" model="${bindings.runReport}" id="runReport0" event="action" onClick="submitForm('dataForm',1,{'event':'action','source':'runReport0'});return false"/>
    by adding onClick method and changed submitButton to button tag..
    Then button action is triggered. But I can not pass to the design part of the uix page. It gives me the message like that "The document is not a valid state" But it works. I dont know why?

  • Call an Application Module deployed as EJB into JServer from a client

    Hi all,
    I've successfully deployed a BC4J Application Module as EJB Session Bean into Oracle8i 8.1.6.
    The deployment descriptor (file LoginModule.dd) starts with the foolowing lines:
    Session Bean ricercalista.server.ejb.LoginModuleServerEJB
    BeanHomeName = "/test/omero/ejb/ricercalista.LoginModule";
    HomeInterfaceClassName = ricercalista.common.ejb.LoginModuleHome;
    RemoteInterfaceClassName = ricercalista.common.ejb.RemoteLoginModule;
    The client code that calls the EJB is:
    import oracle.jbo.*;
    import java.util.Hashtable;
    import javax.naming.*;
    import oracle.jbo.JboContext;
    import ricercalista.common.*;
    import ricercalista.common.ejb.*;
    import ricercalista.UserProfile;
    public class ProvaEJBLogin {
    public static void main(String[] args) throws Exception {
    final String AMDefName = "ricercalista.LoginModule";
    final String Username = "omero";
    final String Password = "omero";
    final String DBUrl = "jdbc:oracle:thin:omero/omero@localhost:1521:OMERO";
    try {
    Hashtable env = new Hashtable(10);
    env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_ORACLE8I);
    env.put(JboContext.HOST_NAME, "bacco08.csr.unibo.it");
    env.put(JboContext.CONNECTION_PORT, "2481");
    env.put(JboContext.ORACLE_SID, "OMERO");
    env.put(JboContext.APPLICATION_PATH, "test/omero/ejb");
    env.put(JboContext.SECURITY_PRINCIPAL, Username);
    env.put(JboContext.SECURITY_CREDENTIALS, Password);
    Context ic = new InitialContext(env);
    LoginModuleHome home = (LoginModuleHome) ic.lookup(AMDefName);
    LoginModule myejb = (LoginModule) home.create();
    myejb.getTransaction().connect(DBUrl, Username, Password);
    myejb.setUser("turronic", "chris");
    System.out.println((String) myejb.getCognome());
    System.out.println((String) myejb.getNome());
    UserProfile up = myejb.getUserProfile();
    for (int i = 0; i < up.size(); i++) {
    System.out.println("dominio = " + up.getCodeDomain(i) + " grado = " + up.getInterestDegree(i));
    myejb.getTransaction().disconnect();
    myejb.remove();
    catch (NamingException ne) {
    System.out.println("Unable to find application " + AMDefName);
    ne.printStackTrace();
    catch (ApplicationModuleCreateException e) {
    System.out.println("Unable to create application module " + AMDefName);
    e.printStackTrace();
    When I run this client, I find the following error:
    "D:\Program Files\Oracle\JDeveloper 3.1.1.2\java1.2\jre\bin\javaw.exe" -classpath "D:\Program Files\Oracle\JDeveloper 3.1.1.2\myclasses;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbojdbcpatch.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboorasql.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbodatum12.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jdev-rt.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\jdbc\lib\oracle8.1.6\classes12.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\connectionmanager.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbomt.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboremote.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jndi.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\xmlparserv2.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\javax_ejb.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboremoteejb.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora_client.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjorb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjapp.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbohtml.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboo8i.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\jswdk-1.0.1\lib\servlet.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Test.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Jelly.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Juggler.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Misc.jar;D:\Program Files \Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Molecule.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Buttons.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\classgen.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboejb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora_client.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjorb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjapp.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\javax_ejb.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjtools.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbj30ssl.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\sqlj\lib\translator.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboremote.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbo8iclient.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora_client.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjorb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjapp.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jndi.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbodatum12.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\java1.2\jre\lib\rt.jar" ricercalista.ProvaEJBLogin
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Unable to find application ricercalista.LoginModule
    [Root exception is java.lang.ClassNotFoundException: ricercalista.common.ejb.LoginModuleHomeHelper]javax.naming.NamingException: Unknown reasons
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.initRemoteHome()
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.<init>(oracle.jbo.JboContext, java.lang.String)
    oracle.jbo.common.JboHome oracle.jbo.client.remote.corba.aurora.AuroraInitialContext.createJboHome(java.lang.String)
    java.lang.Object oracle.jbo.common.JboInitialContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void ricercalista.ProvaEJBLogin.main(java.lang.String[])
    What's wrong in my code? Are the Context Properties set correctly? The test on this Application Module works fine. So what's the problem?
    I need your help!
    Tnx!
    null

    I've added libraries LoginModuleEJBClient.jar and EJBGenerated.jar to the client project.
    The error isn't the same, but the following:
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Unable to find application ricercalista.LoginModule
    javax.naming.NamingException. Root exception is java.lang.ClassCastException
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.initRemoteHome()
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.<init>(oracle.jbo.JboContext, java.lang.String)
    oracle.jbo.common.JboHome oracle.jbo.client.remote.corba.aurora.AuroraInitialContext.createJboHome(java.lang.String)
    java.lang.Object oracle.jbo.common.JboInitialContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void client.LoginClient.<init>()
    void client.LoginClient.main(java.lang.String[])
    Why is there a ClassCastException?
    Tnx in advance for your help.

  • The difference in calling an application module from a backing bean

    Hello everybody!
    I don't understand exactly, where is the difference in calling an application module from a backing bean in the following ways.
    Example 1
    FacesContext context = FacesContext.getCurrentInstance();
    ValueBinding vb = context.getApplication().createValueBinding("#{data}");
    BindingContext bc = (BindingContext)vb.getValue(context);
    DCDataControl dc = bc.findDataControl("AppModuleDataControl");
    AppModuleImpl appModule = (AppModuleImpl)dc.getDataProvider();Example 2
    String amDef = "model.services.AppModule";
    String config = "AppModuleLocal";
    AppModuleImpl appModule = (AppModuleImpl)Configuration.createRootApplicationModule(amDef, config);Example 3 (the same like Example 1???)
    String EL = "#{data.AppModuleDataControl.dataProvider}";
    FacesContext fc = FacesContext.getCurrentInstance();
    ValueBinding vb = fc.getApplication().createValueBinding(EL);
    AppModuleImpl appModule = (AppModuleImpl)vb.getValue(fc);Please can anybody explain, what the three examples do? Which example is preferred to call an application-module-method from a backing bean?
    Thanks and regards
    Majo
    Edit: I am using ADF BC 10g in JDev10 :)

    Hi :)
    >
    This could work, but can you describe the use case for which you need to get the ApplicationModule?
    Maybe we can find a better way to implement your functionality.
    >
    Sure, i know a lot of better ways to implement the same functionality too but its a huge project, its not my code and we have no time to reimplement this functions ;)
    Frank, i don't understand the first line of your code.
    DCBindingContainer bindings = ... resolve #{bindings}Where do i get the bindingContainer, if I don't have the "JSFUtils"- or "ADFUtils"-classes?
    Regards
    Majo
    Edit:
    Sorry, i have answer, before i think about it ;)
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    DCBindingContainer bindings = (DCBindingContainer)app.getVariableResolver().resolveVariable(context, "bindings");
    BindingContext bctx = bindings.getBindingContext();
    DCDataControl dc = bctx.findDataControl("AppModuleDataControl");
    AppModuleImpl am = (AppModuleImpl)dc.getDataProvider();or in my backing bean, when i add the property to the faces-config.xml
    DCBindingContainer bindings = this.getBindings();
    BindingContext bctx = bindings.getBindingContext();
    DCDataControl dc = bctx.findDataControl("AppModuleDataControl");
    AppModuleImpl am = (AppModuleImpl)dc.getDataProvider();Is this right?

Maybe you are looking for