JBO-25301 - accessing DBTransaction  in AMImpl

Hi All,
I am trying to perform some initialization when the AM is instantiated. Therefore I have
called a method from AMImpl constructor and try to access DBTransaction .
The following exception is thrown when we try to access DBTransaction.
Exception :
Exception : oracle.jbo.InvalidOwnerException: JBO-25301: Application module TestAMImpl_30 is not a root app module but has no parent
Sample Code :
public class TestAMImpl extends ApplicationModuleImpl {
     public TestAMImpl() {
     super();
     initMethod();
     public void initMethod(){
          DBTransaction dbTransaction = getDBTransaction(); // Exception is thrown
}

This won't work. As a rule you should not use the constructor for accessing a transaction as there is none at this point in the life cycle of the (root) am.
Check out this post {thread:id=2353163} which should help you to fine the right method to overwrite (I guess onAfterConnect() or onPrepareSession() are candidates).
Timo

Similar Messages

  • JBO-25301: InvalidOwnerException [Not occurs Every Time]

    Hello Everybody,
    We are facing a problem specially related to the above specific error. When we do the transaction say using 15 users load it works perfectly fine, but when we try to do the transaction for 20 users load at the same time, some transactions starts getting failed we started getting the below Exception.
    Also, in this application it seems to be a customized implementation of BC4J. It is not using any bc4j.xcfg configuration file to do any AMPool Setting and seems to be using the default values.
    Caused by: oracle.jbo.InvalidOwnerException: JBO-25301: Application module OrderModule is not a root app module but has no parent
         at oracle.jbo.server.ComponentObjectImpl.getRootApplicationModule()Loracle.jbo.server.ApplicationModuleImpl;(ComponentObjectImpl.java:149)
         at oracle.jbo.server.ApplicationModuleImpl.getDBTransaction()Loracle.jbo.server.DBTransaction;(ApplicationModuleImpl.java:2382)
         at com.pfizer.stork2i.model.bc4j.order.OrderModuleImpl.getCatalogSchedule(Ljava.math.BigDecimal;)Lcom.pfizer.stork2i.model.sqlj.CatalogScheduleT;(OrderModuleImpl.java:94)
    Can anybody would be able to help us out how can we make sure the root application module will not get set with Null value irrespective of the number of transactions we perform or the number of users try to access doing the transaction? Any help would be greatly appreciated.
    Thanks,
    Kishore

    Sorry, I'm not familiar with this kind of development.
    As a general rule you only turn application module pooling off in a test scenario. So never do it in a production environment.
    To get more info about activation/passivation you can search the forum (I wrote a couple of times about it here) and read the chapter 36 and 37 in the latest 'Fusion Developer’s Guide for Oracle Application Development Framework'. It give a good overview over the topic and the things behind it. As far as I can tell the information is valied for the old version too.
    Timo

  • Struts and JBO-25301 error

    Hi!
    I am working on a Struts-based JSP BC4J application. I have created just one application module in which I have a short method for validating usernames and passwords. The try section of the method is listed below:
    try
    String func = "select my_column from my_table where upper(username) = '" + user.toUpperCase() + "' and password = '" + password + "'" ;
    Statement stmt = this.getDBTransaction().createStatement(0);
    ResultSet rs = stmt.executeQuery(func);
    The line where I create the statement gives the following exception:
    JBO-25301: Application module is not a root app module but has no parent
    Documentation says:
    JBO-25301: InvalidOwnerException
    Cause: While traversing the parenthood chain for application modules, a child application module was found with no container (parent) application module.
    Action: If this application has added custom business component classes, it may be that the application code is attempting to access a child application module before it is fully initialized. If this is not the case, this error probably represents some internal error in BC4J framework, in which case contact BC4J Technical Support.
    Any ideas what I might be doing wrong?
    Thanks for any help!
    Zrinka

    I'd recommend downloading and checking out the BC4J Toy Store Demo from here:
    http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/content.html
    it contains an example custom method in the toystore.model.services.ToyStoreService application module that shows a best-practice technique for doing this kind of registered-user check without resorting to hand-coding JDBC prepared statements and in a way that can have good database reuse of the SQL statement with bind variables.

  • JBO-25301: Application module ... is not a root app module but has no..

    Hello,
    Tools:_
    Jdeveloper 10.1.2
    JPDK 10.1.2
    ADF
    Portal version 10.1.2 (repository upgrade 10.1.4)
    Problem:_
    I have an application that calls other application module from it's own application module. Some times it gives error (not every time):
    •     JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOwnerException, msg=JBO-25301: Application module FormHistoryServiceLocal is not a root app module but has no parent
    •        JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOwnerException, msg=JBO-25301: Application module FormHistoryServiceLocal is not a root app module but has no parent
    •           JBO-25301: Application module FormHistoryServiceLocal is not a root app module but has no parent
    Code that application uses to call other application module:_
    public ApplicationHandler( ApplicationModule rootModule )
        try
          if(rootModule != null)
            formHistory = (FormHistoryService)rootModule.findApplicationModule(FORMHISTORYSERVICE_LOCAL);
            if(formHistory == null){
              formHistory = (FormHistoryService)rootModule.createApplicationModule( FORMHISTORYSERVICE_LOCAL, FORMHISTORYSERVICE_DEF );
            userInfoDAO.connect();
          }else System.out.println("Application Module was NULL");
        }catch(Exception e)
          e.printStackTrace();
    (calls: formHistory.addToHistory())
    The other application module:+
    public void addToHistory( Number formId, Number status, Number type, Number userId, String event )
        FormhistoryDefImpl defImpl = (FormhistoryDefImpl)EntityDefImpl.findDefObject("com.mysite.app.Formhistory");
        FormhistoryImpl fh = (FormhistoryImpl)defImpl.CreateFormhistory( this.getDBTransaction(), new NameValuePairs() ); //************ Exception is thrown from here! ************
        fh.setFormid(formId);
        fh.setStatus(status);
        fh.setType(type);
        fh.setUserid(userId);
        fh.setEvent(event);
        oracle.jbo.domain.Date eventTimestamp = new oracle.jbo.domain.Date((new java.sql.Timestamp(new java.util.Date().getTime())));
        fh.setEventtimestamp(eventTimestamp);
        this.getTransaction().commit();
    What's wrong here?
    JBO description:+
    JBO-25301: InvalidOwnerException
    Cause: While traversing the parenthood chain for application modules, a child application module was found with no container (parent) application module.
    Action: If this application has added custom business component classes, it may be that the application code is attempting to access a child application module before it is fully initialized. If this is not the case, this error probably represents some internal error in BC4J framework, in which case contact BC4J Technical Support.
    How can i ensure that child application module is already initialized?

