• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question for Bear Bibeault about ccc.jar

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bear,

I'm working on a project that has made heavy use of your jsp constant library (ccc.jar). We are suddenly having a problem with it, and I thought I'd run this past you to see if you've ever seen it...

We have a clustered application (using JBoss 4.2.1) that makes heavy use of the ccc library. We have JSP pages that work one time, and not the next, claiming constants can not be found in the referencing class. The constants are all declared in a common interface that is implemented in all the classes that exhibit this problem.

I think there is a different problem here, but since your jar is "alien" to our other developers, they feel there may be issues.

Have you ever experienced this? And if not, do you have any suggestions as to where to look?

Thanks, Paul Cooper, Project Manager, EMS Performance Improvement Center
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy Paul.

While not using JBoss, we also have a clustered environment (using Resin as the servlet container) and make heavy use of the constantsMap action without any problems arising.

It sound like the problems are manifesting themselves during the reflection activities to discover the constants?
 
Paul Cooper
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exactly.

I've done more investigation, and can add the following information. I was the principle developer on this app for two years. Many of my constants were declared in an interface, some in classes that implemented that interface. But whenever I referenced the constants in the jsp page, I'd always use the implementing class, and let reflection work out the reference.

Recently we've added developers to the team, and they have changed the way the constants are referenced. Now, we declare the interface directly in the ccc:constantsMap tag, then reference the constants in the page directly from that tag.

What I'm seeing is that the pages that we are having issues with uses references from both the interface and from the implementing class, and the errors always come from the lookup on the implementing class.

What is vexing is that these are intermittent errors. We'll view the page twenty times and have no issues, but then the 21st time it will throw the "Constant not found" exception, and from then on the session is hosed. And sometimes it will happen immediately.

Thanks for the response!!!
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow. The fact that it's intermittent is extremely perplexing. I mean, why would Java reflection work most of the time, but not all of the time?

If you can come up with a reproducible test case, I'd be more than happy to help you solve this puzzler. You also have the source code in the jar file if you need to refer to it.
 
Paul Cooper
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bear, I realized I haven't ever updated you on the what we finally discovered, or at least can demonstrate...

If we ever reference a constant from the Interface in the JSP, we MUST reference all constants we use that are defined in the Interface from the Interface, rather than the implementing class. If we only reference constants in the implementing class, then the JSP never has an issue.

Once we worked our way through all the code and fixed all the references, we haven't had a problem.

One other piece of information that may or may not matter: we use JRockit as our JVM, rather than Java, owing to JRockit's significant speed improvements.

Anyway, thanks for responding earlier...your library is an invaluable tool!

Paul Cooper, Project Manager, EMS Performance Improvement Center
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the wrap-up, Paul.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the wrap-up, Paul.
 
Well THAT's new! Comfort me, reliable tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic