You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Piroumian, Konstantin" <KP...@flagship.ru> on 2001/10/24 15:48:37 UTC

[C2.0rc1] Cocoon installation fails on IONA iPortal App Server

Hi, C2ers!

Did anybody try to install C2.0rc1 on IONA App Server (http://www.iona.com)?
Or some other server that does not use Tomcat as a servlet container? I
think that before releasing C2.0 it must be tested with most popular J2EE
app servers (WebLogic, WebSphere) and results must be documented.

I am trying to install C2.0rc1 on IONA iPortal App Server 3.0, which is a
certified J2EE platform, but I get this error during CocoonServlet
initialization:

java.lang.NullPointerException
 at java.util.Hashtable.put(Hashtable.java:380)
 at
org.apache.avalon.framework.context.DefaultContext.put(DefaultContext.java:1
07)
 at
org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:365)
 at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:136)
 at
com.iona.j2ee.web.servlet.ServletInstanceManager.loadAndInitializeServletCla
ss(ServletInstanceManager.java:202)
 at
com.iona.j2ee.web.servlet.ServletInstanceManager.loadUserDefinedServlet(Serv
letInstanceManager.java:192)
 at
com.iona.j2ee.web.servlet.ServletInstanceManager.refresh(ServletInstanceMana
ger.java:89)
 at
com.iona.j2ee.web.servlet.ServletInstanceManager.<init>(ServletInstanceManag
er.java:74)
 at
com.iona.j2ee.web.servlet.ServletContextImpl.<init>(ServletContextImpl.java:
56)
 at
com.iona.j2ee.server.WebApplicationImpl.<init>(WebApplicationImpl.java:61)
 at
com.iona.j2ee.server.DeployedWarModule.applyContainerConfiguration(DeployedW
arModule.java:90)
 at
com.iona.j2ee.server.Deployed.applyContainerConfiguration(Deployed.java:77)
 at com.iona.j2ee.server.ContainerBean.configure(ContainerBean.java:685)
 at com.iona.j2ee.server.ContainerBean._configure(ContainerBean.java:701)
....

I think that this happens because LogKit couldn't find its configuration
file. I can only guess what happens: it seems that the server does not
extract files from WAR and works with it and Cocoon servlet cannot get its
configuration files.

Any help would very appreciated.

Regards,
    Konstantin Piroumian




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] Installation problems

Posted by giacomo <gi...@apache.org>.
On Sat, 27 Oct 2001, Stefano Mazzocchi wrote:

> "Piroumian, Konstantin" wrote:
> >
> > Hi, C2ers!
> >
> > As I've written already, I faced a problem installing Cocoon 2.0rc1 on IONA
> > App server. The WAR archive is not unpacked when application is running and
> > this results in problems during servlet initialization, particularly:
> > this.servletContext.getRealPath("/") returns 'null'.
>
> Oh, gosh, didn't notice this in code but using getRealPath is wrong and
> should almost never be used!! (I once proposed to the Servlet JSR to
> deprecate all instances of that method, but it was rejected).
>
> getResource() is always the way to go since it allows the container to
> abstact the location of the resource even in environments were the
> webapps may be distributed in a load-balanced environment.
>
> Please, people, don't assume we will be running in a nice and simple
> tomcat container or the entire reason to make Cocoon a servlet API will
> fail.
>
> > Is there a reason that cocoon.xconf and sitemap.xmap (root) are placed in
> > the context root directory and not inside of the WEB-INF/?
>
> I agree that cocoon.xconf should be placed under WEB-INF. I propose to
> make that the default location, but as for sitemaps, I think the sitemap
> should be placed there since it's not a configuration but part of the
> resources Cocoon uses to operate.
>
> > And why not use getResource() instead of using real path to files?
>
> Yes, exactly.
>
> > If C2 is running from an
> > archive then the real path cannot be used to load files.
>
> And there are a ton of other cases.
>
> Also, it is wrong for a webapp to update something inside its resource
> space (as we do with cocoon.log files). The "work" directories for
> webapps were created exactly for this.
>
> Also, it should be possible for cocoon to log on the servlet log and not
> on external files in order to automate log processing (some people might
> have a syslog-connected servlet container and might want to centralize
> log analysis there).

Cocoon logs on the servlet log automatically (at least wit the current
logkit management configuration) in case of log entries with priority
error and up. There is no problem changing the location of logfiles in
the logkit.xconf file.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] Installation problems

Posted by Stefano Mazzocchi <st...@apache.org>.
"Piroumian, Konstantin" wrote:
> 
> Hi, C2ers!
> 
> As I've written already, I faced a problem installing Cocoon 2.0rc1 on IONA
> App server. The WAR archive is not unpacked when application is running and
> this results in problems during servlet initialization, particularly:
> this.servletContext.getRealPath("/") returns 'null'.

Oh, gosh, didn't notice this in code but using getRealPath is wrong and
should almost never be used!! (I once proposed to the Servlet JSR to
deprecate all instances of that method, but it was rejected).

