SQL Server 2005 JDBC Driver 1.0 Error In Using XA Datasource

Feb 22, 2006



We are in the process of configuring a j2ee application with SQL Server 2005. We have downloaded the new version of SQL Server 2005 Java Database Connectivity (JDBC) Driver 1.0.

We are having some issues in getting it to work using the XA datasource. Description of the error is as follows:

javax.transaction.xa.XAException: java.sql.SQLException: Failed to create the XA control connection. Error: Could not find stored procedure 'master..xp_sqljdbc_xa_init'..
at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Unknown Source)

Has anyone else has encountered this and possibly found a solution.


Regards,

Bindu

View 33 Replies


ADVERTISEMENT

SQL Server 2005 JDBC Driver 1.1 Error In Using XA Datasource

Sep 11, 2007

Hello,

I'm trying to configure JBoss application server to use SQLServer 2005 as database with XA transactions.
I can start a new transaction, access SQLServer from within the transaction, but when committing, there is the following XAException from SQLServer:
16:04:20,926 INFO [STDOUT] javax.transaction.xa.XAException: java.sql.SQLException: COMMIT: Status:0 msg:*** SQLJDBC_XA DTC_ERROR Context: xa_commit, state=1, StatusCode:-4 (0xFFFFFFFC) ***16:04:20,926 INFO [STDOUT] at com.microsoft.sqlserver.jdbc.SQLServerXAResource.commit(Unknown Source)16:04:20,941 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.commit(XAManagedConnection.java:176)16:04:20,941 INFO [STDOUT] at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:641)16:04:20,941 INFO [STDOUT] at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2619)16:04:20,941 INFO [STDOUT] at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1779)
[...]


The system is running on Windows Server 2003 64bit with SQLServer 2005 64bit, and JBoss running on JDK 1.5.0 (32bit)
Can anyone tell me what this message indicates?

Regards,
Martin

View 3 Replies View Related

SQL Server 2005 JDBC Driver V1.1 And SSL

Jan 3, 2007

Hi folks,

I'm trying to figure out if the SQL Server 2005 JDBC driver supports SSL at all. I've downloaded the driver documentation, looked at more web pages than I care to count, and even went as far as to take a stab at guessing at different driver property names in the hopes I might discover some undocumented feature. Each time I try, I come up dry.

The following exception shows up in my JBoss log:

2007-01-03 12:13:36,812 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: The SQL Server login requires an SSL connection.)

I know I have things working properly on the SQL Server side, as both osql and Query Analyzer work fine, and packet sniffing yields no plain text information. I've also tried swapping in the open source JTDS driver, and once again, sniffing shows that the data between the two machines in encrypted.

Does anyone know if I'm just missing something completely obvious, or can someone state with absolute certainty that the driver does not support SSL? Any ideas on how to find out if there are plans to support this feature and what the timeline might be?

Thanks in advance.
Trev.

View 3 Replies View Related

SQL Server 2005 JDBC Driver

Apr 1, 2007

Hi



Do we have to use SQL server 2005 JDBC driver to connect the sql server 2005? I got sql server 2000 driver for JDBC, it works fine to connect the database. But when I use sql server migration assistant for oracle, i got an error saying: [sql server 2000 driver for JDBC] Error establishing socket. Do I have to download SQL server 2005 driver for JDBC or I miss something else?



Thanks



Li

View 7 Replies View Related

JDBC Driver For SQL Server 2005

Jul 24, 2007

Can any version of the SQL Server 2000 JDBC driver connect to SQL Server 2005 or do I have to install the new JDBC version 1.1 to connect to my 2005 instance?

View 1 Replies View Related

Issue With Sql Server Jdbc Driver 2005

Jan 25, 2008

I have one query which executes properly with mssql 2000 jdbc driver but fails with the 2005 driver.

The query creates a table, using insert exec method tries to get the data in the created table. But, executing this statement fails producing exception com.microsoft.sqlserver.jdbc.SQLServerException: The statement did no
t return a result set.

the command is as:
insert into #temp exec ('dbcc inputbuffer (' + @spid + ')')

I tried executing only the dbcc command on the db with query analyzer, it returns the results correctly, even with the same driver if I execute the dbcc query it runs fine and returns the resultset. But, only when I use it with insert exec it fails.

Does anyone know why this error occurs and what can be work-around.

