[Geoserver-devel] Installing GeoServer 1.3.0-PR1 from source

Hi all,

For two days now I've been struggling to try to install GeoServer1.3.0-PR1
from source (onto Windows 2000), including extensive Web searching and
reading from the GeoServer documentation. I've followed the instructions
on the page 'Setup Geoserver for Debugging or Programming' to the letter,
so I have Eclipse running, but right at the end of the section 'Debugging
Setup', after hitting the Apply and Debug buttons, I receive the error
message

java.lang.ClassNotFoundException: org.mortbay.jetty.Server
  at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
  at org.mortbay.start.Main.invokeMain(Main.java:145)
  at org.mortbay.start.Main.start(Main.java:482)
  at org.mortbay.start.Main.main(Main.java:90)

I can't find any mention in the documentation of having to separately
install Jetty when using the source distribution of GeoServer, nor can I
find instructions on how I would configure Jetty to work with GeoServer.
I've also been tearing my hair out trying to get Tomcat to work, as per
'Setup Geoserver for Debugging or Programming'.

Can someone please answer the following basic questions? Does Jetty need
to be separately installed before it can be used with the source
distribution? Is it possible to use Maven with GeoServer 1.3.0? Can Tomcat
be ignored in favour of Jetty, or do both have to be installed? Does the
source need to be "checked out" using Subversion/Subclipse or Tortoise
before the source can be built?

There also seems to be no explicit mention in the documentation of exactly
how to start and stop GeoServer once it has been successfully built. How
is this done, both in Eclipse and from the command line?

Thanks very much for any help you can give,

Stephen

Hi Stephan

If you just want to run GeoServer, I suggest using the windows installer version.

If you want to use the version from source, and set up a development environment. Then consult this page: http://docs.codehaus.org/display/GEOSDOC/Setup+Geoserver+for+Debugging+or+Programming

To answer your question about jetty, no you do not need to install it. It should come with the geoserver download in the lib directory.
It looks like the source version of geoserver download is missing a couple of directories (bin/, and some build files). I suggest you grab the version from svn. I will report a bug about this issue.

The tutorial I listed above describes how to run geoserver from eclipse. To run it from the command line, you will need that 'bin' directory. It has .bat, .sh, and .jar files that are used to start and stop Geoserver

When you get the version of geoserver from SVN, to build it, run the ant command 'debug from ide' in the build.xml file located at the root of your geoserver directory. This will build a full version of geoserver. If you just want to update the geoserver.jar file (ie. you made some changes to .java files) then run 'geoserver.jar_copy'.
Yeh they should probably be renamed.
There are also 'run' and 'stop' commands in the file.

Maven will come with the 1.4 version of geoserver. Right now it is under development on the 1.4 branch. You do not need the source of either Tomcat or jetty to compile or run geoserver. Just the binaries for jetty that come with geoserver.

If you are still having issues, I'm sure one of the developers could build you a full working source file.

Brent Owens
(The Open Planning Project)

staylor@anonymised.com wrote:

Hi all,

For two days now I've been struggling to try to install GeoServer1.3.0-PR1
from source (onto Windows 2000), including extensive Web searching and
reading from the GeoServer documentation. I've followed the instructions
on the page 'Setup Geoserver for Debugging or Programming' to the letter,
so I have Eclipse running, but right at the end of the section 'Debugging
Setup', after hitting the Apply and Debug buttons, I receive the error
message

java.lang.ClassNotFoundException: org.mortbay.jetty.Server
  at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
  at org.mortbay.start.Main.invokeMain(Main.java:145)
  at org.mortbay.start.Main.start(Main.java:482)
  at org.mortbay.start.Main.main(Main.java:90)

I can't find any mention in the documentation of having to separately
install Jetty when using the source distribution of GeoServer, nor can I
find instructions on how I would configure Jetty to work with GeoServer.
I've also been tearing my hair out trying to get Tomcat to work, as per
'Setup Geoserver for Debugging or Programming'.

Can someone please answer the following basic questions? Does Jetty need
to be separately installed before it can be used with the source
distribution? Is it possible to use Maven with GeoServer 1.3.0? Can Tomcat
be ignored in favour of Jetty, or do both have to be installed? Does the
source need to be "checked out" using Subversion/Subclipse or Tortoise
before the source can be built?

There also seems to be no explicit mention in the documentation of exactly
how to start and stop GeoServer once it has been successfully built. How
is this done, both in Eclipse and from the command line?

Thanks very much for any help you can give,

Stephen

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Thanks for your help, Brent.

I did as you suggested and obtained the GeoServer source from SVN (using
TortoiseSVN), and successfully built and ran it using Eclipse.
Unfortunately I'm still very confused and have several questions to ask
the list.

