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

Similar Messages

  • 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;
    }

  • 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);
    }

  • Using an Application module's customised Function in JSF

    Dear All
    I wrote a function in the application module with the return type of MAP.
    this function has input parameters. when i try to access the return in EL for value element of my page components, i am always face the NULL.
    but when i deal with the return value in tho code, there is no problem.
    On the other hand, if the function does not have any input parameter, the EL works correctly.
    Can anyone help me with this problem.
    and one more thing. the function is executes every time the page is loaded but i just want it to be executed after i click a button. this means that the return parameter has already the value i need before i execute the function. it seems to be executed automatically at the start of the page loading. what should i do to prevent the execution?
    Thanks for helping me

    Expose your method. Drag your method from your DataControl onto your page and choose for a 'Form'.
    That way, you will get a form with some inputfields (for the parameter(s)) and a submit button.

  • 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

  • Problems with the Application Module Pool

    Hello,
    We have an Oracle ADF Application working in a production enviroment. The application module pool seems to work properly during the first days, but after a few days, the application module pool seems not to work properly. We start to get some errors like JBO-30003: the application pool failed to checkout an application module.
    We have included in the application a DumpPoolStatistics servlet, and what we have observed is:
    1. When the application is restarted in the server, the "total number of application modules in the pool" is equal to "maximum number of application modules in the pool".
    2. Several days after, the "total number of application modules in the pool" starts to decrease.
    We don't know why the "total number of application modules in the pool" starts to decrease, but we think this is the reason of the errors. In fact, "total number of application modules in the pool" is lower than the "jbo.ampool.minavailablesize" parameter value.
    The management of the application module pool is not a task of the developer, so we don't undestand where is the problem.
    We have configured the application module with the next parameters:
    <jbo.ampool.initpoolsize>10</jbo.ampool.initpoolsize>
    <jbo.ampool.maxpoolsize>100</jbo.ampool.maxpoolsize>
    <jbo.ampool.minavailablesize>10</jbo.ampool.minavailablesize>
    <jbo.recyclethreshold>15</jbo.recyclethreshold>
    <jbo.ampool.maxinactiveage>600000</jbo.ampool.minavailablesize>
    <jbo.ampool.monitorsleepinterval>600000</jbo.ampool.monitorsleepinterval>
    <jbo.initpoolsize>15</jbo.initpoolsize>
    <jbo.maxpoolsize>30</jbo.maxpoolsize>
    <jbo.poolminavailablesize>15</jbo.poolminavailablesize>
    <jbo.poolmaxavailablesize>25</jbo.poolmaxavailablesize>
    <jbo.poolmonitorsleepinterval>30000</jbo.poolmonitorsleepinterval>
    <jbo.poolmaxinactiveage>30000</jbo.poolmaxinactiveage>
    <jbo.dofailover>true</jbo.dofailover>
    <jbo.ampool.resetnontransactionalstate>true</jbo.ampool.resetnontransactionalstate>
    <jbo.ampool.doampooling>true</jbo.ampool.doampooling>
    We are working with JDeveloper 10.1.3.4.
    Thanks in advance!

    Sorry, you are right, the number of application modules created whe the application starts is given by the jbo.ampool.initpoolsize. But what it is sure is that the "total number of application modules in the pool" starts to decrease. The number of days is not always the same. But we have to restart the application occasionally.
    I think the time parameters are ok, I would like for example 10 minutes for pool resoruce cleanup, and 10 minutes for considering an inactive AM instance in the pool as a candidate for removal during the next resource cleanup.
    <jbo.ampool.monitorsleepinterval>600000</jbo.ampool.monitorsleepinterval> --> 10 minutes
    <jbo.ampool.maxinactiveage>600000</jbo.ampool.minavailablesize> --> 10 minutes
    Is this right?

  • 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

  • Could not load application module error - custom page.

    Hi,
    I have developed a new custom page and deployed it in instance (classes in java top and imported the page). its a simple page with one table. Just one VO and one AM, all custom.
    It works as expected while executed from jdeveloper but throws the following error in instance:
    oracle.apps.fnd.framework.OAException: Could not load application module XXX.oracle.apps.ar.pay.server.XXPaymentAM'.
         at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:279)
         at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1189)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
    ## Detail 0 ##
    JBO-30003: The application pool (HostnameSID1554XXX.oracle.apps.ar.pay.server.XXPaymentAM) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg=JBO-25002: Definition XXX.oracle.apps.ar.pay.server.XXPaymentAM of type ApplicationModule not found
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1619)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2366)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:427)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:214)
    ## Detail 0 ##
    oracle.jbo.NoDefException: JBO-25002: Definition XXX.oracle.apps.ar.pay.server.XXPaymentAM of type ApplicationModule not found
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:329)
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:269)
         at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:649)
         at oracle.jbo.server.ApplicationModuleDefImpl.findDefObject(ApplicationModuleDefImpl.java:232)
         at oracle.jbo.server.ApplicationModuleImpl.createRootApplicationModule(ApplicationModuleImpl.java:359)
         at oracle.jbo.server.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:91)
    there is no load sharing, bounced the apache with clear cache, but still same error.
    Please help, Thanks!

    Hi,
    Compile all the files again in jDeveloper, again move the files to unix box, import page.xml file and bounce the apache server.
    Try this and let me know if you are still getting the error.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem releasing the application module after upgrade to 11.1.1.2

    We have recently upgraded from JDeveloper 11.1.1.1 to 11.1.1.2.
    In the "tearDown()" method in our Unit Tests, the Application Module is realeased using:
    private ApplicationModule am;
    Configuration.releaseRootApplicationModule(am, true);
    Alter the upgrade, this produces the following error:
    oracle.jbo.JboException: JBO-33025: Failed to release application module MapServiceGlobal. Cookie handle not found.
    Please Help.
    FYI - this is the code that is used to create the application module:
    Hashtable env = new Hashtable(2);
    env.put(JboContext.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
    try
    InitialContext ic = new InitialContext(env);
    ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(rootAM);
    am = home.create();
    catch (NamingException nex)
    /* Handle the error here if you don't find it */
    throw new NamingException("Application Module naming exception " + rootAM + " : " + nex.getMessage());
    /* Connect the AM to a database connection */
    am.getTransaction().connect(jdbcConnectionURL);
    * Set the bundled exception mode so that exceptions are thrown in the
    * same way as when we're running in the web application.
    am.getTransaction().setBundledExceptionMode(true);
    Thanks,
    -Spiro

    Hi,
    I used OCEP 10.3.0.0 and upgraded the wlevs30 domain to PS6(11.1.1.7.0). and it worked without such error.
    My experience is:
    1) in OCEP 10.3.0.0 it needs not to add the security groups in atnstore.txt
    2) you need to add <scratch-directory/> for Jetty in server's config.xml otherwise you will see the visualizer takes a long time to get up on Windows
    Thanks
    Junger

  • Problem with calling a report from a function module. Please help! URGENT!

    Hi Experts,
       I have a scenarion like this:
      XI -
    > Function Module -
    > ABAP Report
      From XI I am callingf a function module in another R/3 system. This function module inturn calls a ABAP report using SUBMIT statement. The function module and the report reside in the same R/3 system.
      I am calling the report like this:
    SUBMIT yseg_save_bp_data WITH SELECTION-TABLE rspar
                                 AND RETURN.
    The problem is when I run the function module directly in the R/3 system then it calls the report without any problem.
    On the other hand, when I call the function module from XI then the report is not called. On debug mode I found that the program exits just at the Submit statement. Why is this strange problem?
    What mistake am I doing? Is there any limitations or restrictions with SUBMIT statement.
    What is the correct way of using submit statement in this scenario?
    Kindly help me!
    Thanks
    Gopal

    Hi Rao,
       I have created the FM as remote RFC. Infact XI is able to call the FM. Only problem is when it reaches the point where the report is called via SUBMIT it exits.
    Help me please!
    Thanks
    Gopal

  • Problem when calling more than 1 Javascript function

    Hello everybody,
    I am trying to disable fields based on the value in a Select List. There is a table in which values are stored to tell if a field should be disabled for the selected value. I have created an Application Process and a JavaScript function for each field.
    The problem is that only the first function is executed, and the second not.
    I have tried the following:
    onchange="Disable_Dagen(this);Disable_Kg(pThis);"and I have put them together in a parent JavaScript function
    function Disable_Fields(pThis){
    Disable_Kg(pThis);
    Disable_Dagen(pThis);
    }In either case only the first works, so when I change the order then the other one is executed properly.
    Can anyone give me a clue on how to solve this?
    My complete JavaScript definition in the header is as follows:
    (the code in html_DisableOnValue is taken from the example site from Carl Beckstrom)
    <script language="JavaScript" type="text/javascript">
    <!--
    function html_DisableOnValue(pThis,pValue,pThat){
         var lTest;
      if(pThis.nodeName == 'SELECT'){
                   lTest = html_SelectValue(pThis) == pValue;
         }else{
                   lTest = $x(pThis).value == pValue;
         if(pThat){
               for (var i=2;i <= arguments.length; i++){
                          html_disableItem(arguments,lTest)
         return;
    function Disable_Dagen(pThis){
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=AP_RETURN_DISABLE_VAL_DGN',0);
    get.add('AI_AFW_CODE',pThis.value);
    gReturn = get.get();
    get = null;
    //alert('Return waarde is '+ gReturn );
    html_DisableOnValue(pThis,gReturn,'P43_AANTAL_DAGEN');
    function Disable_Kg(pThis){
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=AP_RETURN_DISABLE_VAL_KG',0);
    get.add('AI_AFW_CODE',pThis.value);
    gReturn = get.get();
    get = null;
    //alert('Return waarde is '+ gReturn );
    html_DisableOnValue(pThis,gReturn,'P43_AANTAL_KG');
    function Disable_Fields(pThis){
    Disable_Kg(pThis);
    Disable_Dagen(pThis);
    //-->
    </script>
    In this case the Form Element property is set toonchange="Disable_Fields(this)"
    Thanks, Wouter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Roel,
    Thanks again for your response.
    There is a lot more to Firebug then I had seen before. Now I have turned on the Console and the Script. Initially I saw the following in the Console:
    C is undefined
    $x_disableItem(undefined, true)apex_3_1.js (regel 1)
    html_DisableOnValue(select#P43_AFWIJKING_CODE, "101", "P43_AANTAL_DAGEN")f?p=104:...2606::::: (regel 38)
    Disable_Dagen(select#P43_AFWIJKING_CODE)f?p=104:...2606::::: (regel 51)
    onchange(change )f?p=104:...FPQ%3D%3D (regel 2)
    [Break on this error] var gDebug=true;var gkeyPressTime;var gL...Options;html_SelectValue=$f_SelectValue;When I removed the comments before the 2 Alerts, I only got one alert when I tested it.
    Then I replaced the function call to html_DisableOnValue to $f_DisableOnValue as you suggested, and that did the trick. Now it Works!
    I still don't know why the html_DisableOnValue function doesn't work. I just copied it from the demo site of Carl Beckstrom. Anyway my problem is solved.
    Have a nice weekend, Wouter

  • 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.

  • Disabled property: enable two Application Module functions

    I am using jdeveloper 11.1.1.5 and problem I am facing is:
    I want to call two different Application Module functions on one button click. Button is existing on .jspx. For that purpose I have to use Disabled property of button to enable the Application Module functions. Please tell me how to enable both of the functions by using the Disabled property of button.
    Thanks,
    Regards
    Muddasar Amin

    Hi Ashwin,
    Is this the problem only with Application module methods? Can you try with managed bean methods?
    Also, do you have this commandButton enclosed within <af:form>/<af:subform> ?
    Regards,
    Ansh

  • Unable to create application module.  JNID/RMI problem?

    Hi forum,
    I've got an ADF/OC4J application deployed and running successfully but sometimes the following error comes up:
    JBO-30003: The application pool (com.miempresa.AppModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught:
    oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-25222: Unable to create application module.     at
    oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)     
    In stack trace details we can found:
    java.lang.Thread.run(Thread.java:595)## Detail 0 ##javax.naming.NameNotFoundException: com.miempresa.AppModule not found          
    at com.evermind.server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)          at
    com.evermind.server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:255)          at
    com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:195)          at
    javax.naming.InitialContext.lookup(InitialContext.java:351)          at
    oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:136)
    Due to "NameNotFoundException", it seems to be reasonable to say that it's a JNDI problem. When application module is looked up through JNDI it's not found, so exeception is thrown. However, this doesn't happen frequently but occasionally. Why? What am I doing wrong?
    Thanks in advance for your help.
    Luis Serrano.

    Any ideas?

  • JSF: Problems adding rows to table with custom method

    Since this being my first post, I find it only appropriate to thank the development team for such a huge addition to the application development world. You guys rock. You have cured my Java identity crisis. That being said...
    I have been stumped for days. I'm making a simple web cart. I am trying to get two string values (name and price) passed through a custom exposed application module method ran on a backing bean. What I want the exposed VO module to do is, upon receiving the two strings, create a new row on the empty data controlled table I have built to store them. Basically I just need to add rows to a table with my custom managed bean. Most recent version.
    I have written a test method to make sure my backing bean and exposed app module impl were working. This test works:
    //WORKS
    //CartInfo.java   
        public String cb1_action() {
            AppModuleImpl am = new AppModuleImpl();
            am.testMethod();
            return null;       
    //AppModuleImp.java
        public void testMethod() {
            System.out.println("WORKS");      
        }I found some code on how to add rows and unfortunately it isn't working out for some reason. Here is what is producing the error "Caused By: java.lang.NullPointerException" :
    //DOESN'T WORK IN CUSTOM METHOD BUT WORKS WHEN DRAGGED ON TO THE PAGE AS A COMMAND BUTTON
    //CartInfo.java
        public String cb1_action() {
            AppModuleImpl am = new AppModuleImpl();
            am.testMethod("test", "test");
            return null;
    //AppModuleImp.java
           public void testMethod(String pName,String pPrice) {
            ViewObjectImpl vo = this.getCartVO1();
            Row r = vo.createRow();
            r.setAttribute("NAME", pName);
            r.setAttribute("PRICE", pPrice);
            vo.insertRow(r);
    //The VO attributes for the DC are:
    // Name : Type : Alias Name : Entity Usage : Info
    NAME : String : NAME : (blank) : Transient
    PRICE : String : PRICE : (blank) : TransientSo what I have so far is a table linked to my database. A user can select and click on a product on the row's individual Add button and using a modified selection listener, it returns the values to the backing_bean.
    Then what I want it to do is have those variables passed to the other table. I just can't put it together.
    Please if there is anyone that could send me in the right direction I would greatly appreciate it!
    Thank you,
    Jack

    if i understand you, you want to call application module method when user clicks on add button on the UI and your table is from VO
    so what i can come up for now is:
    1) create variable binding from the iterator for both name and price.
    2) on your UI action button :
    <af:commandButton actionListener="yourbean.addToCart">
    <f:attribute name="pName" value ="binding.<created name bind variable>"
    <f:attribute name="pPrice" value = "binding.<created price bind variable>"
    </af:commandButton>
    3) custom Managed Bean:
    //yourBean.java
    public void addToCart(ActionEvent e){
    // get binding here
    // use executeWitParams method to send parameter to the function "testMethod" and execute
    //AppModuleImp.java
    public void testMethod(String pName,String pPrice) {
    CardVOImpl vo = this.getCartVO1();
    CardVORowImpl r = (CardVORowImpl)vo.createRow();
    r.setAttribute("NAME", pName);
    r.setAttribute("PRICE", pPrice);
    vo.insertRow(r);
    Hope this helps...
    Let me know if not..
    Thanks
    Edited by: MavenDev on Oct 30, 2011 8:08 PM

Maybe you are looking for