Thanks in advance.

View 4 Replies View Related

JDBC Driver For Microsoft SQL Server 2005 SP1

Oct 7, 2006

Hola a todos. Saludos cordiales.

Tengo instalado Microsoft Windows 2003 Server Standard Edition en un servidor IBM xSeries 220, estoy tratando de instalar IBM Director 5.10 y no ha sido posible hacer que se conecte con la base de datos.

Esto ocurre cuando intento configurar el Servidor SQL en la fase final de la instalación de IBM Director.

Gracias por su ayuda, ¿puede alguien darme alguna sugerencia?

Erick Gómez, Venezuela

View 1 Replies View Related

OutOfMemoryError With SQL Server 2005 V1.2 JDBC Driver

Oct 6, 2007


We have a problem with SQL Server 2005 v1.2 JDBC driver, where the application is failing with java.lang.OutOfMemoryError. We have a database of around 50 milion rows and our application has to query that database and operate on the large dataset. However, we are not facing this problem with databases having 1 million rows.

Database is running fine even after the java.lang.OutOfMemoryError in the application side. However, the application is not responding after this error.

We are facing this problem with SQL Server 2005 Standard Edition as well as Enterprise Edition.
Any help or suggestions will be highly appreciated.

View 1 Replies View Related

Microsoft SQL Server 2005 JDBC Driver

Sep 28, 2006

Hi, will there be a Windows Mobile edition of this driver, so that is possible to connect to SQL Everywhere on a Pocket PC from Java ME apps?

Best regards.

Luca

View 12 Replies View Related

Microsoft SQL Server 2005 JDBC Driver

Apr 8, 2006

I'm getting the following exception when attempting to connect to SQL Server 2005 using Microsoft's new JDBC driver:

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect

The help docs suggest checking connectivity using telnet. So attempting to connect via telnet to 127.0.0.1:1433 generates:

Could not open connection to the host, on port 23: Connect failed.

So I try to start telnet:

net start telnet

I get the following error message:

The service cannot be started either because it is disabled or because it has no enables devices associated with it.

Can anyone help?

Thanks

View 7 Replies View Related

SQL Server 2005 Express - JDBC Driver

Mar 27, 2008



Is there a JDBC driver specific for 2005 Express ? Or should I be using the SQLServer 2005 JDBC driver -

If specific, please provide link!

Thanks,

MrCuban

View 1 Replies View Related

SQL SERVER JDBC DRIVER 2005 ISSUES , PLEASE HELP

Oct 18, 2007

Hi Friends ,

Recently I downloaded version 1.2 release of the Microsoft SQL Server 2005 JDBC Driver. Thanks a ton to Microsoft
for providing many new features such as Adaptive Buffering , SSL Encryption , Tightly Coupled XA Transactions etc.

I am mainly concerned about SSL part of it and would be grateful if you can solve my queries or forward it to app-
ropriate forum.

1 ) I tried connecting to SSL enabled SQL Server 2005 through a sample program provided by Microsoft along with this
package ( Version 1.2 ) and I succeeded whereas in previous versions I use to get an exception as "The SQL Server
login requires an SSL connection." My connection string is as follows "jdbcqlserver://Ip adress of dataserver
machine:1433;databaseName=master;user=sa;password=sapassword" .

Ideally we should only get an SSL connection when we request it else an error message should be thrown informing
the user that dataserver requires an SSL connection. This would help in choosing between type of communication
a user needs with dataserver.

The scenario now is like forcing a user to have SSL communication if dataserver forces it. A flag may be added
as ssl should be mandatory or auto .


2 ) Current driver 1.2 is not capable of communicating with MS SQL Server 2000 both in case of SSL and Non - SSL
cases , The error which we receive in both cases is :

Oct 18, 2007 4:57:17 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 TransactionID:0x0000000000000000 Prelogin response packet not marked as EOM
The TDS protocol stream is not valid.

To communicate with both MS SQL Server 2000 and 2005 a user will have to maintain both the drivers which may
increase complexity of the application , like loading both driver in a single process , etc etc . . .

If version 1.2 id built on top of Sql server 2000 JDBC drive then it should be able to handle following 4 cases :

i ) SQL Server 2005 - SSL ,
ii ) SQL Server 2005 - Non - SSL ,
iii ) SQL Server 2000 - SSL ,
iv ) SQL Server 2000 - Non - SSL .

