Get the source of Weblogic database connection

Dear all,

Hopefully, you guys right. :-)

How to get the Source of Weblogic database connection string?

I have a Source of data created in my WebLogic.

Because I want to get my Java Bean connection string for Jasper report.
            Class.forName("oracle.jdbc.driver.OracleDriver");
            con = DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:orcl", "username", "pass");
Please advice.

Best regards
Angelique

Published by: Alexis on January 23, 2012 18:37

Hello

If you have configured the data source name in the Weblogic, then
below the code is obtained the connection based on the name of the data source.

        java.sql.Connection connection = null;
        try {
            javax.naming.Context initialContext = new javax.naming.InitialContext();
            javax.sql.DataSource dataSource = (javax.sql.DataSource) initialContext.lookup("<>");
            connection = dataSource.getConnection();
        } catch(Exception e){
             e.printStackTrace();
        }

Kind regards
Hari

Tags: Java

Similar Questions

  • Get the source code of a procedure for a huge package in oracle

    I have a package which, as methods of 40-50 in them, I would like to retrieve the source of one inside the package. is there a table where I can get this detail in the oracle database.


    I know there is an all_source table, which has the entire source code, but I want to only get the source code for a particular procedure.

    Thanks in advance.

    You have defined your procedure as provided

    procedure procedure_name...
    ...
    end procedure_name;
    

    and the procedure is not overloaded, you can try something as

    with
    first_line as
    (select line
       from all_source
      where instr(lower(text),'procedure '||lower(:procedure_name)) > 0
        and name = :package_name
        and type = 'PACKAGE BODY'
        and owner = :package_owner
    ),
    last_line as
    (select line
       from all_source
      where instr(lower(text),'end '||lower(:procedure_name)||';') > 0
        and name = :package_name
        and type = 'PACKAGE BODY'
        and owner = :package_owner
    ),
    select text
      from all_source
     where line between (select line from first_line)
                    and (select line from last_line)
     order by line
    

    Concerning

    Etbin

  • Get the message "This Mac cannot connect to iCloud due to a problem with my Id, open Preferences to solve iCloud iCloud" after entering my password which is accepted and then after a minute or two messages is.

    Get the message "This Mac cannot connect to iCloud due to a problem with my Id, open Preferences to solve iCloud iCloud" after entering my password which is accepted and then after a minute or two messages is.

    I'm your pain ptapp!

    Through my research for an answer that solves this problem, I have found that not even Apple knows how to solve this problem of password to iCloud.

    All 4 of my devices constantly ask my password because of some problems with xyz account.

    Then I enter the password only to be told that iCloud cannot check my password.

    Then after several repetitions of this I get locked and have to go to the site apple id to change my password.

    I didn't spend $6 000 on these beautiful devices so I could spend countless hours dealing with support (with no positive result) and find themselves just beyond myself in frustration. I have a Mac Pro, 2 iPads, 2 iPhones and an iPod touch. All are behaving this way, no matter what it is I'm doing at the time.

    Apple needs to fix this problem, if they have any idea how to.

  • Since the upgrade to the latest version of firefox, I don't get the padlock when it is connected to a secure site. Is this normal?

    Since the upgrade to the latest version of firefox, I don't get the padlock when it is connected to a secure site. Is this normal?

    The lock has been replaced by the site identity button, for details on use, see https://support.mozilla.com/kb/Site+Identity+Button

    If you want to add a padlock icon in the address bar, you can use the add-on locks- https://addons.mozilla.org/firefox/addon/padlock-icon/

  • Can we get the source code for the camera?

    Can we get the source code for the camera? Including libraries? CM is great, except that the camera is not well polished, and the quality of the stock ROM Sony are much better.

    probably more likely questions and restrictions of copyright

    inspect the developers space

    http://developer.sonymobile.com/

  • Windows vista Home premium recovery question - how to get the source for windows vista home edition premium as the recovery does not work since the recovery partition

    How to get the source to windows vista Home premium recovery is not from the recovery partition and gives me an error message

    Hello

    Contact the computer manufacturer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it

    they do it for a nominal cost of $

    or borrow a vista microsoft dvd; not a HP, Acer recovery disk etc

    Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer

    they contain all versions of vista

    This is the product key that determines which version of vista is installed

    http://www.theeldergeek.com/Vista/vista_clean_installation.html

    How to replace Microsoft software or hardware, order service packs and replace product manuals

    http://support.Microsoft.com/kb/326246

  • When I try to open the keyboard screen, I get the prompt and click to connect, but it does not connect.

    OT: On the keyboard interface.

    When I try to open the keyboard screen, I get the prompt and click to connect, but it does not connect. My hard keyboard is dysfunctional and now I can't type my password to connect. Is there a way to get around this? Thanks for any help.

    There is a problem with the KB3004394 update that causes what you see as well as other issues.

    Uninstall this update, your system should return to normal.

    While in Windows Update, select View Update History then installed updates. Go to the bottom of the list to KB3004394, right-click on it and choose uninstall.

    Microsoft has removed the update of the distribution.

    I would try to borrow a keyboard if you can so that you can perform the uninstall.

  • When I try to connect to my remote server the message "an ftp error occurred - cannot establish a connection to the host." How can I get the server to which to connect with dreamweaver?

    When I try to connect to my remote server the message "an ftp error occurred - cannot establish a connection to the host." How can I get the server to which to connect with dreamweaver?

    After spending most of the day on this I found that my password required to upgrade... so two of my sites are now meet Dreamweaver. And the other will be taken care by the owner of the Web site. Thank you, Nancy!

    gay

  • I get the error code message please connect firewall and protection antivirus please help

    I get the error code message please connect to the internet to validate your serial number, but I'm connected to the internet, I have disabled firewall and virus protection please help

    Please read https://forums.adobe.com/thread/1499014

    -try some steps such as changing browsers and disable your firewall

    -also clear the cache of your browser if you start with a fresh browser

    -check the file hosts for blocked entries https://forums.adobe.com/thread/1912777

    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip.

    https://helpx.Adobe.com/creative-cloud/KB/creative-cloud-desktop-application-failed.html

    http://helpx.Adobe.com/creative-cloud/KB/failed-install-creative-cloud-desktop.html

  • How can I reinstall Photoshop CS6 on my new computer when to enter my KEY I continually get the message "you are not connected to internet?

    I bought a new computer. I reinstalled my Photoshop CS6 leave a DVD, but when I entered the serial number I get the message "you are not connected to internet" while I was.  I have "pussy" with Naveen on customer support and after 20 minutes he told me to go to the following link and reinstall through it: http://www.adobe.com/sea/downloads/other-downloads.html


    This led to the same exact scenario only it took me over 2 hours to download CS6. I then contacted the 'Support Portal online' to ask for additional help. It was 2 days ago and I still have to be contacted and assisted with my problem. Any help or ideas out there?

    Here is what is in the file "hosts":

    127.0.0.1 localhost

    127.0.0.1 activate.adobe.com

    127.0.0.1 practivate.adobe.com

    127.0.0.1 ereg.adobe.com

    127.0.0.1 activate.wip3.adobe.com

    127.0.0.1 wip3.adobe.com

    127.0.0.1 3dns - 3.adobe.com

    127.0.0.1 3dns - 2.adobe.com

    127.0.0.1 adobe - dns.adobe.com

    127.0.0.1 adobe-dns - 2.adobe.com

    127.0.0.1 adobe-dns - 3.adobe.com

    127.0.0.1 ereg.wip3.adobe.com

    127.0.0.1 activate - sea.adobe.com

    127.0.0.1 wwis-dubc1 - vip60.adobe.com

    127.0.0.1 activate - sjc0.adobe.com

    127.0.0.1 lm.licenses.adobe.com

    127.0.0.1 192.150.14.69

    127.0.0.1 192.150.18.101

    127.0.0.1 192.150.18.108

    127.0.0.1 192.150.22.40

    127.0.0.1 192.150.8.100

    127.0.0.1 192.150.8.118

    127.0.0.1 209-34-83 - 73.ood.opsource .net

    127.0.0.1 3dns - 1.adobe.com

    127.0.0.1 3dns - 4.adobe.com

    127.0.0.1 3dns.adobe.com

    127.0.0.1 activate - sea.adobe.com

    127.0.0.1 activate.wip.adobe.com

    127.0.0.1 activate.wip1.adobe.com

    127.0.0.1 activate.wip2.adobe.com

    127.0.0.1 activate.wip4.adobe.com

    127.0.0.1 adobe-dns - 1.adobe.com

    127.0.0.1 adobe-dns - 2.adobe.com

    127.0.0.1 adobe-dns - 3.adobe.com

    127.0.0.1 adobe-dns - 4.adobe.com

    127.0.0.1 adobe - dns.adobe.com

    127.0.0.1 adobe.activate.com

    127.0.0.1 adobeereg.com

    127.0.0.1 crl.verisign.net

    127.0.0.1 ereg.wip.adobe.com

    127.0.0.1 ereg.wip1.adobe.com

    127.0.0.1 ereg.wip2.adobe.com

    127.0.0.1 ereg.wip3.adobe.com

    127.0.0.1 ereg.wip4.adobe.com

    127.0.0.1 hl2rcv.adobe.com

    127.0.0.1 ood.opsource.net

    127.0.0.1 practivate.adobe.ipp

    127.0.0.1 practivate.adobe.newoa

    127.0.0.1 practivate.adobe.ntp

    127.0.0.1 tss-geotrust - crl.thawte.com

    127.0.0.1 wip.adobe.com

    127.0.0.1 wip1.adobe.com

    127.0.0.1 wip2.adobe.com

    127.0.0.1 wip3.adobe.com

    127.0.0.1 wip4.adobe.com

  • where can I get the source code for the shell of the user interface

    Hi all
    I use Jdeveloper 11.1.2.3.0 shell and UI.
    I want to show a custom message to the user when it tries to close a tab that contains unsaved data.
    I found this thread {message identifier: = 10782288}
    I tried to extract the contents of the oracle-page-templates file - ext.jar, but I find only the .class files not .java files.
    So, where can I get the source code for the shell of the user interface, or someone has a better solution?

    Hello

    Try this link http://www.oracle.com/technetwork/developer-tools/adf/uishellsrc-1612278.zip

    Frank

  • How to get the DB to Oracle Cloud connection?

    Hello

    I sent my application and the database tables and procedures on Java cloud and the Cloud database matching.

    In the application on the cloud, the pages where the data comes directly from the VO are is filled correctly, but in some pages, I ran DB procedures while I get the DB connection of the using function code:

    Public Sub getDBConnection()

    {

    Connection Conn = null;

    try {}

    InitialContext context = new world;

    Data source dataSource = (DataSource) context.lookup ("< jndiName >");

    Conn = dataSource.getConnection ();

    } catch (NamingException e) {}

    e.printStackTrace ();

    } catch (SQLException e) {}

    e.printStackTrace ();

    }

    }

    But the connection is not putting in place and gives me a java.lang.NullPointerException.

    Anyone know how to create a DB connection from java code on the oracle cloud?

    See this thread for an example.

    --

    Jani Rautiainen

    Relationship with the developers of Applications in fusion

    https://blogs.Oracle.com/fadevrel/

  • Impossible to get the CF 9 Admin to connect to the IBM/DB2 server

    I'm trying to set up a new Data Source in ColdFusion 9.0.1, CF Admin, to connect to the database/server of my company IBM/DB2.  The server IBM itself is 64-bit, and I use my computer at home with Windows 7 Pro 64 bit.

    We use the customer IBM/DB2 version 9.5 FixPak 4.  It is available in 32-bit and 64-bit versions.  I downloaded both and the 64-bit installed driver and it does not work.

    In Control Panel/ODBC Data Sources, System DSN tab, it shows the IBM DB2 ODBC Driver.  I have it configured with the correct host name, name of the comic, user name and password, etc., and fine tested connection here.  When I click TEST CONNECTION, the answer is 'successful connection'.

    But when I go to CF Admin and add this as a Source of data, using ODBC Socket, it shows my connection "named" Control Panel/ODBC.  But when I try to connect, I get the answer: "UNABLE TO VERIFY for the opening of SESSION and an ARCHITECTURE MISMATCH."

    Question: CF 9 Admin does support 64-bit ODBC drivers? Wonder if this is the reason why Windows ODBC will make the connection, but Admin CF won't.  If so, I could uninstall the 64-bit driver and install the 32-bit driver and try again.  Given that few people at work know ColdFusion, I don't have a lot of support here.

    I installed the 32-bit driver on my Windows 7 desktop PC, but it has Windows 7 32 bit.  I have also updated the drivers on several Windows XP SP2 client computers, using the same IBM DB2 Client, but the 32-bit version.  All of you who work very well in CF Admin.

    Hope someone has tried this and has some tips on how to connect to a database of IBM/DB2, CF 9.0.1.  And if Admin CF9 supports 64-bit to connect drivers to other sources of data?  FWIW, all my other Admin SEE data sources (various company Oracle and other servers) work correctly in CF Admin, but I use the default ORACLE supplied with CF9 drivers.  I can't use integrated DB2 drivers for CF9, they are not compatible.  You must install the IBM DB2 client, in order to connect to the database/server IBM.

    Thank you for any help or advice.

    Gary

    Finally got the drivers IBM DB2/JDBC installed, configured and running on my Win7 64 bit PC.  Should be the same game on our server Windows Server 2008 R2 production at work, so am all together.  Still using CF 9.0.1 64-bit, fortunately.  It's the 2nd JDBC connection, I was able to set up correctly (using 'OTHER' as the DSN), including Teradata JDBC.

    When you download and install the IBM DB2 9.5 IBM drivers, you will find 2 JDBC drivers, you will need, including a JDBC class 4 driver, on your hard drive (in the folder: c:\Program Files\IBM\SQLLIB\java).  DB2 drivers that come with CF9 are for mainframe DB2 and do not work in the DB2 server environments.  Although we have 4 IBM 3090 mainframes, I needed that connection to our data base 30-Server DB2 Warehouse.  After 4 months of trying, finally figured it out and it works fine.  And just as fast, or faster, than the connection ODBC 32-bit that we use on our older servers, 32 - bit.

    That I did not "understand is that even after the Adobe technical support call, they were without help.  They wanted $250 for a call of 'pay-per-incident', and there was probably no guarantee they would have the answer I needed.  Here is the answer I realized myself today.  Hope it helps others and saves the cost of an expensive phone call (or hours of Googl'ing).

    Here is the procedure, if it helps someone else. Or if you had to get rid of your DB2 32-bit ODBC Socket connection and try the class 4 JDBC drivers that run on machines of 32 or 64-bit.

    1 copy these 2 files in your root CF bin folder (for example, C:\ColdFusion9\lib) db2jcc4.jar and db2jcc_license_cu.jar

    2 Add db2jcc4.jar and db2jcc_license_cu.jar to Java and JVM paths (restart CF application server)

    3. URL JDBC: jdbc:db2: / / MyServerName:MyPort / MyDBName

    4 driver class: com.ibm.db2.jcc.DB2Driver

    5. Enter your user ID and PW and SUBMIT.  No connection string is necessary, and no other change in advance settings.

    When I got the Green letters that said 'connected successfully', I was thrilled.  So I ran some queries to test, and they all ran fine and fast.

    As mentioned, been trying for months find this procedure by manually configuring the drivers JDBC is something new for me.  It is not difficult, but if you never did, you don't really know, do you use?  In any case, I hope this helps someone else using a PC/Server 64 bit.

    Gary

  • How to get the client computer name database?

    Hiya

    As part of the authentication of the user of our application, the requirement is that if a user is connected from a machine, the same connection of can not the user to different machines at the same time.

    In Forms6i, we had accomplished this by using the following query:

    Select the Terminal
    Session $ v
    Where username = v_username
    And v_terminal terminal <>;

    Where
    v_username = USER-> Oracle Forms reserve Word
    v_terminal = Client_Win_API_Environment.Get_Windows_Username

    In Forms 6i, the column Terminal of V$ Session used to return the name of the local client computer.

    However, in the form of 10g, it returns the name of the computer on which Oracle Application Server is installed, which seems correct to me.

    So my question is how do we get the client computer name of the database in the context of Oracle's 10g? Is there another package of database or view/table that returns the client computer name?

    Your suggestions/comments will be much appreciated.

    See you soon

    Mayur

    We have implemented the same exact requirement to retrieve the IP address of the client (WebUtil provides a function for this) and write it in the field v$ session.action (this can be done using the dbms_application_info package DB). We are so in shape 10g v assessment $session.action instead of v$ session.terminal.

  • I deleted by mistake my certificates. Now, I get the error messages trying to connect to gMail, eBay and my bank accounts, etc.

    I recently did some "housekeeping" on my computer and for reasons known only to nini-gods, I delected all my security certificates. Now, when I try to log in to gmail, ebay, my bank accounts or any https:// site, I get a warning message "this connection is Untrusted." I click on the links provided to overcome the safety message, but whenever I return to the site I have to jump through all the hoops again. I see a small box that can be clicked to confirm security exception, but the little box that must be clicked to "make the permanent exception" is always grayed out. I know I'm on the right sites - have been using the links on the personal bar for years without problems. It started right after I deleted the certificates.

    I've tried everything. Firefox RELOADED (use 3.6.4) deleted and reloaded the bookmarks, follow the instructions when I get the error message. Nothing works. As soon as I close the browser, and then go back online, I'm back to error messages.

    Can anyone help?

    COR - el: thanks a lot for this solution. Everything works fine now.

    However, I had a problem with deleting the files. I dragged to the trash, and then tried to access the sites in question and received the same message. I restarted the computer and when I checked the files I was dragged to the trash were right where they were before. The only file that are been trashed was the .txt file.

    So I renamed them as you suggested and now everything works fine.

    Thank you again once - I tried to understand by using the troubleshooting Firefox site, but your explanation was simple and easy to follow.

    Val

Maybe you are looking for

  • Windows does not start on my NB100

    I think that my nb100 has been infected by a virus. It was a strange virus scan and I couldn't do anything. I turned it off and now Windows will not boot. I tried all the option; mode without failure, safe mode with command etc, but nothing works. I

  • build the version of source code

    I know that it is possible to use a quantity of variable data to produce the installers and output of build version number. But is it possible to derive variables or macros from code source like my version of build?  It would be very handy!

  • The sampling frequency is divided between channels USB-6211

    I use a USB-6211 DAQ card.  The jury is announced with a rate of 250 kech. / s.  I started to take action with 2 channels and could not get the frequency of sampling of 125kHz, then when I tried to make measurements on 5 channels, I could get a maxim

  • Lack of exit Realtek Audio in Device Manager

    Recently, I noticed that my laptop no longer plays sound through speakers or headphones. The icon indicates that there is "no speakers or headphones connected. I checked the sound settings, and Realtek audio output (I don't remember the exact name of

  • HP Designjet 130

    I need driver for printer HP Designjet 130 (Windows 7 x 64)? where can I get it?