IM Mahesh

Greenhorn
+ Follow
since Mar 09, 2006
Merit badge: grant badges
For More
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 IM Mahesh

Hello friends,

I am facing problem to store a file data in oracle blob having file size grater than 4kb. However if i try to store file smaller than 4kb it's working fine.

I get following error.

java.sql.SQLException: Io exception: Software caused connection abort: socket write error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:345)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2094)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1986)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2697)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)


What could be the solution for this?

Thanks in advance.


Mahesh
Sorry for a little type mistake.
jsp comments tag is: <%-- comments --%> and not <% comments %> which i mentioned in previous reply.
17 years ago
Get the value of java string in one javascript var, and then compare them.
e.g.
var value = yourJavaString;
if(value.toLowerCase() == jsVarToCompare.toLowerCase()) {
//your code
}
17 years ago
JSP
What has been changed by the code?
What result r u expecting?

As per the rules output should be : ABCI

Don't forget that the interface variable s1 is static and hence would not be overriden by the subclasses. Therefore the subclasses will always refer to there own copy. And you are accessing it in a nonstatic way through the instance.
Syntax for JSP comments is: <% comments %>
If you are using the tag <!-- --> to comment out your java code then it will not work because it is html syntax.
17 years ago
You are right Peter,
Sorry for the confusion happened. By mistake i was assuming that the sleep() method is going to be called in synchronized block, which is not always true.
17 years ago
That is because java compiler checkes only for the catch blocks which are catching checked exceptions. If you are catching any of checked exceptions which is not thrown by the code in try block, compiler will give error. In this case Throwabe do not come under checked exceptions but IOException do. Hence option 3 is correct.

but if you ask "how to fly to the moon ?"...then it's hard to give any other answer as "build a rocket".

17 years ago
Implementing SinglrThreadModel would mean only one thread at a time can create or use instance or methods of that class. As per my knowledge it is supposed to be used only in servlet programming.
Correct me if i am wrong.
Difference in these APIs is that Thread.speep(long millis) causes to sleep the current thread for given period of time. It does not release the monitor which it has been aquired.. While Thread.wait(long millis) causes to wait for given period of time or will also exit from wait condn if any other thread calls Thread.notify() or Thread.notifyAll() on the same object on which this thread is synchronized. Also it releases the monitor that it has aquired.
Now in your case as you just want to pause the current thread for particular period of time should use Thread.speep(1000).
17 years ago
You can make use of java.lang.Runtime for this purpose. Have a look at sun's documentation for this class.
17 years ago
I think u have used j2se-1.4, but the specification u r looking is for j2se-1.3. The method Boolean.valueOf(boolean b) is added in j2se-1.4
Just initialize it to null.(String user = null).

It would very helpful and interesting for u to see the generated servlet code. It will give u understanding of jsp and u'll be aware of the actual code being generated out of ur jsp. Try it out once.
17 years ago
JSP
Hi Stir Rini,

As u know the code u put in scriplets (i. e. <% %> goes in the _jspService method of the servlet generated. Now in ur code, u have declared the variable user in a try catch block hence it would not be visible outside of that block. Just declare the user variable out side along with the variables 'ResultSet' and 'Statement', the error will vanish.

Hope this will help u understand.
17 years ago
JSP