[Geoserver-devel] xpp3 versions in the classpath

Hi,
looking at the current classpath I've noticed that today we have two
versions of xpp3 in the classpath (excerpt from dependency:tree):

[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile

and

[INFO] +- org.geotools:gt-wfs:jar:2.7-SNAPSHOT:compile
[INFO] | +- org.geotools:gt-xml:jar:2.7-SNAPSHOT:compile
[INFO] | \- xpp3:xpp3:jar:1.1.3.4.O:compile

The above dependency is odd, because gt-xml does not actually
depend on xpp3, but looking in geotools pom files with find and
grep I've found this:

./modules/unsupported/app-schema/app-schema/pom.xml:
<artifactId>xpp3</artifactId>
./modules/unsupported/app-schema/webservice/pom.xml:
<artifactId>xpp3</artifactId>
./modules/unsupported/wfs-ng/pom.xml: <artifactId>xpp3</artifactId>
./modules/unsupported/wfs/pom.xml: <artifactId>xpp3</artifactId>
./pom.xml: <artifactId>xpp3</artifactId>

The reason I'm looking is that the full xpp3 has a class,
javax.xml.namespace.QName
that should not be there (it's part of the java runtime), and causes
issues with JBoss 5.
The xpp3_min jars do not have it instead.

So I'm wondering about two things:
- can we at least harmonize the two versions so that we can use one and only
  one xpp3 jar?
- is the full xpp3 really needed, or can we get along with the "min" version,
  maybe with some code modifications in geotools?

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

That’s odd. Surely a reminiscence of JDK 1.4 compatibility.
As a matter of fact I’m looking forward to get rid of xpp3 at least in wfs-ng, as it’s not a standard pull parser, in favor of StAX. Xpp3 I guess was added as a dependency when StAX was not a standardized API yet.

So, to start with, I’ll try the xpp_min jar and see how/if it affects the wfs module.

I seem to recall Justin uses it someplace else, maybe in the dispatcher, to parse a little bit of an incoming request and figure out something out of its first element or so, but I’m not really sure.

More insight once I try the xpp_min jar.

Cheers and thanks for the catch.

Gabriel

On Wed, Feb 29, 2012 at 10:16 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
looking at the current classpath I’ve noticed that today we have two
versions of xpp3 in the classpath (excerpt from dependency:tree):

[INFO] | ± com.thoughtworks.xstream:xstream:jar:1.3.1:compile
[INFO] | | - xpp3:xpp3_min:jar:1.1.4c:compile

and

[INFO] ± org.geotools:gt-wfs:jar:2.7-SNAPSHOT:compile
[INFO] | ± org.geotools:gt-xml:jar:2.7-SNAPSHOT:compile
[INFO] | - xpp3:xpp3:jar:1.1.3.4.O:compile

The above dependency is odd, because gt-xml does not actually
depend on xpp3, but looking in geotools pom files with find and
grep I’ve found this:

./modules/unsupported/app-schema/app-schema/pom.xml:
xpp3
./modules/unsupported/app-schema/webservice/pom.xml:
xpp3
./modules/unsupported/wfs-ng/pom.xml: xpp3
./modules/unsupported/wfs/pom.xml: xpp3
./pom.xml: xpp3

The reason I’m looking is that the full xpp3 has a class,
javax.xml.namespace.QName
that should not be there (it’s part of the java runtime), and causes
issues with JBoss 5.
The xpp3_min jars do not have it instead.

So I’m wondering about two things:

  • can we at least harmonize the two versions so that we can use one and only
    one xpp3 jar?
  • is the full xpp3 really needed, or can we get along with the “min” version,
    maybe with some code modifications in geotools?

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Okay, wfs can use the xpp3_min jar with minimal changes. Patch attached.

I’m okay with committing it if no objections.
BTW, are we talking trunk only or 2.7.x too?

On Wed, Feb 29, 2012 at 11:16 AM, Gabriel Roldan <groldan@anonymised.com> wrote:

That’s odd. Surely a reminiscence of JDK 1.4 compatibility.
As a matter of fact I’m looking forward to get rid of xpp3 at least in wfs-ng, as it’s not a standard pull parser, in favor of StAX. Xpp3 I guess was added as a dependency when StAX was not a standardized API yet.

So, to start with, I’ll try the xpp_min jar and see how/if it affects the wfs module.

I seem to recall Justin uses it someplace else, maybe in the dispatcher, to parse a little bit of an incoming request and figure out something out of its first element or so, but I’m not really sure.

More insight once I try the xpp_min jar.

Cheers and thanks for the catch.

Gabriel

On Wed, Feb 29, 2012 at 10:16 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
looking at the current classpath I’ve noticed that today we have two
versions of xpp3 in the classpath (excerpt from dependency:tree):

[INFO] | ± com.thoughtworks.xstream:xstream:jar:1.3.1:compile
[INFO] | | - xpp3:xpp3_min:jar:1.1.4c:compile

and

[INFO] ± org.geotools:gt-wfs:jar:2.7-SNAPSHOT:compile
[INFO] | ± org.geotools:gt-xml:jar:2.7-SNAPSHOT:compile
[INFO] | - xpp3:xpp3:jar:1.1.3.4.O:compile

The above dependency is odd, because gt-xml does not actually
depend on xpp3, but looking in geotools pom files with find and
grep I’ve found this:

./modules/unsupported/app-schema/app-schema/pom.xml:
xpp3
./modules/unsupported/app-schema/webservice/pom.xml:
xpp3
./modules/unsupported/wfs-ng/pom.xml: xpp3
./modules/unsupported/wfs/pom.xml: xpp3
./pom.xml: xpp3

The reason I’m looking is that the full xpp3 has a class,
javax.xml.namespace.QName
that should not be there (it’s part of the java runtime), and causes
issues with JBoss 5.
The xpp3_min jars do not have it instead.

So I’m wondering about two things:

  • can we at least harmonize the two versions so that we can use one and only
    one xpp3 jar?
  • is the full xpp3 really needed, or can we get along with the “min” version,
    maybe with some code modifications in geotools?

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.


Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.

(attachments)

xpp3_min.patch (3 KB)

On Wed, Feb 29, 2012 at 3:45 PM, Gabriel Roldan <groldan@anonymised.com> wrote:

Okay, wfs can use the xpp3_min jar with minimal changes. Patch attached.

I'm okay with committing it if no objections.
BTW, are we talking trunk only or 2.7.x too?

Both possibly, but even just trunk is an improvement (for the future)

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

Okay, so I think I can commit the patch to both, and let the maintainers of the other modules having xpp3 as a direct dependency take care of the migration?

On Wed, Feb 29, 2012 at 11:51 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Wed, Feb 29, 2012 at 3:45 PM, Gabriel Roldan <groldan@anonymised.com1501…> wrote:

Okay, wfs can use the xpp3_min jar with minimal changes. Patch attached.

I’m okay with committing it if no objections.
BTW, are we talking trunk only or 2.7.x too?

Both possibly, but even just trunk is an improvement (for the future)

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On Wed, Feb 29, 2012 at 3:55 PM, Gabriel Roldan <groldan@anonymised.com> wrote:

Okay, so I think I can commit the patch to both, and let the maintainers of
the other modules having xpp3 as a direct dependency take care of the
migration?

Sure

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------