*Connection problems Sap A Java Application*

Hi Gurus,
I have a problem. I'm riding the part of the JCO SERVER for SAP from sending information to a Java application.
I created the RFC destination of the type TCP / IP and I have registered my JAVA application in the visual administrator. This application java is already deployed listening to SAP and I can think of the following error when I run a BAPI created in the ABAP fate that I created.
It's not that I can think of that might be.
Or if someone was going another way of doing it from using sap we can send things to JAVA without having to java call the BAPI please help.
Errores tiempo ejecucióCALL_FUNCTION_REMOTE_ERROR
"JCO.Server could not find server function 'Z_BAPI_RFC'"
¿Qué ha sucedido?
Error in ABAP application program.
The current ABAP program "Z_BAPI_RFC====================FT" had to be terminated because one of the statements could not be
executed.
This is probably due to an error in the ABAP program.
The error occurred in an RFC call to another system.
The target system has also written a short dump.
Consult this short dump for more precise information about
the cause of the error.

Please note that this forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
As your query relates to an SAP product, please post to an SAP forum.
Ludek

Similar Messages

  • Can i use single database connection in a hole java application?

    can i use single database connection in a hole java application?.I have so many forms to use database connection.

    Theoretically you can. Not only theoretically. I've seen lots of application which only uses one database connection (they were using, oracle or mysql)
    The first reply given here assumed that the answer to
    your question depends only on the design of your
    application. That is not true.Yes it's true. Nothing in the original questions says that you aren't allowed to open or close the single connection that you have. It's looks more like the OP is interested in sharing a connection (i.e having a singleton or a connection pool with only one connection)
    It does also depend on the behaviour of the database
    in the background.
    Most databases have a time out for connections that
    are idle Not a problem. Most implementations of connection pools and applications which keeps a connection open have a timer which calls e.g. select * from dual (if you are using oracle) when the connection has been idle for X minutes.
    (some, like db2 on z/OS, even cancel
    connections, that are not idle, if they are open a
    certain amount of time or have reached a given limit
    of cpu seconds.)You would also have that problem if you had a connection pool with several connections.
    In essence: If you have no control over the time
    your application runs (and therefore your connection
    is open) or over type or the configuration of the
    database you are accessing, you can't do it.See above.
    The closest thing to what you want would be using
    PooledConnections, iif those are supported for the
    database you want to access.Not true.
    Kaj

  • How to connect to SAP AS JAVA?

    Hi,
    I am developing an JAVA application, which will connect to SAP AS Java dataSource. My environment don't have ABAP installed. So, I believe use of JCo connector is not an option.
    Is ther any other connector API jar available to connect to SAP AS JAVA Datasource?
    Could anyone please help me with a detail guide to connect to SAP AS Java Datasource using any APIs provided by SAP?
    Thanks
    Alingan

    Hi Aligan,
    Thant's correct, you have to develop a service on your EP and then you can change the UME persistence (user creation etc).
    Now you can write a J2EE app which will call your service to cater your requirement.
    Please go through the below links which will help you to achieve the same
    http://help.sap.com/saphelp_nw73/helpdata/de/f5/1cf770b9bd442985ee71461ef2227a/content.htm
    User Management Functions for Users - Integrating Security Functions - SAP Library
    Could you please let me know for any further information.
    Thanks,
    Hamendra

  • Connection Pooling in Core Java Application

    I need to implement Connection pooling in core java applications..
    My database is MySQL 5.0.27 and java version 1.5.0_09
    Any links or ideas will be really appreciated

    but i just wanted to know, how can i do that in core java application. i have used connection pooling in Tomcat using dbcp
    but these are my questions.
    1. How can i run a core java application doing TCP connection in an Application Server which has got Tomcat and i'm asked to do connection pooling in the Tomcat server.xml.. I didn't understand this requirement pls help me... plssssssssssss

  • Trial version of 'SAP NetWeaver java Application Server 7.0'?

    Hello,
    Does anyone knows where I can download a trial version of 'SAP NetWeaver java Application Server 7.0'?
    Because I want to learn EP Portal 7.0.
    (I know CE7.1 includes SAP java server 7.1. However because 7.1 changes a lot from 7.0. I don't want 7.1).
    Thanks.
    Xi

    Hi,
    If oyu are comfortable with Linux, you may download a combined Java+ABAP Stack version of 7.0 (2004s) here:
    [SAP NetWeaver 7.0 (2004s) - Trial Version on Linux |https://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/60d6c8b7-5d8f-2910-31bf-ebdf74fefd8b]
    There is no download for Windows as far I can see in the "Downloads" section of SDN.
    For other Downloads:
    [Software Downloads|https://www.sdn.sap.com/irj/scn/nw-downloads]
    Hope that helps.
    Thanks.
    p256960

  • Exception  while connecting to SAP from Java

    Hi,
    When my application tries to connect to SAP R/3 system, I am getting  the following exception:
    java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path [C:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Windows Imaging\] ];
         ---> nested java.rmi.ServerError: Unexpected Error; nested exception is:
         java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path [C:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Windows Imaging\]
    Please help me with your guidance.
    Regards,
    Blessy.

    Which application is trying to connect to SAP. Give us your SAP landscape..whether it was working beofre and suddenly stoped. or you are in the middle of configuration
    Reagards
    Umesh K

  • Problem Web Dynpro Java applications using JasperReports

    Hello all,
    We have followed the footsteps of these blogs but we can not make it work.
    Part I --> Part-I: Print Web Dynpro Java applications using JasperReports
    Part II --> Part-II: Print Web Dynpro Java applications using JasperReports
    Part III --> Part-III: Print Web Dynpro Java applications using JasperReports
    Details system: 7.02 SP3
    We believe that the problem is in the library, because it finds them.
    1) We created project as a DC external library with *.jars
    2) Public part DC external library.
    3) Add public part of DC Library into new project DC WebDynpro Java.
    4) Development Component -> Build is OK
    5) Development Component -> Deploy is OK
    6) Test app ERROR.
    When we run the application shows the error:
    The initial exception that caused the request to fail, was:
       java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        at com.unisys.tmb.View01.onActiongenerarPDF(View01.java:161)
        at com.unisys.tmb.wdp.InternalView01.wdInvokeEventHandler(InternalView01.java:140)
        at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
        ... 28 more
    See full exception chain for details.
    Regards,
    Luis.

    Hello John,
    Thanks for the link. We have performed the steps in this blog:
    1) Create DC Project "External Library" with name js/jars:
    - Add *.jars in folder Libraries.[Screenshot Libraries|http://img846.imageshack.us/img846/8395/jsjars.jpg]
    - Add archives (*.jar) to public part with name ExternalLib. Which option to choose?
    a- Provides an API for developing/compiling other DCs (Option chosen)
    b- Can be packaged into other build results (eg SDAs)
    - Development Component -> Build
    Step 1 is OK.
    2) Create "J2EE Server Component / Library" DC with name js/lib:
    - Add Used DC -> public part project ExternalLibrary -> "ExternalLib"
    - Specify both build time and run-time dependency here and strong.
    - Generated SDA file in <var>gen/default/deploy</var> How do we check that it contains <var>js.jar</var>?
    - folder gen/default/plublic/defLib/lib/java then you meet *.jars files again. is OK.
    - Development Component -> Deploy.
    - Go to Visual Administrator. We found the library js/lib, but has no associated *. jar. It is the problem.[Screenshot Visual Administrator|http://img542.imageshack.us/img542/5537/visualadminlib.jpg]
    3) Create "WebDynpro" DC with name pdf_jasper
    - Add used DC (defLib) to WebDynpro DC with option "Build time".
    - WebDynpro References -> Library references --> add <var>jslib
    - Deploy
    - Run error: java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource
    Regards,
    Luis.

  • User Role problems in Sun Java Application Server Platform Edition 8

    I am having two problems setting up user roles in Sun Java Application Server Platform Edition 8. At first, I thought that it was a problem with the higher level features that I was using, so I created a very simple example using the simplest authentication I can use, but the problem still occurs. I am using the file realm and configuring the users in the App Server Admin Console. I create 2 users in different roles. One user should have access, the other should not.
    1) The first problem is that both users can access the page
    2) The second problem is that the isUserInRole() method returns false for both users with the role that it should be authenticating against.
    Here is a sample of my code:
    Users Configured in Console:
    username password roles
    user1 ********** admin
    user2 ********** noaccess
    web.xml
         <security-role>
              <role-name>admin</role-name>
         </security-role>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>My Protected Area</web-resource-name>
                   <url-pattern>/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>admin</role-name>
              </auth-constraint>
              <user-data-constraint>
                   <transport-guarantee>NONE</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>file</realm-name>
         </login-config>
         <servlet>
              <servlet-name>
                   TestServlet
              </servlet-name>
              <servlet-class>
                   mypackage.TestServlet
              </servlet-class>
              <security-role-ref>
                   <role-name>admin</role-name>
                   <role-link>admin</role-link>
              </security-role-ref>
         </servlet>
         <servlet-mapping>
              <servlet-name>
                   TestServlet
              </servlet-name>
              <url-pattern>
                   /TestServlet
              </url-pattern>
         </servlet-mapping>
    TestServlet.java:
              out.println("admin role: " + request.isUserInRole("admin") + "<BR/>");
    Thanks before hand for any responses.
    - Brian

    Hi Jeanfrancois,
    Your suggestion has lead me to find my problem. There were actually three problems.
    1) First, you suggestion to reorder my xml file did not cause any errors to occur. I got suspicious that my web.xml file was wrong. I looked at some sample web-xml files and found that I was missing the header as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    2) When I added this information, the deploy feature failed stating the my web.xml file was out of order. I fixed the ordering. It now deployed, but the security still wasn't working.
    3) I then added the sun-web.xml file. This file was missing before hand as I thought it was unnessary. However, this file added the essential mapping from a role to a group. After adding this, it now started to work.
    Thanks so much for you time and effort. You really did help me.
    - Brian Blank

  • Extracting data from sap to java application using JCO

    Hi,
    I am new to sap and wanted to know what is the procedure to extract data from  based on the java application client (user defined input from different tables of sap) input and need to manage huge data meaning reading millions of records.kindly help me how to handle this in ABAP.

    Hi,
    Pls chk these links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4
    Accessing SAP Tables from a Java application
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/47b6cd90-0201-0010-5aba-b6b7474d4aff
    Java Application ,SAP BW
    <b>***Reward Points if Useful</b>
    Regards
    Gokul

  • Error in connecting Oracle Database from JAVA application!!!

    Hi,
    I am trying to connect to the Oracle11g database server from the client machine using JAVA eclipse. I have installed the oracle client in the client machine. Once i try to execute the below code it was throwing below error:
    public class Dbconnect {
    public static void main (String[] args)throws Exception {
    try {
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    String connectString = "jdbc:oracle:thin:@<IP Address>:1521:orcl";
    OracleDriver drivers = new OracleDriver();
    System.out.println(drivers);
    Connection connection = null;
    connection = (OracleConnection)DriverManager.getConnection(connectString,"ADMIN", "admin");
    System.out.println(connection);
    System.out.println("Connected to the database");
    Error:
    java.sql.SQLException: The Network Adapter could not establish the connection
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at DBConnect.main(DBConnect.java:15)
    Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
         at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:359)
         at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)
         at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:672)
         at oracle.net.ns.NSProtocol.connect(NSProtocol.java:237)
         at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
         ... 7 more
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:141)
         at oracle.net.nt.ConnOption.connect(ConnOption.java:123)
         at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:337)
         ... 12 more
    I am unable to connect using sqlplus as well ORA-12560: TNS:protocol adapter error
    Please advise me on how to resolve this issue..
    Thanks

    Prabhu wrote:
    We are not able to connect from SQLplus as we.. If i issue this command in Sqlplus from client machine 'sqlplus admin/admin@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<Ip Adddress>)(PORT=1521)))(CONNECT_DATA=(SID=orcl)))'' it was throwing the below error.
    Error: ORA-12541: TNS:no listener
    Do i need add get any config details in the client machine..
    Could please tell me what is the general procedure to access the DB server from client machine..on DB Server issue following OS commands
    lsnrctl start
    lsnrctl status
    lsnrctl service
    COPT commands & results, then PASTE all back here

  • Connection problems in a Web Application

    hi everybody.
    I'm developing a struts-based Web Application to investigate an Oracle 9.2 DB, using Exadel Studio / Eclipse and Tomcat 5.0.
    Here is the problem: I've made a class to test data-displaying, which simply connects to db using oci8 and returns a resultset, using the base procedure:
    // load driver
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // open connection
    Connection conn=DriverManager.getConnection(...);
    Statement st = conn.createStatement();
    rs = st.executeQuery(sql);Now, everytime I call this method from my Action, to get back the resultset and display it in my jsp, I get a ClassNotFoundException on the Class.forName instruction.
    Note that classes12.jar is correctly mounted, in fact if I run stand-alone the class containing this method, it connects without problems and returns the expected results. The exception is raised ONLY when the entire web application is running and the method is triggered by the struts Action.
    Can anyone help me please?
    Thank you in advance, I'm crushing my head on this for 2 weeks!
    Emanuele

    This means that your driver jar is unavailable to your web application; I'm pretty sure that Tomcat overrides the classpath set by your IDE. You can add application jars to the WEB-INF/lib of your web application. You can also set a container classpath that points to the jars...
    here's some instructions for add the jars for cactus to Tomcat; just substitute your driver jars in these instructions.
    http://jakarta.apache.org/cactus/integration/howto_tomcat.html
    Also, classes12.jar is for Java 1.2 and Java 1.3 Since you are using Struts, I suspect you're also using Java 1.4 or Java 1.5 and you should probably be developing with the appropriate driver (classes12.jar does mostly work with Java 1.4, but Oracle doesn't support it.)

  • Unable to establish connection with SQLServer from Java Application

    Dear All,
    I am facing the issue of establishing connection with SQL Server from Java project developed in NWDS. I am writing a jaas plug-in, as a part of that I am writing a login module to authenticate a web application through jaas, and I got need of fetching some data from SQL Server which is located in remote host. I am getting error in the line of code
    <b>Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver")</b>
    I also added the 3 jar files (msbase.jar,mssqlserver.jar,and msutil.jar) to my login module project and copied the same files at C:\usr\sap\J2E\JC01\j2ee\cluster\server0\bin\ext\MSSQL.
    My MI Landscape is j2ee stack + abap stack +WAS 6.40 with MAXDb as a database.
    Could anyone please let me know the solution if you are aware of it.
    Thanks and Regards,
    Kishore

    I solved it by writing the following code
    Connection con;
    Statement stmt;
    DataSource ds;
    Context ctx;
    ctx = new InitialContext();
    if(ctx == null)     throw new Exception("Boom - No Context");
    ds=(DataSource)ctx.lookup("jdbc/SQLDB");     
    con = ds.getConnection();
    stmt = con.createStatement();
    String query = "SELECT * FROM SubjectBIR where Subject_ID='" + user + "'";
    ResultSet result  = stmt.executeQuery(query);
    stmt.close();
    con.close();

  • Best practice for Web Dynpro for Java to connect to SAP HR

    What is best way to connect Web Dynpro for Java application deployed in SAP portal to connect to SAP HR ?
    Is it good practice to connect to underlying SAP database ( eg oracle) directly to get the data or is there a better way ?
    This below article describes to connect to external DB, however Is there any other way for  SAP HR ?
    http://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproApplciationwithDatabaseMS+Access

    Hi,
    There are 2 supported ways :
    First is  to use JCO connections to call abap RFC enabled function modules. (BAPIs for example)
    Second is to call SOAP web services (HR enterprise services for example)
    You should never access directly database tables...
    Regards,
    Olivier

  • Java application - build JAR file & include JCO library

    Hello everyone,
    I have a problem with my Java application that <i>connects to SAP system using JCO </i>library <b>(sapjco.jar)</b>.
    I would like to create a JAR file from my Java application but when I run the JAR file that I created I get an error that <b>NoClassDefinitionFoundError com/sap/mw/jco/JCO at [...]</b>
    That means that the JCO and associated DLL files <b>(sapjco.jar, librfc32.dll and sapjcorfc.dll)</b> were <u>not</u> included/packed in my JAR file.
    <b>-- How can I include the JCO lib in JAR file?
    -- If there is a problem with the DLL files, how can I include the JCO lib externally (dynamicly read the JCO whenever my JAR in run)?</b>
    I am using Eclipse 3.2 and Export to JAR option when I click right button on Project.
    THANKS IN ADVANCE FOR HELP!!!

    Hi,
    The problem is that you don't have defined the libraries in the Manifest file of your jar-file. So the jar doesn't know what to use at runtime.
    Add following entry to the MANIFEST.MF file:
    Class-Path:/<lib_folder>/<lib1_name>.jar; /<lib_folder>/<lib2_name>.jar and so on.
    Regards,
    Daniel

  • Best practice for connecting to SAP backend from JSPDynPage

    Hi,
    Can anyone help clear up some confusion I have over connecting to SAP from Java?
    We have a number of JSPDynPage portal applications on EP7 Ehp1 that connect to SAP ECC6.
    We currently use 2 methods to call remote functions on the ECC system.
    1) Enterprise connector and JCo Client Service
    This method has the advantage of automatically generated proxy classes and typed access to function module parameters. It is also more closely aligned to Web Dynpro from a design time point of view
    However it also has a number of disadvantages in that it does not support table APPEND structures and requires regeneration for every change to the ABAP structures involved even if the field that has changed is not being referred to. In addition the use of the JCo client service means that the connection pooling must be handled ourselves explicitly
    2) Connector Framework - SAP System Connector
    This method has the advantage that connection management is handled by the framework. It also has the advantage that fields are referred to by name so if an ABAP structure changes then the remote call will not fall over as long as the named fields are still available.
    However this method is more cumbersome because no proxy classes are generated and function module parameters are referred to generically so errors are not picked up by the complier.
    Given the limitations of the above 2 methods, what is the recommended approach?
    In the book u2018Inside Web Dynpro for Javau2019 Chris Whealy says the following about the Adaptive RFC Layer:
    u2018Any Java program running in the AS Java u2013 not just Web Dynpro u2013 can make use of the Adaptive RFC layeru2019
    Has anyone been able to use the Adaptive RFC layer from a NON-WebDynpro java application?
    Any thoughts on the above would be most welcome.
    Thanks,
    Denis.

    Hello,
    The recommended way is with JCA Connector.
    Adaptive RFC is included from NW7.1,
    See "Creating an Adaptive RFC2 Sample Application without using Web Dynpro"
    in the SAP HELP of NWCE7.1 or NWCE7.2.
    Seems to be based in JCo 3.0 and Java5 so it will not work in NW70.
    For older Versions like EP 5 there is also a JCo ClientService available.
    Regards
    Johannes

Maybe you are looking for

  • NOMAD Jukebox Zen Xtra file recovery from working harddri

    My USB port on my NOMAD Jukebox Zen Xtra is basically non-functional. The drive works fine so i'm not trying to recover "corrupted" files, just ones that exist on the drive... Is there any way I can access the files on the hard drive directly if I re

  • Interest calculation on due date and not on invoice

    Hello, Pls can some one let me how to start interest calculation on due date and not invoice date. In the interest calculation, T code FINT, the system calculates interest from invoice date till clearing date and not from due date till clearing date.

  • Objects (XMLType) not supported in nonblocking mode?

    Hi, In 11g OCI guide Nonblocking mode section, it said "The following features and functions are not supported in nonblocking mode:...objects". It looks like if we're selecting embedded objects like XMLType, we can't use nonblocking mode. In fact, wh

  • Samsung Monitor Driver

    Where can I find the Samsung SyncMaster 750s driver for Solaris 7? Thanks,

  • Link / MAP an Lov selection list to the Hierarchy Viewer.

    Hi, I have created both a hierarchy viewer and an LOV af:selectOneChoice; both are appearing correctly on screen. I simple (hopefully) just want to link the selection made on the LOV / combo box to the Hierarchy viewer, such that when a user selects