[Geoserver-devel] Tomcat and JSPCompiler (continue)

Hi all,

I'm having trouble when lauching http://localhost:8080/geoserver/index.jsp :

1.- The JSPCompiler servlet tries to compile index_jsp.java at the wrong place
~apache (apache home) (by default it should be $CATALINA_HOME/work).

2.- Having given the relevant rights for tempory files, the JSPCompiler
servlet returns a text/plain file of index.jsp while refreshing its splash
page (If I retry the above URL, I got the right splash page saying % Loading
..., but after a while, back to the plain text page). It seems that, because
receiving a text/plain response, the background compilation stops. I have to
reload the page manually ...

3.- Finally, I got the following error preventing geoserver to work :

java.lang.NullPointerException
        at
org.vfny.geoserver.form.data.DataNamespacesSelectForm.reset(DataNamespacesSelectForm.java:42)
        at
org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:560)
        at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520)
        at
org.apache.jsp.Select_jsp._jspx_meth_html_form_0(Select_jsp.java:87)
        at org.apache.jsp.Select_jsp._jspService(Select_jsp.java:66)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
        at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
        at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
        at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
        at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
        at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
        at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
        at
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
        at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
        at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
        at
org.apache.jsp.mainLayout_jsp._jspx_meth_tiles_insert_6(mainLayout_jsp.java:1283)
        at org.apache.jsp.mainLayout_jsp._jspService(mainLayout_jsp.java:485)
[cut]

Besides these points the /wfs/GetCapabilities and /wms?request=GetCapabilities
perfectly work.

* Linux Configuration :
j2sdk1.4.2_01
apache-ant-1.6.1
jakarta-tomcat-4.1.24 (maxthread=5 --I have tested with maxthread=75, same
results--)
jakarta-struts-1.1
geoserver-1.2.0 beta (last cvs)

Ok, I've been struggling this whole weekend to try to get a half decent
release out and am feeling pretty deflated right now. I think I got
most of the problems with resin on windows fixed, all of which _really_
should have been done before I took a look at it, and before it went up
on sourceforge. I've tested on tomcat with windows, but now I'm trying
out linux, and, well I haven't found any that work yet. I'm really
regretting the fact that I didn't take the time to install linux on my
laptop before taking off. I have a linux box that I'm connecting to in
New York, but my connections pretty bad, which has made things this
weekend all the more frustrating. But yeah, it looks like resin
doesn't work on linux because it can't load the plug-in datastore stuff
correctly, at least not on my machine on resin 2 and 3. And now tomcat
doesn't work either, at least not the ui, which is the main thrust of
this release. I'm very sad about this, as I like linux users more than
windows users, and don't like the fact that I'm a linux user now, which
primarily happened out of laziness - they get you with the
pre-installation. Since I'm in asia I really can't test this release
as thoroughly as I really think is essential for a GeoServer release.
So I'm going to put what I have up on sourceforge, it's fixes from the
past few days that I've been working on. The docs will have to stay
the same, as I have had pretty much no success getting them to
transform properly in the past few days. I may announce a bit more
widely later today, but I don't really like the thought of most all
linux users trying it out and having it not work. So if any linux
users get success then please let me know. I'd like a beta release
that works for linux, so it can be tested more thoroughly before 1.2.0.
I really have no idea about these errors you're getting. Do you have
any idea how to get the index_jsp.java to compile to the correct place?
Jody, any idea on the null pointer exception?

Chris

Quoting Richard didier <dgr@anonymised.com>:

Hi all,

I'm having trouble when lauching
http://localhost:8080/geoserver/index.js=
p :

1.- The JSPCompiler servlet tries to compile index_jsp.java at the
wrong =
place=20
~apache (apache home) (by default it should be $CATALINA_HOME/work).

2.- Having given the relevant rights for tempory files, the
JSPCompiler=20
servlet returns a text/plain file of index.jsp while refreshing its
splas=
h=20
page (If I retry the above URL, I got the right splash page saying %
Load=
ing=20
=2E.., but after a while, back to the plain text page). It seems
that, be=
cause=20
receiving a text/plain response, the background compilation stops. I
have=
to=20
reload the page manually ...

