Help-how can i connect to the XE through my java application?

Hi, i am trying to connect to the XE through my java application. I have downloaded the jdbc driver tho. but the error occured: cant find the symbol (class oracledatasource not found) . could anyone here tell me what else should i try to fix it? where should i put the jdbc packages ? anyone's prompt reply would be much appreciated! thanks a lot.

Hi ,thank you very much for your guide.
i am actually trying to connect to the XE server through my JSP files.
i download the Oracle jdbc driver packages and put them in the same folder with JSP files. but i did not set the class path tho.
do i have to set the enviroment variables for the classpath of Oracledatasource class? thanks a lot.
another problem i got is installing the JDeveloper, it seemed my computer just got stuck there when installing JDeveloper. my laptop is with 256MB memory tho.
the code i used to connect to the XE server in my jsp file is as below:
<%@ page language="java" contentType="text/html"%>
<%@ page import="java.sql.*" %>
<%@ page import java.sql.Connection%>;
<%@page import java.sql.SQLException%>;
<%@page import oracle.jdbc.pool.OracleDataSource%>;
<%@ page import="java.io.*" %>
<% String jdbcUrl = "jdbc:oracle:thin:@localhost";
Connection conn;
OracleDataSource ds;
ds = new OracleDataSource();
ds.setURL(jdbcUrl);
conn = ds.getConnection(jdbcUrl);
%>
dose it have some problems there?
thanks a lot.
Message was edited by:
Novice

