Database Connection (JDBC) by Applet
Hi all,
I create a database connection from applet ,it worked only compiler means Jbuilder.
But just after I put it on tomcat It gave error .It didnt work there.It gives follwing error.
access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
If any one knows the solution please help me.
Thanks
Virajchi
Hi all,
Dont worry about this question.
I found the solution.
Cant load directly Jdbc driver to the applet.
That directly applet cant communicate with database.
Cheers,
Virajchi
Similar Messages
-
Error during database connection (JDBC)
Hello!
When I try testing my connection to MSSQL (using sender JDBC channel) in communication channel monitoring (RWB)i can read that Error explanation:
Error during database connection to the database URL 'jdbc:microsoftsqlserver://<DB_IP_ADRESS>:1433;databaseName=XXXX' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Unable to locate a suitable JDBC driver to establish a connection to URL 'jdbc:microsoftsqlserver://<DB_IP_ADRESS>:1433;databaseName=XXXX''
Before I did the communication channel configuration I did the driver instalation and deploy like in document "HowTo_ConfigExtAdapters". In Adapter Monitor (RWB) i can see the JDBC adapter instaled and started (gray square).
Any idea what is wrong?hi,
try this:
jdbc:microsoft:sqlserver://
and not
jdbc:microsoftsqlserver
Regards,
michal -
Database connectivity problem in applet, but connects successfully thru app
hi all
my following code works successfully in appletviwer...
but in browser (ie 6.0)it does not even show textarea and
gives error at status bar as "exception : java.lang.NullPointerException: null string"
there is no problem to registerDriver...
but error is at getconnection...
os: windows xp, database : oracle8i, web server: apache
my db server,web server and html,class file all are on same machine...
pls help...
what could be the problem? may i need to do some web server settings?
thanks in advance
//CODE
import java.sql.*;
import oracle.jdbc.driver.*;
import java.awt.*;
public class AppletJdbc extends java.applet.Applet
public void init ()
TextArea outtext= new TextArea();
add(outtext);
Connection conn;
try
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc:oracle:thin:@172.25.12.46:1521:test","scott","tiger");
outtext.appendText("connected");
catch(Exception e)
outtext.appendText(e.getMessage());
}hi
yes i am accessing it in browser by giving("http://172.25.12.46/myfile.html"),
i think problem nullpointerexception was with TextArea..
now i have removed textarea and displaying messages just by
System.out.println...
it is giving java.lang.SecurityException
changes required to do in C:\jdk1.3\jre\lib\security\java.policy file
to make applet run from appletviewer:
following permissions added:
grant {
permission java.util.PropertyPermission "oracle.jserver.version", "read, write";
grant {
permission java.net.SocketPermission "172.25.12.46", "accept, connect, listen, resolve";
is there any setting required to make for browser?
some of u have suggested me to use servelts...
actually i am developing project for my oraganization, which will be used in intranet only and not on internet...
is it necessary to use servelts or direct db connectivity thru applet will do?
thankx -
How can i create Database Connection in Swing Applet?
A DESCRIPTION OF THE PROBLEM :
I am unable to connect to oracle database using thin driver
in Swing Applet.
ENVIRONMENT:
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)
FULL OPERATING SYSTEM VERSION : NT 4.0
Java file:-
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
import java.awt.*;
public class SwingApplet extends JApplet
public void init(){
public void start(){
JTextField txf=new JTextField();
JButton btn=new JButton("Click Me");
btn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
try{
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
Connection con=DriverManager.getConnection
("jdbc:oracle:thin:@orasrv:1521:oracledb","hrisadmin","hrisadmin");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from applicant");
}catch(Exception e){JOptionPane.showMessageDialog
(null,e.toString());}
JOptionPane.showMessageDialog(null,"Hai Swing is cool");
getContentPane().add(txf,BorderLayout.NORTH);
getContentPane().add(btn,BorderLayout.CENTER);
public void stop(){
public void destroy(){
html file:-
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="120" height="160" align="middle"
codebase="http://java.sun.com/products/plugin/1.1.2/
jinstall-12-win32.cab#Version=1,2,0,0">
<PARAM NAME="code" VALUE="SwingApplet.class">
<PARAM NAME="codebase" VALUE=".">
<PARAM NAME="archive" VALUE="classes111.zip">
</OBJECT>ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.security.AccessControlException:access denied(java.net.SocketPermission or
asrv resolve)if the applet runs locally, and you want to connect to your DB locally with the applet, it won't work (except if you adjust the security settings of your browser, maybe). That's because applets don't have access to the computer they're running on (except some information), since that would mean that any applet could just access your computer, so, it's not possible for security purposes.
On the other hand, they don't have to right to connect to anything, except the server they're downloaded from ( so the webserver's ip).
But I'm not sure about connecting to a DB through JDBC that way.
Tom -
Calling one applet from another passing database connection
We are trying to establish if it is possible to start an applet that connects to a database and use that as a 'menu'. From there we would call other applets. Is there a way to pass along the database connection from one applet to another. Any help is greatly appreciated.
nullHere' s a sample program in the Java Tutorial that messages between applets.
http://java.sun.com/docs/books/tutorial/applet/appletsonly/iac.html -
JDBC is the Acronym of Java Database Connectivity - Yes / No?
Hi,
JDBC is the Acronym of Java Database Connectivity - Yes / No?
I am little bit confused. I got this question in an Inteview.
I support yes. But some of the compitiors say no.
What will the real answer?Really? Even Sun contradicts themselves here:
(2002) http://java.sun.com/javase/6/docs/technotes/guides/jdbc/
and (more importantly) here:
http://java.sun.com/docs/glossary.html#JDBC
although here:
(2001) http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/intro.html
I think it is simply silly for the latter to state that "JDBC is the trademarked name and is not an acronym" -- Oh really? JDBC doesn't stand for anything? It is all caps just because it is a trademark then? hmmm.
I'm certain the real answer of what it stands for may have been lost long ago. However, I doubt that the interviewer meant the question to be a trick and was looking for "Java DataBase Connectivity"
For every instance that you find that it doesn't stand for anything, I can show you 2 instances (from Sun or an employee) where they use "Java Database Connectivity (JDBC)".
P.S. Ryan Craig may be the final authority on this... -
AIR application and database connectivity (using JAVA)
Hi
I am creating AIR application and I want to connect with the database using java database connectivity (JDBC).
Can any body give me the some suggestion on how to how to do that.
Please give me any reference for creating AIR application for database connectivity with mysql/access.
Thanks
Sameerlots of serching on the google and found that For AIR applications either you use Webservices(JAVA/PHP/.Net) or you can use SQLLite.
Not found any method for direct connectivity with the database using JDBC.
If any one found direct connecivity withe database using JAVA then please reply.
Thanks -
JDBC Adapter - Established database connection failed
Hi Guys,
we have installed the JDBC Adapter based on the How To Guide and we checked after the installation the Libaries :Cluster --> Server --> Libraries --> com.sap.aii.af.jmsproviderlib and the box Box "JARs Contained" was filled.
So in my point of view we have done everything right during the installation.
Now the developer tested theJDBC Adapter and he comes back with following Error:
Attempt to establish database connection failed with SQL error com.sap.aii.adapter.jdbc.sql.DriverManagementException: Cannot establish connection to URL "jdbc:microsoft:sqlserver://xxx.x.xx.xxx:1433; databaseName=CZZ03;":ClassNot FoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
Do you have any ideas?
Regards
MarkusHello Markus,
To install JDBC driver follow the how to guide.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
Configuration of JDBC Adapter for SQL Server
JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
UserID and Password.
If the connection is not working find the correct port number.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40b92770-db81-2a10-8e91-f747188d8033
JDBC- X I - R/3 Scenario
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
Thanks,
Satya Kumar
Reward Points If it is Useful.. -
Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
Checks performed:
RMS Application code location and directory contents:
[oracle@test-rms-app application]$ pwd
/binary_files/STAGING_DIR/rms/application
[oracle@test-rms-app application]$ ls -ltr
total 144
-rw-r--r-- 1 oracle oinstall 272 Dec 7 2010 version.properties
-rw-r--r-- 1 oracle oinstall 405 Jan 16 2011 expected-object-counts.properties
-rw-r--r-- 1 oracle oinstall 892 May 13 2011 ant.install.properties.sample
-rw-r--r-- 1 oracle oinstall 64004 Jun 6 2011 build.xml
drwxr-xr-x 9 oracle oinstall 4096 Jun 16 2011 rms13
drwxr-xr-x 3 oracle oinstall 4096 Jun 16 2011 installer-resources
drwxr-xr-x 3 oracle oinstall 4096 Jun 16 2011 antinstall
drwxr-xr-x 2 oracle oinstall 4096 Jun 16 2011 ant-ext
drwxr-xr-x 5 oracle oinstall 4096 Jun 16 2011 ant
-rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
-rwxr-xr-x 1 oracle oinstall 4249 Dec 18 10:01 install.sh
drwxr-xr-x 4 oracle oinstall 4096 Dec 18 10:06 common
-rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
-rw-r--r-- 1 oracle oinstall 689 Dec 19 10:37 ant.install.log
[oracle@test-rms-app application]$
Application installation:
[oracle@test-rms-app application]$ ./install.sh
THIS IS the driver directory
Verified $ORACLE_SID.
Verified SQL*Plus exists.
Verified write permissions.
Verified formsweb.cfg read permissions.
Verified Registry.dat read permissions.
Verified Java version 1.4.2.x or greater. Java version - 1.6.0
Verified Tk2Motif.rgb settings.
Verified frmcmp_batch.sh status.
WARNING: Oracle Enterprise Linux not detected. Some components may not install properly.
Verified $DISPLAY - 172.16.129.82:0.0.
This installer will ask for your "My Oracle Support" credentials.
Preparing installer. This may take a few moments.
Your internet connection type is: NONE
Integrating My Oracle Support into the product installer workflow...
[move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
Installer preparation complete.
MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
WLS_INSTANCE=WLS_FORMS
ORACLE_SID=rmsdbtst
JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
Launching installer...
To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
[oracle@test-rms-app application]$ tnsping rmsdbtst
TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
Copyright (c) 1997, 2008, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
OK (0 msec)
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ ping test-rms-db
PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
--- test-rms-db.vonmaur.vmc ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ uname -a
Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ cat /etc/*-release
Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
[oracle@test-rms-app application]$
The database is created and all the batch file scripts have been successfully deployed. Now working on the application server. The Weblogic server is installed and 11g forms and reports are installed successfully.
Any help would be helpful.
Thanks,
Ram.Please check MOS Notes:
FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1) -
Tomcat JDBC Realm Database Connection Error
Hello all,
I am trying to edit the server.xml file on Tomcat so I can use the JDBC Realm instead of the MemoryRealm. Hence, I will be able to read users, passwords and roles from a relational database instead of from the tomcat-users.xml.
I have tried following all the guides on the net I can find, my server.xml looks as follows (after making changes to allow it to use JDBC realm). The only problem is, when I try to run the application the server outputs the following: (after all of these errors have been kicked up a pop-up box then appears titled "Tomcat Manager Application", it asks for a User Name and Password. I have tried the standard user name of "ide" and the password next to it in tomcat-users.xml but it won't accept it. (I am using the netbeans IDE)).
Please could someone suggest any ideas of how I can get the server.xml to work with JDBC realm?
Using CATALINA_BASE: C:\Documents and Settings\Administrator\.netbeans\5.0beta\jakarta-tomcat-5.5.7_base
Using CATALINA_HOME: C:\Program Files\netbeans-5.0beta\enterprise2\jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR: C:\Documents and Settings\Administrator\.netbeans\5.0beta\jakarta-tomcat-5.5.7_base\temp
Using JAVA_HOME: C:\j2sdk1.4.2_08
Created MBeanServer with ID: 1f934ad:107444b1d2b:-8000:ravinder-rdnzoa:1
31-Oct-2005 01:29:33 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
31-Oct-2005 01:29:34 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
31-Oct-2005 01:29:34 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2174 ms
31-Oct-2005 01:29:34 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
31-Oct-2005 01:29:34 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
31-Oct-2005 01:29:34 org.apache.catalina.realm.JDBCRealm start
SEVERE: Exception opening database connection
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:720)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
31-Oct-2005 01:29:34 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
31-Oct-2005 01:29:36 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: WARNING: Security role name IBM used in an <auth-constraint> without being defined in a <security-role>
31-Oct-2005 01:29:36 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: WARNING: Security role name Auditor used in an <auth-constraint> without being defined in a <security-role>
31-Oct-2005 01:29:37 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
31-Oct-2005 01:29:37 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
31-Oct-2005 01:29:37 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
31-Oct-2005 01:29:38 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: WARNING: Security role name IBM used in an <auth-constraint> without being defined in a <security-role>
31-Oct-2005 01:29:38 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
31-Oct-2005 01:29:38 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
31-Oct-2005 01:29:38 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
31-Oct-2005 01:29:39 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
31-Oct-2005 01:29:39 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
31-Oct-2005 01:29:40 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
31-Oct-2005 01:29:40 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/60 config=null
31-Oct-2005 01:29:40 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
31-Oct-2005 01:29:40 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5738 ms
31-Oct-2005 01:29:40 org.apache.catalina.realm.JDBCRealm authenticate
SEVERE: Exception performing authentication
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:344)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
31-Oct-2005 01:29:40 org.apache.catalina.realm.JDBCRealm authenticate
SEVERE: Exception performing authentication
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:344)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)The server.xml looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8025" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<!-- RAV
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"/>
-->
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 5 documentation bundle for more detailed
instructions):
* If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8084" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="utf-8"/>
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
<!-- Note : To use gzip compression you could set the following properties :
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3"/>
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector port="8082"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" acceptCount="100" connectionTimeout="20000"
proxyPort="80" disableUploadTimeout="true" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.4
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<!-- RAV
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
-->
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost:3306/tomcatusers"
connectionName="root" connectionPassword="sikhism1"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false">
<!-- Defines a cluster for this node,
By defining this element, means that every manager will be changed.
So when running a cluster, only make sure that you have webapps in there
that need to be clustered and remove the other ones.
A cluster has the following parameters:
className = the fully qualified name of the cluster class
name = a descriptive name for your cluster, can be anything
mcastAddr = the multicast address, has to be the same for all the nodes
mcastPort = the multicast port, has to be the same for all the nodes
mcastBindAddr = bind the multicast socket to a specific address
mcastTTL = the multicast TTL if you want to limit your broadcast
mcastSoTimeout = the multicast readtimeout
mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
in case of multiple ethernet cards.
auto means that address becomes
InetAddress.getLocalHost().getHostAddress()
tcpListenPort = the tcp listen port
tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
has a wakup bug in java.nio. Set to 0 for no timeout
printToScreen = true means that managers will also print to std.out
expireSessionsOnShutdown = true means that
useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
false means to replicate the session after each request.
false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
<%
HashMap map = (HashMap)session.getAttribute("map");
map.put("key","value");
%>
replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
* Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
* Synchronous means that the thread that executes the request, is also the
thread the replicates the data to the other nodes, and will not return until all
nodes have received the information.
* Asynchronous means that there is a specific 'sender' thread for each cluster node,
so the request thread will queue the replication request into a "smart" queue,
and then return to the client.
The "smart" queue is a queue where when a session is added to the queue, and the same session
already exists in the queue from a previous request, that session will be replaced
in the queue instead of replicating two requests. This almost never happens, unless there is a
large network delay.
-->
<!--
When configuring for clustering, you also add in a valve to catch all the requests
coming in, at the end of the request, the session may or may not be replicated.
A session is replicated if and only if all the conditions are met:
1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
2. a session exists (has been created)
3. the request is not trapped by the "filter" attribute
The filter attribute is to filter out requests that could not modify the session,
hence we don't replicate the session after the end of this request.
The filter is negative, ie, anything you put in the filter, you mean to filter out,
ie, no replication will be done on requests that match one of the filters.
The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
ending with .gif and .js are intercepted.
The deployer element can be used to deploy apps cluster wide.
Currently the deployment only deploys/undeploys to working members in the cluster
so no WARs are copied upons startup of a broken node.
The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
When a new war file is added the war gets deployed to the local instance,
and then deployed to the other instances in the cluster.
When a war file is deleted from the watchDir the war is undeployed locally
and cluster wide
-->
<!--
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true"
notifyListenersOnReplication="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
</Cluster>
-->
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across *all* web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
-->
<!--
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
This valve use NIO direct Byte Buffer to asynchornously store the
log.
-->
<!--
<Valve className="org.apache.catalina.valves.ByteBufferAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
</Host>
</Engine>
</Service>
</Server>Many thanks, and apologies for "dumping" all of the code here.So looking through the java api docs, I found that the tcUtilJDBCOperations has a connect string for the database. Below is the info it outlines. The questions I have it this. How do you specify the psdriver and URL along with do I need to do this as a persistent instance then add my selectstatement as a part of this or can I just specify this and the select statement will use this connection? Any help you can give would be appreciated.
tcUtilJDBCOperations
public tcUtilJDBCOperations(java.lang.String psDriver,
java.lang.String psUrl,
java.lang.String psUsername,
java.lang.String psPassword)Contructor that sets the parameters for connecting to a database
Parameters:
psDriver - The class name of the jdbc driver
psUrl - The URL of the database
psUsername - The username required to access the database
psPassword - The password for the above username
Nick -
How to use JDBC database connection in Solaris
Hi all,
I am new to Solaris and i want to create an application using JDBC database connection.
I want a small piece of code, probably a login page code that verifies the username from a OpenOffice database (.odb) file. I am particular to know the driver name, etc. If possible give the code using JNDI loopkup.
Thanks in advance,
Parasou.Sure no problem.
Please stand by while I do your work for you. -
Connecting to IDMS database via JDBC
Has anyone successfully set up JDBC connectivity to generate reports using data in an IDMS mainframe database containing multiple schemas, where several schemas may contain tables with the same name?
We have no issues when using ODBC to connect to the various schemas in this IDMS databases, but we need to convert the connectivity for existing reports to JDBC.
When I open the JDBC connection, I see the expected hierarchy of schemas and tables in the Database Expert window. If I try to select a table I get the following error message if a table of that same name exists in other schemas:
Failed to retrieve data from the database.
Details: SQL exception: [SQL State:] 42000 [Error message:] DB002046 T11094 C-4M347: Duplicate table ids for ASISCHEM.SR-ACT and CORPCHEM.SR-ACT in area CORPDB.ACTIVITY-AREA [Database Vendor Code: -4]
So although we can connect to the database via JDBC, we can't use the connectivity because Crystal does not appear to correctly resolve that I'm selecting the table from within a specific schema.
Can anyone advise on how to make sure the table name selection is qualified by the correct schema name?
Thanks in advance.Hello,
Try running the query outside of CR to verify the JDBC driver is passing the fully qualified name also.
Then look in the Designer and Show SQL to verify it's there as well as Set Table Location. You may be able to fully qualify it in that UI.
Thank you
Don -
Error database connection in JDBC Adapter
Hi Experts,
I am facing errror database connection problem in production system.
My interface was working fine in production till yesterday but suddenly from today i am facing the error connection problem.
Below is the error message i am getting.
Error during database connection to the database URL 'jdbc:oracle:thin:@<ip>:<port>:"' using the JDBC driver 'oracle.jdbc.driver.OracleDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:oracle:thin:@'jdbc:oracle:thin:@<ip>:<port>:": SQLException: Io exception: The Network Adapter could not establish the connection'
Please advice what would be the problem.
I have checked the IP by pinging, its working fine.
Thanks,
Swetha ReddyHi Sarvesh,
I have tried with deactivaing and activating channel.. but facing same problem..
Nio firewall settings has been changed either side..
Regarding patch i am not sure what patch should be applied..
i can tell that BASIS has not applied ant patch..
Thanks,
Swetha Reddy -
Hi, I want to do an applet where I can connect to a SQL server via an ODBC. The whole conencting to the database works fine with an application, but access is denied when I use an applet ( ie. I have a separated class that do the databases connections and it failed when I use an applet).
Somebody told me that I have to create a java.policy file for users and signed the applet with .jar. but I'm not familiar with either signing a jar(I'm not familiar with the .jar at all) and I'm not familiar either with the java.policy file. Can anyone explain this to me plz?signed the applet with .jar. but I'm not familiar with either signing a jar(I'm not familiar with the .jar at all)So...., check out the link shown below.
http://developer.java.sun.com/developer/qow/archive/167/index.jsp
;o)
V.V.
PS: remember me? -
Cannot connect to database in a signed applet
Hi i have an applet that connects to a database and does stuff. However when I move the applet to a different server i get errors. I did sign the applet but i still get
java.security.AccessControlException: access denied (java.net.SocketPermission <server> resolve)
Do I have to explicitly allow the applet to open a socket to this server, do I have to set up policy files and how exactly is this done? Please explain in detail
ThanksFirst, don't use applets to connect to the database directly.
Signing applets:
http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
second post and last post for the java class file using doprivileged
http://forum.java.sun.com/thread.jsp?forum=63&thread=409341
4th post explaining how to set up your own policy with your own keystore
Still problems?
A Full trace might help us out:
http://forum.java.sun.com/thread.jspa?threadID=656028
Maybe you are looking for
-
Usage alert...but not matching up with details
I received an alert today that one phone on my account has used 2.01 GB of data in the last four days (which shocked me -- this phone has been sitting on its charger for the last four days except for very minor usage). When I go to My Verizon and loo
-
ExecuteOutOfProcess Flag causes Execution Error
Hello guys, I have a problem with calling other Packages from my SSIS 2012 Package "Main.dtsx". I have an "Execute Package Task" in Main which calls "MyPackage.dtsx". If the ExecuteOutOfProcess Flag is set to "False" everything works fine. When I swi
-
I airplay my sunday ticket after update get sound no video whats wrong?
-
Why can't my HD to SD SHORT film look good? Best Encode?
I have a 12 minute short film on HDV. I imported it to FCP5 and then DVDSP4 and created an HD-DVD and it looked GREAT. Then I found out my computer is pretty much the only DVD player that can play the HD-DVD I had created. Thus began my journey to ma
-
In material master particular field should be restricted
In material Master(MM02),a particular field is hide or gradeout to all the user ids but for particular user id system should allow to make the changes that field.