Problem in Proxy call from an application deployed in J2EE engine

Hi,
I am trying Java Sender Proxy --> XI --> DB.
I have generated o/b proxies using integration builder.
<b>Following is the code that i am using for proxy call and it runs absolutely fine when runnning stand alone</b>
<code Controller.java>
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
p.put(Context.PROVIDER_URL, "server:50004");
p.put(Context.SECURITY_PRINCIPAL, "Administrator");
p.put(Context.SECURITY_CREDENTIALS, "password");
ctx = new InitialContext(p);
ref = ctx.lookup("sap.com/ProxySenderEAR/UsersSyncMI_PortTypeBean");
queryOutHome = (UsersSyncMI_PortTypeHome) PortableRemoteObject.narrow(ref, UsersSyncMI_PortTypeHome.class);
queryOutRemote = queryOutHome.create();
UserDT_Type reqtype =     new UserDT_Type();
reqtype.setUsername(name);
reqtype.setPassword(pwd);
UsersDBMTResponse_Type response = queryOutRemote.usersSyncMI(reqtype);
role = response.getRole();
</code>
I am including this java file(Controller.java) in the same EJB project ProxyEJB which includes
my beans and home/local/remote interfaces.
Then I have created a Web Module Project ProxyWeb, that includes Proxy.jsp.
In proxy.jsp i am using the following code
<%
Controller obj = new Controller();
String name = request.getParameter("uname");
String password = request.getParameter("pwd");
String role = obj.getRole(name,password);
%>
Then I have included both ProxyWeb and ProxyEJB in ProxyEAR file, created Enterprise Archive and Deployed in J2EE engine.
and when I call the jsp...i am not getting expected result.
When i am debugging the code using try catch blocks for the controller.java...I observed that
Problem occured at :
<code>
queryOutHome = (UsersSyncMI_PortTypeHome) PortableRemoteObject.narrow(ref, UsersSyncMI_PortTypeHome.class);
queryOutRemote = queryOutHome.create();
</code>
what i am not able to uderstand is that ...when it is working fine when calling from standalone ...then
why it's giving me problems when deployed in j2ee engine...
note: I am using all required jars for XI.(included in ProxyEJB).And I have used NetWeaver Developer Studio for the above EAR,WAR projects.
Kindly suggest,
Regards
Vedavyas

The JNDI call is different when you call an EJB from inside the J2EE.
ctx = new InitialContext();
ref = ctx.lookup("java:comp/env/<JNDI-Name>");
Regards
Stefan

