Kinnaree Patel

Ranch Hand
+ Follow
since Oct 30, 2007
Merit badge: grant badges
For More
Christchurch, New Zealand
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 Kinnaree Patel

Hi Swastik,

Not really. We are still using jdk1.4
12 years ago
Hi all,

I have written a code to upload file to server. When the files are small (around 3MB), it works great. But when i try to upload files of greater size, around 5MB, I start getting OutOfMemory errors (on local machine) and the file does not get upload when I upload EAR to UAT environment. On UAT environment, I do not get any significant errors in log and a open dialog pop up appears while file is being uploaded, ultimately doing nothing. Below is my code that seems to create problems:



On local, when I debug to line System.out.println("saveFile : " + saveFile); it gives me out of memory error. The problem is that dataBytes is not getting converted to file at file = new String(dataBytes);

Any suggestions would be a great help at this stage. I am working on tight deadline and unfortunately none of the solutions found through googling worked!

Thanks,
Kinnaree
12 years ago
Hello All,

I am not sure if this is right place for my question. Please guide if it is not.

I have created a portlet using PDK from Oracle and the app server we use is OC4J. My problem is that when I add portlet to Oracle Portal Page and set defaults using edit defaults, everything goes fine till the next deployment. As soon as I deploy a new EAR, Edit Default set by users go blank and the form is set back to blank.

I am sure there might be some parameter I am missing for this. I tried to google, but was not able to find much of relevance. If someone has an idea on this and can guide me through, I would be grateful.

Thanks,
Kinnaree
12 years ago
Yes. That is right. Sorry for the typo... by filter design pattern I mean servlet filters.
Hello,

Anyone out there to help and guide me please....

Thanks,
Kinnaree
Hi All,

My question might seem a little weird and I know it would be difficult to answer without knowing minute details on project, but I thought nothing wrong giving a try. I might get good suggestions on the technology and design pattern that can be used in our upcoming project. I am trying to include as much detailed description as possible. Can you all please suggest the design pattern(s) and technology(ies) that could be better to use.

1. JDK version is 1.4 (Yeah thats right). We might migrate to higher version soon but as of now it is 1.4
2. Database is Oracle 10g and application server used is OC4J 10.
3. The application is a web application with Rich UI. It basically stores information in database and retrieves it for add, edit, delete, view, search and has a module for reports.
4. We are planning to handle as much data as possible from Java. Ex. Hibernate or iBatis...
5. Production environment has load balancer. Because of this we have faced a lot of problems in past regarding session handling and using sessions. We even had to rewrite some apps to use URL mapping thereafter. What good solutions can be there to avoid this situation using the latest technology?
6. We have to generate reports in Word, Excel and PDF formats. (I know most of the apis that support latest microsoft versions need jdk1.5 but in case someone is aware of the API that is good and goes with JDK1.4 supporting latest microsoft versions?). We use JXL and have tried Apache POI in projects till now but with JDK1.4 none of them support latest microsoft office version.
7. We have used filter design pattern in all earlier projects because of 2 reason: One is to handle database connection and close it properly and another is we require sso login to access any page in application. My question is that to handle problems like database connection remaining open even after closing each and every object explicitly, in a distributed environment (load balancer) and having sso to login which other design patterns can be looked into? Is filter a good use here? These are the most common problems we face in our applications.
8. Till now we have used JSP, Servlets, Struts 1.x and Hibernate 3.0 (mostly just to write connection part and at max 1 or 2 queries, rest all is done using traditional JDBC queries most of the time). Hibernate is not used as effectively as it should have been and we are planning to use it in an effective manner this time. But the main thing I would like to know is which open source technologies other than Struts can be used in a project having Rich UI and validations? Is it good to use Hibernate sessions in a load balancer environment? What other technologies can be used effectively in such situation (or might be a combination of technologies)?
9. FYI, before I forget to mention, most of the pages in this application would be oracle portlets developed using PDK. For ease of development, we develop it on MyEclipse as a JSP file and then convert it to a portlet.

I have tried to cover as much information as possible. Can you all please suggest the technologies and design patters that can be used to solve our existing problems? What other things can be kept in mind while designing an application.

Looking forward for your responses.

Thanks,
Kinnaree

Paul Sturrock wrote:Are you throwing away the exceptiojn? Or redirecting the lofgging?



Yes... I am handling it using log4j... and it logs every exception except for this one...

Cameron Wallace McKenzie wrote:

Check the logs on the app server for some better messages. You should see some type of exception in the logs.

Which server are you using for deployment?

-Cameron McKenzie



The worst thing is I get nothing in the logs... So I am even more confused....

We use OC4J for deployment...



Hi friends,

The problem I am facing is a little wierd.... When I try running my application on Live, I get 500 Internal Sever Error, but when I try running the same thing on Local or UAT machines, it works fine.

Also, sometimes the application works fine, but if the browser window remains open for a while, say about 2 3 mins, it gives me 500 Internal Server Error. Can it be something to do with hibernate session?

Also , the error comes when code reaches at i.e when getSession is encountered...

Does anyone over here have any idea about this?
Well... as far as I know, the cost of software is always more if developed in Java as compared to .NET... not sure though...
15 years ago
I came across such a situation once during my project where I felt that Threads is the best solution to solve it. I don't know whether I was right or not.

I had to open two pages simultaneously and the problem was that one page had to be submitted only after the other page was submitted. If in any case, first page is not submitted, say due to power failure or any other reason, second page should not be submitted.

I felt that Threading was the solution to it.
Hi gkk,

I think you need to change your name. Please refer the naming policy.

And as far as SCJP is concerned, if you have read and understood K&B properly, there is nothing to worry about. Being experienced makes a difference but you can find cases where experienced have failed and freshers have scored well. So it all depends on you, how confident you are.

Be confident and give the exam. Come out with flying colors!!!

ALL THE BEST!!!
Hi Herman,

I used resultset.close() in finally block. But anyways, got the solution. I need to used Datasource. I used it and the problem is solved.

Thanks.

Hi Ranchers,

I have developed an application that uses Dynamic SQL. Problem is that huge number of cursors get open when the application is run. I have closed resultset, callablestatement, session, connection everything. But still the cursors does not get closed because of which the server stops responding after sometime. Is the the problem related to dynamic SQL or I am missing something from Java??? We are using Oracle 10g as backend and on front end side we have JSP, struts. The functions and procedures I call return reference cursors.

I would be greatly thankful if somebody can put atleast some light on this problem. I don't know whether it is a foolish question. But I am totally stuck. We are using 2 layered architecture at back-end. Can that be a cause for so many cursors to open??

Please Help!!!
[ April 14, 2008: Message edited by: Kinnaree Patel ]
Congrates!!! Thanks for sharing your experience!!!