JNDI lookup from Portal Application Module

Dear Experts,
I have a problem with looking up a Deployable Web Service Proxy from within a Portal Application Module.
I use NWDI and created both the Deployable WS Proxy DC and the Portal App DC.
I added the generated Proxy to the Proxy DC's public part and added it as used DC to the Portal Module DC.
When I perform the JNDI lookup, no exception is thrown but the Code is not executed any further...
Here is the source:
Category.APPLICATIONS.infoT( loc, "lookup JNDI...", new Object[] { this });
Object o = ctx.lookup(JNDI_NAME);
Category.APPLICATIONS.infoT( loc, o.getClass().getName(), new Object[] { this });
service = (OrchestrationService)o;
Category.APPLICATIONS.infoT(loc, "success!", new Object[] { this });
The log shows the name of the class (OrchestrationServiceImpl) but not the success! part.
As I said: No exceptions are thrown...
Any help is appreciated!
Matthias

Solved the problem!
It's allways the same:
As soon as you ask the question the answer comes to you by itself...
I needed to add a reference to the using DC. I already did that before but not correctly:
If you want to add a reference to a j2ee application you need to read this document:
[Calling J2EE Applications from Portal Applications|http://help.sap.com/erp2005_ehp_03/helpdata/EN/42/9ddf20bb211d72e10000000a1553f6/frameset.htm]
It says the reference has to look like this:
<property name="SharingReference" value="SAPJ2EE::sap.com/Hello"/>
I hope it helps someone.

Similar Messages

  • Access to Entity Service from Portal Application

    Hi Experts,
    I have a hybrid application which will be making use of both Web Dynpro and Portal Applications. I decided to use Entity Services to store my back-end data and can access it fine from the Web Dynpro project. I have included the public part of my CAF project into the Used DCs of my Portal project and while I am able to call the methods of the Entity Service at compile time, at runtime I receive an error message on the page:
    An exception occurred while processing a request
    I know in order to get this to work for Web Dynpro I had to include sap.com/tccolapi.sap.com/cafruntimeuicouplingapilib as a Library Reference and a few Used DCs, but while I have added the Used DCs to the Portal project, I am unsure of how to add the Library Reference. I assume this has to be added to portalapp.xml, but I don't know the syntax.
    Could somehow please reply with how to do this and whether this is all that is required in order to call Entity Service methods from Portal applications?
    Thanks,
    JP

    Hi Smith,
    Write click on the Project then goto the Properties=>Webdynpro References=>Library references
    add
    caf/eu/gp/api
    sap.com/cafruntimeuicouplingapilib
    And add the following DC in your project.
    1> External in caf/eu/gp/api (CAF domain)
    2> caf/eu/gp/api/wd (CAF domain)
    3> com.sap.security.api.sda (SAP-JEE)
    portalapp.xml
    <?xml version="1.0" encoding="utf-8"?>
    <application>
    <application-config>
    <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal, SAPJ2EE::library:cafeugp~api"/>
    </application-config>
    <components/>
    Check this thread .
    Using CAF GP API in Portal Application project
    Regards,
    Mithu

  • Making LOV off of an exposed method from second application module

    Hello,
    I am on JDev 11.1.1.4.0.
    My ADF project worked fine until the spec changed on how Lookups are going to be handled. Previuosly, all the lookup tables were in the same database as other tables. Change is that FND Lookups will be created in the "Oracle" and my ADF project should connect to "Oracle" to get appropriate lookup values to build LOVs while maintaining the main database connection intact.
    After some research, I now have 2 Application Modules, one my project and the other for Lookups to create LOVs. I went to Application Module configuration wizard to edit JDBC setting to point to "Oracle" database and created a read only view with the following SQL:
    SELECT LOOKUP_CODE, MEANING, DESCRIPTION FROM FND_LOOKUP_VALUES  
    WHERE LOOKUP_TYPE = 'MY_LOOKUP'
    AND ENABLED_FLAG = 'Y'
    AND LANGUAGE = 'US'I can run both AMs via "Oracle Business Component Browser" fine. However, I somehow have to set the lookup view object as data source to create LOV on the main updatable view object's attribute. If I set it the way I used to do treating the lookup view as a view object residing in the same AM I am getting "table or view does not exist" error. I guess it is something to do with the lookup view object, but I cannot seem to make any kind of progress on this.
    Any help would be greatly appreciated.
    Thank you
    Bones Jones
    Edited by: Bones Jones on May 19, 2011 10:40 AM

    Well, I think I have found a solution which I didn't have to write a single line of code. My mistake was to think that I have to write code to achieve this.
    Here is what I did:
    *I already have the main AM and View Objects created for my project.  The following steps are done on top of that to bring LOV to life
    1. Create a new, pretty empty AM, named LovAM.
    1.1 Right click on the newly created AM and select 'Configurations'
    1.2 Click JDBC Name value and click 'Edit'
    1.3 Select the second database source where Lookup is defined. If not listed, go back out and create a new Database connection and come back.
    2. Create a View Object with the following SQL:
    SELECT
        TO_NUMBER(LOOKUP_CODE) ID,
        MEANING NAME,
        DESCRIPTION
    FROM
        FND_LOOKUP_VALUES
    WHERE
        LOOKUP_TYPE = 'MY_LOOKUP' AND ENABLED_FLAG = 'Y' AND LANGUAGE = 'US'3. Notice you now have LovAMDataControl
    4. Create a jspx page and create a table with the main data control's binding (This was a part of the requirements).
    5. I create a read-only table with LovAMDataControl.LovLookUp1 binding (I think this creates/exposes correct binding in the pageDef).
    6. Now I drag-and-drop an attribute that I have been wanting to display LOV from the main binding.
    7. Selected single select listbox. You will be presented with 'Edit zlist Binding' screen.
    8. Base Data Source is the main data control binding.
    9. Select Dynamic List
    10. Select LovAM data control binding as List Data Source.
    11. (optional) Selected 'Name' as Display Attribute.
    11.1. (optional) I don't want to see the table created in step 5. On the jspx page, go to Source tab and delete the table from there. I think this keeps binding in pageDef while the UI component is deleted from the page.
    12. Save and Run
    Now, I didn't have to create Root Application Module in the code, but still achieved what I wanted.
    Thanks
    Bones Jones

  • Error with response object in Portal Application Module

    Hi,
    i have a portal application project in NWDS, with a JspDynpage component. I have a jsp that contains this code:
    OutputStream os = componentResponse.getServletResponse().getOutputStream();
    response.addHeader("Content-Disposition", "attachment;filename=" + sTITLE +".pdf");
    response.setContentType("application/pdf");
    os.write(contenido);
    os.close();
    this code open a pdf in new window. In web module project that app runs correctly but in portal application no, it fails in object response. the log (in default trace) doesn´t help me nothing, only sais:
    Jun 6, 2011 3:19:55 PM     com.sap.portal.prt.runtime.servlet_jsp [SAPEngine_Application_Thread[impl:3]_13] Error: >>> JSPCompiler >>> ERROR in Compiling :JSPFileInfo :314221189
    JSP File : /usr/sap/DP4/DVEBMGS40/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/appl.factdist.efact.por/pagelet/inicio.jsp
    Class Name: sapportalsjspInicio
    Java File : /usr/sap/DP4/DVEBMGS40/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/appl.factdist.efact.por/work/pagelet/_sapportalsjsp_inicio.java
    Package Name : pagelet
    Class File : /usr/sap/DP4/DVEBMGS40/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/appl.factdist.efact.por/work/pagelet/_sapportalsjsp_inicio.class
    Is out dated : false [email protected]bbc2b
    In addition, i can use the request object perfectly
    somebody knows what's happening??
    Thank you,
    Fernando

    Hi,
    You shouldn't use the response object directly
    Instead, create a new HttpServletResponse reference from the componentRequest object.
    Try using the following:
    long length = file.length(); // where 'file' is a File() object of your sTITLE +".pdf" file
    // Create the byte array to hold the data
    byte[] bytes = new byte[(int)length];
    int offset = 0;
    int numRead = 0;
    while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
        offset += numRead;
    //The most important part:
    HttpServletResponse res = componentRequest.getServletResponse(true);
    res.setContentType("application/pdf");
    res.addHeader("Content-Disposition", "attachment;filename=" + sTITLE +".pdf");
    res.getOutputStream().write(bytes);

  • Break points are not triggering in RFC from portal application

    Helllo,
    I am running Biller Direct application from portal, which is triggering a standard SAP RFC FM back end, am trying to debug my execution from portal, for this i put the External Break point, Session break-poiint at the beginning of this SAP RFC FM, but, its not stoppping at ll, here the user is a Web user, not dialog user.
    How can i stop my execution in this SAP RFC FM to check how the structures are populated?
    Thank you

    Hi Raju,
    Please try the below way and check if it works.
    Open the RFC in R/3 i.e.
    SE37 -> give FM NAME -> DISPLAY.
    Click on UTILITIES -> SETTINGS -> CLICK THE TAB debugging.
    In the screen against the field users : give the value 'WEBLOGIN'.
    Uncheck the FLAG 'IP MATCHING'.
    And at the bottom check the check box against the field
    'Session Break Point Activate Immediately'.
    Save these settings.
    Then go to the line at which you want to debug the code and put an external break point over there.
    But, please take care of one thing as we are giving it as a WEBLOGIN, when ever some logs in, it will reach the brteak point and stop there. We have to click F8 to continue. Or else, the portal will be hanged for them.
    Thanks & regards,
    Y Gautham

  • Code generate report in excel format from portal(Application Server)

    Hi all
    Please give some solution with code generate report in excel format from
    oracle portal(Application Server).

    Not feasible.
    Why? Because "the Excel format" is a binary and proprietary Microsoft file format. And writing a generator to generate Excel files will be complex, and resource expensive. In the vast majority of cases this will not be justified.
    As an alternative the very basic Microsoft XML office format can be used. But note that this is not a a ISO standard (it has been shot down in flames) - and effort and resources for that would be better spend on the Open Document XML standard (which very likely will be ratified as the ISO standard instead).
    Of course, you could have meant a CSV file - in which case, you need to play close attention to details. CSV is not an Excel format. A software designers and developers, our success is determined by attention to technical detail. In which case you are not paying any attention to technical detail by confusing CSV with Excel.

  • JNDI lookup from a Java stored proc?

    Anybody know if a JNDI lookup, or accessing an EJB from a Java stored procedure is possible? I looked through all the docs and it says it is possible but doesn't specify how. In the java class thats resolved through the stored proc, how are the server generated classes and interfaces made available? Normally setting the classpath for the client app that does the lookup accomplishes this, but what if its called through the stored proc?

    check the rdbms platform's "javavm" folder for a "readme.txt" file ...
    In section 3.16.9, it discusses how to do this ...

  • JNDI lookup from Tomcat to EJB Container

    Hello!
    i am currently trying to use a combination of Catalina and an external EJB Server (running on another machine).
    i am really struggeling with doing the jndi lookup. i have no idea where and how to set the properties in the web server and do the mapping from the ejb-refs to the jndi name? (since tomcat doesnt seem to have a deploymentplan?!)
    maybe someone here knows the problem and can help, please?
    (i am not sure but this might also be the wrong discussion group for that??)
    thanks
    wolfgang

    Hello Wolfgang,
    I solved this problem by setting the proper jndi properties in the startup phase (MyInitServlet) by System.setProperty(...).
    This seems ugly, but it works.
    Tilo

  • View link between VO from two application modules

    Is it possible to create view link between VOs from 2 different Application modules?

    Here is what it says:
    SymptomsYou have an ADF BC (BC4J) project and you are getting the following error:
    oracle.jbo.domain.Number; local class incompatibleA more detailed error looks similar to:
    oracle.jbo.domain.Number; local class incompatible: stream classdesc
    serialVersionUID = -7171468674200794918, local class serialVersionUID =
    -6507359405709672486
    CauseThis problem is caused by either that:
    You have inadvertently mixed two mutually exclusive domain libraries like "BC4J Generic Domains" (bc4jdomgnrc.jar) and "BC4J Oracle Domains" (bc4jdomorcl.jar).
    or
    You have added the "BC4J Datum" library (bc4jdatum.jar) to your middle-tier class path, and are trying to use a JDBC driver different from the one that ships with JDeveloper 10g in the box.
    The BC4J Generic Domains and the BC4J Oracle Domains are never meant to be used in the same application classpath. They contain different implementations of the same set of classes, one destined for use in Oracle JDBC driver environments, and the other for use with other non-Oracle JDBC drivers.
    The BC4J Datum library is designed for use in a thin-client Classpath that is remotely accessing an ADF Business Components middle tier deployed as an EJB Session bean. It contains only the domain classes (typically jar'ed up as part of the whole Oracle JDBC Driver JAR) without having to have the rest of the JDBC Driver JAR on the thin client. SolutionPlease check if any of the above suggested scenarios is applicable to your application.
    If you have the BC4J Generic Domains and the BC4J Oracle Domains in the same project despite that they are never meant to be used in the same application classpath you will get this error. They contain different implementations of the same set of classes, one destined for use in Oracle JDBC driver environments, and the other for use with other non-Oracle JDBC drivers.
    Goto the Project Properties for you project.
    Select Profiles -> <Profile Name> -> Libraries
    Check in the Selected list (to the right) if you have both BC4J Generic Domains and the BC4J Oracle Domains there. If so, remove the one not appropriate for your project.

  • UserTransaction -  Scope using JNDI lookup from jspInit() method

    Howdy,
    I'm using JSP's with JavaBeans accessing a DataSource and some other enviroment variables using JNDI lookups. I've read that JNDI lookups can take a fair amount of time and should be limited whenever possible. My previous configuration had the JNDI lookups inside the constructors of the JavaBeans but I've recently decided to move them to the jspInit() method of the calling JSP. This way the lookup only needs to be performed once and then I pass the values to the JavaBean in a method called setContextVariables. Two of the references to objects that i'm sending are the UserTransaction and DataSource objects. Within the Javabeans I have userTran.begin() and commit() statements. So far it's running great but i'm starting to wonder about the thread safety of this method. My question lies in the actual delagation of the UserTransaction object to the calling client method. It seems that i'm passing the same transaction to every Javabean (or am I?) Is the transaction actually issued when the begin() method is called, or at the time of the JNDI lookup? To test everything out, I opened two sessions and put a breakpoint inside one of the transactions. When I stopped at the breakpoint I ran another thread (also using a transaction retrieved from the same JSP). Then I went back and resumed the first thread and everything seemed to work ok. So... this seems completely fantabulastic so far (definitely noticable response time increases) but I'm still a little skeptical. If anyone is using a process similar to this I would appreciate some feedback. Thanks.

    Hi,
    The EJB bean will use the client transaction when the following attributes are specified in descriptor.
    1) Required
    2) Mandatory
    3) Supports
    In Required case, if the client is associated with Transaction, then the EJB bean will use the same transaction. This is achieved by Transaction context. The EJB bean will use the same transaction context set by client. if the client doesn't have any transaction, then the container will create new transaction context for EJB bean and completes the transaction.
    In Mandatory case, the client must be associated with Transaction so that EJB bean will use the same transaction. If the client doesn't associate with transaction, then container will throw TransactionRequiredException for EJB bean.
    In Supports case, it works similar to Required case except that if the client doesn't associate with transaction, then there won't be any transaction in EJB bean.
    hope this helps.

  • Retrieve system alias details from portal application

    Hello,
    In my portal application, I need to retrieve a system alias details.  The system is an R/3 system and I need to know its application server address, system number and client number.
    Do you know if I can achieve that using portal API?
    Thank you,
    Laurent

    Hi Laurent,
             See this thread: getting information from a system
    Retrieve system aliases from portal
    I hope first thread will solve your problem
    Regards
    Suresh

  • IView from portal application in SAP Portal 7.3

    Hi,
    I´m starting with SAP Portal 7.3 and I have developed a hello word JSPDynpage with NWDI 7.3.
    I have successfully deployed it to the server and I can see my application under Portal applications, and do a success preview.
    But I´m not able to create an iView from this portal component.
    How do you create an iView from a deployed custom portal component?
    In other words, what is the alternative way of u201Cnew iView from paru201D in the new portal version?
    Thanks a lot.

    Dear Alberto,
    Check this post.
    Might help.
    PCD content of Netweaver 7.0 available in Netweaver 7.3
    Kind Regards
    /Ricardo Quintas

  • Send mail from Portal application using java

    Hi everybody,
    I'm looking for a way to send mails from my portal application written in java.
    Now I've read a lot of topics on this but can't seem to get it straight.
    I added a few jars to my project among which is
    coll.appl.gw.srvcmail_api.jar
    Here you have the ISendMailItem.class and ISendMailService.class files.
    Now I know these are interfaces so I created 2 new classes:
    Mail implementing ISendMailItem
    SendMail implementing ISendMailService
    And all of the forced methods are created for me but now I don't know how to use these classes to be able to send a mail.
    Can someone help me with this please?
    Thank you
    Regards
    Wouter

    Hey Göran,
    Thank you for this example.
    for the transport i've put this
    transport.connect( "smtpgateway.arinso.com", "", "" );
    Is this correct? or do I need to fill in more info?
    I've adde the mail.jar to my buildpath and put your code in a eventhandler.
    When I now generate the corresponding event i get an Exception:
    java.lang.ClassCastException: javax.mail.Session
    Do you know why I get this?
    Thank you
    Wouter
    Message was edited by:
            Wouter Delellio

  • Defining bc4j.xcfg for Webservice from ADF Application Module

    Hi all,
    I've already posted my previous question in JBO30003 while executing ADF Application Module WebService
    but no replies at all :)
    after thorough inspection, i found that why my client can connect to ADF AM and why my WebService Invocation is failed with JBO 300003. My J2EE Client application is connected to ADF AppModule with some configuration in CPX file.
    <JboProject
       id="DataBindings"
       xmlns="http://xmlns.oracle.com/adfm/application"
       version="10.1.2.18.73"
       SeparateXMLFiles="false"
       Package=""
       ClientType="JClient" >
       <Contents >
          <DataControl
             id="AppModuleDataControl"
             SubType="DCBC4J"
             SupportsFindMode="true"
             SupportsTransactions="true"
             Package="package"
             FactoryClass="FactoryImpl"
             Configuration="AppModuleEmbeddedAS" >
             <Parameters >
                <Parameter
                   name="Sync"
                   value="Immediate" >
                </Parameter>
             </Parameters>
          </DataControl>
    and so forththis CPX file define that this client connect to Application Module on my AppServer with "AppModuleEmbeddedAS" configuration, as stated in my BC4J.XCFG.
    <AppModuleConfig name="AppModuleEmbeddedAS">
             <AppModuleJndiName>AppModuleBean</AppModuleJndiName>
             <java.naming.security.credentials>welcome</java.naming.security.credentials>
             <DeployPlatform>EjbIas</DeployPlatform>
             <java.naming.security.principal>admin</java.naming.security.principal>
             <jbo.internal.embedded>true</jbo.internal.embedded>
             <HostName>localhost</HostName>
             <jbo.ampool.dynamicjdbccredentials>false</jbo.ampool.dynamicjdbccredentials>
             <ApplicationName>AppModule</ApplicationName>
             <jbo.ampool.doampooling>false</jbo.ampool.doampooling>
             <java.naming.security.authentication>simple</java.naming.security.authentication>
             <java.naming.factory.initial>oracle.jbo.common.JboInitialContextFactory</java.naming.factory.initial>
             <ConnectionPort>23891</ConnectionPort>
             <JDBCDataSource>jdbc/DBGEBPOC_on_LOCALHOSTDS</JDBCDataSource>
             <java.naming.provider.url>ormi://localhost:23791/current-workspace-app</java.naming.provider.url>
             <jbo.server.internal_connection>jdbc/DBGEBPOC_on_LOCALHOSTCoreDS</jbo.server.internal_connection>
             <jbo.dofailover>false</jbo.dofailover>
             <ApplicationPath>current-workspace-app</ApplicationPath>
             <jbo.ampool.resetnontransactionalstate>false</jbo.ampool.resetnontransactionalstate>
          </AppModuleConfig>Now, how could I define configuration like my J2EE Client in my web service? as we know that web service's client is web browser. Does it mean that we can't define any CPX file?
    FYI, My webservice's End Point pages is successly shown up. but when i invoke the method, it returns XML with faultmessage Error JBO30003.

    Hi,
    You can directly edit the bc4j.xcfg file. Note that the WebService binding is not created from the Am directly but from the deployed WSDL file.
    Frank

  • Metadata through user input from portal application while new check In

    Hi,
    We have a requirment to create new doc/html from portal end, and check in it into UCM with user populated metadata's
    I have few quetions
    - Can I user OOTB RichtextEditor taskflow with little customization.
    - Is it a easy option to add a check in form (custom taskflow).
    - or we have to create new custom taskflow and use CHECKIN_NEW service using RIDC api.
    Thanks
    Edited by: 953836 on Aug 21, 2012 2:20 AM

    You could go with the standard stuff, but everything depends on what user experience you want to achieve.
    a) doc/html
    What formats you want to support? HTML is OK, but .DOC (especially if it means MS-Word) might be a challenge
    b) you could use SSXA tags (see here: http://docs.oracle.com/cd/E23943_01/doc.1111/e13650/toc.htm ) which could do exactly what you ask for (via Contributor Data Files). Note, however, that this user experience is not often met with understanding. And even more important, mind this: Clarification on SSXA Support with WebCenter Portal
    c) you could also use CHECKIN_NEW_FORM (see here http://docs.oracle.com/cd/E23943_01/doc.1111/e11011/c04_core.htm#BABGBCHI ) and somehow consume its output in your custom code. By doing this, you could use Content's standard functionality, profiles, but yet, achieve the user experience similar to what Desktop Integration Suite provides.

Maybe you are looking for