Java Application to connect to vdb3 database

Hi Folks,
I have to create a java application to connect to vdb3 oracle databse to support various transactions with menu options as below:
File menu(ALT F)
---Connect (ALT L)
---Exit (ALT E)
Data menu(ALT D)
---Query(ALT Q)
---Add Student(ALT A)
---Delete Student(ALT T)
---Update Student(ALT U)
Option menu(ALT O)
---Color(ATL C)
---Font (ATL N)
There is a STUDENT table with studid, firstname, lastname, major and age.
I have the following code for the GUI. I am getting the following errors. How do I go about from here? Please help.
Student.java:13: cannot find symbol
symbol : class ControlPanel
location: class Student
private ControlPanel controls;
^
Student.java:38: cannot find symbol
symbol: method GridLayout(int,int,int,int)
frame.add(panel, GridLayout(4,2,5,5));
^
Student.java:49: cannot find symbol
symbol : method addWindowListener(<anonymous java.awt.event.WindowAdapter>)
location: class javax.swing.JMenuItem
exititem.addWindowListener(
^
Student.java:69: cannot find symbol
symbol : method JMenuItem(java.lang.String)
location: class Student
JMenuItem queryItem = JMenuItem("Query");
^
Student.java:78: cannot find symbol
symbol : method showMessgaeDialog(<nulltype>,java.awt.Component,java.lang.String,int)
location: class javax.swing.JOptionPane
JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
import javax.swing.*;
import java.sql.*;
import java.awt.*;
import java.awt.event.*;
public class Student extends JFrame
     private JTextArea out;
     private JDesktopPane desktop;
     private JTextArea queryoutput;
     private ControlPanel controls;
     public Student()
          super(" Student Database");
          //container c = getContentPane();
          desktop = new JDesktopPane();
          add(desktop);
          JMenu fileMenu = new JMenu("File");
          fileMenu.setMnemonic('F');
          JMenuItem connectItem = new JMenuItem("Connect");
          connectItem.setMnemonic('L');
          fileMenu.add(connectItem);
          connectItem.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent event)
                    JInternalFrame frame = new JInternalFrame("Login", true, true, true, true );
                    MyPanel panel = new MyPanel();
                    frame.add(panel, GridLayout(4,2,5,5));
                    frame.pack();
                    desktop.add(frame);
                    frame.setVisible(true);
          JMenuItem exititem = new JMenuItem("Exit");
          exititem.setMnemonic('E');
          fileMenu.add(exititem);
          exititem.addWindowListener(
               new WindowAdapter()
                    public void WindowClosing (WindowEvent event)
                         System.exit(0);
          JMenuBar bar = new JMenuBar();
          setJMenuBar(bar);
          bar.add(fileMenu);
          queryoutput = new JTextArea(5,20);
          JMenu dataMenu = new JMenu("Data");
          dataMenu.setMnemonic('D');
          JMenuItem queryItem = JMenuItem("Query");          
          queryItem.setMnemonic('Q');
          dataMenu.add(queryItem);
          dataMenu.addSeparator();
          dataMenu.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent event)
                    JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
          JMenuItem addstud = new JMenuItem("Add Student");
          addstud.setMnemonic('A');
          dataMenu.add(addstud);
          dataMenu.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent event)
          JMenuItem delstud = new JMenuItem("Delete Student");
          addstud.setMnemonic('T');
          dataMenu.add(delstud);
          dataMenu.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent event)
          JMenuItem updatestud = new JMenuItem("Update Student");
          addstud.setMnemonic('U');
          dataMenu.add(updatestud);
          dataMenu.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent event)
          JMenu options = new JMenu("Options");
          options.setMnemonic('O');
          JMenuItem color = new JMenuItem("Color");
          addstud.setMnemonic('C');
          options.add(color);
          options.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent event)
          JMenuItem font = new JMenuItem("Font");
          addstud.setMnemonic('N');
          options.add(font);
          options.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent event)
