0

ZK-JSP And Tomcat Start Exception

asked 2009-12-13 23:05:36 +0800

jaeeun gravatar image jaeeun
12 1

updated 2009-12-13 23:28:32 +0800

Hi everybody?
Tomcat and ZK-JSP 1.3 version of the Tomcat after installing the runtime, the following exception occurs.

>>> ZK Jsp spec v2.0 JspFactory initializing...
java.lang.NullPointerException: factory
at org.zkoss.jsp.spec.AbstractJspFactory.<init>(AbstractJspFactory.java:46)
at org.zkoss.jsp.spec.v20.JspFactoryImpl.<init>(JspFactoryImpl.java:47)
at org.zkoss.jsp.spec.v20.JspFactoryImpl.<clinit>(JspFactoryImpl.java:53)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.zkoss.lang.Classes.forNameByThread(Classes.java:199)
at org.zkoss.jsp.spec.JspFactoryContextListener.initJspFactory(JspFactoryContextListener.java:80)
at org.zkoss.jsp.spec.JspFactoryContextListener.startCorrectVersionJspFactory2(JspFactoryContextListener.java:69)
at org.zkoss.jsp.spec.JspFactoryContextListener.contextInitialized(JspFactoryContextListener.java:48)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

This issue is tomcat start up exception.
Environment linux, tomcat 5.5, jdk 1.5.0_12, ZK 3.6, ZK-JSP 1.3.
And I'm in tomcat
tomcat> conf> catalina> localhost> host-manager.xml and
tomcat> conf> catalina> localhost> manager.xml
security reasons, do not use.

This issue what could be a way to solve is the way you'd appreciate?

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2009-12-13 23:58:53 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi,jaeeun
you can update to zkjsp 1.4.0-RC

link publish delete flag offensive edit

answered 2009-12-14 00:04:48 +0800

jaeeun gravatar image jaeeun
12 1

Hi, as1225

i can update to zkjsp 1.4.0-RC, but same issue..

link publish delete flag offensive edit

answered 2009-12-14 00:43:42 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2009-12-14 00:54:02 +0800

I import zkdemo363 war file
and add zkjsp 1.4.0-rc jar file in WEB-INF/lib
it works well in windows XP
you can try to clean tomcat
I am building linux ubuntu-9.10-desktop-i386
and try it later
do you try in windows environment ?

link publish delete flag offensive edit

answered 2009-12-14 01:31:52 +0800

jaeeun gravatar image jaeeun
12 1

as1225, thank you for the answer.
I tested on linux, and you are the same set.
Differences in the tomcat security settings such as the following statement to defrost.
> rm -rf ${TOMCAT_HOME}/server/webapps/{host-,}manager
> rm -rf ${TOMCAT_HOME}/conf/Catalina/localhost/{host-,}manager.xml
This set is estimated to cause a problem.
There is no way to fix that?

link publish delete flag offensive edit

answered 2009-12-14 02:21:35 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2009-12-14 02:24:07 +0800

do you use zk variable in EL
like desktop or page
if not
you can mark below in web.xml

<listener>
		<description>ZK JspTags EL environment initiation </description>
		<display-name>ZK Jsp Factory initiator</display-name>
		<listener-class>org.zkoss.jsp.spec.JspFactoryContextListener</listener-class>
</listener>

this Listener is more stable in tomcat 6.0

The listener is used when we need to get zk variable in EL

But it has life cycle issue
we couldn't solve it yet

link publish delete flag offensive edit

answered 2009-12-14 03:50:12 +0800

jaeeun gravatar image jaeeun
12 1

Thank you for your answer will appear.
Web.xml for your very good results have been noted.
Lisner remove the one in my product and if you run tomcat no exception did not occur.
If you say life cycle What is the specific issue I want to know.

link publish delete flag offensive edit

answered 2010-03-18 19:01:16 +0800

hguerrerojaime gravatar image hguerrerojaime
3

Hey guys, I'm trying to get the same thing done but using Grails (using a gsp instead of a jsp) I installed the zkjsp.jar in the grails lib dir, and when I add the listener in the web.xml file I get the exact same error.

The whole purpose I'm doing this is so I can make custom scaffolding templates using zk (which I couldn't achieve with the zul files using the grails create-zul command). I found out that with the command "grails install-templates" you can customize the scaffolding templates and the controls used by the variable types but those templates are in gsp. If I could integrate zul tags into de gsp it would be a HUGE HUGE help for me.

Thanks in advance

link publish delete flag offensive edit

answered 2010-03-19 04:30:31 +0800

tmillsclare gravatar image tmillsclare
799 2 5 30

@hguerrerojaime,

Does this help at all? It is a post on using ZUL within GSP.

http://felipecypriano.com/blog/2009/12/10/grails-with-zk-embedding-zul-in-gsp/

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-12-13 23:05:36 +0800

Seen: 1,131 times

Last updated: Mar 19 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More