quality@glassfish.java.net

Re: admin_gui not starting anymore when xercesImpl.jar present in domain1/lib/?

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Wed, 23 Sep 2009 16:36:27 +0200

2009/9/23 Kristian Rink <rink_at_planconnect.de>

> Richard Kolb schrieb:
> > Basically I have banned anything in the domain lib except the database
> > drivers for my sanity sake.
> > Apache Tomcat has the concept of a shared/lib (that all the web apps
> > use) and a common/lib that Tomcat and everything uses.
> > This prevents this kind of thing.
>
> Well, I actually was hoping for something like this related to
> glassfish/lib/ and /glassfish/domains/domain1/lib/, not even talking about
> the various subfolders in domain1/lib/ in v3 builds. But I am unsure what
> (not) to put here and/or what goes where best. :)
>

We also had the same issue.
I got the strangest Hibernate 'duplicate mappings' errors because Hibernate
was in the domain lib

Any XML libs are generally bad I think.




>
> > What I would suggest is create a EJB project with your core logic and
> > dependencies and use that in your web front ends.
> > All the more static logic goes into the EJB, and then the more dynamic
> > logic goes into the war.
>
> Yes, we're out to get it done like this, but the problem persists for
> third-party libraries (Spring, in some cases, itext, slf4j, jcr/jackrabbit,
> ...) used in applications. Packaging these jars into ejb-jars is working
> (with maven2 and a certain plugin) but far from nice, and packaging a ton
> of
> jar files into a war is also not that fine - especially if, by then, you
> end
> up with ten or twelve war files, 50 megs in size each, knowing that most of
> the size making up these files is basically passive code (jar libraries)
> which is common to all these applications... ;)
>

50 megs, ouch.
I've seen some IDE's like MyEclipse and Netbeans put the strangest things in
the pom.xml
Maybe have a look , if you have not already. Put Maven on a diet :)

a 'mvn strip-package' would be a nice feature. But I guess that's a
discussion for another forum

regards
Richard