How to connect to MS SQL server using JSP?
Hi, i am new to JSP so i would like to know what is the code to create a connection to MS SQL server.
I am using jakarta-tomcat 4 as my server.
sorry for any inconvenient....
pls help me....
This works to start off with but there are more sophisticated/ different ways of doing things,for instance it's best not to access the db via your jsp, rather do this logic in JavaBeans, Servlets or use Struts.Therefore, it's best that you consult with others and find out which is best way to go about creating your web apps.
Here's some code:
In my jsp's I access the bean below , instantiate a statement object and go on from there:
*SOME of the code in the JSP's.
//create bean instance
<jsp:useBean id='dbConn' class='projectsevenhouses.DatabaseConnectionBean ' scope='session' />
//instantiate statement
Statement st = dbConn.getConnection().createStatement();
* JavaBean
package projectsevenhouses;
public class DatabaseConnectionBean implements Serializable {
private Connection conn;
private Statement st;
private String dbURL = "jdbc:odbc:datasource";
private static String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
/** Creates a new instance of DatabaseConnectionBean */
public DatabaseConnectionBean() {
makeConnection();
public void setDatabaseName(String dbName) {
dbURL = dbName;
private void makeConnection() {
try {
Class.forName(driver);
conn = DriverManager.getConnection(dbURL,"sa","");
} catch (SQLException e) {
System.out.println("SQL Cause ->" + e.toString());
} catch (ClassNotFoundException cnf) {
System.out.println("Class Not Found:" + cnf);
public Connection getConnection() {
if (conn == null) {
makeConnection();
return conn;
public void setCloseConnection(boolean close) {
if (close) {
try {
conn.close();
} catch (Exception e) {
conn = null;
Hope it gives u an idea...
Ciao
Ushanta
Similar Messages
-
How to connect to a Sql server from Oracle using db link
Hi All,
Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
Thank you,
Praveen.we have 2 products - DG4MSQL and DG4ODBC.
DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
Check out Metalink and you'll find notes how to configure both products.
For a generic overview:
Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
And the setup notes:
DG4ODBC
Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
DG4MSQL
Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux -
Connecting DB Oracle/SQL server using the same SQL Navigator release 5.1.0
I have
SQL Navigator release 5.1.0.655 installed in my desktop
License version X-pert Edition
Licensed Options
PL/SQL Debugger
CodeXpert
Knowledge Xpert For Pl/SQL
Xper Tuning
Currently I have the access of Oracle DB using this SQL navigator and MS-SQL server using MS-Sql server Query Analyzer
My question is -- using the same SQL Navigator can I connect MS-SQL server DB/Tables and can I run sql query using this..
Thanks in advance.
MashWhy, in an Oracle forum, are you asking a question about a Quest product connecting to a Microsoft product?
How does this relate to the Oracle Database? -
How to connect to ms sql server analysis server
I am interested to learn how to use the sql server olap technology
--can any one help?
and also i need how to connect to the analysis server and get data from the cubes.
is there a demo available...possibly a demo application as well?
or site that shows or uses OLAP technology using java.
thanx in advance
ashokI was thinking about how to achieve that. But I have not found any opensource JDBC driver or package that provides the feature you are looking for.
However there is still a change of building some kind of bridge through web services. You could implement a web service with the .NET framework, exposing whichever you need of MS Analysis service to a Java WS client.
Good luck -
How to connect to a FTP server using a proxy in a DMZ with XI file adapter?
Hello,
Want to connect to an ftp server using a proxy in the DMZ. I don't see any standard options in the XI file adapter to use a standard. Is there a workaround?
I already looked at https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=57137
But it didn't help me.
Regards,
Erik van LisdonkU can't use FTP over SSH i.e., SFTP. But u may use FTPS by enabling the SSL layer on J2EE of XI. See this
SFTP vs. FTPS in SAP PI
Regards,
Prateek -
How to connect to remote sql server database?
Hallo,
I am a new member, so please excuse me if my questions are dummy.
I am using CR2008 SP2 to make reports from sql server 2005 databases.
Localy there is no connection problem and everything works perfect.
I would like to establish a connection with a remote sql server 2005,
but i am not familiar with remote data retriving. which driver should i use? static ip? vpn? server ports?
Any answer will be really appreciatedHello,
This is more a question for Microsoft to see what and how they support remote connections to databases. As long as you have the connection made CR will not have any problems. You may find it is slow so optimizing your queries is highly recommended. Passing a million records through your web connector is going to take time.....
I've personally used a VPN connection and then set the ODBC or OLE DB connection info to my test server here at work and it worked fine. But they were small data sets.
Thank you
Don -
Connecting to MS SQL Server using ODI Agents
I'll start with an apology, since I'm sure it's something very obvious that I've missed. Other posts have similar, but I think slightly different issues - but they have helped me get this far.
We have ODI set up with two Agents (L and S running on Windows) which successfully connect to Oracle databases.
I'm trying to connect to our first MS SQL Server database, and while a test through "Local (No Agent)" is successful, the connection is not successful when I try through one of the agents.
This is true both when I test through Topology Manager on my laptop and when I use the ODI Topology Manager on the server running the agents themselves.
In attempting to fix the problem, I have updated/checked as follows:
Downloaded updated MS SQL Server drivers (I'm connecting to a MS SQL Server 2005 database). The new MS driver is version 3.0 and I've copied file sqljdbc4.jar to the ODI home drivers directory on both my laptop and on the server which runs the agents.
Checked that we have a newer JRE installed - we have JRE 6 update 7 installed (1.6.0.17_b04) on the server which runs the agents.
Updated the ODI_JAVA_HOME environmental variable so that it points to the jre6 directory on the server which runs the agents.
Stopped and restarted the Agent services.
Closed and reopened Topology Manager.
Configured the SQL Server data server to use the following JDBC driver:
com.microsoft.sqlserver.jdbc.SQLServerDriver
Configured the JDBC url as follows (changing the hostname):
jdbc:sqlserver://<hostname>:1433;selectMethod=cursor;integratedSecurity=false
Tested using 'Local (No Agent)' successfully.
Tested through an agent and received the following error:
java.lang.Exception:
at com.sunopsis.graphical.c.po.a(po.java)
at com.sunopsis.graphical.c.po.t(po.java)
at com.sunopsis.graphical.c.po.g(po.java)
at com.sunopsis.graphical.c.po.a(po.java)
at com.sunopsis.graphical.c.po.a(po.java)
at com.sunopsis.graphical.c.ja.actionPerformed(ja.java)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at com.sunopsis.graphical.c.po.r(po.java)
at com.sunopsis.graphical.c.po.<init>(po.java)
at com.sunopsis.graphical.frame.b.jh.by(jh.java)
at com.sunopsis.graphical.frame.bo.x(bo.java)
at com.sunopsis.graphical.frame.bo.d(bo.java)
at com.sunopsis.graphical.frame.w.actionPerformed(w.java)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I'm sure it's something obvious that I've missed, but I've now spent close to two days researching, testing and drinking too much coffee. Any help would be very gratefully received!
Thanks.After more investigation and even more chocolate, we've identified the problem and it's now working. For anyone else who strikes this problem in future, here's something to check/consider/try:
Even though Squirrel SQL Client was connecting and working ok using the MS JDBC driver (v 3.0), it recorded this in its logs:
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the INTERSECT operation.
We've found that the open source jTDS driver does not have the same issue as the Microsoft one.
We've installed the current jTDS driver, recorded the driver name (net.sourceforge.jtds.jdbc.Driver) and the JDBC URL (jdbc:jtds:sqlserver://<hostname>:1433/<database>) and the connection is now working fine.
Hope this helps other people...
Thanks to those of you who offered suggestions and things to check...much appreciated.
Robyn -
How to connect to Ms SQL Server 2000 with forms9i......
hi,
how do i connect my forms9i to the database in the Ms SQL Server 2000 on the same machine ?
please give a code example also
thanks
regards
montySee
http://www.oracle.com/technology/products/forms/pdf/275201.pdf
Also search the forum and you will find discussions on this topic. -
Hi, my name is Gregory,
I am a newbie in oracle forum here, and need some help from the database guru here...
I am trying to create the database link from Oracle database to SQL Server.
here are the information:
host name of OracleDB = a3500
host name/Ip of SQL Server = 172.16.1.58
SQL Server database name = CKS_VSSD
i had create the new initntchsql.ora file under tg4msql\admin folder, and i also had create the new listener.
here is the file contains
############ initntchsql.ora ###################
HS_FDS_CONNECT_INFO="SERVER=172.16.1.58;DATABASE=CKS_VSSD"
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
############ listener.ora ######################
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = a3500)(PORT = 1521))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(ADDRESS LIST=
(ADDRESS = (PROTOCOL = TCP)(HOST = a3500)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\ora92)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = orclems)
(ORACLE_HOME = C:\oracle\ora92)
(SID_NAME = orclems)
(SID_DESC =
(GLOBAL_DBNAME = cps4)
(ORACLE_HOME = C:\oracle\ora92)
(SID_NAME = cps4)
(SID_DESC =
(PROGRAM = tg4msql)
(SID_NAME = NTCHSQL)
(ORACLE_HOME = C:\Oracle\Ora92)
#################### tnsnames.ora #################
NTCHSQL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = a3500)(PORT = 1521))
(CONNECT_DATA =
(SID = NTCHSQL)
(HS = OK)
and i had created databaselink named ntchsql
then i select statement:
select * from vssd50@ntchsql
and error occured:
ORA-02068: Following severe error from NTCHSQL
ORA-28511: lost RPC connection to heterogenous remote agent using SID=%s
ORA-28509: unable to establish a connection to non-Oracle system
did i missed something on the configuration?
oya... i also see other thread that said i have to comment
SQLNET.AUTHENTICATION_SERVICES = (NTS)
from sqlnet.ora file, and i did that, and the error still the same...
can somebody help me?sorry my fault hehehee....
here is the lsnrctl stat
LSNRCTL> stat
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))(ADDRE
SS LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 9.2.0.4.0 - Produc
tion
Start Date 16-FEB-2006 15:30:24
Uptime 0 days 0 hr. 26 min. 57 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File C:\oracle\ora92\network\admin\listener.ora
Listener Log File C:\oracle\ora92\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a3500)(PORT=1521))(ADDRESS LIST=(ADD
RESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc))(ADDRESS L
IST=(ADDRESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a3500)(PORT=8080))(Presentation=HTTP
)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a3500)(PORT=2100))(Presentation=FTP)
(Session=RAW))
Services Summary...
Service "NTCHSQL" has 1 instance(s).
Instance "NTCHSQL", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "cps4" has 2 instance(s).
Instance "cps4", status UNKNOWN, has 1 handler(s) for this service...
Instance "cps4", status READY, has 1 handler(s) for this service...
Service "cps4XDB" has 1 instance(s).
Instance "cps4", status READY, has 1 handler(s) for this service...
Service "orclems" has 1 instance(s).
Instance "orclems", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
thanks for helping.... :-) -
How to connect to IMAP mail server using java ?
Hello Friends,
I need to include a mailing facility in my application. Now its not the smtp server instead I have to connect to the IMAP server.
Pls provide your valuable suggestions as to how do I go about this ?
What API will I need to download ?? As javamail API does not have IMAP package.
Thank you for your attention.
RegardsWhat API will I need to download ?? As javamail API does not have IMAP package.What gave you that idea? JavaMail does support IMAP.
-
Problem Connecting To MS SQL Server Via JSP
Please advise !
My envoironment is Windows 2000, j2sdk1.4.1_02, Java Web Services Developer Pack 1.1.
I have set my system variables as below :
JAVA_HOME : C:\j2sdk1.4.1_02
CATALINA_HOME : C:\jwsdp-1.1
CLASSPATH : %JAVA_HOME%\lib;%CATALINA_HOME%\lib;.
PATH : %JAVA_HOME%\bin;
I have copied all the *.jar files from "C:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed" to "C:\j2sdk1.4.1_02\jre\lib".
I have download and install the Microsoft SQL Server 2000 Driver for JDBC. I copied msbase.jar, msutil.jar, mssqlserver.jar to "C:\j2sdk1.4.1_02\lib".
I have created database call "test" in my local SQL server.
I have created table call "Conferences"
I have created those file :
ConnectionBean.java
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import javax.servlet.http.*;
public class ConnectionBean implements HttpSessionBindingListener {
private Connection connection;
private Statement statement;
private static final String driver="com.microsoft.jdbc.sqlserver.SQLServerDriver";
private static final String dbURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=test;"; // database address/database name
private static final String login="sa";
private static final String password="";
public ConnectionBean()
try {
Class.forName(driver);
connection=DriverManager.getConnection(dbURL,login,password);
statement=connection.createStatement();
catch (ClassNotFoundException e) {
System.err.println("ConnectionBean : driver unavailable");
connection = null;
catch (SQLException e) {
System.err.println("ConnectionBean : driver not loaded");
connection = null;
public static void main(String args[]){
ConnectionBean nb = new ConnectionBean();
public Connection getConnection()
return connection;
public void commit() throws SQLException
connection.commit();
public void rollback() throws SQLException
connection.rollback();
public void setAutoCommit (boolean autoCommit) throws SQLException
connection.setAutoCommit(autoCommit);
public ResultSet executeQuery (String sql) throws SQLException
return statement.executeQuery(sql);
public int executeUpdate(String sql) throws SQLException
return statement.executeUpdate(sql);
public void valueBound(HttpSessionBindingEvent event)
System.err.print("Connection: in the valueBound method");
try
if (connection == null || connection.isClosed())
connection=DriverManager.getConnection(dbURL,login,password);
statement=connection.createStatement();
catch (SQLException e) { connection = null; }
public void valueUnbound(HttpSessionBindingEvent event)
try
connection.close();
catch (SQLException e) { }
finally
connection = null;
protected void finalize()
try
connection.close();
catch (SQLException e) { }
conference.jsp
<%@ page import="java.sql.*" %>
<jsp:useBean id="connection" class"ConnectionBean" scope="session" />
<html>
<body>
<center>
<font size="+2" face="arial"><b>Conference Registration</b></font>
<form action="shuttle.jsp" method="post">
<table border=1 bgcolor="tan" width="50%" align="center">
<tr><td>
<table border="0" bgcolor="white" cellspacing=0 width="100%"
<tr bgcolor="tan">
<th>?</th><th>City</th><th>Tickets Remaining</th><tr>
<%
Strign sql = "SELECT * FROM Conferences";
ResultSet results = connection.executeQuery(sql);
while (results.next()){
if (results.getInt("seats") > 0) {
%>
<td>
<input type="radio" name="show"
value="<%= results.getString("id") %>">
</td>
<% } else { %>
<td>?</td>
<% } %>
<td><%= results.getString("city") %></td>
<td align="center"><%= results.getString("seats") %></td>
</tr>
<% } %>
</table>
</td></tr></table>
<p>
<input type="submit" value="Next Choose Shuttle)">
</form>
</center>
</body>
</html>
I created 2 folder call "WEB-INF" and "classes" in my web server directory.
I have compiled the ConnectionBean.java and copied the ConnectionBean.class to my "classes" folder.
But i get an error like this :
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.compiler.ParseException: /conference.jsp(1,34) Attribute class has no value
at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)
at org.apache.jasper.compiler.JspReader.parseTagAttributesBean(JspReader.java:616)
at org.apache.jasper.compiler.Parser$Bean.accept(Parser.java:654)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:376)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:518)
at java.lang.Thread.run(Thread.java:536)
It look like cant find the class, I have try copied ConnectionBean.class to "C:\jwsdp-1.1\common\classes", but still came out a some error message.
I'm very sad and demotivate because i have try so many time and i still cant make it.
Please help ! thank you.
regards.What's creating the connection and putting it into the session scope?
I'd start looking at the docs to figure out how to set up a data source for your app.
I know how to do it for Tomcat 4.1.24. Does Tomcat come bundled with the Java Web Services Developer Pack 1.1? If so, check this out:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html -
How to connect to Window 2003 server using "connect as"
How can I set up Lion to easily connect to specified shares in the windows 2003 server. I want to authenticate as a user other than the one I am logged into on my Macbook? I am setting this up for teachers in a school. The macbook may be used by multiple teachers. Best way (simplest) please.
Hi
Let's pretend the Windows Server has an IP address of 10.10.10.254
Go Menu > Connect to Server > smb://10.10.10.254. When prompted enter the account credentials of a user (username and password) that exists on the Windows Server. Alternatively you could use cifs://10.10.10.254. Either one will do. Assuming no 'silliness' on the Windows Network Administrator's part the share should mount.
For ease of connectivity afterwards you could tick the 'remember password using keychain manager' box. Personally I find keychain manager more trouble than it's worth. However you deal with this as you see fit. If it's multiple users using the same workstation I would not enable the option.
Once mounted you can view the Server Share on the user's Desktop by enabling the option in the Finder. It should appear as a blue-ish drive icon on the Desktop. Add the icon in that User's Login Items in the Accounts Preferences Pane. Think of it a little like the Windows equivalent of "mapping a network drive".
Next time that user logs into their local account and provided the workstation is connected to the same network, the share point should mount.
You could also or alternatively drag the share icon to the right hand side of Dock. Click on it to re-connect to the share after you've disconnected from it.
HTH?
Tony -
WIN - How to Connect to Informix Dynamic Server using Generic Connectivity
Hi All,
I have our Oracle running on Windows 2003 and our Informix 9x running on HP.
We have IBM Informix Client install in Wndows 2003 and connection ODBC setup and connected sucessfully.
The setup are as follows:
1) ODBC
System DSN name: capatibak (connected successfully)
2) C:\oracle\product\10.2.0\db_1\hs\admin
Copy the file inithsodbc.ora to initCAPATIBAK.ora and set the following
HS_FDS_CONNECT_INFO = capatibak
HS_FDS_TRACE_LEVEL = ON
3) Listener.ora setup
(SID_DESC =
(SID_NAME = capatibak)
(ORACLE_HOME = c:\oracle\product\10.2.0\db_1)
(PROGRAM = capatibak)
4) Tnsnames.ora setup
CAPATIBAK =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = pendbdev1)(PORT = 1521))
(CONNECT_DATA =
(SID = CAPATIBAK)
(HS=OK)
5) Shutdown and restart Listener
6) Setup database link and perform connection test.
Return: ORA-12518: TNS:listener could not hand off client connection
Kindly advice if I miss any configuration. I am very new to this kind of setup.
Thanks
StevenProblem solved by using the following documentation:
http://www.niall.litchfield.dial.pipex.com/WhitePapers/SettingUpGenericConnectivity.pdf -
Connection with SQL Server using DBCO
Hi,
I want to connect to Misrosoft SQL Server using DBCO transaction. I have given the following fields.
DB Connection = test
DBMS = MSS
User Name = user02
password = test
Conn. info = MSSQL_SERVER=tcp:10.100.50.36 MSSQL_DBNAME=New_Wisdom
permanent selected
Connection Limit = 5
Optimum Conns = 2
while executing through the statement as follows,
EXEC SQL.
CONNECT :'TEST'
ENDEXEC.
I am getting the dump ' An SQL error occurred when executing Native SQL.
The error 900 occurred in the current database connection "DEFAULT".' Please suggest me what needs to be added or corrected.Hi Benito.
I'm not very familiar with MSS but maybe the following will help a little bit.
Depending on the version of your SAP system you can use the transaction DBACOCKPIT to add connections to non-SAP databases. There is an test connection button in that transaction, too. You will find some information about that transaction in some whitepapers here in the SDN. For example have a look at this one: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1062428c-f1df-2910-b08f-c322feddcd10
ADBC error 16 is just "something went wrong". Is your SAP system using MSS, too? If not you will need the matching DBSL for it on your SAP system.
If you have set up an connection you can use program ADBC_TEST_CONNECTION to check if everything is ok. If I remember it correctly in case of errors it allows you to jump into the trace file. There you should find some usefull information.
Perhaps asking in the Database&OS forum area (there is a MSS forum) might help, too.
Best regards,
Jan -
Connect to MS SQL Server 2000 data warehouse
Hi,
I use a MS SQL Server 2000 database for my web application where I use JSP. I suppose to create data warehouse using MS SQL Server's Data Transformation Service. But I don't know it's possible to connect to a MS SQL Server's data warehouse using JSP. So I want to know is it possible to connect to data warehouse using JSP and if it is how to do it? Thank you.You can certainly connect to M$ SQL Server using the JDBC driver:
http://www.microsoft.com/downloads/details.aspx?FamilyID=4f8f2f01-1ed7-4c4d-8f7b-3d47969e66ae&displaylang=en
Connecting to a data warehouse is no different from any relational database. (My understanding is that a data warehouse usually means a star schema implemented in a relational database.) This will connect you.
If you're not familiar with JDBC, you might need the tutorial:
http://java.sun.com/docs/books/tutorial/jdbc/
Maybe you are looking for
-
How to Get the desired Name in Distrubution Lists
Hai all. In my scenario I come accross distrubution list. I created sucessfully Distrubution Lists and validated and run in Ofline Wizard and it run sucessfully. But here comes the issue is the name of the report is which created by distrubution list
-
A pdf. file has been emailed to me from a wireless support recommended by my ISP. I have sent the file to the trash, but it will not delete. Please help
-
Can I change my CS For Windows to MAC?
I would like to change my CS 4 Version of Illustrator to Mac. Unfortunately I only have a Version for Windows is this possible, can anyone help?
-
Can you create file extensions?
Does anyone know if u can create file extensions to read and write from using java? If so can u tell me how or reccomend something that might help teach me? Thanks Mike
-
Cant´t watch videos in my ipod!
I can´t watch videos in my ipod. Everytime I try to play them the screen goes grey and then it frezzes so I have to restart!! I did everything already from letting the batery die, restore, restart the ipod and nothing works. Can someone tell me how t