If this single driver handles all above 4 cases , life of a developer and application developed by him/her would
become less complex.

3 ) Last but not the least , the SQL Server 2000 JDBC driver connects with both kind of SQL Server 2000 instances i.e.
SSL and Non - SSL without any certificate of flags specified. I was able to establish non - SSL connection with SQL
Server 2000 using two third party JDBC drivers which I think is not appropriate behaviour.

4 ) I have also noticed that when SQL Server 2005 is running in Non - SSL mode i.e. "ForecEncryption=No" and our Client
application requests SSL communication , we are not warned about server is not runnning in SSL mode , could you please
explain this ?

Kindly correct me I am wrong anywhere as I am just a beginner and don't have much knowledge on this subject .

Thanks a lot.

Sincerly ,

Sudhansu Tiwari

View 1 Replies View Related

SQL Server 2005 Express JDBC Driver???

Dec 9, 2005

Hi All,

View 5 Replies View Related

Microsoft SQL Server 2005 JDBC Driver 1.1 On Solaris

Apr 26, 2007

hi,Does MS2005 JDBC Driver 1.1 support integrated security on Solaris and if sohow?Thanks,MarcM

View 1 Replies View Related

SQL Server 2005 JDBC Driver V1.2: StreamError Not Serializable

Jan 11, 2008

I'm encountering a problem that seems to be due to the StreamError class not being serializable. This was raised on the JDBC Driver Team blog by Jonas on 10/24/2007. Jimmy Wu notes on 10/29/2007 that it is under investigation. Any progress?

http://blogs.msdn.com/jdbcteam/archive/2007/10/12/microsoft-sql-server-2005-jdbc-driver-v1-2-official-release.aspx#comments

Thanks,
Mike

View 2 Replies View Related

Can't Retrieve Second Resultset With Jdbc Sql Server 2005 Driver

Dec 7, 2006

Hi All,

My java application executes one stored procedure that returns two resultsets and then deal with data. The code actually is very simple

Statement stmt = con.createStatement(); con is database connection

ResultSet rs = stmt.getResultSet();

//Do something

rs.close();

rs = stmt.getResultSet();

//Do something

Then I got the error: The result set is closed.

The code worked well with jdbc sql server 2000 driver.

Thanks for your help.

Eric

View 1 Replies View Related

Using 2005 JDBC Driver To Access SQL Server 2000

Oct 5, 2006

Hi,

I'm using JDBC driver for Server 2005 (version 1.1.1501) to access Server 2000. I have no problems reading my data, but every update returns "Cursor is READ ONLY".

If I use driver for Server 2000 I have no problems. And I have no problems running the same program with 2005 driver against SQL Server Express.

Where should I start debugging?

Thank you,

View 1 Replies View Related

Create Jbc On TomCat Microsoft SQL Server 2005 JDBC Driver

Feb 14, 2008



Hi, We are looking for a way to create the jdbc connection with Microsoft jdbc driver on a TomCat server ? Meaning the exact information to enter within the server.xml file or within the Tomcat web server administration tool - data source GUI.


thanks

View 1 Replies View Related

Stored Procedures SQL Server 2005 And JDBC Driver Problems

Aug 22, 2007

Hi,

I am using SQL server 2005 stored procedures being called from my java application using the CallableStatement. As long as my stored procedure is a simple and direct Select statement things are moving nicely.
But my stored procedures are a little bit more complicated and this causes problems for me to parse the data in a ResultSet.
a sample stored procedure:
Create procedure sp_Get

@cat int,
@itemId bigint
as
declare @results table (tableId bigint, label varchar(200), typeId int)

if @cat = 1
begin

insert @results (tableId, label, typeId)
select

tableId = personId,
label = fname + lname,
typeId = 1
from Person where catId = @itemId


insert @results (tableId, label, typeId)
select
tableId = prospectId,
label = prospect,
typeId = 2
from Prospects where catId = @itemId
end
else if @cat = 2
begin

insert @results (tableId, label, typeId)
select

tableId = companyId,
label = Company,
typeId = 1
from Company where regionId = @itemId
end
/* result set*/
select

tableId,
label,
typeId
from @results
GO

my java code:
Connection conn = this.getConnection() //opens connection to db
CallableStatement cmd = conn.prepareCall(" { call sp_Get (?,?) }");
cmd.setInteger("cat", 1);
cmd.setLong("itemId", 2);