I can't find any documentation about the geoserver.jar file: does this
simply contain .class files for all objects in the source? If so, I assume
'geoserver.jar_move' (you wrote 'geoserver.jar_copy', but I can't find a
task by this name) compiles all modified .java files, and also for some
reason moves geoserver.jar from lib/ to WEB-INF/lib/. (But why does it
need to be moved?) Also, how is running 'geoserver.jar_move' different
from building all of GeoServer?

The task 'debug from ide' (which someone suggested should be renamed
'deploy from Jetty') seems to remove all changes to the configuration
files - should this task be run only once when first building GeoServer?

Also, it has occurred to me that as all the code I currently want to
modify is in GeoTools, can I simply use the binary (in my case, the
Windows installer) version of GeoServer, and somehow add the modified
GeoTools JARs (if they are all that is required) to the GeoServer build?
Would this be any easier than building both GeoServer and GeoTools from
source? If I do this, can GeoTools be built using Eclipse, or does
building require the use of Maven 1.0.2 from the command line? (I haven't
been able to successfully run 'maven build', and seem to be missing a
.maven directory.)

Thanks very much in advance for any help you can give in answer to all
these questions.

Stephen

Hi Stephan

If you just want to run GeoServer, I suggest using the windows installer
version.

If you want to use the version from source, and set up a development
environment. Then consult this page:
http://docs.codehaus.org/display/GEOSDOC/Setup+Geoserver+for+Debugging+or+Programming

To answer your question about jetty, no you do not need to install it.
It should come with the geoserver download in the lib directory.
It looks like the source version of geoserver download is missing a
couple of directories (bin/, and some build files). I suggest you grab
the version from svn. I will report a bug about this issue.

The tutorial I listed above describes how to run geoserver from eclipse.
To run it from the command line, you will need that 'bin' directory. It
has .bat, .sh, and .jar files that are used to start and stop Geoserver

When you get the version of geoserver from SVN, to build it, run the ant
command 'debug from ide' in the build.xml file located at the root of
your geoserver directory. This will build a full version of geoserver.
If you just want to update the geoserver.jar file (ie. you made some
changes to .java files) then run 'geoserver.jar_copy'.
Yeh they should probably be renamed.
There are also 'run' and 'stop' commands in the file.

Maven will come with the 1.4 version of geoserver. Right now it is under
development on the 1.4 branch. You do not need the source of either
Tomcat or jetty to compile or run geoserver. Just the binaries for jetty
that come with geoserver.

If you are still having issues, I'm sure one of the developers could
build you a full working source file.

Brent Owens
(The Open Planning Project)

staylor@anonymised.com wrote:

Hi all,

For two days now I've been struggling to try to install
GeoServer1.3.0-PR1
from source (onto Windows 2000), including extensive Web searching and
reading from the GeoServer documentation. I've followed the instructions
on the page 'Setup Geoserver for Debugging or Programming' to the
letter,
so I have Eclipse running, but right at the end of the section
'Debugging
Setup', after hitting the Apply and Debug buttons, I receive the error
message

java.lang.ClassNotFoundException: org.mortbay.jetty.Server
  at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
  at org.mortbay.start.Main.invokeMain(Main.java:145)
  at org.mortbay.start.Main.start(Main.java:482)
  at org.mortbay.start.Main.main(Main.java:90)

I can't find any mention in the documentation of having to separately
install Jetty when using the source distribution of GeoServer, nor can I
find instructions on how I would configure Jetty to work with GeoServer.
I've also been tearing my hair out trying to get Tomcat to work, as per
'Setup Geoserver for Debugging or Programming'.

Can someone please answer the following basic questions? Does Jetty need
to be separately installed before it can be used with the source
distribution? Is it possible to use Maven with GeoServer 1.3.0? Can
Tomcat
be ignored in favour of Jetty, or do both have to be installed? Does the
source need to be "checked out" using Subversion/Subclipse or Tortoise
before the source can be built?

There also seems to be no explicit mention in the documentation of
exactly
how to start and stop GeoServer once it has been successfully built. How
is this done, both in Eclipse and from the command line?

Thanks very much for any help you can give,

Stephen

The geoserver.jar contains all the geoserver source files, except the servlet source files (as I just re-learned). Rebuilding the whole source will also update the struts pages that make up the web admin tool, in case you modified anything there.

If the change is just in geotools, then you just need to build the geotools binary, and put it in geoserver. In the binary version should be fine. Note that there are probably 6-8 geotools jars (all start with gt2 I think) in the geoserver codebase. The gt2-main.jar has most of the classes, individual datastores are in their own jar though.

