Java to MS SQL 2005 connection
Hi good afternoon,
I am facing problem while connecting with MSSQL Server 2005 through java. I am only able to connect with server using windows authentication. and when I tried to connect it with SQL server authentication using username as "sa" and null password it is giving an error.
I have written the following code
import java.sql.*;
public class SqlServer{
public static void main(String[] args) throws Exception{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;databaseName=hibernate;integratedSecurity=true";
Connection con = DriverManager.getConnection(connectionUrl);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from dbo.customers");
while(rs.next())
System.out.println(rs.getString("cust_id"));
rs.close();
stmt.close();
con.close();
System.in.read();
And the error is
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Sour
ce)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at SqlServer.main(SqlServer.java:11)
I had just enabled the TCP/IP connection setting
in Configuration Manager provided with SQL Server
2005.What did this solve exactly? I thought you need the uid/pwd of the logged in user of the client's operaring system.
Edit nevermind, this just solved the actual connection problem. But are you logging in without password then?
Message was edited by:
BalusC
Similar Messages
-
Hi,
Well for some reasons I don't really know because SAP doesn't help me a lot on this.
I just reinstall all my SAP software over SQL2005. Everything was nice, and everything works fine from SAP and SQL2005
Now I'm loading the project I was used to work on in SQL 2000 just before the installation and now the connection to SAP never work from the DI API
and Of course I'm using dst_MSSQL2005 as the famous parameter for an SQL2005 connection
I did check the connection parameters and everything is all right. If I'm able to connect with SQL Studio Manager, why not with the DI API ?
Is there something I should know here ?
Thank you for any helpMarc,
Are you able to connect with any of the DI API samples that come with the SDK? Have you installed the DI API on the machine you are trying to run your code? Have you installed the SQL Native Client for connectivity to SQL?
Eddy -
Database connection to MS SQL 2005 (URGENT Help Needed)
Hi all,
Does anyone know how to connect my adobe form to MS SQL 2005?
I have this code:
try {
InitialContext initialContext = new InitialContext ();
DataSource dataSource = (DataSource) initialContext.lookup ("jdbc/MyAlias");
java.sql.Connection connection = dataSource.getConnection ();
} catch (SQLException e) {
// handle exception
} catch (NamingException e) {
// handle exception
Other than these, what else do i need to do inorder to get my database connection up?
And after my database connection is up, how do i test to check if my database connection is up or not?
How do i extract the information from the database and put them onto the textfields/dropdownlists on my form?
Thanks In AdvanceHi Mel,
After implementing the codes and modifying them, some of them are underlined, why is this so? =X
Or are u willing to exchange msn so i could send u the screenshot instead?
Thanks In Advance
(Sorry im not that good in this)
(I shall underline the areas which represents the red underline in my web dynpro)
//Code for database connection.
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)_ctx.lookup("jdbc/JXDataSource");_
Connection conn = ds.getConnection();
Statement st = null;
ResultSet rs = null;
IPrivateDetailed_Claims_FormView.IFillDataElement dataEle = null;
st = conn.createStatement();
// Execute the appropriate SQL query
rs = st.executeQuery("SELECT NAME WHERE VENDORCODE='9000116L' ");_
while (rs.next()) {
// Code that will populate your VN based on the data obtained in the ResultSet.
dataEle = wdContext.createFillDataElement();
dataEle.setName(_rs.getString(1)_);
// dataEle.setAge(rs.getInt(2));
// dataEle.setAddress(rs.getString(3));
//wdContext.nodeFillData.addElement(dataEle);
// Close the connections
rs.close();
st.close();
conn.close();
Edited by: JingXuan Lim on Jan 25, 2008 4:59 AM
Edited by: JingXuan Lim on Jan 25, 2008 5:00 AM -
Issue in Java system installation: MS SQL 2005
Dear All,
I am installing a SAP Netweaver '04 SR1 , Java system with data base MS SQL 2005.
I am facing the issue hereby i will attach the jload.java.log file.
Can any one help me out in fixing it?
java version "1.4.2_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05)
Java HotSpot(TM) Client VM (build 1.4.2_16-b05, mixed mode)
Mar 16, 2009 11:09:42 PM com.sap.inst.jload.Jload main
INFO: Jload -sec KS7,jdbc/pool/KS7,D:\usr\sap\KS7\SYS\global/security/data/SecStore.properties,D:\usr\sap\KS7\SYS\global/security/data/SecStore.key -dataDir D:/Netweaver/netweaver1\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_JAVA\ONE_HOST/IMPORT.XML -log C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_JAVA\ONE_HOST/jload.log
Mar 16, 2009 11:09:43 PM com.sap.inst.jload.Jload main
SEVERE: couldn't connect to DB
java.sql.SQLException: [SAP NetWeaver][SQLServer JDBC Driver]Unable to connect. Invalid URL.
Thanks
RajHi
Yes, everything is checked it. Error appears in the phase of Load Java Database content (18 of 25).
ERROR 2009-03-17 03:35:49
CJS-20065 Execution of JLoad tool 'C:\j2sdk1.4.2_16/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/KS7/JC00/j2ee\jdbc\base.jar;D:\usr\sap/KS7/JC00/j2ee\jdbc\util.jar;D:\usr\sap/KS7/JC00/j2ee\jdbc\sqlserver.jar;D:\usr\sap/KS7/JC00/j2ee\jdbc\spy.jar;D:/usr/sap/KS7/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/KS7/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/KS7/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/KS7/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/KS7/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'KS7,jdbc/pool/KS7,D:\usr\sap\KS7\SYS\global/security/data/SecStore.properties,D:\usr\sap\KS7\SYS\global/security/data/SecStore.key' '-dataDir' 'D:/Netweaver/netweaver1\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_JAVA\ONE_HOST/IMPORT.XML' '-log' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_JAVA\ONE_HOST/jload.log'' aborts with returncode 1. Check 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_JAVA\ONE_HOST/jload.log' and 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_JAVA\ONE_HOST/jload.java.log' for more information.
Thanks
Raj -
Trouble connecting to SQL 2005
I'm using Flex 3, trying to connect to SQL 2005 via ASP with IIS7.
I was following the instructions listed [url=http://livedocs.adobe.com/flex/3/html/help.html?content=data_3.html]here [/url] under the section "Generating an ASP .NET database application", I attempted to Create an Application from Database, following all the steps as listed, but Flex is failing to connet to my database.
I specified a name for the connection profile (I assume this can be anything - maybe this is my mistake), on the next screen under server name I put in the name of my local SQL 2005 Server on my machine: DAVE-PC\SQLEXPRESS, I put in the name of the database AIS1010 and user ID: sa and password 1234 (these all match the credentials on my local SQL Server) and I clicked the button 'Test connection', I get the message unable to connect to database.
I looked at the logs under the detail button, and I can see that Flex is failing to find "DAVE-PC\SQLEXPRESS'. What am I doing wrong here?
Is there something specific I need to do in IIS?
D.I should add:
The first line of the error details reads:
java.sql.SQLException: Unknown server host name 'DAVE-PC\SQLEXPRESS'.
but this is the correct server name in SQL 2005.
also
In the Projects Flex Server Properties root folder is: C:\inetpub\wwwroot\
root URL is: http://localhost/
these locations do 'validate' in Flex.
IIS Server is running and I'm able to run other applications through it using some other applications, both in Flex and in Unipaas..
D -
CF8 and connection pooling using MS SQL 2005 JDBC Driver
After upgrading one of our production servers to CF8 we're
getting errors under load while connecting to MS SQL 2000 data
bases using the MS SQL 2005 JDBC 1.1 driver instead of the driver
cf8 ships with. The following error is recorded in the logs:
Error Executing Database Query. The TCP/IP connection to the
host has failed. java.net.BindException: Address already in use:
connect
Confirmed by the database statistics, Coldfusion is no longer
pooling the database connections. After changing the data source to
use the build in driver everything works fine. We've been using
this driver and CF7 for some time without this error.
Is this a compatibility issue between the driver and Java 6?
Or is there a conflict between this driver and the build in driver?
Has anyone seen similar issues? We’d like to use this driver
rather then the build in one.
Thanks,
Remy Becherthanks for the answer...I have been waiting for one..I do agree that connection ppooling is same ..but I would appreciate it if someone could point me to some example implemenations using MS JDBC type 4 driver..
Thanks again..
PS: I did search the forum before posting this.. -
ODI 10.1.3.4.0 - Topology Manager Connection Error using SQL 2005 SP3
Hello All,
I am using the ODI repository in SQL 2005 SP3. I could create my master repository using the following parameters:
driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
URL:jdbc:microsoft:sqlserver://server_name:1433;SelectMethod=direct;DataBaseName=ODI
I needed to copy to the drivers directory all files of SQL 2000 (msutil.jar, msbase.jar,mssqlserver.jar) and SQL 2005 (sqljdbc.jar). I am using the JRE 1.4.2 and JDBC 2005 1.2 (http://msdn.microsoft.com/en-us/library/ms378422(SQL.90).aspx)
But when I try to connect in Topology Manager to create the work repository appears the following error:
using this driver string: com.microsoft.jdbc.sqlserver.SQLServerDriver
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC] Can't start a cloned connection while in manual transaction mode.
using this driver string: com.microsoft.sqlserver.jdbc.SQLServerDriver
java.sql.SQLException: No suitable driver
Does Somebody know what is happening?
Regards,
Wallace Galvao
Sao Paulo - BrazilHi,
If you plan on using the SQL Server 2005 drivers then you only need the 1.2 sqljdbc.jar file in the drivers directory.
The connection details for SQL Server 2005 should be like the following.
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:sqlserver://<sqls machine>:1433;databaseName=<db name>;integratedSecurity=false
I would try just with just the correct driver in place, remove the others, restart any ODI components and then make sure the connection information is correct like above.
Cheers
John
http://john-goodwin.blogspot.com/ -
Not able to connect to MS SQL 2005 Evaluation version
Hi,
I have installed MS SQL 2005 Evaluation version(downloaded from microsoft site) on my win2k3 Enterprise Edition I am writing a java application that connects to MS SQL 2005.
I have downloaded the MS SQL 2005 JDBC driver. And i unjarred the
I have unjarred the sqljdbc.jar file and kept the com folder and my .java file in the same folder.
When i am trying to connect, I am getting the following error:
com.microsoft.sqlserver.jdbc.SQLServerException: Failed Logon:com.microsoft.sqlserver.jdbc.SQLServerException: TCP/IP connection failed to host:155.35.54.160 java.net.ConnectException: Connection refused:connect
My code look like this:
try {
Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String fs = File.separator;
String conn_str = "jdbc:sqlserver://155.35.54.160:1433;user=sa;password=SA;databaseName=asdb";
conn = DriverManager.getConnection ( conn_str );
catch (Exception e) {System.out.println(e); }
Please reply.
Thanks and Regards,
Sudheer GajulaFirst aid check list for "connection refused":
- Check host name in connect string.
- Check port number in connect string.
- Try numeric IP address of server host in connect string, in case name server is hosed.
- Are there any firewalls between client and server blocking the port.
- Check that the db server is running.
- Check that the db server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port. You need to configure the database to accept TCP connections; read the documentation or google.
- Try "telnet server-host-name the-port-number" from the client, to see if firewalls are blocking it.
- If "telnet" fails: try telnet with the numeric ip address.
- If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
- Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"? -
Coldfusion connection to MS SQL 2005
Please help with this issue if you have any suggestions. I am
trying to establish a connection from my IIS server with ColdFusion
to another local server with an MS SQL 9.0 database. I can connect
to this database using Enterprise from another computer, but when I
use the same username and password within ColdFusion I get the
following error:
Connection verification failed for data source: FORMS
java.sql.SQLException: [Macromedia][SQLServer JDBC
Driver][SQLServer]Login failed for user 'domain\coldfusion'. The
user is not associated with a trusted SQL Server connection.
The root cause was that: java.sql.SQLException:
[Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user
'domain\coldfusion'. The user is not associated with a trusted SQL
Server connection.
I have reinstalled ColdFusion with no errors and have also
installed the MS JDBC driver for MS SQL 2005 but still get the same
error.
Thanks for any suggestions you might have.
CraigIf there is anyone else with this problem I have something
that you may want to try. This did work for me and I'm able to
connect to SQL 2005 using ODBC Socket. The IIS computer was using
system credentials and not the ColdFusion credentials I had
created.
On the ColdFusion application server goto the Properties of
CF's ODBC server and agent. Under LogOn change the LogOn
information to the username and password you have set up for
ColdFusion for both and restart these services. When setting up
your ODBC Socket do not include username or password information.
Hopefully CF8 will include Windows Authentication. Even with
this workaround we may need to switch to mixed authentication on
SQL which is not ideal. -
Connecting to MS SQL 2005 via JDBC Driver
I have an application in which I use Java to abstract
database elements as objects and handle most of the server-side
processing. This is done by creating a Java object via
CreateObject(). The Java then connects to a MS SQL 2005 database
using the JDBC 1.1 Driver.
The following tutorial explains how to set this up:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=ded4216b.
It instructs you to create a Data Source, much like how you
typically would in "regular" ColdFusion applications. Then, using
some simple Java, I am successfully able to connect to the
database, query it, and get results. The connection code is
attached.
As you can see, I am still passing all the connection
parameters to the Database class constructor. My question is: how
would I go about connecting to the database by simply using the
Data Source Name, as you would, again, in "regular" ColdFusion
applications. Is this possible at all?
Thanks!Thanks for the input guys.
Perhaps I did not explain my intent very clearly. What I am
trying to accomplish is have a vast majority of the server-side
code done in Java. With that, I would be able to do things like:
<cfset myUser = CreateObject("java", "User").init(5)>
<cfoutput>#myUser.getFirstName()#</cfoutput>
However, unless I am able to connect to the database in Java
(which I currently AM able to do, but just not quite the way I want
to), I would have to run all the queries in CF and then pass them
to the different objects so that they can then process the query
results. This isn't a very smart thing to do, seeing that it binds
me to a lot of CF while I am trying use it as little as possible
(session management and user interface "tier" only).
So no, I am not going all out with Java just to avoid passing
username/password, but instead to use true OOP instead of CF
Components. I realize ColdFusion too passes this info, but it does
not show up in the source code, which is precisely what I need to
do, but with Java.
Basically, I have everything working the way I need now,
except I need to be able to connect using a data source name rather
than passing the parameters, if at all possible. -
Unable to establish connection to MS SQL 2005 from topology manager in ODI
Hi,
My environment:
WinXP pro SP3, MS SQL SERVER2005, Oracle data integrator latest version.
MS SQL 2005 JDBC 2.0 DRIVER, JRE 1.4.2
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:microsoft:sqlserver://testserver:1433;SelectMethod=cursor;databaseName=AdventureWorksDW;integratedSecurity=false
I set the classpath, odi_home path and path poiting to jdbc driver in odi home->drivers and to odi->jre->1.4.2
Before i begin, i would like to mention, i have gone through many forum topicson this one and made sure my string is all right.
When I try to create a new data server in topology manager, it says connection is successful, but after that when i try to click OK, it gives me a error:
java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.graphical.frame.b.jz.dP(jz.java)
at com.sunopsis.graphical.frame.b.jz.bD(jz.java)
at com.sunopsis.graphical.frame.bo.bz(bo.java)
at com.sunopsis.graphical.frame.b.jz.em(jz.java)
at com.sunopsis.graphical.frame.b.jz.<init>(jz.java)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.sunopsis.graphical.frame.bb.b(bb.java)
at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Unknown Source)
Someone please help me.
Thank you.
Edited by: user9946607 on Feb 7, 2010 7:20 AM
Edited by: user9946607 on Feb 7, 2010 7:21 AMHi John,
Thank you for your reply. The link was good, but it did not solve my problem.
The artcile you provided me, lead me to another one: http://msdn.microsoft.com/en-us/library/ms378422.aspx
I download JRE 1.5.
Based on these, I have JDBC 2.0 (sqljdbc and sqljdbc4.0) files.
I copy only sqljdbc to my classpath = C:\OraHome_1\oracledi\drivers\sqljdbc.jar
my ODI_JAVA_HOME = C:\OraHome_1\jre\jre1.5.0_11
Same error in topology manager.
Data server name: test.ahu.edu, 1444
Conntection string:
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:microsoft:sqlserver://test.ahu.edu:1444;SelectMethod=cursor;databaseName=AdventureWorksDW;integratedSecurity=false
I am not sure show the share screen shots here, but if there is a way, please let me know, I can upload the screen shots.
Please help me.
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.graphical.l.pm.o(pm.java)
at com.sunopsis.graphical.l.pm.r(pm.java)
at com.sunopsis.graphical.l.pm.g(pm.java)
at com.sunopsis.graphical.l.pm.a(pm.java)
at com.sunopsis.graphical.l.pm.a(pm.java)
at com.sunopsis.graphical.l.iz.actionPerformed(iz.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.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$2.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 com.sunopsis.graphical.l.pm.q(pm.java)
at com.sunopsis.graphical.l.pm.<init>(pm.java)
at com.sunopsis.graphical.frame.b.jh.bx(jh.java)
at com.sunopsis.graphical.frame.bo.w(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.pumpOneEventForHierarchy(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)
Thank you. -
Error in Connecting to MS SQL 2005 via JDBC Driver
Here's the setup
CF MX7 resides on a centOS wid Apache 2.0 webserver box.
I need to established a datasource connection between the
Coldfusion server and a MSSQL 2005 Express+SP1 database sitting on
a remote XP wid SP2 setup.
I've also downloaded and installed on the /lib folder of the
CFMX7 server the corresponding JDBC drivers (versions 1.1 and 1.0)
for the MS SQL server.
The thing is, this problem always occurs:
Connection verification failed for data source:
datasourcename
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Error establishing socket.
The root cause was that: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing
socket.
The datasource connection info is as follows:
CF Datasource Name: datasourcename_JDBCdriver
JDBC URL:
jdbc:microsoft:sqlserver://192.168.0.47:1433;DatabaseName=nameofdatabase
Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver Name: mssql2005
Username: sa
Password: userdefinedpassword
I've already tried these settings:
* Enabled mix mode of authentication under the SQL server
* Affix a /MSSQLSERVER instance name on the jdbc url setting
"jdbc:microsoft:sqlserver://192.168.0.47\MSSQLSERVER:1433;DatabaseName=nameofdatabase"
but a different error had occured:
The root cause was that: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]The requested instance
is either invalid or not running.
so i remove it since its only an optional setting
* Configured the SQL 2005 Express, under the SQL Server
Configuration Manager, to listen to protocol TCP/IP under port 1433
(this is the ONLY ENABLE protocol)
I've checked using Telnet and netstat and the SQL service is
normally listening to the said port.
* Disabled windows firewall under XP (came with SP2)
and even tried using other JDBC drivers such as:
* macromedia drivers
* jtds driver
but to no avail.
Is the problem still within the MS SQL 2005 Express wid
XP+SP2 box or a connecting issue on the Cf server under the
centOS/Apache machine?
A little help would do wonders just about now.I had the same problem, but do not have express version. In
the configuration manger, I viewed the properties of the enabled
tcp/ip protocol. On the IP addresses tab, I found that though the
IPs were enabled, the drop down beside active was no. I changed all
to yes, applied it and restarted my instance. Then in the cf
datasource I left the port blank and everything worked. -
MS SQL 2005 remote connection using sqljdbc
Hi,
I have production line computer with software using java code and firebird database, i also have sqljdbc.jar also in the library.
my software is trying to connect to mssql2005 database in a remote computer and got this error message:
java.lang.classnotfoundexception: com.microsoft.sqlserver.jdbc.SQLServerDriver.
I have no problem when connecting to my local mssql2005 database though. but have problems when trying to make remote connection.
May i know what could seem to be the cause of the problem, is there anything missing ? do i need to instal anything else on the production line computer? currently it does not have mssql2005 instal on the production computer do i need to instal it ? please help. thanksBtreksun wrote:
Hi,
Im using MS SQL 2005 Express edition, I dont find any sqljdbc.jar driver inside the installation,
I dont see any other driver or driver folder in the installation path.
Inside my instalation path C:\Program Files\Microsoft SQL Server: only shows these folders
MSSQL$MSSQL2000
MSSQL.1
80
90
100
"Class path" applies to java. None of the above is java.
I dont know what to set my classpath with?You are running your java in "something". That "something" is an application. That "something" does not have the correct class path. You didn't tell us what it is so we can't help you with it.
I even download sqljdbc.jar and put it inside C:\Program Files\Microsoft SQL Server and set the classpath but doesnt work ?I suggest you google for class path, read several articles about it and try some of the stuff that they talk about. -
Installing Application Server JAVA on SQL 2005
We are looking to install a NW 7.0 system with Application Server Java only. We would like to install the SCS and the Central Instance on one host on a Windows 2008 64-bit server and the Database Instance on a seperate host. The DB host is a Windows 2008 32-bit server and has MSSQL 2005 installed on it.
We are new to MSSQL with SAP and have a couple questions:
1) Is the scenario I described above possible? Looking at the PAM it looks like we need to have Windows 2008 on a 64-bit platform in order for SQL 2005 to work.
2) For installing the database instance, do you have to use sapinst on the DB host and install the database instance? If so, how do you connect the SCS to the DB? Or can you use the sapinst where the SCS was installed and link to the DB host?
Thanks and any help would be great.
Dale DingmannHi Dale
If you're installing this to work as a Clustered system, I think you want to have the 2 servers (DB & CI) the same.
Ken -
Error export from my database sql 2005 with Windows 2003 abap+java
Hi all
I'm trying to create an Export from my database sql 2005 with Windows 2003, but SAPINST starts with an error. ABAP+JAVA stack
While running the export preparation, I am getting the following error;
INFO 2010-09-08 12:12:43
Output of C:\j2sdk1.4.2_13-x64\bin\java.exe -classpath D:\usr\sap\BID\SYS\global\sltools\sharedlib\launcher.jar -showversion -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.sl.ut.manager.UtlMain
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_jce.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_jsse.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_smime.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_ssl.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/w3c_http.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comsl.ut.infoprovider_lib.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comsl.ut.manager.offline.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/antlr.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/exception.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/jddi.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/logging.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/offlineconfiguration.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/opensqlsta.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/tc_sec_secstorefs.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comtcsdtcvlimpl.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/SDMutil.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/SLUtil.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\base.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\util.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\sqlserver.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\spy.jar -export -type=keydb "-expfile=C:/Program Files/sapinst_instdir/NW04S/LM/COPY/MSS/EXP/CENTRAL/AS/PREEXP/usages_data.xml" -log=UTL_load_usages.log -sid=BID -dsn=jdbc/pool/BID -ssprops=D:/usr/sap/BID/SYS/global/security/data/SecStore.properties -ssk=D:/usr/sap/BID/SYS/global/security/data/SecStore.key is written to the logfile C:/Program Files/sapinst_instdir/NW04S/LM/COPY/MSS/EXP/CENTRAL/AS/PREEXP/UTL.java.log.
WARNING 2010-09-08 12:12:46
Execution of the command "C:\j2sdk1.4.2_13-x64\bin\java.exe -classpath D:\usr\sap\BID\SYS\global\sltools\sharedlib\launcher.jar -showversion -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.sl.ut.manager.UtlMain
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_jce.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_jsse.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_smime.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_ssl.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/w3c_http.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comsl.ut.infoprovider_lib.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comsl.ut.manager.offline.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/antlr.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/exception.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/jddi.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/logging.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/offlineconfiguration.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/opensqlsta.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/tc_sec_secstorefs.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comtcsdtcvlimpl.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/SDMutil.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/SLUtil.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\base.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\util.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\sqlserver.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\spy.jar -export -type=keydb "-expfile=C:/Program Files/sapinst_instdir/NW04S/LM/COPY/MSS/EXP/CENTRAL/AS/PREEXP/usages_data.xml" -log=UTL_load_usages.log -sid=BID -dsn=jdbc/pool/BID -ssprops=D:/usr/sap/BID/SYS/global/security/data/SecStore.properties -ssk=D:/usr/sap/BID/SYS/global/security/data/SecStore.key" finished with return code 64. Output:
java version "1.4.2_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_13-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.4.2_13-b06, mixed mode)
ERROR 2010-09-08 12:12:46
CJS-30071 Execution of UTL tool 'C:\j2sdk1.4.2_13-x64\bin\java.exe -classpath D:\usr\sap\BID\SYS\global\sltools\sharedlib\launcher.jar -showversion -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.sl.ut.manager.UtlMain
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_jce.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_jsse.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_smime.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/iaik_ssl.jar;
JRBIWD/sapmnt/BID/SYS/global/security/lib/tools/w3c_http.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comsl.ut.infoprovider_lib.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comsl.ut.manager.offline.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/antlr.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/exception.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/jddi.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/logging.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/offlineconfiguration.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/opensqlsta.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/tc_sec_secstorefs.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/sap.comtcsdtcvlimpl.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/SDMutil.jar;D:/usr/sap/BID/SYS/global/sltools/sharedlib/SLUtil.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\base.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\util.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\sqlserver.jar;D:\usr\sap\BID\DVEBMGS01\exe\mssjdbc\spy.jar -export -type=keydb "-expfile=C:/Program Files/sapinst_instdir/NW04S/LM/COPY/MSS/EXP/CENTRAL/AS/PREEXP/usages_data.xml" -log=UTL_load_usages.log -sid=BID -dsn=jdbc/pool/BID -ssprops=D:/usr/sap/BID/SYS/global/security/data/SecStore.properties -ssk=D:/usr/sap/BID/SYS/global/security/data/SecStore.key' aborts due to database connection error with return code 64.<br>DIAGNOSIS: The connection parameters are wrong or the database server is shutdown.<br> SOLUTION: Check 'UTL_load_usages.log' and 'C:/Program Files/sapinst_instdir/NW04S/LM/COPY/MSS/EXP/CENTRAL/AS/PREEXP/UTL.java.log' for more information.
ERROR 2010-09-08 12:12:46
FCO-00011 The step getUsageTypes with step key |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_Java_Prepare_Export_Dialog|ind|ind|ind|ind|5|0|getUsageTypes was executed with status ERROR .
Could anyone please help me out on this, if possible?
Thanks
JMHi,
please ensure that you use a SAP supported JDK as below:
716604 for the Sun JDK (Windows, Linux, Solaris)
709140 Recommended JDK and VM Settings for the WebAS630/640/7.0
And the re try the export pls.
Regards,
Snow
Maybe you are looking for
-
How to convert my MM alias into an AppleID to use it with iCloud?
I used MobileMe and created a mail that became my Apple ID. Then I created an alias that became my main e-mail so now with iCloud I wish that aslias could become my Apple ID. I don't care to loose the first Apple ID but "How to convert my MM alias in
-
Best approach for handling a Repair business
Hi All, A company provides Repair Services for various branded Products. The manufacturers send their Products for repair along with replacement Parts. The repaired Products are despatched back to the Original Manufacturer with details of Repair (nat
-
I just updated Itunes. Now I can't get my Library to load
So, I updated to the latest version of Itunes tonight. Now I cannot get my libary to load. All of my music is still showing on Itunes, but my library will not load. First, it kept showing it was loading, and nothing happened. So I rebooted. Now
-
Is it worth it to make custom icons for a custom control/indicator?
I was making custom icons (well not very custom, but still at least somet ext) for controls and indicators, when I realized that the only times you see them are when you open the control, itself, ot if you hover over it in the project with context he
-
Disable the 'OUTPUT' Tab in the SRM PO Web Browser for SRM Employee Role
Hi All, I would like to Disable 'OUTPUT' Tab in SRM PO (Web browser) for different users who are assigned to SRM Employee Role (who has PO Display Authorization) to restrict PO Print Preview only (not to restrict displaying PO field values in SRM Web