3.- Finally, I got the following error preventing geoserver to work :

java.lang.NullPointerException
        at=20

org.vfny.geoserver.form.data.DataNamespacesSelectForm.reset(DataNamespace=

sSelectForm.java:42)
        at=20
org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:560)
        at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:=
520)
        at=20
org.apache.jsp.Select_jsp._jspx_meth_html_form_0(Select_jsp.java:87)
        at org.apache.jsp.Select_jsp._jspService(Select_jsp.java:66)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java=
:137)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at=20

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav=

a:210)
        at=20

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:2=
41)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at=20

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatch=

er.java:684)
        at=20

org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispa=

tcher.java:575)
        at=20

org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatc=

her.java:498)
        at=20

org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.jav=

a:822)
        at=20

org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:39=

8)
        at=20

org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)

        at
org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177=
)
        at=20
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
        at=20

org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag=

=2Ejava:881)
        at=20
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
        at=20

org.apache.jsp.mainLayout_jsp._jspx_meth_tiles_insert_6(mainLayout_jsp.ja=

va:1283)
        at
org.apache.jsp.mainLayout_jsp._jspService(mainLayout_jsp.java:=
485)
[cut]

Besides these points the /wfs/GetCapabilities and
/wms?request=3DGetCapab=
ilities=20
perfectly work.

* Linux Configuration :
j2sdk1.4.2_01
apache-ant-1.6.1
jakarta-tomcat-4.1.24 (maxthread=3D5 --I have tested with
maxthread=3D75,=
same=20
results--)
jakarta-struts-1.1
geoserver-1.2.0 beta (last cvs)

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

Hi,

Jody, any idea on the null pointer exception?

See
http://cvs.sourceforge.net/viewcvs.py/geoserver/geoserver/src/org/vfny/geoserver/form/data/DataNamespacesSelectForm.java?annotate=1.3

Line 42 : user==null !

Yours,

p.b.

Le Samedi 13 Mars 2004 14:43, Richard didier a écrit :

Some more information about this problem :

I'm having trouble when lauching http://localhost:8080/geoserver/index.jsp
:

1.- The JSPCompiler servlet tries to compile index_jsp.java at the wrong
place ~apache (apache home) (by default it should be $CATALINA_HOME/work).

The log console says that the temporary file /var/www/32456-file can not be
created

2.- Having given the relevant rights for tempory files, the JSPCompiler
servlet returns a text/plain file of index.jsp while refreshing its splash
page (If I retry the above URL, I got the right splash page saying %
Loading ..., but after a while, back to the plain text page). It seems
that, because receiving a text/plain response, the background compilation
stops. I have to reload the page manually ...

Once "manually" compiled, the /geoserver/welcome.do works.
Question: I have found that I could be possible to invoke the JSP compiler at
build time (ant). It might be interresting to have it in the build.xml (see
tomcat-docs/jasper-howto.html) ?

3.- Finally, I got the following error preventing geoserver to work :

java.lang.NullPointerException
        at
org.vfny.geoserver.form.data.DataNamespacesSelectForm.reset(DataNamespacesS
electForm.java:42) at

I may think that this error is due to the manual compilation cause the admin
page (datastores) shows up without problem!

I'm going to concentrate on the translation bugs and UI.

didier

Quoting Richard didier <dgr@anonymised.com>:

> 1.- The JSPCompiler servlet tries to compile index_jsp.java at the wrong
> place ~apache (apache home) (by default it should be $CATALINA_HOME/work).

The log console says that the temporary file /var/www/32456-file can not be
created

I will ask David to look into this on Monday (he wrote the JSPCompiler).

Once "manually" compiled, the /geoserver/welcome.do works.
Question: I have found that I could be possible to invoke the JSP compiler at
build time (ant). It might be interresting to have it in the build.xml (see
tomcat-docs/jasper-howto.html) ?

That does not appear to be cross platform - we looked into precompiling using
resin, but the resulting Java files would not work on Tomcat. We really just
added to precompile to try and help everyone's first impression of the App (it
takes a while to compile the JSP on resin or tomcat).