//this returns false?
boolean hasResults = cmd.execute();

//this also returns false?
boolean moreResults = cmd.getMoreResults();



The strange part of this is that when you execute this query in the SQL Server Managent Studio it returns 1 result set.
Why is my java code not able to see this result?

Thanks for any help,

- Rogier

View 1 Replies View Related

Transaction Not Commiting Using Microsoft SQL Server 2005 JDBC Driver 1.1

Feb 14, 2007

I have some code that should execute multiple statements and then commit. I am using the Microsoft SQL Server 2005 JDBC Driver 1.1.

The statements only commit ifI close the connection to the SQL Server 2005 instance. I've looked at the example given at http://msdn2.microsoft.com/en-us/library/ms378931.aspx and it doesn't require closing the connection in order to commit.

Example:

public void doCall(Connection con) {
try {
/*Turn off AutoCommit.*/
con.setAutoCommit(false);

/**Call Two Stored Procedures.*/
Statement stmt = con.preapareCall(/*Java Code*/);
stmt.setObject(/*Java Code*/);
stmt.execute();

Statement stmts = con.preapareCall(/*Java Code*/);
stmt2.setObject(/*Java Code*/);
stmt2.execute();



/**Commit the transaction.*/
con.commit();

}
catch (SQLException ex) { //If some error occurs handle it.
ex.printStackTrace();
try {
con.rollback();
}
catch (SQLException se) {
se.printStackTrace();
}
}
}

My transaction never commits, and when I try to query the associated database tables in Microsoft SQL Server Management Studio 2005 my query hangs.

View 7 Replies View Related

IntegratedSecurity Issues With Microsoft SQL Server 2005 JDBC Driver

Dec 14, 2006

I am using Microsoft SQL Server 2005 JDBC Driver to connect to SQL Server 2000 database, I am using the following connection URL

boolean iSecurity = true;

String connectionUrl = "jdbc:sqlserver://machine_name:1433;" + "databaseName=dbname;integratedSecurity=" + iSecurity;

I am getting the following error.

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

How do I resolve it? I have the following set

VMOPTIONS = -Xrs -Djava.compiler=NONE -Djava.library.path=C:Microsoft SQL Server 2005 JDBC Driversqljdbc_1.1enuauthx86sqljdbc_auth.dll

Any help will be highly appreciated.

Regards

Arup

View 1 Replies View Related

SQL Server 2005 JDBC Driver - GetParameterMetaData() For 'INSERT ... INTO' Statement

Aug 15, 2006

I use the Microsoft SQL Server 2005 JDBC Driver (1.0.809.102 and 1.1.1320.0) to connect to a SQL Server 2005 database. I'm currently implementing a generic data access layer that executes an arbitrary SQL statement:

public void prepareQuery(String sql) throws SQLException, ClassNotFoundException {
PreparedStatement stm = getConnection().prepareStatement(sql);
ParameterMetaData pmd = stm.getParameterMetaData();
int numPar = pmd.getParameterCount();
System.out.println("Number of parameters: " + numPar);
// ... acquire and process 'numPar' parameters ...
}

Exemplarily, I created a table named 'TEST_TABLE' with three Integer columns ('C1', 'C2' and 'C3') and a Varchar column ('C4'). Calling

prepareQuery("INSERT INTO [TEST_TABLE] ( [C1], [C2], [C3], [C4] ) VALUES ( 1, 2, ?, ? )")

gives the following result:

Number of parameters: 4

This is definitely wrong because that statement has only two parameters, one of type Integer and one of type Varchar. How can I get the correct number and types of the parameters?

View 3 Replies View Related

SQL Server 2005 JDBC Driver Output Parameter/Result Set Issue

Mar 21, 2006

I'm having an issue with the JDBC driver when I execute a stored procedure that both has a return value and also returns a result set. If I attempt to retrieve the return value (registered as an output parameter) after I execute the stored procedure, then any subsequent attempts to retrieve the result set always return null. Is this by design? If I use the result set first and then later get the return value that works; however, in my situation I need to first check the return value before I work on the result set. Am I'm I doing something wrong?

Code:

CallableStatement cs = connection.prepareCall("{? = call spGetCustomer(?, ?) }");
cs.registerOutputParameter(1, Types.INTEGER);
cs.setString(2,"blahblahblah");
cs.setBoolean(3,false);
cs.execute();

