-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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?
Hi,jaeeun
you can update to zkjsp 1.4.0-RC
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 ?
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?
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
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.
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
@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/
Asked: 2009-12-13 23:05:36 +0800
Seen: 1,131 times
Last updated: Mar 19 '10