• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Code too large

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on a project where a client has requested being able to run our web application on Oracle 10gAS. Currently our web application has been exclusively deployed to Tomcat 4.1.30.

In loading up and testing on 10gAS, I have discovered about 5 JSP pages that do not compile, giving me errors about the code being to large in a try block. A look at the .java files being generated shows that about 80-90% of the page is being wrapped in one huge try-catch block (unlike what Tomcat does - tomcat breaks quite a bit of the code out into seperate methods).

Is there any way to force the OC4J pieces to break up the code?
I can certainly go through the 5 or 6 pages and break it up myself using <%! %> blocks to declare methods and <jsp:include > for some of the static pieces, but I'd rather not make all the pages really unreadable and hard to maintain just because Oracle's system is dumb enough to try and wrap the majority of a JSP page in a single block of code.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without looking at your code it's hard to say...

I agree that the 10g JSP compiler could use some improvements. But that is in the 9.0.x versions. When you say 10g is it 9.0.x or is it the 10.x version? I am told the 10.x versions have improved the JSP compiler but I havent checked yet for sure.
 
Charles Hasegawa
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, 9.0.x version.
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmmm, sounds like a great opportunity for some refactoring. Don't stop at putting the code into methods in the jsps. Perhaps some of that code belongs in plain old java objects.
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Charles,
I would venture to say that your client is requesting to use Oracle 10gAS simply because "it's Oracle"! Have you asked what their motivation is for running Oracle? I doubt whether it is due to the price of Oracle as opposed to Tomcat, right?

Just because a client requests something, doesn't mean it's in his best interests.

Do you think that your family doctor should prescribe medicines that you ask him for? "Hi Doc! I've got the flu. Please write me a prescription for medicinal marijuana. Thanks!" And then the doctor would say, "Sure thing. You're my client. Whatever you say!"

Good Luck,
Avi.
 
reply
    Bookmark Topic Watch Topic
  • New Topic