Webdynpro java and oracle DB connection..

Hi,
I have a good knowledge of WD (web dynpro java) projects having ECC as backend as i have done lot of projects where ECC is backend and WD JAVA is front end.
but in my new project i have wd java as front end but my backend is oracle DB. I want to know how to create/setup  connection betwen webdynpro java and oracle DB, how to proceed on this ? wat all settings I have to do in VA (visual admin) and all.
please let me know how to proceed on this. Any document/tutorial on this will be very helpful..

Hi Rahul,
Create a DataSource to the oracle db in Visual Admin, give the datasource an alias name and connect to the db from WebDynpro by calling the alias name.
These document might be useful:
[http://help.sap.com/saphelp_nw70/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm]
[SAP Note 867176|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=867176]
[SAP Note 941594|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0000941594&nlang=E]
Good luck!
Regards,
Aditya

Similar Messages

  • WebDynpro java and Oracle Connection

    Hi,
    I'm trying to make a simple connection to an Oracle database within a custom webdynpro component. Using NWDS 7.0.08 and EP 7.0 SP 10.
    Here is a sample of the java code I use :
    Connection conn = null;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn =DriverManager.getConnection ("jdbc:oracle:thin:@hostname:port:DATABASENAME","schema", "password");
    Statement stmt=conn.createStatement();
    ResultSet rs=stmt.executeQuery("select * from MYTABLE");
    But when I run this WebDynpro, the following error appears :
    "oracle.jdbc.driver.OracleDriver".
    I have also catched the exception stack but it doesn't seem meaningful. If you need it, I can provide it in another thread.
    So What should I do to connect to this oracle database ? Is it the right provider ?
    Thanks,
    Loïc LEVEUGLE

    Hi!,
      please try following code, this is working fine for me.
    String  serverName = "172.21.1.62";
    String portNumber = "1526";
    String sid = "vision";
    String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
    String userName = "scott";
    String password = "tiger";
    Connection connection = null;
    try {
        // Load the JDBC driver
        String driverName = "oracle.jdbc.driver.OracleDriver";
        Class.forName(driverName);
        connection = DriverManager.getConnection(url, userName, password);
        Statement stmt =connection.createStatement();
        PreparedStatement pstmt = connection.prepareStatement("insert into club (Name,EmpID,Location,Extention,MailID,InstPlay) values(?,?,?,?,?,?)");
                   pstmt.clearParameters();
        pstmt.setString(1,Name);
        pstmt.setString(2,EmpID);
        pstmt.setString(3,Location);
        pstmt.setString(4,Extention);
        pstmt.setString(5,MailID);
        pstmt.setString(6,Instrument);
        pstmt.executeUpdate();
    } catch(Exception exc) {
         exc.printStackTrace();
    put classes12.jar in your class Path.
    regards,
    Mithileshwar Sahu

  • How to relate java and Oracle

    i have to tried to make programs using java and oracle. if i give the values in the 'insert' statement it is getting updated in the original table in oracle but how to take the values from the text fields of java and insert into the tables in oracle. do we have any methods to convert the values into sql type. pl reply.

    Here is a sample of a Java program that uses JDBC and a PreparedStatement. This particular program does a select, but you can also use this for inserts. I'm not 100% this is what you are looking for, but if it isn't just let me know. I'll help if I can.
    Joel
    For inserts, just replace this code:
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
      System.out.println(rs.getInt(rs.findColumn("CNT")));
    }with this code (and obviously change the Select string to an Insert String):
    int rowcnt = ps.executeUpdate();Here is the whole program:
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class dbtest {
        public static void main(String args[]) throws SQLException {
            try {
                String timeString = new String("2000-11-01 23:59:59");
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
                java.util.Date date = format.parse(timeString);
                Timestamp timestamp = new Timestamp(date.getTime());
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn =
                    DriverManager.getConnection(
                        "jdbc:oracle:thin:@riker:1521:mydb",
                        "myusername",
                        "mypassword");
                String sql =
                    "SELECT COUNT(*) CNT FROM SERVICE_ALARM "
                        + "WHERE TRANS_STREAM_NODE_ID = ? "
                        + "AND SERVICE_ID = ? "
                        + "AND ALARM_ID = ? "
                        + "AND RAISED > TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, "ROW1");
                ps.setInt(2, 1);
                ps.setString(3, "ROW1");
                String myDate =
                    timestamp.toString().substring(0, timestamp.toString().length() - 2);
                System.out.println("myDate=(" + myDate + ")");
                ps.setString(4, myDate);
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    System.out.println(rs.getInt(rs.findColumn("CNT")));
                rs.close();
                ps.close();
            } catch (Exception e) {
                System.out.println("Java Exception caught, error message=" + e.getMessage());
    }

  • Java and oracle in linux

    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..

    884540 wrote:
    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..You can mention the classpath using the javac and java options:
    javac -cp .;<path> <ClassName>.java
    and
    java -cp .;<path> <ClassName>
    Or refer the below link to avoid mentioning classpath everytime you run/ compile the program
    http://www.linuxquestions.org/questions/linux-software-2/j2sdk-install-174483/#post898715

  • Relation between java and oracle

    Hi,
    This is general information about java and oracle.
    I had worked in java last one year, but now switch to oracle i heared that nearly combination of each are implemented oops concept. But i know where it used in java, not in oracle.
    In oracle, where we are implemented inheritance, polymorhism and encapsulation.
    plz give some tips
    Regards venki

    does this mean you used to develop your applications on java and manuplate your data in Oracle over JDBC or Hibernate but then you started to develop PL/SQL applications for this need and use PL/SQL's OO features?
    With my experiences I may say if you are working on data intensive database applications learning how to use effectively SQL and PL/SQL is critical, this is Oracle's native language not something written to work for any database vendor. http://www.oracle.com/pls/db102/portal.portal_db?selected=5

  • Comparision matrix of Webdynpro Java and Adobe Interactive form

    Hi Experts,
    In our project we have to choose the GUI between Webdynpro Java and Adobe Interactive forms. Can anyone help me out with strong comparision parameter's in order to select the right technology.
    Thank you in advance.

    Hi ,
    Depends on your project requirement : if you project is simple and want to use  less UI controls  then use Adobe Interactive Forms (AIF).
    But In your project needs large number of UI controls and to show huge amount of data then best option is  Web Dynpro Java.
    Web Dynpro provides wide varieties of UI controls for designing your web application . Adobe Interactive Forms have limited controls .
    Web Dynpro take care of your Client side eventing which is not possible in AIF . AIF Developers needs to know Adobe scripting too.
    If your Client data is huge AIF take so much of time to render your content and also this depends on your reader version installed on the end user too . Web Dynpro Java is Client neutral & it won't take much time to render the content.
    Use AIF  to show/process Business data in any Web application. ideally it is not suited for complete GUI of your project  .
    Regards,
    Rakesh Kumar

  • Connection between webdynpro java and ECC.

    Hi experts,
    I am very new to webdynpro java, I want to learn webdynpro java since I know little bit of java.
    So here is my question,
    I want to connect my webdynpro java to ECC  to get data from ECC and display it on front end and as well i want to send data to ECC, can anyone help me to resolve this one.
    Thanks and Regards,
    Santoshkumar.

    Hi Santosh,
    This is pretty basic stuff in the world of Web Dynpro Java - I'd suggest you search SCN, read content on help.sap.com and then come back here with more specific questions.  All anyone can do to answer your current question is search for you and post links to documents that you could find for yourself.
    Cheers,
    G.

  • Webdynpro java and EJB integration

    Hi,
    I am new to Webdynpro Java, would require your help in the following area:
    my requirement is I need to read values from oracle database using EJB/Java Beans and display the same using webdynpro JAVA(as user interface).
    Pls suggest the possible solution with required docs & videos(if possible)
    FYI:
    Tools: NWDS 7.0, SAP portal 7.3
    Thanks
    Nag

    Hello Nag,
    there are two possibilities to use your ejb in WD4J:
    1. Via JNDI Lookup
      try {
            InitialContext ctx = new InitialContext();
            <YourEJBInterface Class> service = (<YourEJBInterface Class>) ctx.lookup(<JNDI-Name>);
      } catch (NamingException e) {
            throw new RuntimeException(e);
    2. Via EJB Model:
    here a guide --> http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70d2638c-4b04-2d10-d2a3-992fdf1e3d55?quicklink=index&…
    hope this helps.
    Regards
    Tobi

  • Java and abap stack connection

    Hello,
    how to check connection b/w Java and ABAP stack.
    I am getting below error :
    SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
      <SAP:P1>connection to partner 'localhost:0' broken / CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 t</SAP:P1>
    We did some upgrades of kernel and jvm and started getting this error.
    Please suggest

    Hi,
    Check this threads
    JCO_SYSTEM_FAILURE
    JCO_SYSTEM_FAILURE
    JCO_SYSTEM_FAILURE . Pls help
    Regards
    Ramesh

  • Reports from Java and Oracle database

    Hi
    I need to generate couple of reports from my application, with Java as front end and oracle 11.2.0.3.0.  database . Reports are  having very simple select statements, using the criteria users enter from GUI. we don't need to execute a  direct select statement from Java, with the where clauses . I did some research and found out about Pipelined functions. I tested for a small set of records and it worked fine. Will this work for large data set? any drawbacks of using this method?  Any other methods for this requirement?
    Thanks in advance
    JP

    Pipeline table functions do not sound like the appropriate approach. It is designed to primarily deal with data transformations. Using it as a rendering engine for report writing? There are fundamental problems with such an approach.
    As Dave and Andre commented - the CORRECT means for PL/SQL to pass "data" to Java (or other client languages) is via reference cursors (pointers that the client can use for referencing SQL cursor programs on the server). And Java as a report writer does not really compare with the ease and flexibility that Oracle Apex (Application Express) provides as a reporting framework.

  • Webdynpro Java and Webdynpro ABAP

    hi all,
    Im working in webdynpro java. Im confused about WD java and WD ABAP. which one we should select for what? And now a days people are telling that SAP is coming up all business packages in WD ABAP. Is it true? Which one is better either WD Java or ABAP?
    Thanks,
    J.Smitha.

    Smitha,
    It's tough question to answer. Which one to choose either Web Dynpro java or Web Dynpro ABAP , it depends on which technology you are comfortable. In relation to the business packages SAP already provided allmost all of them in java and in the future all the Business packages also available in ABAP. It's all how you want to develop the application. In sap portal world some applciation which we can develop with ABAP Web Dynpro and some applications with JAVA Web Webdynpro as SAP Web AS available as dual stack.
    If someone already has a strong ABAP background and has WD for ABAP available they should probably use that. If they are a J2EE developer they should probably use WD for Java but it is likely they will also then need some ABAP support for the backend systems.
    I think more customers may be asking for WD for Java projects simply because it has been around longer and is more widely available to customers where as some cutomers prefer to develop their application using ABAP Web Dynpro because of SAP propritary. But ultimately it's again all our interest and customer.
    Thanks
    Krishna

  • How to validate prerequisite for ODP and Oracle Client connection

    Hi.
    I have a very simple application on .Net that connect to Oracle using ODP (was compiled with Oracle.DataAccess dll 10.2).
    I want to check "connection prerequisite" (application will be able to connect to DB) before installing this aplication on other computers?
    How can I check that ODP.NET version 10.2 or higher is installed on target host (registry check is not enopugh)?
    I know that I can check ODP entries in registry - but this will not check Oracle Client and compatibility between client and ODP.
    Also, if ODP was installed by ODAC XCopy installation - registry may be not updated by new ODP entry.
    And - if I am installing on the computer, DB was installed on, Oracle Client can be not installed separately.
    And one more issue: When I tried to run "test connection" method from installation, that use referenced dll on machine, that has only ODAC (with ODP) 11, - "Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
    at Oracle.DataAccess.Client.OracleConnection..cctor()" error message was thrown (policies for both ODAC 10.2 and 11 are exists in GAC (assembly), pointing to Oracle.DataAccess 11 from ODP 2x bin).
    So, How and which components can I check to ensure appropriate versions of ODP and Oracle Client were installed and application will be connected?
    Thank you in advance!

    Hi,
    You could check for the presense of Oracle.DataAccess.dll in the GAC. Bear in mind you'd also want to check the version and whether a policy files exists as well as a newer version + policy file will work too (but not without the policy file).
    That wouldn't confirm the install is valid and works though, and I don't know of a way you could easily check that, apart from perhaps simply trying to run a small exe that attempts a connection to the database.
    With respect to the type initializer exception, that occurs when ODP cant find the right oraops*.dll or oci.dll, usually due to the wrong one being found, but can also occur if one is not found at all. Quite often this is due to the application including ODP in its bin directory rather than letting ODP get picked up out of the gac. Prior to 10.2.0.2.20, ODP loads the dependencies based in PATH so multiple homes can cause it as well. 10.2.0.2.20 and higher ODP loads dll's based on DLLPATH registry entry.
    Hope it helps,
    Greg

  • Webdynpro Java and ESS/MSS

    Hello,
    It has been a rumour for a long time and now it seems that SAP will convert all ESS/MSS services into Webdynpro ABAP....so i want to know what's the plan for Webdynpro Java ...? what areas will it be used...? and what are the options for Webdynpro Java Developers....? ...one thing for sure is to learn Webdynpro ABAP...
    Regards,
    Anil

    As far as I know, SAP has changed travel management and HR administraor from WDJ to WDA as of EhP1.
    Do you have any ideas about any other BP?
    Actually, I wonder SAP has been developed any new BP based on WDJ after EhP is introduced.

  • Java and Oracle Reports

    How to connect java with oracle report server... i m using a swing application.... I have seen api documentation but didnt get things. please help...

    user13323568 wrote:
    How to connect java with oracle report server... i m using a swing application.... I have seen api documentation but didnt get things. please help...How can anyone help you?
    You "don't get things", that is a problem you have to solve before you can be helped. Maybe you just need to spend more time on it or find better documentation; API documentation is only a reference, not a manual.

  • 3 tiers model with Java and Oracle.

    Hi everybody. I have a problem with my work. I want to design a simple program follow 3 tiers model with Java and database is Oracle. But I do not know how I can design them. Please help me. It will better if you give some source code for each layer.
    Thanks in advance.
    Ky Thanh.

    I'd suggest searching the net for tutorials. Pick out the things you don't know about and need to know (SQL? JDBC? Java? software design in general?) and google: tier architecture, sql tutorial, etc. Sun's Java & JDBC tutorials are at http://java.sun.com/learning/tutorial/index.html
    Source for each tier? Read the JDBC tutorial and you can write the database tier source yourself. Learn Swing/Servlets/whatever you use for the user interface and you can write the top tier. The middle tier is your business logic, which is dependent on your area of business, and you'll need to know about the business and just general programming. Then if the tiers need to be distributed (hopefully not), you'll need to learn EJB or something.
    I hope you haven't been given a task there you aren't ready to take on... Learning to swim by jumping into the river is a great way to learn in a school assignment, but you mention work, and learning that way at work sounds a bit risky to me.

Maybe you are looking for