This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Dilshan Edirisuriya

Ranch Hand
+ Follow
since Apr 22, 2006
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 Dilshan Edirisuriya

Thank you William for your reply.

But why is this happen in java applications. A solution like .net does not encounter such performance issues. So I suspect this has something to do with java. Any ideas?
8 years ago
I wanted to execute an external exe from java. For this I have used an intermediate bat file and through the bat file I am executing the exe. This works fine and I get my expected results. But I have issues in this approach when executing this file under User Account Control (UAC). In Windows Vista and Windows 7 when UAC enable this take some time to execute. Also when the external exe file becomes large the time taken to execute keeps on increasing (For a 200 MB file it takes 15-20 second delay to pop up with executable). So is there any alternative solution to this approach? Also if its a .net soluton will I encounter the same issue?

Thank you
8 years ago
Sorry "AcroFields form = stamper.getAcroFields();" has to be XfaForm form = stamper.getAcroFields().getXfa();
Is there any tool available for reading and writing to XFA filds? I tried iText but I could retrieve any fields for "AcroFields form = stamper.getAcroFields();". So I think this is not allowed in iText. Any ideas? Will PDFBox allow this?
I need to display the live web cam videos in web application web page. I selected Java Media Framework for this web cam capturing. As this needs to be run in the client side I thought of developing a sort of standalone application and embed that in the web page as an applet. Let me know whether this is a best practice to achieve my requirement or is there any other way to do this. The requirement is to show the web cam video in the web page.

Thank You
8 years ago
Thank you Rob for the reply.
8 years ago
In our application we use 3rd party checksum digest lib that requited to give source file as a byte array or as a ByteBuffer. Source files can be very to 1Mb to ~1GB . Here what is the most efficient approach to read those files in to byte array or ByteBuffer ?
8 years ago
I am using a BufferedReader to read remote site content of a web site. I am using ready() method to check whether the stream is ready and if so iterating through it. In some cases it does not enter into the loop cos the buffered ready is indicating it is NOT READY. Hence I used a thread sleep of 2 seconds to delay the process and it resulted in my expected output. So what will be the reason for this behavior and what will be the actual way I should write this.

Thank You
8 years ago
In my code I change the user password and after that I call "SecurityContextHolder.getContext().getAuthentication().setAuthenticated(false);" to update it. Once I run that code the sysetem logs out as the user password is changed.

So is there any way that I can do the same thing without logging out? I need to change the password and update the authentication in acegi without loging out the system.

Need your help

Thank you
8 years ago
Yes it looks fine the path is displayed. Also I pasted the src url into the browser address bar and it displays the message box for mpg file. The same coding works for image type once I change the content type. But when it comes to video this occurs. Firefox doesnt render that servlet output stream as I observed.
Yes its installed. I did a sample code for this and it worked perfectly. Have a look at this.



Only difference is the src is generated dynamically in my code. Here its a hard coded one just to check whether the div refresh works. Here is the coding for get the serveltout putstream for the video.

I need to embed a video in the jsp page. The "src" of the object tag is dynamic. Here is my coding.



I have several links in a data grid. In the onclick event of those links I am calling a javascript function with the file name (like 123.mpg) and it will be feeded to the "val" variable above. According to that I am setting the innerHTML property. So once I click the link it will popup a video with dynamic content.

The problem is this does not work on Firefox. This works fine in IE. Is there any possibility of failing this in Firefox.

For Your Information

/Test/ShowImage?contentImageName="+val+"' will execute a servlet which will write the video file in to the servlet output stream. And if its an image instead of a video this works fine. And the MPG files i tested are larger than 5MB and less than 10 MB.

Need your help.

Thank you.
Hi Jan this is the exception I got.

java.sql.SQLException: Non supported character set: oracle-character-set-178

at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
at
oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:171)
at
oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:135)
at oracle.xdb.XMLType.getBytesString(XMLType.java:1215)
at oracle.xdb.XMLType.getBytesValue(XMLType.java:1151)
at oracle.xdb.XMLType.toDatum(XMLType.java:323)
at oracle.xdb.XMLType.toBytes(XMLType.java:1274)
at
oracle.jdbc.driver.OraclePreparedStatement.setOPAQUE(OraclePreparedStatement.java:1757)
at
I need to pass a string array to a oracle stored procedure. For that I have used the following coding.

oracle.sql.ArrayDescriptor descrip = oracle.sql.ArrayDescriptor.createDescriptor(SPNAME,connection);
oracle.sql.ARRAY array = new oracle.sql.ARRAY(descrip, connection, inputObj);
cstmt.setArray(PARAMNO,array);

But when I pass a string array in to the stored procedure it throws sql exception with the non supported character set message. The stored procedure array type is varchar2. I tried adding "orai18n.jar" in to the class path but still the result was the same. So what may be the reason for getting this error. I am using jboss as my application server. Please help me.

Thank you