class MyPanel extends JPanel
          private JLabel L1;
          private JLabel L2;
          private JLabel L3;
          private JTextField userid;
          private JPasswordField pw;
          private JTextField database;
          private JButton ok;
          private Connection connect;
          private JTextArea output;
          private String url;
     public MyPanel()
          L1 = new JLabel("User Id:");
          add(L1);
          userid = new JTextField(10);
          add(userid);
          L2 = new JLabel("Password:");
          add(L2);
          pw = new JPasswordField(10);
          add(pw);
          L3 = new JLabel("Database Name:");
          add(L3);
          database = new JTextField(10);
          add(database);
          ok = new JButton("OK");
          add(ok);
          ok.addActionListener(     
          new ActionListener()
               public void actionPerformed(ActionEvent event)
               try {
     url = "jdbc:odbc:Student";
     Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
     connect = DriverManager.getConnection( url );
     output.append( "Connection successful\n" );
          catch ( ClassNotFoundException cnfex ) {     
     // process ClassNotFoundExceptions here
     cnfex.printStackTrace();     
     output.append( "Connection unsuccessful\n" +
cnfex.toString() );
     catch ( SQLException sqlex ) {
     // process SQLExceptions here
     sqlex.printStackTrace();
     output.append( "Connection unsuccessful\n" +
sqlex.toString() );
     catch ( Exception ex ) {
     // process remaining Exceptions here
     ex.printStackTrace();
     output.append( ex.toString() );
import javax.swing.*;
public class MainWindow
     public static void main( String args[])
          Student student = new Student();
          student.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          student.setSize(500,200);
          student.setVisible( true);
}

Error messages tell you everything you need to know (usually).
Student.java:13: cannot find symbol
symbol : class ControlPanel
location: class Student
private ControlPanel controls;
^
This means that the compiler cannot find the class ControlPanel. Does it exists. Is it in the same directory as your other files. Has it compiled correctly.
Student.java:38: cannot find symbol
symbol: method GridLayout(int,int,int,int)
frame.add(panel, GridLayout(4,2,5,5));
^
This tells you it cannot find the method GridLayout. I presume you meant to have a new in front of it. Besides the layout manager code should have been done prior to this and your code should be
frame.add(panel);Student.java:49: cannot find symbol
symbol : method addWindowListener(<anonymous java.awt.event.WindowAdapter>)
location: class javax.swing.JMenuItem
exititem.addWindowListener(
^
Once again the method addWindowListener cannot be found. JFrame has this method not JMenuItem. Probably need an ActionListener.
Student.java:69: cannot find symbol
symbol : method JMenuItem(java.lang.String)
location: class Student
JMenuItem queryItem = JMenuItem("Query");
^
Once again the compiler thinks you are trying to call a method called JMenuItem. You forgot new.
Student.java:78: cannot find symbol
symbol : method showMessgaeDialog(<nulltype>,java.awt.Component,java.lang.String,int)
location: class javax.swing.JOptionPane
JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
Spelling!

Similar Messages

  • How do the application servers connect the new database after failing over from primary DB to standby DB

    How do the application servers connect the new database after failing over from primary DB to standby DB?
    We have setup a DR environment with a standalone Primary server and a standalone Physical Standby server on RHEL Linux 6.4. Now our application team would like to know:
    When the primary DB server is crashed, the standy DB server will takeover the role of primary DB through the DataGuard fast failover. As the applications are connected by the primary DB IP before,currently the physical DB is used as a different IP or listener. If this is happened, they need to stop their application servers and re-configure their connection so the they coonect the new DB server, they cannot tolerate these workaround. 
    Whether does oracle have the better solution for this so that the application can automatically know the role's transition and change to the new IP without re-confige any connection and shutdown their application?
    Oracle support provides us the answer as following:
    ==================================================================
    Applications connected to a primary database can transparently failover to the new primary database upon an Oracle Data Guard role transition. Integration with Fast Application Notification (FAN) provides fast failover for integrated clients.
    After a failover, the broker publishes Fast Application Notification (FAN) events. These FAN events can be used in the following ways:
    Applications can use FAN without programmatic changes if they use one of these Oracle integrated database clients: Oracle Database JDBC, Oracle Database Oracle Call Interface (OCI), and Oracle Data Provider for .NET ( ODP.NET). These clients can be configured for Fast Connection Failover (FCF) to automatically connect to a new primary database after a failover.
    JAVA applications can use FAN programmatically by using the JDBC FAN application programming interface to subscribe to FAN events and to execute event handling actions upon the receipt of an event.
    FAN server-side callouts can be configured on the database tier.
    FAN events are published using Oracle Notification Services (ONS) and Oracle Streams Advanced Queuing (AQ).
    =======================================================================================
    Who has the experience and the related documentation or other solutions? we don't have the concept of about FAN.
    Thank very much in advance.

    Hi mesbeg,
    Thanks alot.
    For example, there is an application JBOSS server connecting the DB, we just added another datasource and put the standby IP into the configuration file except adding a service on DB side like this following:
            <subsystem xmlns="urn:jboss:domain:datasources:1.0">
            <datasources>
                    <datasource jta="false" jndi-name="java:/jdbc/idserverDatasource" pool-name="IDServerDataSource" enabled="true" use-java-context="true">
                        <connection-url>jdbc:oracle:thin:@<primay DB IP>:1521:testdb</connection-url>
                        <connection-url>jdbc:oracle:thin:@<standby DB IP>:1521:testdb</connection-url>
                        <driver>oracle</driver>
                        <pool>
                            <min-pool-size>2</min-pool-size>
                            <max-pool-size>10</max-pool-size>
                            <prefill>true</prefill>
                        </pool>
                        <security>
                            <user-name>TEST_USER</user-name>
                            <password>Password1</password>
                        </security>
                        <validation>
                            <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
                            <validate-on-match>false</validate-on-match>
                            <background-validation>false</background-validation>
                            <use-fast-fail>false</use-fast-fail>
                            <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
                            <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
                        </validation>
                    </datasource>
                    <drivers>
                        <driver name="oracle" module="com.oracle.jdbc">
                            <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
                        </driver>
                    </drivers>
                </datasources>
            </subsystem>
    If the failover is occurred, the JBOSS will automatically be pointed to the standby DB. Additional actions are not needed.

  • Java application to connect to AP 7.00 (IPC)

    Hi,
    I have to develop standalone java application that connects to IPC and does configurations via the IPC Server (via the RFCs the IPC Server exports).
    I have JCo connection to the SAP ECC system (only one server. I assume the IPC server is running on the same host)
    I then tried to call the "CREATE_SESSION" command. Repository returned null.
    Do I need to set a special SystemNr in JCODestination? (To connect to the IPC Server)
    Or is it possible to make a connection to SAP ECC system and then call the IPC RFCs?
    Does SAP provide a function/transaction to retrieve a list of functions that a RFC destination supports?
    Is there a Howto document on how to call the IPC server from a standalone (Java) application?
    I hope somebody can help me!
    Thanks!
    BR Georg

    Error messages tell you everything you need to know (usually).
    Student.java:13: cannot find symbol
    symbol : class ControlPanel
    location: class Student
    private ControlPanel controls;
    ^
    This means that the compiler cannot find the class ControlPanel. Does it exists. Is it in the same directory as your other files. Has it compiled correctly.
    Student.java:38: cannot find symbol
    symbol: method GridLayout(int,int,int,int)
    frame.add(panel, GridLayout(4,2,5,5));
    ^
    This tells you it cannot find the method GridLayout. I presume you meant to have a new in front of it. Besides the layout manager code should have been done prior to this and your code should be
    frame.add(panel);Student.java:49: cannot find symbol
    symbol : method addWindowListener(<anonymous java.awt.event.WindowAdapter>)
    location: class javax.swing.JMenuItem
    exititem.addWindowListener(
    ^
    Once again the method addWindowListener cannot be found. JFrame has this method not JMenuItem. Probably need an ActionListener.
    Student.java:69: cannot find symbol
    symbol : method JMenuItem(java.lang.String)
    location: class Student
    JMenuItem queryItem = JMenuItem("Query");
    ^
    Once again the compiler thinks you are trying to call a method called JMenuItem. You forgot new.
    Student.java:78: cannot find symbol
    symbol : method showMessgaeDialog(<nulltype>,java.awt.Component,java.lang.String,int)
    location: class javax.swing.JOptionPane
    JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
    Spelling!

  • Oracle Application server connection pool and database links

    I am using Oracle application server 10g with connection pools, the db used by the application connects to another oracle db using a database link. My question is when the application starts it creates 10 connections, does it also create x amount of database links as well?

    Hi,
    Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?Hi Vinod,
    Yes, TopLink allows you to use the app server's connection pooling and transaction services. Chapter 2 of the Oracle9iAS TopLink Foundation Library Guide provides details as do the TopLink examples. The easiest way to set this up is by using the sessions.xml file. The sample XML below is from the file <toplink903>\examples\ias\examples\ejb\sessionbean\sessions.xml. Here we are adding the datasource defined in OC4J and specifying that we are using the OC4J transaction controller also.
    <login>
    <user-name>sa</user-name>
    <password></password>
    <datasource>java:comp/env/jdbc/ejbJTSDataSource</datasource>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    When using this approach you need to change your TopLink code slightly in the EJB methods:
    a. Acquire the ACTIVE unit of work from the server
    session (again, see the EmployeeSessionEJB code
    example) with something like:
    UnitOfWork uow = clientSession.getActiveUnitOfWork();
    b. Calls to uow.commit() can be ommitted or commented out
    because the EJB will handle this. Note that of course
    the methods you create in the EJB that are using this
    approach must have TX Required (default).
    Hope this helps.
    Pete

  • Help using C# application to connect to oracle database

    I'm new to database.
    I'm developing a C# GUI application in visual studio 2008 that is suppose to interact with oracle. After researching and trying out several sample codes, nothing works and I'm in desperate need of some help/advice/suggestions.
    The simplest example I'm trying is to just get a button to run a simple SQL query. The code is:
    private void button1_Click(object sender, EventArgs e)
    string oradb = "Data Source=acme.gatech.edu;User Id=gtg880f;Password=******;";
    OracleConnection conn = new OracleConnection(oradb); // C#
    conn.Open();
    OracleCommand cmd = new OracleCommand();
    cmd.Connection = conn;
    cmd.CommandText = "select Location_Name from warehouse where Location_name = 'atlanta'";
    cmd.CommandType = CommandType.Text;
    OracleDataReader dr = cmd.ExecuteReader();
    dr.Read();
    label1.Text = dr.GetString(0);
    conn.Dispose();
    I've installed many many version of oracle database and have included the Oracle.Data.Access under reference.
    If I use putty and connect to acme.gatech.edu via port 22, I can type sqlplus / and run the query "elect Location_Name from warehouse where Location_name = 'atlanta'" and it'll work.
    After some research, some say that if I can connect via sqlplus that means i can connect to the database but what do i need to implement to enable my c# code in visual studio to be able to do that.
    I did a search on the forum but found nothing that matches this. In essence, I'm not sure what/how to specify such that I can connect to the acme.gatech.edu server and run sql commands.
    Thanks,
    Oky Sabeni

    There're two ways you can get data in and out of database using .NET
    #1 System.Data.OracleClient namespace - it's .NET avail out of the box
    #2 Oracle.DataAccess.Client - aka "ODP.NET"
                   Download: http://www.oracle.com/technology/software/tech/windows/odpnet/index.html
    Or download Beta because as of today it's the only version which supports .NET "TransactionScope" (I just tested seems like still it is NOT working Re: 10g Express + ODP.NET (version 2.111.6.20) > support TransactionScope? http://www.oracle.com/technology/software/tech/windows/odpnet/index1110710beta.html
    QuickStart: http://www.installationwiki.org/ODP.NET_Getting_Started_Guide
    Also there's a doc under Start menu>Programs>Oracle - OraOdac11g_BETA_home>Application Development>"Oracle Data Provider for .NET Developer's Guide"
    It's worth reading just scroll down quick for code fragment.
    Anyway here's two small examples:
    Example 1: System.Data.OracleClient (Using library from M$)
              * First you'll need to add reference to "System.Data.OracleClient".
              IDbFactory oDbFactory = DbProviderFactories.GetFactory("System.Data.OracleClient");
              IDbConnection oConn = oDbFactory.CreateConnection();
              oConn.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;";
              // Or ...
              oConn = new System.Data.OracleClient.OracleConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;");
         Example 2: ODP.NET from Oracle
              IDbFactory oDbFactory = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
              IDbConnection oConn = oDbFactory.CreateConnection();
              oConn.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;";
              // Or ...
              oConn = new Oracle.DataAccess.Client.OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;");
    string strSQL = "... SQL statement...";
              int nPersonId = 0;
              string strFirstName = null;
              Person oPerson = null;
              string strSQL = "SELECT Id FROM PERSON";
              oCmd = oConn.CreateCommand();
              oCmd.CommandText = strSQL;
              oCmd.CommandType = System.Data.CommandType.Text;
              IDataReader oRdr = oCmd.ExecuteReader();
              while (oRdr.Read())
                   if (!Convert.IsDBNull(oRdr["Id"]))
                        nPersonId = (int) oRdr["Id"];
                   if (!Convert.IsDBNull(oRdr["FirstName"]))
                        strFirstName = (string)oRdr["FirstName"];
                   oPerson.Id = nPersonId;
                   oPerson.FirstName = strFirstName;
    Example CREATE TABLE:
              DECLARE
              count_item int;
              BEGIN
                   SELECT count(1) into count_item FROM user_sequences WHERE sequence_name = 'AUDITLOGSEQUENCE';
                   IF count_item > 0 THEN
                        begin
                        dbms_output.put_line('drop sequence AUDITLOGSEQUENCE');
                        EXECUTE IMMEDIATE ('DROP SEQUENCE AUDITLOGSEQUENCE');
                        end;
                   ELSE
                        dbms_output.put_line('no need to drop AUDITLOGSEQUENCE');
                   END IF;
                   EXECUTE IMMEDIATE 'CREATE SEQUENCE AUDITLOGSEQUENCE
                        MINVALUE 1
                        MAXVALUE 999999999999999999999999999
                        START WITH 1
                        INCREMENT BY 1
                        CACHE 20';
                   dbms_output.put_line('AUDITLOGSEQUENCE created');
                   SELECT count(1) into count_item FROM user_tables WHERE table_name = 'LOG';
                   IF count_item > 0 THEN
                        begin
                        dbms_output.put_line('drop table LOG');
                        EXECUTE IMMEDIATE ('DROP TABLE LOG');
                        end;
                   ELSE
                        dbms_output.put_line('no need to drop table LOG');
                   END IF;
                   EXECUTE IMMEDIATE '
                        CREATE TABLE LOG (
                             Id numeric(19,0) NOT NULL,
                             CreateDate timestamp default sysdate NOT NULL,
                             Thread varchar (510) NULL,
                             LogLevel varchar (100) NULL,
                             Logger varchar (510) NULL,
                             Message varchar (4000) NULL,
                             InnerException varchar (4000) NULL,
                             CONSTRAINT PK_LOG PRIMARY KEY (Id)
                   COMMIT;
                   dbms_output.put_line('table LOG created');
                   dbms_output.put_line('setup complete');
              EXCEPTION
                   WHEN OTHERS THEN
                        dbms_output.put_line('*** setup exception detected! ***');
                        dbms_output.put_line('error code: ' || sqlcode);
                        dbms_output.put_line('stack trace: ' || dbms_utility.format_error_backtrace);
                        RAISE_APPLICATION_ERROR(-20000, 'AuditTrail.oracle.tables.sql - install failed');
              END;
         Before running script, make sure your account has permission (unless you're using SYS account of course). You'd probably need to know how to create user and granther right:
              CREATE USER dev IDENTIFIED BY "devacc_@";
              GRANT CREATE SESSION TO DEV;
              GRANT DBA TO DEV;
         Here's how you can run PL\SQL scripts in Oracle
         SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 6 14:10:05 2009
              Copyright (c) 1982, 2005, Oracle. All rights reserved.
              SQL> connect devvvy/"somepwd"
              Connected.
              SQL> set serveroutput on
              SQL> @C:\dev\UnitTest\Util\Command\sql\Oracle\SetupSchema\xxxxx.oracle.tables.sql
              1125 /
              SQL> @C:\dev\Util\Command\sql\Oracle\SetupSchema\xxxxx.oracle.tables.data.only.sql
              560 /
              PL/SQL procedure successfully completed.
              SQL> @C:\dev\Util\Command\sql\Oracle\SetupSchema\AuditTrail.oracle.tables.sql
              54 /
              PL/SQL procedure successfully completed.
              SQL> COMMIT;
         Remeber however:
              (a) SQL*Plus does not like "&" in your SQL script. Do comment or string containing "&" should be taken out.
              (b) password should not contain "@" because it's a special character in "CONNECT" command.
                   Alternative, download TOAD for Oracle - http://www.toadsoft.com/toad_oracle.htm
              (c) After command, type "/" next line to get command executed.
              (d) remember to COMMIT
    REF for Oracle:
         Oracle Official doc: http://www.oracle.com/pls/db111/portal.portal_db?selected=1&frame=
         Oracle 11g configuration Guide: http://www.thegeekstuff.com/2008/10/oracle-11g-step-by-step-installation-guide-with-screenshots/
         ODAC/ODP.NET QuickStart: http://www.installationwiki.org/ODP.NET_Getting_Started_Guide
         ODP.NET versioning scheme: http://download.oracle.com/docs/html/E10927_01/InstallVersioningScheme.htm
         SQLPlus basic: http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25108/xedev_sqlplus.htm#CJAGGHGE
         PL\SQL:
              Cheat sheet: http://en.wikibooks.org/wiki/Oracle_Programming/SQL_Cheatsheet
              Reference:
                   http://www.rocket99.com/techref/oracle_plsql.html
                   http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm
              EXECUTE IMMEDIATE, DROP/CREATE TABLE: http://www.java2s.com/Code/Oracle/PL-SQL/Callexecuteimmediatetodroptablecreatetableandinsertdata.htm
              Exception handling: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm
              Named Block syntax: http://www.java2s.com/Tutorial/Oracle/0440__PL-SQL-Statements/Thestructureofanamedblock.htm
              CREATE PROCEDURE: http://it.toolbox.com/blogs/oracle-guide/learn-plsql-procedures-and-functions-13030
         Oracle DataType: http://www.ss64.com/orasyntax/datatypes.html
                             http://www.adp-gmbh.ch/ora/misc/datatypes/index.html
         Oracle Sequence and Create table: http://www.java2s.com/Tutorial/Oracle/0100__Sequences/Usingasequencetopopulateatablescolumn.htm

  • Root Application Module connecting to 2 databases technologies

    I have an application which needs to connect to 2 different databases.
    I managed to get access to each databases in their own respective Application Modules.
    In order to achieve that, I created a new ViewObject within the "oracle" model, and still used the "MySQL" query. Using the jbo.envinfoprovider property, I can force the Application module to connect to the appropriate database, MySQL in this case.
    Now, my problem is that I need to have a Root application module that will use BOTH "child" application module and eventually BOTH database connections. At the moment, I can only use one at a time. Using the jbo.envinfoprovider property of the ROOT application module allows me to select which of the 2 database I want to use, but I need both.
    To put it in a tree-like structure, here's what I want to achieve :
    ROOT (Oracle + MySQL)
    |
    |__ AppModule1 (Oracle)
    | |
    | |__ View1
    | |__ View2
    |
    |__ AppModule2 (MySQL)
    |
    |_ View3

    What I mean is if I deploy the application on the integrated weblogic server, using the default navigation flow defined in the adfc-config.xml file, when I reach the "forensic" page, it will try to "read" from both database and fail at reading the second database.
    The page displays the following :
    1- a table containing the records from the Oracle database (3 columns=> ID, pattern, solution)
    2- an adf_form used to populate the above table :
    - the ID is bound to a database trigger, so is set to readonly
    - the solution is a text input field
    - the Pattern is a LoV, based on the data found on the MySQL database.
    If I test the page from the "forensic.jspx" itself (by right-clicking and selecting "Run"), I can manage the data just fine (I can do any CRUD operations I want)
    on the other hand, if I go to the "adfc-config.xml" file and (right-click and then select "Run"), the page will only read one of the two database (I can control which one, by changing the jbo.envinfoprovider property of my application module)
    Hope this helps understand what I am trying to achieve.
    Thanks !

  • Application that connects to multiple databases.

    I am developing an application that performs many task, but one in particular is connecting to multiple databases and creating user accounts in each all with the push of a single button. I have tried putting connect statements in the trigger code but I don't get the desired results.
    How would I get my application to switch database connections while in execution?
    Please reply to the forum, or email me @ [email protected]
    Thank you.
    Travis

    Hi
    The only possible way which I could find for your requirement is that of DB Links. Establish DataBase Links among the multible databases, with which you want to work in one session. Peform all your actions through the DB Links.

  • 3rd party Java Application Cannot connect to inter...

    3rd party application like gmail, orkut or 160by2 which are java ME application cannot connect to internet in my Nokia 2700 classic, when connecting it only prompts "Application wants use Network. Allow?" like this, I press the allow button still it cannot connect to the internet, my Operamini and all other nokia apps are working correctly.. Please Help.. 

    sandeep_extreme wrote:
    3rd party application like gmail, orkut or 160by2 which are java ME application cannot connect to internet in my Nokia 2700 classic, when connecting it only prompts "Application wants use Network. Allow?" like this, I press the allow button still it cannot connect to the internet, my Operamini and all other nokia apps are working correctly.. Please Help.. 
    These apps might not be compatible with your 2700 even though it's installed.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Java applet to connect to Oracle Database?

    Hello,
    I need to make a standalone java applet where I can enter the following:
    database url:
    driver:
    database:
    user name:
    password:
    host name:
    port:
    and then click "ok" and it is supposed to connect me to my Oracle account set up at my school. Ive never done anything like this before. Can anyone please provide me with some code to get started? Thank soooo much!

    look into jdbc. You will find it a bit more tricky if you insist on using an applet (why not an app?), as they do not by default have permission to do this sort of stuff (security issues). You will need to create the applet, and then sign it using a certificate. You may be able to get a development-only certificate for free from some eastern european website... I would strongly urge you to use an app instead if you are in any way able to.

  • Java == error while connecting to mysql database?!?!??!

    Hi. I'm using Eclipse to develope jsp pages. I'm new to java.
    I'm trying to connect from a jsp page to mysql server and i'm getting an error on the line below:
    Class.forName("com.mysql.jdbc.Driver");
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    i downloaded the mysql jar file and i added it to my library folder.
    the other question is that is there anyway to mention the name of the database in my connection?
    conn =DriverManager.getConnection("jdbc:mysql://localhost","admin", "");

    hi this is the root cause i thought it might help
    root cause
    javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
         org.apache.jsp.test_jsp._jspService(test_jsp.java:100)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
         java.lang.ClassLoader.loadClassInternal(Unknown Source)
         java.lang.Class.forName0(Native Method)
         java.lang.Class.forName(Unknown Source)
         org.apache.jsp.test_jsp._jspService(test_jsp.java:85)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • Issue with Java Application with ECC - Connection Issue

    Hi
    We have developed one java application to connect to SAP to extract some data. We are using java API (sapjco) to connect to the SAP. Now we are facing one issue u2013 for the ECC while connecting through the java application we are getting u201CUserid or Password incorrect erroru201D, but with the same userid and password we are able to log through the SAP GUI. If we changed the password with all CAPS (Capital Letters) and without numeric values, its working fine in java application (Means its connecting to ECC)
    We are facing this issue only in ECC; the same application is running successfully in SAP 4.7 etc. without changing password.
    Please Help!

    I would draw the conclusion that you have to provide the paaword in upper case. There is a standar java method there that does this for you. Just do it before sending the password.
    Regards,
    Benny

  • ORA-28509 when calling PL/SQL mq message throught Java Application

    I have a PL/SQL procedure called "prc_send_mq_message" witch works perfectly when I invoke throught database users where it is compiled.
    But when this same procedure is invoked by Java Application witch connects with the same user, the error: "ORA-28509: was not possible stablish connectinon with Non_Database Oracle" happens.
    Can anyone help me ?
    See pl/sqlblock bellow:
    Create or replace procedure prc_send_mq_message Is
    pi_db_link_name Varchar2(100) := 'siibdg4mq';
    pi_queue_name Varchar2(100) := 'QL.REQ.SIIB.FBS.01';
    vObjDesc PGM.MQOD;
    vHandleObj PGM.MQOH;
    vMsgDesc PGM.MQMD;
    vPutOpt PGM.MQPMO;
    --options PGM.MQPMO;
    vPutBuffer Raw(32767);
    Begin
    -- Opening the queue:
    vObjDesc.DBLINKNAME := pi_db_link_name;
    vObjDesc.OBJECTNAME := pi_queue_name;
    pgm.mqopen( vObjDesc, PGM_SUP.MQOO_OUTPUT, vHandleObj ); --> ORA-28509: was not possible stablish connectinon with Non_Database Oracle
    End;
    /

    Hi,
    This is the Oracle MessageQ forum, not the WebLogic Server, Oracle Database, or Oracle JMS forum. You will likely have better success in getting your question answered by using one of the Database related forums.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Monitor database connections in a database pool

    Hi,
    Do you know how I can monitor database connections in a database pool.. ? I am using Jboss container.
    The purpose is to monitor connections that are closed and refresh them.
    Thanks,

    There a firewall.. across which my application makes connections to the database.. the firewall times out due to the inactivity. and my application dies.
    I was thinking may be I could check for the database connections in a pool and then one that is not being used for a long time .. close it and again refresh the connection.
    Please Advise...

  • Creating WSDL for Java Application/ JSP Page

    I am looking for creating a Webservice(WSDL) for a Java application which connects to the R/3 System Backend. I have tried to connect to the Backend using JCO in JSP page and was successful, but I need to generate a WSDL file which when consumed performs the connection and looks up for the data in the Backend. The FrontEnd can be a JSP application or a Java Application in NetWeaver.

    The easiest thing to do is put it in a JAR file with an appropriate manifest. That way it retains cross-platform functionality, which is kind of the point of writing things in Java. The JAR file will be double-clickable.
    If you absolutely must put it in an .exe for some reason, there are applications on the web that will do it.
    Either way, a google search is your next step.
    Drake

  • Using Java + WEBDAV to connect to Oracle 10g Repository

    Hi,
    I could not connect to Oracle 10g Repository with WEBDAV protocol. I thought that Oracle should provide a client library to help Java application to connect to Repo but I could not find it out.
    Could you please show me how to connect to Repo with WEBDAV protocol?
    It's better if giving me some examples.
    Thanks a lot.

    Hi,
    Did you succeed??
    I am also searching for an example.
    Regards,
    Romano

Maybe you are looking for

  • Interesting and an  imporatant issue at sales order schedule line.

    hi all, interesting and an  imporatant issue at sales order schedule line. i created a sales order with 10 qty.and the system proposed a two schedule lines. let's say to order created date is 27.11.2008.and the requested delivery date is 27.11.2008.

  • Magic mouse left click works like right click

    magic mouse left click works like left click and at times right click.

  • HowTo make a servlet with PDF output to the browser

    A new one goes here ! How do I make a Servlet which functions like the rwservlet, and pushes a PDF output to the clientbrowser ? Is there any sample code that uses rwclient or others to produce a response ? Thanks anyone.

  • Photoshop cc can't open and make new documents.

    I'm using adobe creative cloud and photoshop cc. When I run the Photoshop cc, it can't open and create new documents. Open and make new documents Photoshop don't work so i terminate a photoshop cc use windows task manager. I use windows7 ultimate k o

  • Internationalization of application in ADF

    Hi, I have done with loading the bundle and creating the localized resource bundle but when it comes to registering the locales and registering the bundles used for application messages....i am getting an error "page cannot be displayed".I refered th