Database connection with a Java applet
I am having trouble figuring out what I am doing wrong.
I am able to connect to the remote database from inside JDeveloper 9.0.3 and execute some simple SQL statements.
The problem is when I try to run this applet on a web page to test it I get some exceptions.
with e.message()
access denied (java.util.PropertyPermission oracle.jserver.version read)
java.security.AccessControlException: access denied (java.util.PropertyPermission oracle.jserver.version read)
I know from within the IDE I assume the security settings are lax or non-exsistant.
any ideas?
Thanks,
Martin
Java applets can only access their host machine. If your database is located on a different server than the web server then you get these errors. To access a database located on a different machine you can use the so callled Applet - Servlet tunelling. You actually use a servelt as a proxy. The applet calls the servlet and the servlet accesses the database.
There is a lot of info on these issues in java.sun.com.
hope this helps!
Similar Messages
-
How to make a SQL database connection with a java code in netbeans?
can somebody helpthrough an example
raghu0007 wrote:
can somebody helpthrough an exampleNetbeans is just an IDE.
Anyway the JDBC tutorial may be found here http://java.sun.com/docs/books/tutorial/jdbc/index.html
If you have a specific question please ask it. -
NetBean, I can't establish the oracle database connection with version 9i.
In NetBean, I can't establish the oracle database connection with version 9i.
I have create the datasource and it is fine.
when i try to access the tables i get a message
"Unable to refresh children, connection is broken, unsupported feature"
in netbeans.
Does netbeans support oracle 9i version.
Thanks,
VKKIn NetBean, I can't establish the oracle database connection with version 9i.
I have create the datasource and it is fine.
when i try to access the tables i get a message
"Unable to refresh children, connection is broken, unsupported feature"
in netbeans.
Does netbeans support oracle 9i version.
Thanks,
VKK -
I am having trouble with my JAVA Applet. It isn't functioning on SAFARI. It seems to have stopped working and I used it on SAFARI last year. Any suggestions?
Post in the Safari forum area.
-
How to get database connection in common java class
hi friendz,
plz help me...
I am using JDEV 11.1.2.2.0 version.
my problem is I'm writing common java class which can reuse any application.
in this case when im create database connection like this,
String username = "a";
String password = "b";
String thinConn = "jdbc:oracle:thin:@IP:1521:database";
DriverManager.registerDriver(new OracleDriver());
Connection conn =
DriverManager.getConnection(thinConn, username, password);
conn.setAutoCommit(false);
return conn;
but this statement not working in java class.its working only backing bean.
import oracle.jdbc.OracleDriver;
DriverManager.registerDriver(new OracleDriver());
how can i do that??
hope your help
-Harsh-What is the error message in Java class?
With JDBC 4.0 driver the DriverManager class has added support for the Java SE Service Provider mechanism to the getConnection() and getDrivers() methods using which JDBC drivers may be loaded automatically. The following Class.forName() method is not required to be invoked.
Class.forName(“oracle.jdbc.OracleDriver”);
Only the following is required to obtain a connection.
String url="jdbc:oracle:thin:@localhost:1521:ORCL";
Connection connection = DriverManager.getConnection(url,"oe", "pw"); -
Database connectivity with MS Acess using WSAD5.1
I am using WSAD5.1 as IDE and development tool. I am trying to connect to MS Access database using following lines of code
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //.newInstance();
dbConnection = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\\customers.mdb");
I tried creating system DSN and changing url as "jdbc:odbc:Test" where Test is DSN.
I have rt.jar file in my class path.
When I run this program from command prompt I am getting connectivity with proper results.
The problem is when it is run with WSAD inweb project I am getting an error
"java.sql.SQLException: No suitable driver".
Am I required to change any environmental settings?try this Code
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
dbConnection = DriverManager.getConnection("jdbc:odbc:test"); <Here Test is the driver name>and add the tools.jar file in the IDE li directory or in to the Project path of the IDE -
Create database connection with Mysql
Hi, all:
inside JDeveloper, i try to create a database connection for Mysql (third party
JDBC driver). I input all needed parameters into
JDeveloper database connection dialog, and test connection, the error message
says 'Unable to find driver org.gjt.mm.mysql.Driver". The jar file contains driver
is listed in system classpath, and Mysql and MM-Mysql JDBC driver are tested with
other applications and there is no problem.
So, what i should do to create such a connection ??
Any help will be appreciated. thank you in advance.
kevin.The connectio URL could look like this:
(leave the User-, Password-, and Role-fields, in the tab before, empty)
Java Class Name: org.gjt.mm.mysql.Driver
URL: jdbc:mysql://localhost:3306/test?ultradevhack=true&?user=myuser&?password=mypassword -
Database connection with mysql
i have my server as follows:
import java.rmi.*;
public class JobServer
public static void main(String[] args)
try
JobImpl j = new JobImpl();
Naming.rebind("//"+"localhost"+"/JobImpl",j);
System.out.println("Registered");
catch (Exception e)
System.out.println("Exception occured in JobServer ... " +e);
and my interface implementation:
import java.rmi.*;
import java.rmi.server.*;
import java.sql.*;
public class JobImpl extends UnicastRemoteObject implements JobInt
String host="localhost";
String user="root";
String pass="admin";
String db="db";
String conn;
ResultSet rs;
Statement st;
public JobImpl() throws RemoteException
super();
try
Class.forName("com.mysql.jdbc.Driver");
conn = "jdbc:mysql://" + host + "/" + db + "?user=" + user + "&password=" + pass;
Connection Conn = DriverManager.getConnection(conn);
st = Conn.createStatement();
catch (Exception e)
System.out.println("problem while establishing connection"+e);
public String getname(int jobno) throws RemoteException
try
rs = st.executeQuery("Select name from job whwre jobno="+jobno);
rs.next();
return(rs.getString("name"));
catch (Exception e)
e.printStackTrace();
return null;
when i 'javac JobServer' on the command prompt, i have the following error:
problem while establishing connection java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
Exception occured in JobServer ... java.rmi.ConnectionException: Connection refused to host: localhost; nested exception is :
java.net.ConnectionException: Connection refused: connect
apparently theres a problem with my database connection... the connection isnt right? plz helpproblem while establishing connection
java.lang.ClassNotFoundException:
com.mysql.jdbc.DriverSo fix that first. It's just a matter of installing the MySQL JAR file(s) in the appropriate place, i.e. somewhere on your CLASSPATH. Read their documentation. -
SQL Server Database Connectivity with Visual Studio 2012 - Help Needed
Hello,
I am having Visual Studio 2012 and SQL Developer 4.0 installed on my system with Windows 8 - 64bit
I want to shift a VS project with an SQL database connectivity to another new Laptop (above mentioned) ...
I have the project opened in VS without bieng connected to the database..
I have a backup file of the database (which needs to be restored to a new created database on SQL Developer)
The problem:
I am unable to create a server connection in SQL Developer which will allow me to create a new database followed by the recovery from backup file.
I am getting the following error message when I try to create a connection:
Status: Faliure - IO error: The network adapter could not establish a connection
Please help me in setting up a server connection and adding a new sql databaseThe error message seemed unfamiliar to me and since I had never heard of SQL Developer before, I went to Google. Google might be pulling my legs, but it appears that SQL Developer is related to Oracle. This forum is devoted to SQL Server, so you are in the
wrong place.
Try finding a forum for SQL Developer.
Erland Sommarskog, SQL Server MVP, [email protected] -
How TO use configurable Database connection with ADF BC
I have developed a simple JSF/ ADF BC web application that connects to a database and read/display data from the db tables. I have successfully deployed the application to Tomcat 5.5.17. However, now i need to change the database the application is connecting to. My question is How can I change the Database connection without having to change the application modules or rebuild the war file ??? In other words, is there a specific file (xml) where the database connection can be changed?
If you set up the application with a data source (I am not sure if this is possible using another app server, I use OC4J), then you would just change it there. However if you created a database connection in the JDEV and pointed your data model to that, then you will have to change and rebuild.
You might be able to edit the xml file that contains the setttings, I am not sure my CM guys dont allow this, all of our changes have to go through our code repository. -
How to get Flex to communicate with a Java applet?
We are building a Flex 2.0 app which needs to talk to a Java
applet. The applet lives in the same HTML page as the Flex app. My
guess is that we can use the Flex-Ajax bridge combined with some
Javascript-java bridge. Any suggestions on specific libraries to
use, web sites to consult, or techniques to use?Maybe this could help:
http://www.kellyjo.com/code/flexjava/FlexJava.html -
BROWSER HANGING WITH LOADING JAVA APPLET
HI
WHEN I RUN THE FORM ON THE EXTERNAL
BROWSER.(USING OPTION RUN A FORM ON THE WEB).
FILLING IN ALL THE DETAILS.
BROWSER HANGS WITH MESSAGE LOADING JAVA APPLET.
TEST.FMX IS IN THE FORMS60 PATH.
I NEED HELP THANKS
DEEPAK.
nullTry using the java console to get more info on what is hapenning.
If you have using Jinitator its on the jinitator control panel. -
Database connectivity with BI 10.1.3.4
Hi,
I installed Oracle BI Enterprise 10.1.3.4 and next I want to connect Oracle 10g Database or Oracle 11g Database to access the tables to generate reports.
Please help with the documentation or steps to connect with my local database.
Thanks.Hi ,
From Bipublisher you connect to the Database from Admin Tab.Check the below link
http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/tutorials/obiee10g-453439.html
It will be useful for you.
Thanks,
Ananth v -
How to share internet connection with KDE networkmanager applet
I mainly use wireless around my house and like to use one computer to share it's wireless to another when installing Arch, until I can get KDE and networkmanager installed so I can easily connect to the wireless. I've always been able to easily share internet connections with Ubuntu, but when I try it with Arch, with Gnome OR KDE (and their respective applets), It just doesn't work.
Is there some library or backend I need to install to make ICS work?
Thanks!
Last edited by MetaMan (2011-09-10 22:12:26)If this helps at all, here is what I am currently trying: I open up the network settings KDE Control Module, select "Wired", select the device (eth0) and click edit, and under the "IPv4 Address" tab selecting "Shared" from the "Method" drop-down.
Also, to make it clearer, I am trying to share wlan0(on device 1) through eth0 to eth0 on device 2. Also, device 2 is running the Arch setup and I am telling it to connect to eth0 via DHCP after I select the remote mirror to use. I have managed to do this before when device 1 ran Ubuntu.
I've searched Google, the forums, read the wiki pages for KDE and networkmanager, and can't seem to find a mention of internet connection sharing (pertaining to my usage case; the forums have some posts of people trying to use their computer to broadcast eth0, I'm trying to do the opposite) anywhere on them. In fact, I'll gladly write the section myself if I figure this problem out.
Hope this extra information helps! -
Can anyone help with the java applet issue
Hello everyone,
This is my first thread in this forum,
I need a little help with the form developer...
I have oracle 9i db , 9i form developer
I don't want to run the form i created as a java applet
HOW IS THAT DONE i.e NOT IN THE INTERNET EXPLORER?????????
***IF ITS POSSIBLEHello,
I don't want to run the form i created as a java applet
No chance, because the Web Forms client is an applet and cannot be anything else.
Francois
Maybe you are looking for
-
Got the dreaded no wifi on my wife's iPhone 4S. Wifi greyed out and no luck with the reset network instructions. Why isn't Apple addressing this issue? We are a family of Apple product users, 2 ipads, an ipad mini, 4 iPhones but one isn't working! Is
-
Want to sync iphone to my itunes account that I use with my ipod
I have recently purchased an iphone 4S and when i switched it on for the first time it came up with a set-up screen. One of the options was to set it up as a new iphone (new apple ID and password) or to restore from an itunes back-up. I would like
-
Printing to a printer on XP with an IMac?
I have a Linksys wireless router Model BEFW11S4. I have an HP printer hooked up to a PC running XP Pro it is wired to the Linksys router. I have an Imac G5 running on 10.4.2 , it is hooked up to the Linksys router wireless. I can connect to the inter
-
Commodity code & does not exist
Hi Experts, We modify the length of your commodity codes (from 11 to 8). So I decided to add all new commodity codes (length 8) in the T604 / T604t, and to keep all existing commodity codes (length 11) until we modify all Master Data with new commodi
-
How do I restore iWork after a crash?
I used to have access to Pages, Keynote and Numbers. After my system crashed I don't see them. How do I restore them to my unit if they weren't on the Time Machine (had to cut out some software to make room for data files)? Should I have a disk or c