Similar Messages

  • How can I connect with the AspNetUsers table in MVC 5?

    I have a model, in which I have used several foreign keys from other tables. The point is that I also need to get the Id of the user, from the AspNetUsers table, though, I don't know how. I have done something like this, but it doesn't seem to be working:
    public class Message
        public int MessageID { get; set; }
        [Required(ErrorMessage="Please type a message to submit")]
        [DataType(DataType.MultilineText)]
        [Display(Name="Message")]
        public string MessageText { get; set; }
        public DateTime WrittenOn { get; set; }
        [Required(ErrorMessage="Please select a ticket")]
        [ForeignKey("Ticket")]
        [Display(Name="Ticket")]
        public int TicketID { get; set; }
        public virtual Ticket Ticket { get; set; }
        [Required(ErrorMessage = "Please select a business")]
        [ForeignKey("Business")]
        [Display(Name = "Business")]
        public int BusinessID { get; set; }
        public virtual Business Business { get; set; }
        [Required(ErrorMessage = "Please select a user")]
        [ForeignKey("aspnetusers")]
        [Display(Name = "User")]
        public int Id { get; set; }
        public virtual ApplicationUser ApplicationUser { get; set; }
    When I try to create a controller using the Entity Framework with my model, I get an error message saying:
        The ForeignKeyAttribute on property 'Id' on type ... is not valid. The navigation property 'aspnetusers' was not found on the dependent type ... The Name value should be a valid navigation property name.
    If someone could help me solve the problem, I would be glad.

    Hi Toni,
    I see that this particular query is been answered in the following thread.
    http://stackoverflow.com/questions/25372436/how-can-i-connect-with-the-aspnetusers-table-in-mvc-5
    You can also refer the following links, hope this helps.
    http://stackoverflow.com/questions/20071282/aspnet-identity-and-mvc5
    http://blogs.msdn.com/b/webdev/archive/2013/10/16/customizing-profile-information-in-asp-net-identity-in-vs-2013-templates.aspx
    Regards,
    Bharath

  • How can I connect to the database using ODBC within excel.

    Hi,
    How can I connect to the database using ODBC within excel and just refresh the data when needed.
    Thanks,
    Priyanka
    Edited by: user554934 on Jun 9, 2009 2:53 AM

    This is NOT an APEX relevant question, try posting it in the SQL/PL/SQL Forum..
    Thank you,
    Tony Miller
    Webster, TX

  • I recently updated my iPod touch to sync through iCloud - now can't connect to the internet through wifi, my macbook air is working as we speak

    I recently updated my iPod touch to sync through iCloud - now can't connect to the internet through wifi, my macbook air is working as we speak. ive tried 'forgetting this network" in settings; tried turning off and on again; and pulling my hair out! The last was equally useless and a little painful!

    Try:
    - Resetting the iPOd. Nothing will be lost
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Pwer off and then back on yur router
    - Reset network settings: Settings>General>Reset>Reet Network Settings
    - iPhone and iPod touch: Troubleshooting Wi-Fi networks and connections

  • How can i build RPMs file for my own Java Application?

    How can i build RPMs file for my own Java Application?....I have my own directory that contains all Java Source files and some files that my Application required....I want to build RPMs file like a install File to Linux System, Now my OS is Linux Fedora core 1.....How can i do this?

    I think that in order to create a RPM, you'd need to
    use some C.Nope - the RPM is all about packaging and the "magic" x.spec file. You can have anything you want in the RPM, but you have to use RPM tools to build the .rpm file. One of the features is that you can also indicate (via "install" scripts) modifications to other files or the filesystem to support the installation of whatever's in the RPM.

  • How can i connect to the itunes store on my ipod?

    i've tried buying an album off of itunes but it keeps coming up with 'cannot connect to itunes store', will i be charged even though it is working? and how can i download it without this happening?

    Hello there, JosieMay7.
    The following Knowledge Base article has some great information for troubleshooting your issue:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    Additionally to verify if you have been charged, the following article will help you determine that:
    iTunes Store & Mac App Store: Seeing your purchase history and order numbers
    http://support.apple.com/kb/HT2727
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • Can i connect to the database through the internet

    hi all
    i installed a database oracle 8i enterprise edition on a pc that exists in a town far from me . i wonder can i connect to this database through the internet from my house
    please i need a answer
    thanks in advance

    You can connect from an Oracle client to any Oracle database in the world that meets certain requirements.
    First you need an open network connection between the two points so either no firewall exists between the two stations or the firewall(s) have been configured to allow Oranet traffic. This means both databases must have access to the Internet and certain ports are open.
    Second you will need the IP address and port for the remote listener, which in turn must be up and running on the target server.
    Then you must have the Service Name or SID and a valid username/password combination for the target database. Plus the username must have create session privilege.
    That should be about it.
    HTH -- Mark D Powell --

  • Blackberry 9320 can't connect to the internet through WIFI

    Dear all
    I have problem connecting my Blackberry 9320 to the internet via the wifi. I have tried all settings but still can't connect. I connect to the WIFI but when I try to connect to the net its says can't connect to the internet if the problems continues contact your internet service provider. I had the Blackberry 8520, I could connect to the net through the WIFI easily but with this I really don't know where the problem could be. I really need your help

    If it says "Contact your service provider", then i don't think it's a problem with BB's end. You need to contact your carrier.
    God is Great

  • How can I connect to the internet on my ipad without a 3G data plan?

    Is there any other way to connect to the internet without a 3G data plan? I have an internet router at home from verizon, can that connect my ipad to the internet or do i still need the 3G data plan? Can u please help me?

    The iPad can connect to wireless networks. So if your router is capable of broadcasting its internet connection wirelessly (so that you can access it from say a laptop) then you can go to the settings and choose wifi to connect to the router. If not you can turn on internet sharing on your computer if you have a pc or mac. This will share your connection wirelessly so that you can connect your iPad to the internet.

  • How can I connect to the database using the Oracle Remote Diagnostic Agent?

    Now I try to study RDA on Windows XP platform,when I run 'rda.cmd',there is a question 'Enter password for 'SYSTEM@'',what is the answer?
    Because I didn't know how to connect to database,there are many error messages - RDA-00510: SQL execution disabled,What can I do?

    Metalink Note:314422.1 to start
    It is asking you to tell how to connect to 'the database that you are investigating' over a network. The answer .... the password for the userid called 'system' in the database specified after the @
    I am confused ... you do not know how to connect to your database?

  • How can I connect to the portal homepage on a 9i Database

    I successfully installed Oracle 9iAS on a MS Windows NT machine
    and configured the Portal Server on an Oracle 9i Database on
    another machine (Windows 2000).
    But when I try to call the portal homepage (portal30.home), I
    get the following error: "The preference path does not exist:
    Oracle.Portal.Page (WWC-51000)".
    I can successfully call the .../admin_/gateway.htm page and
    connect over there to the database.
    The shared_pool_size parameter is large enough (92274688).
    I installed the portal server manually, without the GUI, because
    the connection to the database during the installation was only
    enabled as SYSDBA or SYSOPER.
    How can I also get connected to portal homepage?
    Thanks,
    Reinaldo

    can i connect my roku box to the 2nd AE's ethernet port?
    Yes
    will it make any difference? (as opposed to the roku box, used for netflix, picking up it's signal wirelessly).
    Probably not, since the AirPort Express is picking up its signal via wireless.
    The same signal just appears at the Ethernet port. If anything, the signal at the Ethernet port will have a bit less bandwidth than the wireless signal since the Express must convert from wireless to Ethernet...and you always lose something in the conversion process.
    Normally, you would use the Ethernet port if a device did not have wireless capability.

  • DNS: Client can't connect because .local domain isn't in DNS. How can I connect over the WAN to server.domain.local?

    So my 2012 server is set up on the LAN with a .local domain name. 
    Remote Desktop Services are set up and remoteapp stuff works fine on the LAN.
    I've set up port forwarding so I can connect to the server over the WAN too, but remoteapp stuff is a bit different. I can connect to the server by specifying the correct IP address. Giving a Web browser the address
    https://serverIPAddress/RDWeb
    lets me get the login screen and see the range of apps for me to run. I select one, the connectoid is downloaded correctly (in Chrome) and I click on the downloaded connectoid. 
    Unfortunately, rather than pursuing the sensible IP-address approach that I started with, the connectoid has been given the server's name on the LAN:  server.domain.local. Clearly, the client machine tries to look this up but DNS hasn't heard of
    it because it's a .local address. 
    I cannot be the only one to have come across this apparent oversight on Microsoft's part. Any ideas as to how this can sensibly be overcome? Obviously, I could put the IP address translation into every client's hosts file (and I've done this and shown it
    works) but I've got too many clients to mess about like this. Anybody know 'the Microsoft way' to fix this?
    Thank you for checking this out -- I am confident the details of the problem are completely specified in this query but, if I'm wrong, please ask.
    Many thanks again,
    Biffo

    Hi,
    I would like to suggest you to follow the checklist.
    Checklist: Make RemoteApp Programs Available from the Internet
    http://technet.microsoft.com/en-us/library/cc772415.aspx
    Thanks.
    Jeremy Wu
    TechNet Community Support

  • Help: i can't connect to the internet

    hi:
    1. i have a the ipod touch 3G and have had no problems with it for the past year.    i've also had no problems connecting to my home's wireless network.
    2. within the past week, i can't connect to my home's internet.   at times, the wireless icon isn't there and thus i've had to go into the settings and manually set things up.   once i'm hooked up (ie the wireless icon shows), when i try to open up a web page, i still get the error message that i'm not hooked up to the internet. 
    3.  additional info:  i updated the ipod software and i even to the step of restoring the ipod software.  unfortunately, it didn't help at all.
    4.  please any help would be greatly appreciated.
    thanks.  harry

    are you sure you're using a router and not an ethernet hub? Linksys makes both. Are you using a cable modem or DSL?

  • Help! Can't connect to the internet!

    I was using my macbook yesterday and the battery ran out before I could plug it in. So the system shut down. When I plugged the mac back in, it started up again like normal. However, my internet connection was lost and now I cannot get it back.
    I'm using my airport and it is picking up and connecting to the network I was using before the crash. However, when I open Safari, it says I am not connected to the internet.
    I've run Network Diagnostics to see if I can locate the problem. It says that the AirPort, AirPort settings, Network Settings, and ISP are fine (the little buttons next to them are green). But when it gets to the Internet button - it says that the diagnostics for it failed. It also says that the Server failed, too.
    In the window next to the buttons in the Network Diagnostics page, it says to select a location.
    Also, I tried to connect to other networks but with no luck! And I have a roommate using the same wireless network and her internet is just fine.
    I have no idea what's going on or where to look to fix this problem. Any help will be much appreciated!

    First thing to do whenever a Mac shuts down abnormally is to either boot from the Install CD/DVD and Repair Disk & Permissions, or use/get Applejack...
    http://www.versiontracker.com/dyn/moreinfo/macosx/19596
    After installing, reboot holding down CMD+s, then when the prompt shows, type in...
    applejack AUTO
    Then let it do all 5 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 5 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.
    Then we'll have a better idea.

  • Help - I can't connect to the Music Store anymore

    Today I have had the message "iTunes could not connect to the Music Store. The network connection was reset." This was after it tried for a few minutes. Everything else - playlists, accessing Gracenote CDDB for CDs, playing my songs - seems to be working fine. (It's iTunes 6.0.4).
    It's seems to be suggesting I have an internet connection problem, but I don't! Safari, Mail, limewire, they're all working fine.
    It all happened after I pressed the 'See All' arrow next to the 'Just For You' selection on the front page (which I've never tried before). Earlier today I had a problem with one CD which wouldn't read one track properly which meant I had to 'force quit' iTunes, but I was able to access the Music Store when I relaunched, or at least the front page anyway.
    Since then I have repaired permissions, restarted, but the problem is still there. I have tried other user accounts and the problem is in all accounts. I have had a look in /Library for Preferences or Application Support folders at the System level that might be the problem, but there aren't any. What do I do now - reinstall iTunes 6 (if I still have the DVD)? What happens to all my playlists and songs and purchases and previews etc if I do that?
    iMac G5 17" 1.5Gb RAM   Mac OS X (10.4.9)  

    Ok, this is an update and then I'm going off to bed, so if anyone has any bright ideas I will see them first thing.
    I now wonder if limewire may be the problem, even though it is 'listening' currently on port 33782 which is nowhere near to iTunes or anything else for OS X. Why? Because up until today, I could only connect to limewire during the daytime - evenings and weekends it wouldn't connect and discussion forums suggest that tiscali (my ISP) is one of the worst offenders for blocking UDP traffic at peak times and may be specifically targeting limewire. Today, when I have had the problem with iTunes Music Store, I have been able to connect to limewire all day and all evening, no problems.
    However the problem with this theory is that when I could connect previously to limewire only during the day, I could still connect to the Music Store as well at the same time. So it may be irrelevant.
    I have checked everything else from the article - the discussion boards, keychain access, firewall, it all checks out. So if anyone has any ideas about this, I'd be very happy.
    iMac G5 17" 1.5Gb RAM   Mac OS X (10.4.9)  

Maybe you are looking for