The creation of a servlet to "walk" a JSP applicaiton is apparently the standard
way of doing this sort of thing. The only wrinkle is that many of our pages
demand the user to be "logged in" before they will show.

> 3.- Finally, I got the following error preventing geoserver to work :
>
> java.lang.NullPointerException
> at
> org.vfny.geoserver.form.data.DataNamespacesSelectForm.reset(DataNamespacesS
>electForm.java:42) at

I may think that this error is due to the manual compilation cause the admin
page (datastores) shows up without problem!

I think this is one of those cases where the JSP page would really like the user
to be logged in, and I am not sure the detail on how the JSPCompiler is faking
this process.

Over to you David.

I'm going to concentrate on the translation bugs and UI.

Thanks muchly,
Jody

The variable "user" represents the user and is stored in session context. It
stores such things as their current selections (in this case the selected
namespace).

In other words we are not supposed to get this far without being logged in. Will
have to redirect to the login page, as a hack we could select the default
namespace I suppose.

Oh wait, this is during the JSPCompiler. The JSCompiler is trying to walk to a
page that requires it to be logged in, I will ask David. may just need to
prevent the JSPCompiler from walking into this page.

Hi,

> Jody, any idea on the null pointer exception?

See

Line 42 : user==null !

I have supressed this error, at least I hope I have. I could not reproduce this
problem on my Windows machine at home.

The Form now returns from its reset method with out error if the user is not
logged in. In the normal course of things the JSP page will redirect if
required. The forms themsleves shoudl not assume the user is logged in.

This is a pain, but should be possible.

Quoting jgarnett@anonymised.com:

> > 3.- Finally, I got the following error preventing geoserver to work :
> >
> > java.lang.NullPointerException
> > at
> >
org.vfny.geoserver.form.data.DataNamespacesSelectForm.reset(DataNamespacesS
> >electForm.java:42) at
>
> I may think that this error is due to the manual compilation cause the
admin
> page (datastores) shows up without problem!

I think this is one of those cases where the JSP page would really like the
user
to be logged in, and I am not sure the detail on how the JSPCompiler is
faking
this process.

Over to you David.

> I'm going to concentrate on the translation bugs and UI.

Thanks muchly,
Jody

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.Compare, Download & Develop Open Source & Business Software - SourceForge
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Quoting Richard didier [<dgr@anonymised.com>](mailto:dgr@anonymised.com):

  
1.- The JSPCompiler servlet tries to compile index_jsp.java at the wrong
place ~apache (apache home) (by default it should be $CATALINA_HOME/work).
      
The log console says that the temporary file /var/www/32456-file can not be
created
    

I will ask David to look into this on Monday (he wrote the JSPCompiler).
  

This is a catch created and used by the web container … has nothing to do with the JSPCompiler, most likely you will get the same error just calling decent sized set of jsps from your browser.

  
Once "manually" compiled, the /geoserver/welcome.do works.
Question: I have found that I could be possible to invoke the JSP compiler at
build time (ant). It might be interresting to have it in the build.xml (see
tomcat-docs/jasper-howto.html) ?
    

That does not appear to be cross platform - we looked into precompiling using
resin, but the resulting Java files would not work on Tomcat. We really just
added to precompile to try and help everyone's first impression of the App (it
takes a while to compile the JSP on resin or tomcat).

The creation of a servlet to "walk" a JSP applicaiton is apparently the standard
way of doing this sort of thing.  The only wrinkle is that many of our pages
demand the user to be "logged in" before they will show.

  
3.- Finally, I got the following error preventing geoserver to work :

java.lang.NullPointerException
        at
org.vfny.geoserver.form.data.DataNamespacesSelectForm.reset(DataNamespacesS
electForm.java:42) at
      
I may think that this error is due to the manual compilation cause the admin
page (datastores) shows up without problem!
    

I think this is one of those cases where the JSP page would really like the user
to be logged in, and I am not sure the detail on how the JSPCompiler is faking
this process.

Over to you David.
  

Yah, i’m playing with the web container … should really fix that. (Jira task → for me).