Oracle CEP to connect to a database

Hi all

I am trying to create a simple Application CEP example of works for a few days, but I just can't do it and I'm getting more crazy.

So I installed Oracle CEP 11.1.1 and configured Eclipse 1.2.1 to develop the CEP Application. Then, I created a new CEP project modelled on HelloWorld.

I added the drivers jdbc in java build path as external jar.

I also tried to add a data source in the config.xml file

When I add a database connection in the data source Explorer Eclipse it works very well.


But when I add the code in the constructor of my card and deploy the application:
try {
          DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
             this.conn = DriverManager.getConnection(CONNEC_STRING, USERNAME, PASS);

          } catch (SQLException e) {
               e.printStackTrace();
          }
I get just an error java.lang.NoClassDefFoundError on registerDriver instruction. And I really don't understand what is wrong.

I would be really grateful if someone could explain me step by step how set up drivers and just do a simple select query in a table.


Thanks in advance.


Max

You must not the DriverManager connection object. You can get it from Datasource by getting static resource injection.

This returns you the javax.sql.Datasource object that can give you a link.

Please take a look at

http://download.Oracle.com/docs/CD/E17904_01/doc.1111/e14301/overview.htm#CEPED524

Tags: Fusion Middleware

Similar Questions

  • ORACLE client to connect to the database without user name and password

    Customer require us to perform a function:
    On the client server that has installed the ORACLE client. They can connect to the database without username and passwod entry.
    Use "sqlplus / as sysdba" can archive database connection.
    Is it possible to change the configuration to do this?

    See if external authentication support,
    http://docs.Oracle.com/CD/E11882_01/network.112/e16543/authentication.htm#DBSEG99842

    Aman...

  • Connection to the database to Oracle using Oracle Apex 5.0.1

    Hi all

    Is it possible to connect to the Oracle (Oracle SQL Developer 4.1.1) database using Oracle Apex 5.0.1 instead of using the object browser. As he was more workspace after you have downloaded the data we have on CSV Excel.

    For example: regardless of the tables I've created in the Application Builder is created in the object browser. We have limited the workspace of 500 MB. This is the reason why we cannot use this method to load the data and retrieve it. (Note: can I ask 2 GB of space to work on the approval of the Director, who is still not sufficient)

    Is it possible that I will create an apex.oracle.com application by using the application builder and I will create in the database tables. When I load the file in application, data will be stored in the database Oracle instead of the object browser.

    Well let me know is possible, if yes, how can I proceed.

    If this isn't the case, please let me know how I can get more workspace.

    According to my understanding, other possibilities are: 1) taking backup of old files and free up space, 2) create another workspace and get extra work space.

    Thanks for your help!

    Kind regards

    Vinod

    Hello

    When you load data using APEX SQL Workshop utilities for example, the data is stored in your database tables.

    Object browser is just seen tool your schema as the table objects and the data in the tables, just as SQL Developer.

    If you have no good reason to keep these files that you downloaded in the workspace, delete those. Data is stored in database tables.

    Kind regards

    Jari

  • need to connect and configure the oracle on windows 7 vmware professional database? Help, please?

    Hello

    In fact, I wanted to set up ORACLE with Informatica Power Center (ETL) database connection. But my problem is that I installed the oracle database with grid inside VMWARE with the RHEL operating system. But what INFORMATICA etl software is installed outside VMWARE, which is located in WINDOWS 7 Professional.

    I would like to know how I can access and configure oracle database of windows 7 Professional as oracle database is installed inside VMWARE RHEL 6.5 operating system.

    Help, please.

    HERE'S HOW I SOLVED IT: -.


    Here is the url for the NAT that could become useful for other institutions.

    How to Setup Port Forwarding in VMware Workstation 9 | Virten.NET

  • JAVA + connection with a database created on Oracle Application Express

    Hello

    I have a database created on Oracle Application Express (free version), and I have to connect to this database in a java application (made on Eclipse) for a college job. Is this possible? If it is, can you show me how to do this?

    Thank you!

    9227e5f8-f6e0-4822-8e9b-5dbb1f227a26 wrote:

    I have a database created on Oracle Application Express (free version), and I have to connect to this database in a java application (made on Eclipse) for a college job. Is this possible? If it is, can you show me how to do this?

    Databases are not "created on Oracle Application Express". Request Express is a component of a pre-existing database.

    What do you mean by 'Oracle Application Express (free version)'? If it comes to a workspace on the hosted apex.oracle.com, then it is possible to connect using the APEX in a web browser. If you mean a local installation of Oracle Express Edition, then Yes, a Java application can connect to it, but the issue is off-topic for this forum and should ask in the forum Database Oracle Express Edition (XE) .

  • Unable to connect to the database from Oracle Forms server

    Hello

    I installed Oracle Forms on top of Weblogic server. When I try to connect to an Oracle Forms home by TNS naming database, it returns error "ORA-12504". It works fine when I use EZConnect.

    D:\Oracle\Middleware\FRHome\BIN >. \sqlplus myuser/mypass@auhdb2

    SQL * more: version 11.1.0.7.0 - Production on Sun Sep 28 10:28:34 2014

    Copyright (c) 1982, 2008, Oracle.  All rights reserved.

    ERROR:

    ORA-12504: TNS:listener did not have the SERVICE_NAME in CONNECT_DATA

    D:\Oracle\Middleware\FRHome\BIN > @//auhdb2/auhdb2 mypass/myuser mypasssqlplus

    SQL * more: version 11.1.0.7.0 - Production on Sun Sep 28 10:28:55 2014

    Copyright (c) 1982, 2008, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL >

    Here are the specifications of the environment:

    Server operating system: Windows 2008 R2 64-bit EA

    WebLogic: Weblogic Version 10.3.6

    Forms and reports: 11.1.2.2

    Database, I am trying to connect to: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 on Windows 2003 Server

    Tnsnames configuration in D:\Oracle\Middleware\FRHome\network\admin:

    AUHDB2 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = auhdb2) (PORT = 1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = auhdb2)

    )

    )

    Thanks in advance.

    I want to update this post because I understood what was the matter.

    The TNSNAMES file. ORA file must be created in ORACLE_INSTANCE/config, not in %ORACLE_HOME%\FRHome\network\admin

    It was interesting for me!

  • Connect to the database through PHP Oracle

    Hello

    I'm trying to run a PHP script on a button from an external site that connects to the Oracle database. Someone at - it an idea how to connect to a database SQL as I want to use the Web site as a customer to the product which inserts records?

    Thank you very much!

    I read your other thread Connect to database via PHP APEX found on the forum of the APEX.

    The person who told you to post here you gave some bad advice.

    "cj" has some good information for you in your original post.

    As you use the APEX and PHP to interact with the database at the same time, you will need to do some design work before you continue.

    Step 1: Learn Oracle.

    Read Oracle Concepts Guide

    If you have questions about how Oracle works, feel free to ask in the general forum.

    Step 2: Design your security

    identify the tables of the PHP users will be allowed access. (I only allow to SELECT)

    identify processes that PHP users will be allowed to do. (my LMD is placed here)

    Think "ROLES".

    There is a forum "database security - general."  But, I think that general would also work.

    Step 3: Move the "business logic" in the database

    You want to reuse the APEX of the process in PHP, PERL/CGI, .NET, etc etc.

    To do this, the only way is to move the process of the APEX in the database code. (IE packages)

    In other words: put your "business logic" within your database.

    Not all the processes of the APEX should be moved (for example 'extract of automatic data"is specific APEX)

    You can create Packages that can be used instead of "Automatic DML" within the SQL APEX workshop.

    (post in the forum of the APEX for more information)

    Other processes, you will need to read the code to determine.

    Also, you'll want to move your APEX 'Permission' and 'Validation' code in packages also.

    In this way: PHP, .NET, Java, etc., etc. can use the same code 'validation '.

    Step 3: use a code repository

    You will create a large number of packages.

    You'll want to use a Code (e.g. SVN) repository to keep a history of your code.

    Oracle SQL Developer (free) must be able to help here

    Step 4: consider asking for help

    You should consider hiring a consultant to help you if you don't have in-house expertise that can solve the above steps.

    MK

    PS - for later use, remember to mark your question as 'responded' If you realize that it is in the wrong forum.

  • Error: "oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber ()"I"connection to the database of AWM

    When I try to connect to a database of MN get the following error:

    java.lang.UnsatisfiedLinkError: oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber () I

    java.util.MissingResourceException: can't find resource for bundle oracle.olap.awm.app.AwmResources3, key oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber () I

    Any ideas?

    Windows: 7

    MN: 11.2.0.3.0A

    DB: 11.2.0.1.0

    Oracle client: 11.2.0 (32 bit)

    I found the answer in this post:

    Error connecting to 11.1.0.7 AWM db with OLAP option

  • Cannot connect to the database Oracle Hyperion EPM 11.1.2

    Hello!
    I'm deployment Hyperion EPM 11.1.2 on a single machine with Windows 2008 R2 x 64. I created an Oracle database, and I can connect to it through SQL, so everything looks ok here. I also installed the Oracle Client for Win x 64 and ODP on my machine. The installation of Hyperion EPM also completed successfully, and then I went to set it up. I have entered the database connection information:

    Driver database: Oracle (thin)
    Server: the IP address of the machine >
    Port: 1521
    The service name or SID: < my Oracle database name >
    Username: Oracle user with the role of s/n >
    Password: < password of the Oracle user >

    And then I click on 'Next' and I get the error message: + "" i/o error: the network adapter could not establish the connection "+"

    I would point out that I also had a problem connecting to the Oracle SQL Plus error first database: "ORA - 12560:TNS:protocol adapter error. But after the creation of the ORACLE_SID environment variable by assigning the name of the database, this error disappeared.

    Please help with any advice on what could be bad! Thank you!

    If you use 'localhost' or 127.0.0.1 during the configuration of the database not the real IP address

  • Connect to the database using oracle forms

    Hello experts,

    I have installed on my computer, Oracle Developer Suite 10 g (10.1.2.0.2) (including the forms and Designer) and after that I installed Oracle Database 11 g Express Edition (11.2) Beta.
    both facilities are on the same (local) computer.
    When I chose to connect to the database, he wonder about the data connection to the database:
    username, password and database.
    I'm sure that the user name and password are correct, because I have no problem to connect directly to the database (via sql * more).
    could you please tell me what I should write in the field database? I trid XE but it dose not help.
    Can I need to make some changes manully so that it works?
    Please note that the operating system is Windows XP service pack 3.

    Thank you for your help.

    Published by: user1818173 on 28/08/2011 01:43

    Hello
    Have you changed the TNSNAMES file. File of the ORA for DS? You must add the TNS for DS TNSNAMES. ORA file.
    Go to $DB_Default_Home$ \netword\admin and open the TNSNAMES file. ORA file in Notepad. Copy the entry tns where you connect from SQL * more.
    Go to $DS_Default_Home$ \netword\admin and open the TNSNAMES file. ORA file in Notepad. Paste the tns entry that you copied.
    Now try to connect generator of form.
    Kind regards
    Qasim Jules

  • not able to connect to the database using the oracle instant client

    Hello

    I am not able to connect to the database using the instant oracle from my local PC client. They use to connect to the database files and sqlnet.ora files LDAP.ora. If I want to test the connection, I found this executable tns wasn't there, so not able to tnsping. So I'm not able to solve this problem.

    Please let me know if a solution for everything

    Client Oracle: oracle 10.2bFAT client 32-bit

    Platform: windows 7 64-bit

    Thank you
    Veera

    There is little that tnsping can do sqlplus can't.

    Instead of
    tnsping mydb.myorg.com
    Try
    sqlplus-s-L /@mydb.myorg.com
    or
    sqlplus-s-L user/[email protected]

    If you get
    ORA-12154: TNS: could not resolve the connect identifier specified
    you know that the customer could not resolve 'mydb.myorg.com '.

    If you get
    ORA-12541: TNS:no listener
    then "mydb.myorg.com" could be resolved, but there is no listener it running.

    If you get
    ORA-12514: TNS:listener is not currently of service requested in connect descriptor
    then "mydb.myorg.com" could be solved, the listener is in place, and the database is out of service.

    If you get
    ORA-01017: name of user and password invalid. connection refused
    you know that 'mydb.myorg.com' has been successfully resolved, and the database is running.

    If you want more details, such as how and what "mydb.myorg.com" is resolved, turn the tracking by adding the following to "sqlnet.ora:
    TRACE_LEVEL_CLIENT = ADMIN
    TRACE_DIRECTORY_CLIENT = C:\TEMP (a writable directory)

    Then you will find lines like this in the trace file:

    -THE INFORMATION SOURCE PARAMETER FOLLOWS-
    Attempt to load system pfile source C:\oracle\network\admin\sqlnet.ora
    Source of the setting successfully loaded

    Attempt to load the local pfile source C:\Dokumente und Einstellungen\lanadvall\sqlnet.ora
    The parameter source has not been loaded.

    This shows you which configuration files are read, followed by the settings real read.

    nnfgrne: will read if path adapters
    nnfgrne: switching adapter LDAP

    He's now looking for LDAP name resolution.

    nnfloidinfocache: Info: insert the value DIRECTORY_SERVSSL = oid.host.myorg.com:389 at index 0 in NLPA_CACHE

    These are LDAP servers, he is trying.

    nnflilc: conn sync opening of oid.host.myorg.com:389

    nnflfdn: turning simplified mydb.myorg.com name to a unique name.
    nnflfdn: using the administrative context: dc = prod
    nnflfdn: the domain name resulting is cn = mydb, cn = OracleContext, dc is myorg, dc = com

    nnflrne1: runs the directory for dn: cn = mydb, cn = OracleContext, dc is myorg, dc = com
    nnflqbf: search: Base: cn = mydb, cn = OracleContext, dc is myorg, dc = com, range: 0, filter: (objectclass = *)

    nnfgrne: query fails, the leap to the next map

    Did not work. Try the other adapters:

    nnfgrne: switching adapter EZCONNECT

    snlinGetAddrInfo: name resolution failed for test64.test

    No luck.

    If the resolution is approved, it will look like this:

    nnfloidinfocache: Info: insert the value DIRECTORY_SERVERS = oid.host.myorg.com:389 at index 0 in NLPA_CACHE

    nnflilc: conn sync opening of oid.host.myorg.com:389

    nnflfdn: turning simplified mydb.myorg.com name to a unique name.
    nnflfdn: using the administrative context: dc = prod
    nnflfdn: the domain name resulting is cn = mydb, cn = OracleContext, dc is myorg, dc = com

    nnflrne1: runs the directory for dn: cn = mydb, cn = OracleContext, dc is myorg, dc = com
    nnflqbf: search: Base: cn = mydb, cn = OracleContext, dc is myorg, dc = com, range: 0, filter: (objectclass = *)

    niotns: the call to address: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=dbserver.host.myorg.com) (PORT = 1521)) (CONNECT_DATA = (SID = DBNAME) (CID = (PROGRAM = C:\Oracle\ora1020\bin\sqlplus.exe)(HOST=pc247596)(USER=lanadvall)))

    Yours,
    Laurenz Albe

  • slow down the connection to the database (Oracle enterprise 11g ed on RHEL 4)

    Hello
    I am facing problem when connecting to the database connection using sqlplus to my database the time consuming and it increases as the number of users connect to it increases. (although with a user of sqlplus scott/tiger@db takes 15 seconds and when simultaneously if multiple users try to connect then time required in connection is alsomost = number of user * 15 seconds.)

    same tnsping takes huge when 4-5 user tries to connect to the database.
    What should I do for debugging?

    Hello

    Try this:
    -Remove any nameserver entry in /etc/resolv.conf on server
    -Add name to the/etc/hosts machine like that
    127.0.0.1 localhost.localdomain localhost
    10.10.20.134 piorovm.localdomain piorovm

    Kind regards
    Marcin Przepiorowski
    http://oracleprof.blogspot.com/

  • How can I connect to my database externally from another pc on the network?

    Hi all

    I just install 12 c on my Oracle Linux box and I am able to connect locally to the database, as intended. Now, what would be the first step to connect to my external database from another computer on the network. By example, if the database server is 10.0.0.150 and I want to connect to 10.0.0.151 how can I make this happen? If necessary here are a few references:

    -bash-4, $ 2 cat listener.ora

    listener.ora # Network Configuration file: /ora01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora

    # Generated by Oracle configuration tools.

    LISTENER =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oranode1.dba.com) (PORT = 1521))

    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))

    )

    )

    -bash-4, $ 2 cat tnsnames.ora

    tnsnames.ora # Network Configuration file: /ora01/app/oracle/product/12.1.0/db_1/network/admin/tnsnames.ora

    # Generated by Oracle configuration tools.

    ANTHONYDB =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oranode1.dba.com) (PORT = 1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = anthonydb)

    )

    )

    -bash-4, $ 2 cat/etc/hosts

    127.0.0.1 oranode1 oranode1.dba.com localhost4 localhost4.localdomain4

    : 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

    10.0.0.150 oranode1.dba.com oranode1

    Let me know if you need any information. Currently, I am not able to connect to my database using the IP and port (10.0.0.150, 1521) of my 10.0.0.151 pc. Thank you all for your help in advance.

    Hello EdStevens,

    I tried to use the SID with SID = anthonydb and I got the same error message. I believe that we must resolve before listener troubleshoot us this error...  If we look at the file of the listener:

    [oracle@oranode1 admin] $ cat listener.ora

    listener.ora # Network Configuration file: /ora01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora

    # Generated by Oracle configuration tools.

    LISTENER =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oranode1.dba.com) (PORT = 1521))

    )

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = 10.0.0.150)(PORT = 1521))

    )

    )

    ADR_BASE_LISTENER = / ora01/app/oracle

    I have two entries, and I think that I should remove the last entry:

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = 10.0.0.150)(PORT = 1521))

    )

    I created a backup of the file listener and I'm going to give it a shot.

  • How to connect to the database without sqlclient soa

    Hi all

    I have a very simple question.

    I need to write a shell script to get some stats for bpel instances of database as part of the daily health check.

    The problem is in our area of unix server, any customer database is not installed.

    Sql client is present as part of the installation of SOA that we can use to create the connection to the database? or by any mode of access to the shell database.

    Thanks in advance,

    Bob

    Hi Bob, there.

    most of the components in the FMW stack including SOA infrastructure rely on pure JDBC to talk to RDBMS and as I know there is no client Oracle installed in slot the FMW home (after installing SOA Suite).

    One possibility would be to use the Oracle Instant Client and use its tools from your shell scripts. It's a bit unzip and run Setup.

    HTH,

    A.

  • Unable to connect to the database. adbldxml.pl

    I've updated 11.1.0.7 12.1.0.2 database database with a 12.1.3 apps

    I produced the apps appsutip.zip and copied to the 12.1.0 oracle home

    but when I run perl adbldxml.pl in appsutil/bin and answering questions that I can't connect to the database

    Hello

    When I run the listener his race of my former oracle home how change that

    You must stop the listener of the old House and new start home. You may need to copy all the files from the old House to the new house network and change the oracle home location in all the files manually (or) you can configure the new listener of 12 at home.

    To get an idea please see my blogpost:

    http://appsdbaworkshop.blogspot.com/2012/03/Oracle-11gr2-database-upgrade-in-apps.html

    Kind regards

    A H E E R X

Maybe you are looking for

  • Apple Watch connection icon

    My son has experimented with his new Apple Watch today, and after setting the phone down, it found the phone. Thus, he went to his watch, crept upward to display looks and got to the first to allow him to ping the phone. Top of the page it showed con

  • I have delete my folder of photo by accident iOS 9.2.1 stream

    I deleted my file of flow of photos by accident, but photos will always download in my folder of iCloud on my windows laptop. I tried to off 'iCloud photo library' and 'Download for my photo stream' under the settings iCloud on my iPhone, but it does

  • How can I replace a receiver for a Mobile Mouse 3500 MicrosftWireless?

    I accidentally dropped my laptop while the Mobile Wireless mouse receiver is plugged into the USB port. The receiver was totally destroyed. Now, I want a source replacement part. The mouse is a gift from last Christmas and I don't want to replace as

  • Install new printer and remove old printer

    I'm trying to remove and install a printer.  Someone can help me. I have a hp photosmart C7280 printer I want to install on pc. Follow-up to the procedure didn't work.

  • 2 12 X spectrum: spectrum 2 12 x power

    How and where can I buy NDDN food for my new x 2 12 computer science spectrum? I don't see on the web site of HP