getResource() is always the way to go since it allows the container to
abstact the location of the resource even in environments were the
webapps may be distributed in a load-balanced environment.

Please, people, don't assume we will be running in a nice and simple
tomcat container or the entire reason to make Cocoon a servlet API will
fail.

> Is there a reason that cocoon.xconf and sitemap.xmap (root) are placed in
> the context root directory and not inside of the WEB-INF/?

I agree that cocoon.xconf should be placed under WEB-INF. I propose to
make that the default location, but as for sitemaps, I think the sitemap
should be placed there since it's not a configuration but part of the
resources Cocoon uses to operate.

> And why not use getResource() instead of using real path to files?

Yes, exactly.

> If C2 is running from an
> archive then the real path cannot be used to load files.

And there are a ton of other cases.
 
Also, it is wrong for a webapp to update something inside its resource
space (as we do with cocoon.log files). The "work" directories for
webapps were created exactly for this.

Also, it should be possible for cocoon to log on the servlet log and not
on external files in order to automate log processing (some people might
have a syslog-connected servlet container and might want to centralize
log analysis there).

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


[C2] Installation problems

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
Hi, C2ers!

As I've written already, I faced a problem installing Cocoon 2.0rc1 on IONA
App server. The WAR archive is not unpacked when application is running and
this results in problems during servlet initialization, particularly:
this.servletContext.getRealPath("/") returns 'null'.

Is there a reason that cocoon.xconf and sitemap.xmap (root) are placed in
the context root directory and not inside of the WEB-INF/? And why not use
getResource() instead of using real path to files? If C2 is running from an
archive then the real path cannot be used to load files.

Anybody knows a workaround for such situation?

Best regards,

Konstantin Piroumian
Sr. Software developer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: kpiroumian@flagship.ru
http://www.protek.com






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2.0rc1] Cocoon installation fails on IONA iPortal App Server

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
> Hi,
> I am working with HP-AS it is newly released J2EE platform app server.
> Cocoon cannot be deployed as WAR unless WAR is extracted!!!!!!!

Thanks for your answer.

I am only the second day working with Iona and I haven't seen a single
config param about extracting before running :(

>
> Tomcat has a configuration parameter to specify if the WAR should be
> extracted before "usage".
> The default is set to "true". What does it means is that as a first step
WAR
> is extracted then the rest of initialization happens.
> Internal Cocoon classpath is set, sitemap is compiled and life is
beautiful.
>
> When the WAR is not extracted we have some problems. The problem is that
the
> result of getRealPath() method is undefined and
> classpath cannot be correctly set and everything relying on classpath is
> failing - compilation of the sitemap is the first victim.

Other problems start when Cocoon tries to create log files inside of
WEB-INF/ directory, which will be inside of an archive :(

>
> In fact this problem is on my to-do list. I hope to fix Cocoon code to
> surpass this limitation very soon.

This kind of problems must be fixed before releasing C2.0, because
specification does not require the WAR file to be extracted before running
the application and several servers extract the archive into a temporary
work folders then it results in problems with Cocoon.

In my case, I had to evaluate Cocoon to be used in our commercial product,
which must be easily deployable to most popular App Servers, including Iona
iPortal 3.0 and WebLogic 6.1.

>
> Other minor problem is that I need to override HP-AS xalan.jar and
> xerces.jar with those shipped with Cocoon.

I've seen a lot of messages about problems with WL 6.1 too. I tested C2.0
only with WL 6.0 sp1 and Cocoon worked after replacing the parser.

I never had problems only with Tomcat 3.2.1, Tomcat 3.3 and Tomcat 4.0. To
make Cocoon a really useful tool supporting only Tomcat is not enough. It's
used very rarely on production servers.

> Regards,
> Kinga

Regards,
    Konstantin

> > Hi, C2ers!
> >
> > Did anybody try to install C2.0rc1 on IONA App Server
> (http://www.iona.com)?
> > Or some other server that does not use Tomcat as a servlet container? I
> > think that before releasing C2.0 it must be tested with most popular
J2EE
> > app servers (WebLogic, WebSphere) and results must be documented.
> >
> > I am trying to install C2.0rc1 on IONA iPortal App Server 3.0, which is
a
> > certified J2EE platform, but I get this error during CocoonServlet
> > initialization:
> >
> > java.lang.NullPointerException
> >  at java.util.Hashtable.put(Hashtable.java:380)
> >  at
> >
>
org.apache.avalon.framework.context.DefaultContext.put(DefaultContext.java:1
> > 07)
> >  at
> >
org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:365)
> >  at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:136)
> >  at
> >
>
com.iona.j2ee.web.servlet.ServletInstanceManager.loadAndInitializeServletCla
> > ss(ServletInstanceManager.java:202)
> >  at
> >
>
com.iona.j2ee.web.servlet.ServletInstanceManager.loadUserDefinedServlet(Serv
> > letInstanceManager.java:192)
> >  at
> >
>
com.iona.j2ee.web.servlet.ServletInstanceManager.refresh(ServletInstanceMana
> > ger.java:89)
> >  at
> >
>
com.iona.j2ee.web.servlet.ServletInstanceManager.<init>(ServletInstanceManag
> > er.java:74)
> >  at
> >
>
com.iona.j2ee.web.servlet.ServletContextImpl.<init>(ServletContextImpl.java:
> > 56)
> >  at
> >
com.iona.j2ee.server.WebApplicationImpl.<init>(WebApplicationImpl.java:61)
> >  at
> >
>
com.iona.j2ee.server.DeployedWarModule.applyContainerConfiguration(DeployedW
> > arModule.java:90)
> >  at
> >
>
com.iona.j2ee.server.Deployed.applyContainerConfiguration(Deployed.java:77)
> >  at com.iona.j2ee.server.ContainerBean.configure(ContainerBean.java:685)
> >  at
com.iona.j2ee.server.ContainerBean._configure(ContainerBean.java:701)
> > ....
> >
> > I think that this happens because LogKit couldn't find its configuration
> > file. I can only guess what happens: it seems that the server does not
> > extract files from WAR and works with it and Cocoon servlet cannot get
its
> > configuration files.
> >
> > Any help would very appreciated.
> >
> > Regards,
> >     Konstantin Piroumian
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2.0rc1] Cocoon installation fails on IONA iPortal App Server