    Anyone?

  • What is JBO-25301?

    Hi All,
    I'm getting this error:
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    Can somebody please advice what it is about?
    Thank you
    The Exception Details are below:
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2343)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1710)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:988)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:763)
         at xxppm.oracle.apps.per.selfservice.objectives.server.webui.ppmPerfCO.processRequest(ppmPerfCO.java:33)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2084)
         at oracle.apps.fnd.framework.webui.beans.table.OATableBean.processRequest(OATableBean.java:1030)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAFlexibleContentHelper.processRequest(OAFlexibleContentHelper.java:501)
         at oracle.apps.fnd.framework.webui.beans.OAFlexibleContentBean.processRequest(OAFlexibleContentBean.java:356)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.beans.layout.OAFlexibleLayoutBean.processRequest(OAFlexibleLayoutBean.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:389)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1134)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2297)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1710)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:988)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:763)
         at xxppm.oracle.apps.per.selfservice.objectives.server.webui.ppmPerfCO.processRequest(ppmPerfCO.java:33)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2084)
         at oracle.apps.fnd.framework.webui.beans.table.OATableBean.processRequest(OATableBean.java:1030)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAFlexibleContentHelper.processRequest(OAFlexibleContentHelper.java:501)
         at oracle.apps.fnd.framework.webui.beans.OAFlexibleContentBean.processRequest(OAFlexibleContentBean.java:356)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.beans.layout.OAFlexibleLayoutBean.processRequest(OAFlexibleLayoutBean.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:389)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1134)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2297)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1710)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)

    JBO-25301: InvalidOwnerException
    Cause: While traversing the parenthood chain for application modules, a child application module was found with no container (parent) application module.
    When are you getting this error, as requested by Frank?
    Also:
    Are you using Oracle Applications Framework?
    What's the details of software & versions you're using?
    If using OAF it's may be worth posting your discussion with the OA Framework forum:
    OA Framework

  • Best practices for Reusable methods that access DBTransaction object

    Hi All,
    In our application, there are reusable methods that has DBTransaction object as parameter, eg :
    public static String postingToGL(DBTransaction dbTran, String pProceName, Number pDocId)
    This method could be called both from : Entity Object or Application Module (AM).
    I have two options about where to implement it :
    (1) put it in a Utils / helper class, so that I can call it both from Entity class and AM. But I have to pass DBTransaction object as parameter (I am not convenient with this)
    or...
    (2) put it in Entity object base class, but the problem is what if application module also nede to call that method ?
    WHat is the best practice in this situation ?
    Thank you,
    xtanto

    Hi,
    what about putting it into an AM base class ? I don't know what you worries are for passing the DBTransaction around.
    Frank

  • Help with Application Module

    I have created 3 application modules
    am1, am2, am3.
    am2, am3 are nested in am1
    Now on trying to access application module instance am2 or am3 in a custom static method in am1 throws this error:
    Exception in thread "main" oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
         at oracle.jbo.server.ComponentObjectImpl.getRootApplicationModule(ComponentObjectImpl.java:168)
         at oracle.jbo.server.ApplicationModuleImpl.findApplicationModule(ApplicationModuleImpl.java:1295)
         at
    the code is as below incase needed:
    public class AppModule1Impl
    extends ApplicationModuleImpl
    /**This is the default constructor (do not remove)
    public AppModule1Impl()
    /**Sample main for debugging Business Components code using the tester.
    public static void main(String[] args)
    //launchTester("sni.pricing", /* package name */
    // "AppModule1Local" /* Configuration Name */);
    AppModule1Impl am=new AppModule1Impl();
    AppModule2Impl m2=(AppModule2Impl)am.getAppModule2();
    AppModule3Impl m3=(AppModule3Impl)am.getAppModule3();
    /**Container's getter for AppModule2
    public ApplicationModuleImpl getAppModule2()
    return (ApplicationModuleImpl) findApplicationModule("AppModule2");
    /**Container's getter for AppModule3
    public ApplicationModuleImpl getAppModule3()
    return (ApplicationModuleImpl) findApplicationModule("AppModule3");
    Message was edited by:
    Naga Kalyan

    You can't just instantiate an application module with new AppModuleImpl(). You have to set up an application module in a context. Therefor you have to create an root application module which set up all other stuff for the framework.
    The easiest way to set things up is to build an JUnit test case (Business Components Test Suit or Business Components Test Fixture). This will create the fixture class which handles the creation of the root application module and some code how to use it.
    Timo

  • "Application module  is not a root app module but has no parent"

    This is to follow up on my answered question on rootAN substitution
    Re: "login session has expired" after am substitution
    I am working on an OAF extension.
    I have a new LOV region. I extended (to be substituted) the seeded VO, call it xxVO. And I have three custom methods using this xxVO that are called from processFormRequest of my controller which extends the seeded controller.
    So putting these methods in rootAM and AM substitution didn't work as some folks pointed out.
    So I created xxAM (extends root AM), put xxVO in xxAM’s data model and put my methods in xxAM, set this xxAM as AMDefinition for my custom LOV region.
    In my controller I do
    OAApplicationModule xxAM = new xxprg.oracle.apps.icx.por.req.server.xxprgRequisitionAMImpl();
    But I am getting
    => oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    at
    xxAM.invokeMethod("handleChangeRequester", parameters);
    I found a few posts on the same topic. One advise was to not instantiate ‘new’ AM but do something like this
    Xo2cAcctOviewExtAMImpl amExt = (Xo2cAcctOviewExtAMImpl )pageContext.getApplicationModule(webBean);
    In this example I am confused about the fact that ‘getApplicationModule(webBean);’ which is used in the signature of the processFormRequest will return a ‘rootAM’, is this correct?
    There was another workaround mentioned in other posts to not use xxAM at all but build a class to mimic an xxAM passing all needed values that custom methods require. In which case how(or better where) do I instantiate xxVO since now xxVO won’t be part of any AM data model?
    Can someone please clarify.
    Thank you
    Anatoliy

    Pratap,
    Thank you for the response.
    The reason I need to use new xxCO on the page is this.
    Seeded page CheckoutLinesPG.
    It has advanced table on it where every column has it's one external region.
    The new LOV region xxRN is put on a page also under this table new column.
    1. When a requester (seeded region on the seeded page) is changed then my xxLOV should reflect the change and be populated according to what is selected in the Requester LOV.
    2. When one-time address is added (another seeded region on the seeded page) my xxLOV should be disabled, when one time address taken out - enabled again.
    So xxCO should apply to the whole page.
    The VO behind advanced table PoRequisitionLinesVO is extended with 2 additional attributes and will substitute, the new xxVO is under xxAM data model.
    All works fine with my methods in the seeded RequisitionAM which I get a handle to in the xxCO. But I don;t know how to get the handle to the xxAM if I put my methods there.
    Thanks,
    Anatoliy
    P.S. just fyi - I know it is not the recommended approach but what I did for now I put all calls into the controller - in the controller I can get a handle to root AM, through that I am getting a handle to xxVO which (!) is substituted during runtime with my xxVO. But if you can figure out how to get a handle to xxAM in my case it will be great.
    Edited by: asmirnov on Mar 24, 2009 2:04 PM

  • Is it possible to call a task flow present in 1 ADF Mobile Application to another ADF Mobile Application?

    In ADF Mobile, I want to call a task flow present in application1 to a different application2 on click of a button. Is it possible?

    Hi,
    This is my code to call the package.
    String amDef = "model.service.DAFService";
    String config = "DAFServiceLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
         CallableStatement cstmt = null;
         String stmt = "begin call CP_DAF_PKG.DAF_PROCESS(?,?,?,?,?,?,?,?,?); end; ";
         cstmt = getDBTransaction().createCallableStatement(stmt,0);
    But in this case, I am getting
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    I understand the reason for this error. I need to call the
    createcallableStatement from the application module that I have above.
    Something like am. (call the package)
    But not sure about any method which does that..
    Please let me know if you know the way to solve it.
    Thanks,
    Venki

  • Call a Function From a Backing Bean

    Hello,
    I am trying to call a PL/SQL function from a Backing Bean but i am getting a getDBTransaction error. Here is the example i was trying to do in a backing bean.
    I Am getting the employee ID , sending it to a function that calculates the annual salary and then through a button whose code is in the backing bean, showing a message on the screen with the annual salary.
    I am getting the JBO-25301 error.
    Can't i use getDBTransaction in my backing bean.

    Please have a look at the following thread:
    Stored Procedure

  • How to call precedure in impl into java bean

    Dear all,
    i'm tried to call procedure at impl.java into java bean.
    but, there is error which is it cannot find the root of this.getDBTranstation
    any idea.
    TQ

    Hi
    Please tell me
    How to call ethod in AppModuleImpl from other bean?
    I have created method in AppModuleImpl
    public String callFuncWithArgs(String p_company, String p_division, String p_user, String p_wrkord_type,
    String p_service_type, String p_HOLD_CODE_TYPE) {
    return (String)callStoredFunction(VARCHAR2, "WS_tran.Margin_TO_USER(?,?,?,?,?,?)",
    new Object[] { p_company, p_division, p_user, p_wrkord_type, p_service_type,
    p_HOLD_CODE_TYPE });
    This method is working after run APPModule. But I want to call this method from SparesTEOImpl class and
    public boolean validateUnitPrice(int unitprice) {
    //want to call here AppModuleImpl
    callFuncWithArgs(String p_company, String p_division, String p_user, String p_wrkord_type,
                                       String p_service_type, String p_HOLD_CODE_TYPE) here
    Please tell me how to call , I wrote in following ways but I got error...
    public boolean validateUnitPrice(int unitprice) {
    String margin=appImpl.callFuncWithArgs("00004","SDWSG", "S1","CSH", "SP","M");
    System.out.println("Output"+margin);
    return margin;
    After that I got the following error.
    Exception in thread "main" oracle.jbo.InvalidOwnerException: JBO-25301: Application module AppModuleImpl_0 is not a root app module but has no parent
        at oracle.jbo.server.ComponentObjectImpl.getRootApplicationModule(ComponentObjectImpl.java:177)
        at oracle.jbo.server.ApplicationModuleImpl.getDBTransaction(ApplicationModuleImpl.java:3656)
        at model.AppModuleImpl.callStoredFunction(AppModuleImpl.java:128)
        at model.AppModuleImpl.callFuncWithArgs(AppModuleImpl.java:160)
        at model.SparesTEOImpl.validateUnitPrice(SparesTEOImpl.java:55)
        at model.SparesTEOImpl.main(SparesTEOImpl.java:67)
    Process exited with exit code 1.
    Please tell me how to solve this problem...

  • Is it possible to call a package from DB in ADF?

    Hi,
    I am using Jdev 10.1.3.3 with ADF. I want to call a package from
    my DB from jdev. Is it possible with ADF? Please let me know.
    Thanks,
    Venki

    Hi,
    This is my code to call the package.
    String amDef = "model.service.DAFService";
    String config = "DAFServiceLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
         CallableStatement cstmt = null;
         String stmt = "begin call CP_DAF_PKG.DAF_PROCESS(?,?,?,?,?,?,?,?,?); end; ";
         cstmt = getDBTransaction().createCallableStatement(stmt,0);
    But in this case, I am getting
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    I understand the reason for this error. I need to call the
    createcallableStatement from the application module that I have above.
    Something like am. (call the package)
    But not sure about any method which does that..
    Please let me know if you know the way to solve it.
    Thanks,
    Venki

  • TP4 : task-flow inconsistencies and errors

    I have a simple task flow with five activities.
    1. the first one initialize a view object by calling the create operation on the view object, this is the default activity of the task-flow
    2. the second operation is a view activity to edit the new created view. The view acitivity call a jspx page the all related elements from the view object to edit the data
    3. the third is a view activity to display edited values before commiting or canceling. This view show an empty page with two buttons with fixed outcome (cancel, save).
    4. and 5. are two task flow return that commit (save) or rollback (cancel). It is no parameter in return (at this stage).
    A very simple task-flow.
    My diagram show a warning and two errors.
    The warning is on the first activity. It tell me into the source that "EL Token "bindings" is unknown.
    Here is the code.
        <method-call id="initializeFlexItem">
          <method>#{bindings.Create.execute}</method>
          <outcome>
            <fixed-outcome>initialized</fixed-outcome>
          </outcome>
        </method-call>The errors are mentionned for the return task flow. Errors says that "Element commit not expected", "Element rollback not expected". May be the document doesn't correspond to its xmlschema.
    I have an another warning the template-referernce tag that mention an document-id child is required and not present. The task-flow doesn't refer to any template. So the tag has not to be there, or attribute has not to be required.
    Running the task-flow is not succesfull. I got a JBO-25301 error saying that the application module is not a root application module but has no parent. It seem not to be related to task-flow inconsistencies and errors but I don't know and would like my task-flow is fully correct to be sure.
    Any idea, explanation, recommandation, workaround is welcome.

    I have seem that the property inspector didn't reflect that the return activity was a commit or rollback activity. I added this property and the red x on the return activity disappeared from the diagram and no more errors was mentioned in source editor for these tags.
    The code generated was this one:
        <task-flow-return id="commit">
          <outcome>
            <name>commit</name>
            <commit/>
          </outcome>
        </task-flow-return>
        <task-flow-return id="rollback">
          <outcome>
            <name>rollback</name>
            <rollback/>
          </outcome>
        </task-flow-return>

  • Why do releaseRootApplicationModule not realease memory ?????

    I'm having serious problem.
    I use the following two methods to create and release application modules:
    Configuration.createRootApplicationModule("AM name", "Config name");
    Configuration.releaseRootApplicationModule (myAmHandle, true);
    When debugging with the heap view, I see that even if my release says true, thus remove it, no pooling - the AM instance remain there.
    Thus, each time I create, another instance will be added and it just grows.
    If I change my release to false:
    Configuration.releaseRootApplicationModule (myAmHandle, fals)
    Thus, releasing to the pool, it seem to work, but then when I'm trying to get a nested app module after getting
    the released one from the pool, it through the following exception:
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module PER4_PerId is not a root app module but has no parent
    Please help. I don't get anything like this in the forum.
    Henkie

    John Rich wrote:
    I agree with Altenbach that I have never seen this problem. If one of you could post some code which exhibits this problem perhaps someone on the exchange will be able to explain it. In any event, if this is a bug in LV then you will have to submit an example to NI in order for them to "look into it."
    Here's my vi that's causing the problem, PreviewPictures.vi (attached).
    The input parameters are:
    1. The full path to a folder containing jpeg pictures.
    2. An array of jpeg file names in the above folder.
    It also calls on the following sub vi's:
    1. LoadJpegPicture.vi, this takes the path to the jpeg folder and the chosen jpeg file name and loads the picture data.
    2. DisplayPicture.vi, this simply displays the picture on a larger screen.
    3. StartCounter.vi, this sends a pulse out via a DIO96 card to start some external hardware counter/timers.
    With the front panel of PreviewPictures.vi showing the user should be able to press the Next or Previous buttons to move through and view the jpeg pictures in the selected folder.
    Pressing the run button takes the index back to the first picture and increments the index displaying each picture with a delay set by the slide bar control until the last picture is reached.
    I'm finding the problem occurs when the Next button is pressed. The mechanical action is set to 'Switch Until Released' but I'm finding that it sometimes stays on after the mouse has been released and moved away. Clicking back on the mouse then sets it to false whist held down but when released it stays on true again!
    I would use a local and force it to false after it's been read but I want the user to be able to keep the button held down to continually increment through the pictures.
    Any advice would be much appreciated,
    Thanks,
    Dave.
    Attachments:
    PreviewPicsAndSubVIs.zip ‏130 KB

  • Global application module settings

    Is there a better way than having to explicitly do the following (for example)
    <% myAppMod.useApplicationModule().getSession().setLocale(new java.util.Locale("en", "AU")); %>
    <% myAppMod.useApplicationModule().getTransaction().setBundledExceptionMode(true); %>
    on every jsp page where I use "myAppMod".
    I tried setting the above in the constructor of of MyAppMod, i.e
         public MyAppModuleImpl()
              getSession().setLocale(new java.util.Locale("en", "AU"));
              getTransaction().setBundledExceptionMode(true);
    but I get the following execption:
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent

    Jamie,
    For the Locale, I would rely in the logic in the ApplicationModule tag which already set the locale from the request using the following method:
    If your browser has en-AU as the first language in the list, en-AU locale will be used and set to the am session.
    If your browser does not have any language preference, the locale will be determine at best using the html charset.
    It is a more flexible approach.
    As for the bundleException you need to set it only once at the begining if you are using statefull or reserved release mode.
    Otherwise, set it by overwritting the activate method of the ApplicationModuleImpl instead of the constructor.
    Charles.

Maybe you are looking for

  • How to install windows 8 using bootcamp with no optical drive

    Hi, I have a mac book pro 17" late 2011 with Mountain Lion installed. I have previously installed a windows 7 using bootcamp without an optical drive by creating an install disk as part of boot camp option. I still don't have an optical drive. The ot

  • Catalog manipulation - swap jpg for tiff

    I have a dilemma. I have 20,000 scanned images stored in PSE6. When I started my scanning project 3 years ago I was using and older (and slower) version of PSE and also hard disk space was more of an issue. for each roll of film I created a folder an

  • Multiple Problems with Photoshop

    My whole Adobe is totally screwed up.  1. My computer got a virus or malware, and trashed all kinds of stuff including Photoshop files (I'm pretty sure it may have been drivers).  2. Photoshop wouldn't run and I thought I'd reinstall it, so I uninsta

  • Unknown Server error, again and again

    I have to delete my ../OOBE/opm.db file every two to three days to get past the 'unknown server error' CC login. Is there a more permanent solution? I did all the updates. This is really annoying. I open a file. I get a 'font not present' error becau

  • New Update = I hate this phone now

    The new update has messed up my phone, the camera no longer works, the apps shut down, the email is hard to switch from one account to the next then back. Facetime goes off while talking on the phone, this is a joke! I now hate my phone! iphone 4S an