[Geoserver-devel] Trying to build rest sample from Geoserver 2.9.0 documentation

Hi all,
I am trying to build the first rest sample from GeoServer 2.9.0 Developer Manual:
http://docs.geoserver.org/2.9.0/developer/programming-guide/rest-services/implementing.html

And I am getting an error. The error is in attached file mvn_install.txt.
I tried with different versions of com.mockrunner:mockrunner:jar and it is always the same.

When I remove test dependencies from pom.xml and test folder from hello_rest project I can build the project with maven install, but when I copy my jar in WEB-INF\lib, I get the error from th other attached file - geoserver.log.
The last attached file is my pom.xml

I am using latest version of maven - 3.3.9 and java 1.8.0_72.
I do not know what am I doing wrong… I am reading the manual and doing all the steps…

Best regards,
Kalin

(attachments)

mvn_install.txt (1.4 KB)
geoserver.log (44.2 KB)
pom.xml (2.88 KB)

Did you build geoserver 2.9.0 on your system first?

Brad

No, but I managed to solve this problem.
I replaced dependency com.mockrunner.mockrunner in my pom with these dependencies:

xmlunit xmlunit 1.6 test org.easymock easymock 3.4 test org.easymock easymockclassextension 3.2 test

And also added scope=“prototype” to my bean in applicationContext.xml

Now I can build the sample project and I cat deply it in WEB_INF\lib without getting error.

···

On Wed, Aug 10, 2016 at 2:10 PM, Brad Hards <bradh@anonymised.com> wrote:

Did you build geoserver 2.9.0 on your system first?

Brad

Ah that’s interesting, thanks for sharing back.
Could you open a ticket at https://osgeo-org.atlassian.net/projects/GEOS ?

A pull request to fix the issue would also be very much welcomed, in case you have time :-p

Cheers
Andrea

···

On Wed, Aug 10, 2016 at 2:09 PM, Kalin Genov <kalin.genov@anonymised.com> wrote:

No, but I managed to solve this problem.
I replaced dependency com.mockrunner.mockrunner in my pom with these dependencies:

xmlunit xmlunit 1.6 test org.easymock easymock 3.4 test org.easymock easymockclassextension 3.2 test

And also added scope=“prototype” to my bean in applicationContext.xml

Now I can build the sample project and I cat deply it in WEB_INF\lib without getting error.


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev


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

On Wed, Aug 10, 2016 at 2:10 PM, Brad Hards <bradh@anonymised.com> wrote:

Did you build geoserver 2.9.0 on your system first?

Brad

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


I didn’t understand what to do :slight_smile:
This is an error in the documentation and you want me to open a new ticket for it? I can do that.
And then to correct the error in the documentation? I don’t think I can do this right now :slight_smile:

···

On Wed, Aug 10, 2016 at 3:42 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Ah that’s interesting, thanks for sharing back.
Could you open a ticket at https://osgeo-org.atlassian.net/projects/GEOS ?

A pull request to fix the issue would also be very much welcomed, in case you have time :-p

Cheers
Andrea

On Wed, Aug 10, 2016 at 2:09 PM, Kalin Genov <kalin.genov@anonymised.com> wrote:

No, but I managed to solve this problem.
I replaced dependency com.mockrunner.mockrunner in my pom with these dependencies:

xmlunit xmlunit 1.6 test org.easymock easymock 3.4 test org.easymock easymockclassextension 3.2 test

And also added scope=“prototype” to my bean in applicationContext.xml

Now I can build the sample project and I cat deply it in WEB_INF\lib without getting error.


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev


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

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Wed, Aug 10, 2016 at 2:10 PM, Brad Hards <bradh@anonymised.com> wrote:

Did you build geoserver 2.9.0 on your system first?

Brad