Posted by kingadziembowska <ki...@msn.com>.
Hi,
I am working with HP-AS it is newly released J2EE platform app server.
Cocoon cannot be deployed as WAR unless WAR is extracted!!!!!!!

Tomcat has a configuration parameter to specify if the WAR should be
extracted before "usage".
The default is set to "true". What does it means is that as a first step WAR
is extracted then the rest of initialization happens.
Internal Cocoon classpath is set, sitemap is compiled and life is beautiful.

When the WAR is not extracted we have some problems. The problem is that the
result of getRealPath() method is undefined and
classpath cannot be correctly set and everything relying on classpath is
failing - compilation of the sitemap is the first victim.

In fact this problem is on my to-do list. I hope to fix Cocoon code to
surpass this limitation very soon.

Other minor problem is that I need to override HP-AS xalan.jar and
xerces.jar with those shipped with Cocoon.
Regards,
Kinga





----- Original Message -----
From: "Piroumian, Konstantin" <KP...@flagship.ru>
To: <co...@xml.apache.org>
Sent: Wednesday, October 24, 2001 9:48 AM
Subject: [C2.0rc1] Cocoon installation fails on IONA iPortal App Server


> Hi, C2ers!
>
> Did anybody try to install C2.0rc1 on IONA App Server
(http://www.iona.com)?
> Or some other server that does not use Tomcat as a servlet container? I
> think that before releasing C2.0 it must be tested with most popular J2EE
> app servers (WebLogic, WebSphere) and results must be documented.
>
> I am trying to install C2.0rc1 on IONA iPortal App Server 3.0, which is a
> certified J2EE platform, but I get this error during CocoonServlet
> initialization:
>
> java.lang.NullPointerException
>  at java.util.Hashtable.put(Hashtable.java:380)
>  at
>
org.apache.avalon.framework.context.DefaultContext.put(DefaultContext.java:1
> 07)
>  at
> org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:365)
>  at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:136)
>  at
>
com.iona.j2ee.web.servlet.ServletInstanceManager.loadAndInitializeServletCla
> ss(ServletInstanceManager.java:202)
>  at
>
com.iona.j2ee.web.servlet.ServletInstanceManager.loadUserDefinedServlet(Serv
> letInstanceManager.java:192)
>  at
>
com.iona.j2ee.web.servlet.ServletInstanceManager.refresh(ServletInstanceMana
> ger.java:89)
>  at
>
com.iona.j2ee.web.servlet.ServletInstanceManager.<init>(ServletInstanceManag
> er.java:74)
>  at
>
com.iona.j2ee.web.servlet.ServletContextImpl.<init>(ServletContextImpl.java:
> 56)
>  at
> com.iona.j2ee.server.WebApplicationImpl.<init>(WebApplicationImpl.java:61)
>  at
>
com.iona.j2ee.server.DeployedWarModule.applyContainerConfiguration(DeployedW
> arModule.java:90)
>  at
>
com.iona.j2ee.server.Deployed.applyContainerConfiguration(Deployed.java:77)
>  at com.iona.j2ee.server.ContainerBean.configure(ContainerBean.java:685)
>  at com.iona.j2ee.server.ContainerBean._configure(ContainerBean.java:701)
> ....
>
> I think that this happens because LogKit couldn't find its configuration
> file. I can only guess what happens: it seems that the server does not
> extract files from WAR and works with it and Cocoon servlet cannot get its
> configuration files.
>
> Any help would very appreciated.
>
> Regards,
>     Konstantin Piroumian
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org