0

Issue in Tomcat 6 when all ZK in $CATALINA_HOME/lib

asked 2009-05-15 07:57:19 +0800

sousa1981 gravatar image sousa1981
573 4

We are migrated all our application with ZK 2.4.1, 3.0.0, 3.0.5, 3.5.2 to ZK 3.6.1

So, we installed all technology ZK 3.6.1 + Spring 2.5.5 + Hibernate 3.3.1 + Commons Apache Staff + Xfire + Mail to be available in $CATALINA_HOME/lib.

In that way each application will not have each of technology installed in webapp1, webapp2, etc.

But, we got an issue with "i3-label.properties" when running webapp1, webapp2, etc.

webapp1 has an label called labelAAA=valueAAA
webapp2 has an label called labelAAA=valueBBB

When we run our webapp1 and webapp2 has same value valueBBB.

We see an WARNING from ZK saying Labels labelAAA will be replaced...

The question, can ZK be installed in $CATALINA_HOME/lib to be available to all webapp?

Our can we turn round this issue?

The other issue we found was, we installed ZK in $CATALINA_HOME/lib, but for each application we have jasperreport jar installed inside webapp, and as you know ZK doesn't install Report Component because doesn't found jasperreport.

All feedback are welcome

Thanks in advance,

delete flag offensive retag edit

12 Replies

Sort by ยป oldest newest

answered 2009-05-15 08:10:04 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

updated 2009-05-16 11:15:33 +0800

About the jasperreport, from the Spec. of class loader in Tomcat,
http://www.mbaworld.com/docs/class-loader-howto.html

I think it is no possible to work together,
JasperReport Component was loaded by CommonLoader, but jasperreport.jar was in Webapp ClassLoader

It will throw class not found error I think.

link publish delete flag offensive edit

answered 2009-05-15 08:18:45 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

updated 2009-05-15 08:20:27 +0800

Sousa...
About i3 label....
After trace some code, the default loaded i18n content was stored in 'static',
which mean , if you put zk jar files in CommonClass Loader, the i3 label will be loaded by each application to same place/class.

There should be some workaround to solve this issue, let me think...

link publish delete flag offensive edit

answered 2009-05-15 18:57:05 +0800

dastultz gravatar image dastultz
797 8

I originally had my zk jars in $CATALINA_HOME/lib but had to move them to webapp/../lib folder because one of the configuration files is done globally as well. I think if you have one lang-addon.xml it will configure all your webapps. Can't remember if that was the file or not. This is a bummer, because all the duplicate classes take up memory and PERM_GEN memory quickly becomes more difficult to manage.

/Daryl

link publish delete flag offensive edit

answered 2009-05-16 08:22:10 +0800

sousa1981 gravatar image sousa1981
573 4

Thanks Dennis and Daryl,

The fact, we are now going to back to old architecture; Where each webapp has own ZK 3.6.1.

So, the question to ZK Team is: Do you recommend as to put ZK 3.6.1 in $CATALINA_HOME/lib? We already know issue with labels, what are the others?

@Daryl, what about Spring + Hibernate + Commons Apache Jars? Do you use it in your $CATALINA_HOME/lib? Is there any problem?

Regards

link publish delete flag offensive edit

answered 2009-05-25 04:12:00 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Hi guys,

Is some workaround for the i18n and severals apps on same server problem?

Regards,
Madruga

link publish delete flag offensive edit

answered 2009-05-25 04:45:45 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

updated 2009-05-25 04:46:06 +0800

madruga, do you place zk jars on application server loader level too?

link publish delete flag offensive edit

answered 2009-05-26 05:51:08 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Yes, but for the moment I have just only one app, so no problems. It makes remote deploy a lot easier.

But in the future I problably will have more apps on the same server.

link publish delete flag offensive edit

answered 2009-05-26 09:28:28 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

I checked implementation, I am afraid that there is no easy/configurable way to do it.
You need to write some code,intercept some lifecycle, and know core code of Labels and ZK to control it.
However, still, you could post it as a feature request.

link publish delete flag offensive edit

answered 2009-05-26 17:38:35 +0800

sousa1981 gravatar image sousa1981
573 4

Submitted ID is 2796916

link publish delete flag offensive edit

answered 2009-05-27 18:58:01 +0800

dastultz gravatar image dastultz
797 8

@Sousa1981
>what about Spring + Hibernate + Commons Apache Jars? Do you use it in your $CATALINA_HOME/lib? Is there any problem?

I don't use Spring or Hibernate. I am just starting with OpenJPA which is in .../WEB-INF/lib (due to my use of DataSource to avoid cross class loader problem on redeploy). I have always had Commons jars in $CATALINA_HOME/lib.

/Daryl

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-05-15 07:57:19 +0800

Seen: 538 times

Last updated: Sep 12 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More