Similar Messages

  • Need to run VI on boot or call from other application

    I am looking for the most basic way to get Labview to run a VI upon bootup or call from another application (without having to hit the run button on the toolbar.) I would rather not have to build an application; I don't want to buy the professional version. I want my data acquisition to recover from a power outage reboot and keep going without human intervention. Is there a way to build an init that launches the VI in run mode? A colleague of mine has convinced me labview is the way to go for a new experiment, but this is one stumbling block that needs to be resolved. Thanks for any help you can give.

    i have used the startup folder to run labview vi's on several machines and it *can* work just fine.
    however, sometimes there is a timimg problem and i get the message 'vi not found,' then labview usually loads the vi and runs - but leaves the error message, which can cause problems with later operations.
    today i had this problem with a 3.4 G HP machine running Win200. Labview 7.1 & DAQmx.
    my work around solution is to use the *MarcroScheduler* program. i call a it from the startup folder. it does the following
    (a) start Labview 7.1
    (b) wait 1 minute
    (c) execute the vi.
    without the wait state, Labview 7.1 will not run the vi properly.
    good luck with your applications.
    cu,
    larryb

  • How to use external library in EAR deployed onto J2EE engine

    For certain reasons some classes in .jar file in operation system level should be used in the EAR project I've deployed onto J2EE Engine.
    Can some one tell me what steps I should perform to acheive this?

    hey there,
    Think im already late for this... but it may be useful to someone who reads this forum later.
    I am struggling with exactly the same problem for the past more than 24
    odd hours now. The sad part - Im sure I have seen this being done in a
    matter of a few minutes when my team mate had an older version on NWDS.
    (I am currently using SP16 NWDS). May be this indeed is a bug that SAP
    needs to fix in its SP16 NWDS release.
    I need to use the HSSF POI libraries for my webdynpro components and
    have been trying ALL possible options given out here on SDN. To mention a
    few, I have tried -
    1) Jarrod's method of making a Java DC and then declaring a usage
    dependency for it inside a J2EE Server (library) DC. It didnt work... it
    gave me a warning that an illegal reference has been made to the runtime
    public part. And the final SDA file generated in the J2EE server
    component DC DIDNOT contain the jar files that I had added to the public part
    of the Java DC. On investigating further, I found that there were NO
    entities present in BOTH the public parts of the Java DC, even though the
    folder actually contained all the required .jar files.
    2) Creating an External Library DC, adding the JAR files to the
    'libraries' folder. Creating two public parts, one for assembly and the second
    for compilation. Then adding this DC as a 'Used DC' into a J2EE Server
    (library) DC. Yet, the .sda file that is created on building the J2ee
    Server (library) DC DOESNOT contain the JAR files.
    3) Creating an external library DC, adding the JAR files to the
    'libraries' folder. Creating two public parts, one for assembly and the second
    for compilation. Then adding this DC as a 'Used  DC' into a webdynpro
    DC. On building this webdynpro DC, the .ear file DOESNOT contain the JAR
    files.
    4) Directly adding the JAR files to my own webdynpro component in the
    'src/packages' folder. This didnt work because on rebuilding the
    project, the JAR files get deleted on their own.
    5) Renaming my .JAR files to .ZIP, extracting the entire package
    structure into folders, copy pasting this entire folder structure along with
    its .class files into the src/packages folder. On rebuilding, the NWDS
    deletes these folders and files on its own / behaves erratically. Also
    copy pasted these .class files along with the proper package structure
    into the '/bin' directory of my webdynpro application, but it still
    didnt work.
    The only thing that I have to try yet is to shift to SP10 of NWDS,
    build this external library project and get the required JAR files put on
    the wendynpro server. After that I might choose to get back onto the
    SP16 version and hopefully continue productive work... !
    Regards,
    Navneet.

  • How to create simple JSP and deploy to J2EE engine?

    Hi,
    I need to create simple JSP pages and deploy it to SAP J2EE engine.. what is the procedure?...I may later add some businness logic but not needed for now.
    Please help
    Thanks,
    Jai

    Gabrie,
    Here are Simple steps,
    In the NWDS
    1) create J2EE -> Web Module Project    (XYZ)
    2) create/add your JSP pages to the project
    3) Right click on your project root and click on 'Build Web Archive' from the context
    3) create J2EE -> Enterprise Application project(EAR)
    4) Right click on your Web Module Project root and click on 'Add to EAR Project' from the context, select the EAR you just created in step 3.
    5)Right click on your EAR project root and click on 'Build WebApplication Archive' from the context
    6)Expand the EAR project node, and right click on the *.ear file, click on 'Deploy to J2EE Engine'.
    7)Enter your SDM password  when prompted,
    You can access you JSP at this url
    http://server:port/xyz/a.jsp
    - Dileep

  • Problem displaying WebHelp in firefox called from web application

    We're using RoboHelp 7.03. When the WebHelp is generated, it seems that the navigation topics all immediately begin with a few illegal characters. This isn't a problem in IE -- it ignores these characters and displays our help pages fine. In Firefox, however, the WebHelp loops when trying to open the main topic page and does not display the "Show TOC" link for the sub-pages. (The navigation pages I'm referring to are the skin files, whgdata files, whdata, etc.)
    I should note, this occurs only for the project that we're calling from within a web-based application we offer our customers. Firefox displays the WebHelp correctly when opened regularly from the browser.
    I did a search-and-replace operation on the WebHelp published for the web application. Removing the illegal characters took care of the problem, but I'm wondering if there is any way to remove these characters from the output so we don't have to remember to do the search and replace each time we publish the project? (It's in beta stage right now; we're going to be republishing the help fairly often.)
    I'm not sure if these will display properly, but the illegal characters look like this: 
    Thank you,
    Sasha M.

    Those characters are known as the BOM characters. See item 22 in http://www.grainge.org/pages/authoring/rh7/using_rh7.htm.
    You say the behaviour is different when you run the help independently and when the developers call the help. Could it be that you are viewing it from a different location? What if the help is run from the location the developer's use but independently of the application?
    Visit www.grainge.org for RoboHelp and Authoring tips

  • Problem regarding BAPI call from a webdynpro applications

    Hi,
      We are trying to call a BAPI in R/3 system from a webdynpro application through the standard method. But we are getting some problems in JCO settings. We already wasted so much time in solving those problems. Is there anyway where i can access BAPI from Webdynpro application.
    Rgrds,
    Anna

    Hello Anna,
      You can do it by using SAP Java Connector API's in the implementation of the Webdynpro application. You can refer to the sample programs for JCO at http://service.sap.com/connectors and download the latest version of SAP JCo in that install those files as per the installation document in the downloaded zip. The downloaded zip contains information about JCo APIs and sample programs.
    Hope this will solve your problem.
    Best Regards,
    Srinivas.

  • Deployable Proxy Called From Portal

    I've created and deployed a proxy on my portal application server.  Then, from a portal service, I successfully look it up and invoke it.  However, I'm getting a class loader error on the com.sap.engine.lib.xml.parser.tokenizer.XMLTokenWriter class.
    I've added a sharing reference to my deployed J2EE component, and I know this is working because I can look up the proxy.  What is strange is that this was working okay yesterday.  It seems some class loading issue has come up since then.
    Can anyone give me a pointer here?
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:360)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at com.sap.engine.services.webservices.jaxrpc.encoding.SimpleValidator.checkMaxLengthString(SimpleValidator.java:77)
         at com.champtech.coin.extract.bwdelta.types.Unit3.serialize(Unit3.java:58)
         at com.sap.engine.services.webservices.jaxrpc.encoding.GeneratedComplexType.serialize(GeneratedComplexType.java:500)
         at com.sap.engine.services.webservices.jaxrpc.encoding.SerializationUtil._serializeArray(SerializationUtil.java:462)
         at com.sap.engine.services.webservices.jaxrpc.encoding.GeneratedComplexType.serialize(GeneratedComplexType.java:354)
         at com.sap.engine.services.webservices.jaxrpc.encoding.GeneratedComplexType.serialize(GeneratedComplexType.java:500)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.buildRequestDocument(MimeHttpBinding.java:388)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1422)
         at com.champtech.coin.extract.bwdelta.ZCOINLAB_XML_WSSoapBindingStub.BI0_QI6AZCOINLAB_XML_RFC(ZCOINLAB_XML_WSSoapBindingStub.java:86)
         ... 5 more
    #1#java.rmi.RemoteException: Service call exception; nested exception is:
         java.lang.ClassNotFoundException: com.sap.engine.lib.xml.parser.tokenizer.XMLTokenWriter
    Found in negative cache
    Loader Info -
    ClassLoader name: [champtech.com/COINBWExtraction.services]
    Parent loader name: [Frame ClassLoader]
    References:
       common:service:http;service:servlet_jsp
       service:ejb
       common:service:iiop;service:naming;service:p4;service:ts
       service:jmsconnector
       library:jsse
       library:servlet
       common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl
       library:ejb20
       library:j2eeca
       library:jms
       library:opensql
       common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore
       interface:resourcecontext_api
       interface:webservices
       interface:cross
       interface:ejbserialization
    Resources:
       C:
    usr
    sap
    EPQ
    JC00
    j2ee
    cluster
    server0
    apps
    champtech.com
    COINBWExtraction.services
    webservices_container
    wsClients
    ws_cl_0
    jars
    com.champtech.coin.extract.bwdelta.BWDeltaLoadService.jar
       C:
    usr
    sap
    EPQ
    JC00
    j2ee
    cluster
    server0
    apps
    champtech.com
    COINBWExtraction.services
    webservices_container
    wsClients
    app_jars
    COINBWExtraction.services.jar
    Loading model: {parent,references,local}

    Hi Mike:
    I am facing the same problem, my project can't fine class XMLTokenWriter.
    I removed the default class path and added the sapxmltoolkit.jar as external jar to my project, but the problem still exist. Could you kindly tell me more detail of your solution?
    Best regards!

  • Calling from the application Slow vs. Running through SQL developer Fast

    Alright, we write many applications that make use of calling stored procedures in packages to return data. This is the only time i have ever encountered this issue and have not been able to pinpoint the cause.
    This application is very data-centric and is filled with calls to stored procedures and I would say about 80% run fine as in the time required to run is about the same as in SQL Developer maybe just a little slower due to the amount of data that may be returned to the application. The other 20% run horribly slow from the application and run lighting fast in SQL Developer and i cannot figure out why.
    I have traced the code right up to the .Fill on the Oracle.DataAccess.Client.OracleDataAdapter and that is where it just holds either for a long period of time or just forever, some of these i haved waited hours for and they have not finished running.
    For Example: I created a new page in the project and it makes a request through the use of ajax, when the request file is reached it performs two stored procedures from the same package (the only two procedures in the package). Both procedures take in three varchar2's and have an in out cursor, the cursor is returned into a datatable in the VB. The first query runs in a couple seconds returns the correct data etc. The second query, which takes .2 seconds on average to run from SQL Developer, just runs and runs and i have never actually even waited for it to finish because it takes so long. The specific example i am trying only returns 1 row with 7 columns, so there is not a large amount of data being passed back.
    I have seen this sort of thing happen on occasions, but everytime it was usually because the package was not compiled and was waiting on a view to finish before compilation and after killing the view it was fine. But this issue seems to happen randomnly with certain procedures and not others all in the same package.
    This issue happens on the same procedures everytime which would lead me to believe it is the procedure, but running them in SQL Developer shows me this is incorrect because they run exceptionally fast in some cases. I even went so far as to restart the entire database just in case there was some sort of lock causing this issue but this did not fix the issue.
    I have verified parameters, cursors, debugged the procedures, stepped every line of code, tried deleting and readding the oracle.dataAccess reference. I can't seem to figure this one out.
    It is causing alot of wasted time because i am forced to wait a horribly long time for these queries in order to test. If anyone has any clues, hints, or ideas as to what this could be please let me know! If the same issue exists when the application is moved into production it will be unnacceptable and the application utterly unusable.
    Thanks in Advance for any help!
    -Jarrod

    Hi,
    This is consistently reproducible with the problem procedure/operations? Total WAG here, but I've seen cases where having support for distributed transactions enabled causes the database to disable certain optimizations. Try setting Enlist=false in your connection string.
    Otherwise, I'd recommend enabling 10046 database trace and client side sqlnet trace to capture the problem behavior for further investigation. Oracle support can certainly give you a hand with that if needed.
    Hope it helps,
    Greg

  • Aysnch Proxy calling from Inbound Proxy

    Hello Experts,
    My scenario:-
    Legacy sending File to Inbound proxy and from Inbound proxy I am calling the outbound proxy method to send the data back to Legacy system.
    Its like File request -Inbound Proxy- Outbound Proxy Response- File.
    FileRequest-Inbound Proxy----message in R3 as well in XI moni is successful.
    File Outbound response-File-----message in R3 is coming as empty and because of this the message fails in Xi moni.
    I tried to debug the scenario using test tab with the moni payload, I am able to see the data populated in debugging mode, But after the Outbound method is called the response message is coming is empty. commit work is also used inside outbound method.
    I tried every possible ways,but not getting any clue.
    chirag

    Hi,
    Just check...........in the inbound proxy code, the structure of the response msg is updated as the current structure of response msg.......may be you are filling the data in the old structure of response msg and then asssinging it in the outbound proxy call.......you need to fill the data in the new structure of response msg in your inbound proxy code.
    Regards,
    Rajeev Gupta

  • Endeca webservice call from different Application.

    I am trying to call the Endeca (v2.2.2) Webservice, using the client generated class file from the wsdl file (conversation.wsdl) and pass the query to get the result. Steps so far did
    •     Use apache cxf codegen plugin 2.7.0 to generate the client classes using the above wsdl.
    •     Written junit test case for client class and send the query to server. I can connect to the server but getting back the ConversationFault: Sequence has length 0 but must have length 1
    •     The only method I can use to call from the client is conversationPort.query(request), which is generated by cxf wd12java
    •     Following is the line of code from the client class
    ContentElementConfig config = new ContentElementConfig();
    config.setHandlerFunction("AS select max(p_common_date_epoch) as 'MaxDate' where Social_Media_Type = 'Twitter' group by interaction_author_username, interaction_text, interaction_link, Klout_Score, Followers_Count, DocumentSentiment, calculated_entity_sentiment, SalienceSentiment order by MaxDate desc, Followers_Count desc page (0,50)");
    Request request = new Request();
    request.setState(null);
    request.getContentElementConfig().add(config);
    Client Call: Results results = webServiceClient.readQueryResults(request); // this method internally calls conversationPort.query(request).
    Any thoughts or recommendation please advise.
    Edited by: user4993272 on May 9, 2013 10:57 AM

    Hi,
    i have two application take as App1 and App2 .i want to make a webservice call from App1 to App2 . through this webservice call i will pull the data from App2 and populate the data inside a .jspx file.
    i am not understanding how i will do that.
    A service wont allow you to access the live instance of an application and instead create its own data session. So while you can query data that belongs to App2, you wont be able e.g. to access a users uncommitted data changes
    Frank

  • Webservice call from one application to another application

    Hi all,
    I am new in ADF and using jdeveloper version 11.1.1.0.0. Now I am working in an application where my steps are as follows,
    i have two application take as App1 and App2 .i want to make a webservice call from App1 to App2 . through this webservice call i will pull the data from App2 and populate the data inside a .jspx file.
    i am not understanding how i will do that.
    please give your useful comments.

    Hi,
    i have two application take as App1 and App2 .i want to make a webservice call from App1 to App2 . through this webservice call i will pull the data from App2 and populate the data inside a .jspx file.
    i am not understanding how i will do that.
    A service wont allow you to access the live instance of an application and instead create its own data session. So while you can query data that belongs to App2, you wont be able e.g. to access a users uncommitted data changes
    Frank

  • Environment.Exit hangs when called from an application domain exception handler

    I've implemented a handler for exceptions not thrown in the main GUI thread of my C# WinForms application, as follows:
        AppDomain.CurrentDomain.UnhandledException  += OnUnhandledExceptionThrown;
    This handler is called from a background thread. The last statement in this handler is a call to
    Environment.Exit with the application exit code. However, the application hangs in this call. From within Visual Studio, it hangs and I'm unable to break the application; I have to use Task Manager to terminate Visual Studio. Environment.Exit
    works fine when called from the unhandled exception handler for the GUI thread. Is there a better way to terminate the application in the context of an unhandled exception thrown by a background thread?

    Are you just trying to avoid a crash? Environment.Exit can cause deadlocking if exiting in the wrong kind of scenario; if you're just trying to avoid a crash, use
    GetCurrentProcess with
    TerminateProcess to terminate your own process.  It skips the notification phases that Environment.Exit uses which prevents the common deadlock scenarios.
    WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/

  • Problem with incoming call from pstn

    Hi,
    we have a 2610XM router with CCME 3.2 and 4 bri
    and we don't redirect incomming call from pstn on a internal IP Phone.
    which command for redirect call ?
    my isdn number (french) is 0156838050
    and when we call this number with my mobile (number 0685284832), look this debug
    debug isdn q931:
    Mar 22 12:53:46.350: ISDN BR1/0 Q931: Ux_DLRelInd: DL_REL_IND received from L2
    *Mar 22 12:53:46.378: ISDN BR1/0 Q931: RX <- SETUP pd = 8 callref = 0x73
    Bearer Capability i = 0x8090A3
    Standard = CCITT
    Transer Capability = Speech
    Transfer Mode = Circuit
    Transfer Rate = 64 kbit/s
    Channel ID i = 0x89
    Calling Party Number i = 0x2083, '685284832'
    Plan:Unknown, Type:National
    Called Party Number i = 0x81, '8050'
    Plan:ISDN, Type:Unknown
    Sending Complete
    *Mar 22 12:53:46.382: %ISDN-6-LAYER2UP: Layer 2 for Interface BR1/0, TEI 64 changed to up
    Router#
    *Mar 22 12:53:46.415: ISDN BR1/0 Q931: TX -> CALL_PROC pd = 8 callref = 0xF3
    Channel ID i = 0x89
    *Mar 22 12:53:46.439: ISDN BR1/0 Q931: TX -> DISCONNECT pd = 8 callref = 0xF3
    Cause i = 0x8081 - Unallocated/unassigned number
    *Mar 22 12:53:46.527: ISDN BR1/0 Q931: RX <- RELEASE_COMP pd = 8 callref = 0x73
    Cause i = 0x87E4 - Invalid information element contents
    Router#
    thanks for your help

    You have to either use a transfer pattern or a translation rule.
    http://www.cisco.com/en/US/products/sw/iosswrel/ps5012/products_feature_guide_chapter09186a00801812db.html

  • 6820a problem rec'ing calls from anyone but compan...

    Hi
    1st timer here.
    I have a Nokia 6820a and travelled through India with it last yr but since arriving back a yr ago I have only been able to receive calls from t-mobile users and no one else. I know my sim works as I have been using it in another phone.
    any ideas anyone ?
    Thanks

    Try doing a resore factory settings on your phone.

  • EJB lookup from Tomcat deployed on J2ee Engine

    Hello  All,
                            I have a jsf application which runs on tomcat, Now I developed a EJB (stateless) in NWDS and deployed on SAP j2ee engine, when I run a plain java calss I am able to access it but not  through my web-app. Can anybody throw some light on why this is happening?
    Thanks in Advance
    Somil

    Hello  All,
                            I have a jsf application which runs on tomcat, Now I developed a EJB (stateless) in NWDS and deployed on SAP j2ee engine, when I run a plain java calss I am able to access it but not  through my web-app. Can anybody throw some light on why this is happening?
    Thanks in Advance
    Somil

Maybe you are looking for