Win a copy of Spring Boot in Practice this week in the Spring forum!

prashant shelke

Greenhorn
+ Follow
since Mar 10, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prashant shelke

Issue resolved by changing

getColumns(database name, null, table name, "%")

to

getColumns(database name, null, table name, null)
Issue resolved by changing

getColumns(database name, null, table name, "%")

to

getColumns(database name, null, table name, null)
Thanks for reply.

There are 15 columns per table and loop is on 2000 tables.
I am calling getColumns(database name, null, table name, "%") this method to fetch each table's column list.

One more thing I would like to add is, this method works well for less number of iterations

Note: getColumns() method I am calling on databaseMetaData object which I retrieved from MSSQL connection object.
BlazeDS : BlazeData services(free)
LCDS : Live cycle data services(chargeable)

both are data services useful for server connecting to database.

http://flex.sys-con.com/read/478394.htm
http://labs.adobe.com/wiki/index.php/BlazeDS:Release_Notes
11 years ago
I am facing confusing exception as :

java.lang.ArrayIndexOutOfBoundsException: 20
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getColumn(SQLServerResultSet.java:508)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.skipColumns(SQLServerResultSet.java:134)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.discardCurrentRow(SQLServerResultSet.java:1472)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1525)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.discardFetchBuffer(SQLServerResultSet.java:4090)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.close(SQLServerResultSet.java:410)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.clearLastResult(SQLServerStatement.java:1053)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1359)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processResults(SQLServerStatement.java:996)
at com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.processBatch(SQLServerCallableStatement.java:133)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processResponse(SQLServerStatement.java:981)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.resetForReexecute(SQLServerStatement.java:740)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:334)

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:322)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQueryInternal(SQLServerPreparedStatement.java:278)
at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSetFromStoredProc(SQLServerDatabaseMetaData.java:267)
at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSetWithProvidedColumnNames(SQLServerDatabaseMetaData.ja
va:283)
at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getColumns(SQLServerDatabaseMetaData.java:547)


MSSQL configuration as follows:

Microsoft SQL Server Management Studio Express 9.00.4035.00
Microsoft Data Access Components (MDAC) 6.0.6002.18005 (lh_sp2rtm.090410-1830)
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 8.0.6001.18904
Microsoft .NET Framework 2.0.50727.4200
Operating System 6.0.6002

I am using sqljdbc4.jar

Please help if anybody fix this.
I am using sqljdbc4.jar, I looked into its MANIFEST.MF but its not having version number mentioned in it.

Following are parameters for getColumns() method:

getColumns(DatabaseName, null, TableName, "%")

Here, owner name I am sending as "null"

Thanks for reply.
I am facing following exception stack-trace when I tried to call getColumns() method on
java.sql.DatabaseMetaData object ( which I retrieved from MSSQL's JDBC connection)


Exception:

java.lang.NullPointerException
at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSetWithProvidedColumnNames(SQLServerDatabaseMetaData.java:287)
at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getColumns(SQLServerDatabaseMetaData.java:547)

I am sure about attributes are Not NULL which I am sending to getColumns method. Not getting what causing this exception.

MSSQL server version I am using:
Microsoft SQL Server Management Studio Express 9.00.2047.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 8.0.6001.18702
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600


Please help if anybody aware of this.
Hi All,

I am facing performance issues with internet explorer, following is scenario and performance numbers.

One more is strange thing here, when I request data through AJAX, IE is no more accessible. When all data comes on screen then only its become usable.

I have one JSP screen which is fetching data from server using DWR ajax. Following are the performance numbers with different types of browsers:

FireFox:=
1. Test 1: 44 sec
2. Test 2: 47 sec

IE 7.0:=
1. Test 1: 6 mins 44 sec
2. Test 2: 7 mins


Google Chrome:=
1. Test 1: 2 mins
2. Test 2: 1 min 30 sec

One observation is:
1. I am rendering HTML components dynamically after AJAX method brings data to client-side in bucket of 2K rows, using innerHTML.
2. AJAX method not takes time to generate data of bucket-size 2K( total 5 buckets if total data is of 10K) but time for rendering and coming back to java-side method is increasing exponentially.

Thanks in advance.
Prashant Shelke.
12 years ago
I have FIXED Rollback not working issue at database level, by removing "START TRANSACTION;" & "COMMIT;" in one of STORED PROCEDURE which was getting called in transaction.

Roopali, your answer helped me to maintain rollback for BATCH operations & for nested transactions.

Thanks!
Heyy Roopali Thanks a lot, my ISSUE RESOLVED!.
Thanks
I have got same issue when
1. I changed bean mapping in applicationContext.xml.

ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController' defined in ServletContext resource [/WEB-INF/FileUploaderServlet-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy52] to required type [com.server.util.services.UtilService] for property 'utilService'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy52] to required type [com.server.util.services.UtilService] for property 'utilService': no matching editors or conversion strategy found
Caused by:
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy52] to required type [com.server.util.services.UtilService] for property 'utilService'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy52] to required type [com.server.util.services.UtilService] for property 'utilService': no matching editors or conversion strategy found
Caused by:
java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy52] to required type [com.server.util.services.UtilService] for property 'utilService': no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:224)
at org.springframework.beans.TypeConverterDelegate.
13 years ago
Here is code snippet where i m facing problem:


In above scenario records inserted by Loop 1 should be rolled back. Which is not working.
Flow of code is like

TestService.java(where transaction boundaries maintained as below) --> DO --> DAOImpl

TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

[b]Note: I am using spring.jar version 2.0.1
Hi I am also facing same issue as mentioned by Roopali,

for loop(n)
{
for loop_1()
{
Insert A()
Insert B()
Insert C()
}

for loop_2()
{
Insert D()
Insert E() --> throws RunTimeException
}
}
In above scenario records inserted by Loop 1 should be rolled back. Which is not working.
Flow of code is like

TestService.java(where transaction boundaries maintained) --> DO --> DAOImpl

TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

Note: I am using spring.jar version 2.0.1