int retVal = cs.getInt(1);
ResultSet rs = cs.getResultSet(); // Always returns null, even though the SP actually returns a result set.

View 36 Replies View Related

How To Configure Distributed Transaction / XA Support Using Microsoft SQL Server 2005 JDBC Driver.

May 30, 2007

I am trying to configure distributed transaction and XA support using Microsoft SQL Server 2005 JDBC Driver. I have coppied SQLJDBC_XA.dll from XA directory and placed in my sql server binn directory and trying to run the script xa_install.sql from binn directory with command as below :

C:Program FilesMicrosoft SQL Server80ToolsBinn>
osql -U sa -n -P admin -S localhost -i C:JavaLibrariesMS SQL Driversqljdbc_1.2enuxa xa_install.sql

But I am getting error saying :
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).

when I replaced local host with the machine name it gives error :
[Shared Memory]SQL Server does not exist or access denied.
[Shared Memory]ConnectionOpen (Connect()).

where in I am able to test connection from Websphere using the same connection.

Please help some one ....... I am in URGENT need.... I need to enable XA suport for my application to run........

Thanks ----

View 2 Replies View Related

SQL Server 2005 JDBC Driver 1.1 Truncate Output Parameter From A Stored Procedure To 4000 Char.

Oct 26, 2006

I have a procedure that uses varchar(max) as output parameter, when I tried to retrieve

the result of calling the procedure, the result is truncated to 4000 character. Is this a driver bug?

Any workaround?



Here is the pseudo code:

create Procedure foo(@output varchar(max))

{

set @foo = 'string that has more than 4000 characters...';

return;

}



Java code:

CallableStatement cs = connection.prepareCall("{call foo ?}");

cs.registerOutputParameter(1, Types.longvarchar); // also tried Types.CLOB.

cs.execute();

String result = cs.getString(1); // The result is truncated to 4000 char.

-- Also tried

CLOB clob = cs.getClob(1);

long len = clob.length(); // The result is 4000.

Thanks,

Eric Wang





View 3 Replies View Related

SQLServer 2005 JDBC Driver - Date Rendered Correctly On Local Environment(windows), But Not On Websphere Server (unix)

Dec 6, 2006

Hi,

We are trying to move our application from SQL2005 to SQL2005, we are using 2005 jdbc driver 1.1.

The problem we have is, when a date is retrieved from the database, only the year part got correctly, but the date is automatically set to January 1 of that year. The interesting thing is this problem doesn't occur on local development environment (developer's windows platform), it only happens when we deploy the application to production server (unix).

Does anyone know what is going on, how to fix it?

Thanks.

Cathie

View 12 Replies View Related

Error With JDBC Driver

Mar 31, 2008



hi, i am using sqljdbc.jar in a java applet and i am using Netbeans for development. i am able to connect with the SQL Server from the IDE. however, when i try to debug the SQL part of the code, i am getting an exception at :


DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver());
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl="jdbcqlserver://localhost:49182;databaseName=NanoBase;";
Connection con = java.sql.DriverManager.getConnection(connectionUrl, "test", "Walt787sop289");

where it says that it cannot find the class. i am also putting down the exception information.

java.lang.reflect.InvocationTargetException
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:597)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1273)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1219)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1066)
at com.sun.javaws.Launcher.run(Launcher.java:105)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/SQLServerDriver
at VncViewer.performSql(VncViewer.java:115)
at VncViewer.readParameters(VncViewer.java:743)
at VncViewer.init(VncViewer.java:152)
at VncViewer.main(VncViewer.java:53)
... 9 more
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:256)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

i am currently using java web start to debug the application. earlier, the application was running smoothly during debug (when not being run through java web start), but was failing to run when started externally say within a html file as an applet. however, when i used java web start, the exception is being pointed to the line in bold. i have added sqljdbc.jar to the list of libraries and have added it under the compile as well as the run time configuration. i would appreciate if this exception could be resolved. if i have to configure anything in the classpath, pls suggest how i can configure it under netbeans.

regards,
anant

View 4 Replies View Related

Jdbc Type 4 Driver Error

May 25, 2007



Mr Mugundan.......