I think you may need maven to build geotools, and I think maven 2 is recommended now if you're building trunk. But if you're building 2.1.x, which GeoServer 1.3 is built against, then I _think_ maven 1 is the way to go. It may be possible to build with eclipse, I think there's a page on it here: http://docs.codehaus.org/display/GEOT/Eclipse+Developers+Guide or http://www.geotools.org/display/GEOT/Eclipse+Build And maybe else where in the geotools docs (I don't use eclipse).

best regards,

Chris

staylor@anonymised.com wrote:

Thanks for your help, Brent.

I did as you suggested and obtained the GeoServer source from SVN (using
TortoiseSVN), and successfully built and ran it using Eclipse.
Unfortunately I'm still very confused and have several questions to ask
the list.

I can't find any documentation about the geoserver.jar file: does this
simply contain .class files for all objects in the source? If so, I assume
'geoserver.jar_move' (you wrote 'geoserver.jar_copy', but I can't find a
task by this name) compiles all modified .java files, and also for some
reason moves geoserver.jar from lib/ to WEB-INF/lib/. (But why does it
need to be moved?) Also, how is running 'geoserver.jar_move' different
from building all of GeoServer?

The task 'debug from ide' (which someone suggested should be renamed
'deploy from Jetty') seems to remove all changes to the configuration
files - should this task be run only once when first building GeoServer?

Also, it has occurred to me that as all the code I currently want to
modify is in GeoTools, can I simply use the binary (in my case, the
Windows installer) version of GeoServer, and somehow add the modified
GeoTools JARs (if they are all that is required) to the GeoServer build?
Would this be any easier than building both GeoServer and GeoTools from
source? If I do this, can GeoTools be built using Eclipse, or does
building require the use of Maven 1.0.2 from the command line? (I haven't
been able to successfully run 'maven build', and seem to be missing a
.maven directory.)

Thanks very much in advance for any help you can give in answer to all
these questions.

Stephen

Hi Stephan

If you just want to run GeoServer, I suggest using the windows installer
version.

If you want to use the version from source, and set up a development
environment. Then consult this page:
http://docs.codehaus.org/display/GEOSDOC/Setup+Geoserver+for+Debugging+or+Programming

To answer your question about jetty, no you do not need to install it.
It should come with the geoserver download in the lib directory.
It looks like the source version of geoserver download is missing a
couple of directories (bin/, and some build files). I suggest you grab
the version from svn. I will report a bug about this issue.

The tutorial I listed above describes how to run geoserver from eclipse.
To run it from the command line, you will need that 'bin' directory. It
has .bat, .sh, and .jar files that are used to start and stop Geoserver

When you get the version of geoserver from SVN, to build it, run the ant
command 'debug from ide' in the build.xml file located at the root of
your geoserver directory. This will build a full version of geoserver.
If you just want to update the geoserver.jar file (ie. you made some
changes to .java files) then run 'geoserver.jar_copy'.
Yeh they should probably be renamed.
There are also 'run' and 'stop' commands in the file.

Maven will come with the 1.4 version of geoserver. Right now it is under
development on the 1.4 branch. You do not need the source of either
Tomcat or jetty to compile or run geoserver. Just the binaries for jetty
that come with geoserver.

If you are still having issues, I'm sure one of the developers could
build you a full working source file.

Brent Owens
(The Open Planning Project)

staylor@anonymised.com wrote:

Hi all,

For two days now I've been struggling to try to install
GeoServer1.3.0-PR1
from source (onto Windows 2000), including extensive Web searching and
reading from the GeoServer documentation. I've followed the instructions
on the page 'Setup Geoserver for Debugging or Programming' to the
letter,
so I have Eclipse running, but right at the end of the section
'Debugging
Setup', after hitting the Apply and Debug buttons, I receive the error
message

java.lang.ClassNotFoundException: org.mortbay.jetty.Server
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.mortbay.start.Main.invokeMain(Main.java:145)
at org.mortbay.start.Main.start(Main.java:482)
at org.mortbay.start.Main.main(Main.java:90)

I can't find any mention in the documentation of having to separately
install Jetty when using the source distribution of GeoServer, nor can I
find instructions on how I would configure Jetty to work with GeoServer.
I've also been tearing my hair out trying to get Tomcat to work, as per
'Setup Geoserver for Debugging or Programming'.

Can someone please answer the following basic questions? Does Jetty need
to be separately installed before it can be used with the source
distribution? Is it possible to use Maven with GeoServer 1.3.0? Can
Tomcat
be ignored in favour of Jetty, or do both have to be installed? Does the
source need to be "checked out" using Subversion/Subclipse or Tortoise
before the source can be built?

There also seems to be no explicit mention in the documentation of
exactly
how to start and stop GeoServer once it has been successfully built. How
is this done, both in Eclipse and from the command line?

Thanks very much for any help you can give,

Stephen

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com