My web application is running in jdk1.4, tomcat4, ms sql 2005 in win 2003 environment. I am using jdbc type 4 driver for sql server 2005 (com.microsoft.sqlserver.jdbc.SQLServerDriver, sqljdbc_1.2)database connection this gives an error even gives error in both sqljdbc1.1 and 1.2 versions...

please see the error message...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

tomcat server error message begin

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1SELECT costct from costctmain where costct not in (select distinct mainct from costcts) 1
pageName : GENERAL_ERROR_PAGE
select count(*) from ( select P1.type, SUM(CASE P1.costct WHEN '11234578' THEN P1.total ELSE 0 END) AS a11234578, sum(P1.total)
w.project as type, e.costct, sum(t.tshours) as total from tswork t right outer join emp e on t.eid = e.eid join workmap w on t
ct pp on w.project = pp.pno where tsstatus in ('appr','subt') and tsupload = 'y' and e.costct in (11234578) and tsdate >= (sel
od where period = 'APR' and periodyear = 2007) group by e.costct, w.project union select PP.* from ( select t.jno as type, e.c
s total from tsjob t right outer join emp e on t.eid = e.eid where tsstatus in ('appr','subt') and tsupload = 'y' and e.costct
te >= (select startdate from period where period = 'APR' and periodyear = 2007) group by e.costct, t.jno ) as PP where type !=
y P1.type ) as P3
Error in executing query
com.microsoft.sqlserver.jdbc.SQLServerException: The IOBuffer.process operation returned an unknown packet type:-120. Index:70.
DS_DONE(-3) TDS_DONEPROC(-2) TDS_DONEINPROC(-1)
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.buildNextRowset(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(Unknown Source)
at eTime.DBConnectManager.execQuery(DBConnectManager.java:198)
at reports.UtilisationReport.getData(UtilisationReport.java:333)
at reports.UtilisationReport.generateReport(UtilisationReport.java:109)
at reports.DivUtilisationReportServlet.getReportData(DivUtilisationReportServlet.java:230)
at reports.DivUtilisationReportServlet.doGet(DivUtilisationReportServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
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)
java.lang.NullPointerException
at reports.UtilisationReport.getData(UtilisationReport.java:335)
at reports.UtilisationReport.generateReport(UtilisationReport.java:109)
at reports.DivUtilisationReportServlet.getReportData(DivUtilisationReportServlet.java:230)
at reports.DivUtilisationReportServlet.doGet(DivUtilisationReportServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
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)
select count(*) from ( select aatype as type, SUM(CASE P2.costct WHEN '11234578'THEN P2.total ELSE 0 END) AS a11234578, SUM(P2.t
select aatype, costct, sum(tshours) as total from tsnr t join emp e on t.eid = e.eid where tsstatus in ('appr','subt') and tsup
in ('11234578') and tsdate >= (select startdate from period where period = 'APR' and periodyear = 2007) group by aatype, costct
) as P3
Error in executing query
com.microsoft.sqlserver.jdbc.SQLServerException: The IOBuffer.process operation returned an unknown packet type:-120. Index:70.
DS_DONE(-3) TDS_DONEPROC(-2) TDS_DONEINPROC(-1)
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.buildNextRowset(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(Unknown Source)
at eTime.DBConnectManager.execQuery(DBConnectManager.java:198)
at reports.UtilisationReport.getData(UtilisationReport.java:333)
at reports.UtilisationReport.generateReport(UtilisationReport.java:133)
at reports.DivUtilisationReportServlet.getReportData(DivUtilisationReportServlet.java:230)
at reports.DivUtilisationReportServlet.doGet(DivUtilisationReportServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
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)
java.lang.NullPointerException
at reports.UtilisationReport.getData(UtilisationReport.java:335)
at reports.UtilisationReport.generateReport(UtilisationReport.java:133)
at reports.DivUtilisationReportServlet.getReportData(DivUtilisationReportServlet.java:230)
at reports.DivUtilisationReportServlet.doGet(DivUtilisationReportServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
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)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

end of tomcat server error ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



but when i use sql server 2000 driver jdbc ("sun.jdbc.odbc.JdbcOdbcDriver"), It works fine but i need to use type 4 driver please help me to fix this issue.



advance many thanks.....

View 6 Replies View Related

SQL 2005 JDBC Driver 1.1 And 1.2 Fails To Failback?

May 22, 2007

Hi,

I have a Tomcat server which uses the SQL 2005 JDBC Driver 1.1 .

A couple of weeks ago I successfully got it to work with database failover. However, I've now run in to another problem whereby it fails to failback i.e. the DB fails for a second time back to the original server.

If I restart the Tomcat server following a failback everything continues to work again. Or at least until I do another failover and failback!

It also doesn't seem to make any difference which DB server (primary or failoverPartner) is the principal when we perform a failover and failback ... It will always fails on the failback.

This also seems to be the case with the 1.2 CTP driver.

Does anyone have any ideas what may be the issue?

Many Thanks in Advance!
Nick

View 16 Replies View Related

How Can I Set SO_TIMEOUT On The Sockets Used By The JDBC 2005 Driver?

Jul 9, 2007

Hello,



One of our customers is experiencing a problem that makes me think there is a network problem, because we make a request and never return from the driver, but the transaction is still open on the server awaiting the next command (and holding locks blocking other processes). I see a number of other driver writers have described similar problems, and their "workaround" is to set SO_TIMEOUT on the sockets (setSoTimeout) they create which is a last defense so that the transaction won't block forever.



I do not see this in the API documentation- how can I set this? Many other drivers use a connection string parameter, do you offer the same?



Is there any logging I can enable that can show me for sure that the driver is waiting indefinately on socket.read (thats not terribly expensive)?



Thanks,



Steve

View 10 Replies View Related

Jdbc Driver Error For Mssqlserver. Need Urgent Help!

Feb 24, 2008

im stuck and despirately need help. my jdbc driver for mssql server 2000 (dont laugh).

here's the code:


Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:microsoftqlserver://user:1433");


and here's the exception it throws at me:

Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at jdbctest.NewClass.main(NewClass.java:29)


i know this is a very common question for a thread, but u gotta pls answer me.

View 1 Replies View Related

Microsoft JDBC Driver - TDS Prelogin Error (?)

Jan 25, 2008



Hi,

Anyone know what I'm doing wrong? My JDBC is erroring. I'm using the Microsoft 1.2 driver, I have a SQL Server 2005 back end with the following clients connecting to it:


ASP.NET 2.0 web application
Visual Studio C# console applications (*2)
Java command line client.



Everything runs hunky-dory on my dev. environment (laptop, local, launched via Visual Studio) but now it's on the server, the Java client is erroring.

When I use the 1.2 sqljdbc.jar file, I get:


25-Jan-2008 12:20:29 com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 TransactionID:0x0000000000000000 Prelogin response packet not marked as a REPLY

My Error Trap:
--------------
SQL STATE : 08S01
ERROR CODE: 0
MESSAGE : The TDS protocol stream is not valid.

When I use the 1.1 file I get:


My Error Trap:
--------------
SQL STATE : 08S01
ERROR CODE: 0
MESSAGE : The TDS prelogin response is incomplete. The target server must be SQL Server 2000 or later.

I don't know what these errors mean. I've tried compiling as java 1.5 and 1.6 with the same results. It works fine on my laptop (Vista Home Premium) but won't when I try and connect to the server. I've searched the web on the error messages and can't find an answer yet.

Any help appreciated.

My drivers are the Windows versions. Also, everything else is working okay on the server: The consoles are up and running and the web browser connects and SELECTs, UPDATEs & INSERTs okay.
I ought to mention: My laptop is running SQL Server Development edition and the Server is running obviously something else.


My SQL Server version is 9.0.1399 and the OS is Windows Server 2003. SQL Authentication is mixed mode.

View 4 Replies View Related

JDBC Driver SetMaxRows Documentation Error

Feb 1, 2007

The javadoc for statement.setMaxRows(maxROWS) reads:

"Sets the limit for the maximum number of rows that any ResultSet
object can contain to the given number. If the limit is exceeded, the excess
rows are silently dropped."

In fact, it seems that the driver calls set rowcount MAXROWS on the connection.

While this superficially will work, if your query manipulates records sets that exceed MAXROWS, the subqueries will also be limited in their size. And this is not what you expect. The javadocs suggest that it is only the result that is truncated. Silently.

It seems that setFetchSize is more appropriate.

I am using a relatively recent jar (248KB).

I hope that somebody finds this useful and that the development team will adjust the javadocs or the behavior.

Other than that, thanks for a great driver! ;-)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved