打印

提问须知

本主题由 mfkvfn 于 2011-6-10 15:20 解除高亮
第一个程序Hello Duke 就出错了 每一步都是按文档里那样做的.. 希望版主能给予帮助 一个对OPERAMASKS有着浓厚兴趣的新手....
服务器遇到了一个内部错误而无法完成请求。


javax.servlet.ServletException: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
   at com.apusic.web.container.WebComponent.create(Unknown Source)
   at com.apusic.web.container.WebComponent.getComponent(Unknown Source)
   at com.apusic.web.container.WebComponent.init(Unknown Source)
   at com.apusic.web.container.WebContainer.loadServlet(Unknown Source)
   at com.apusic.web.container.WebContainer.loadServlet(Unknown Source)
   at com.apusic.web.container.WebContainer.processRequest(Unknown Source)
   at com.apusic.web.http.VirtualHost.processRequest(Unknown Source)
   at com.apusic.web.http.HttpServer.processRequest(Unknown Source)
   at com.apusic.web.http.HttpConnectionHandler.service(Unknown Source)
   at com.apusic.web.http.ConnectionHandler.processRequest(Unknown Source)
   at com.apusic.web.http.ConnectionHandler.processConnection(Unknown Source)
   at com.apusic.web.http.ConnectionHandler.run(Unknown Source)
   at com.apusic.util.ThreadPoolImpl$WorkerThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
   at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256)
   at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
   at com.apusic.web.container.ServletComponent.initializeComponent(Unknown Source)
   at com.apusic.web.container.ServletComponent.initializeComponent(Unknown Source)
    ...13 more

控制台的错误提示 是无法装载Servlet 'Face Servlet : java.lang.IllegalStateException:Application' was
not properly initialized at startup,could not find
Factory : javax.faces.context.FacesContextFactory

TOP

用jocky混淆编译,怎么会出现这种问题

我的eclipse是3.2的,我将编译器改成jDK1.5的,target VM是1.5还能编译成功,怎么只将target VM改成1.4就不行了呢(其它没变,不是说可以将文件编译成JDK1.4支持的类文件么)?下面是错误信息:
Buildfile: E:\workspace\pm\jocky_build.xml
init:
[jocky] Jocky disabled
[mkdir] Created dir: E:\workspace\pm\jocky\performance\WEB-INF\classes
build:
[echo] pm.jocky: E:\workspace\pm\jocky_build.xml
[jocky] Jocky enabled
[javac] Compiling 180 source files to E:\workspace\pm\jocky\performance\WEB-INF\classes
[javac] An exception has occurred in the compiler (1.5.0). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
[javac] java.lang.AssertionError: com.sun.tools.javac.jvm.ClassFile$TypeName@d0a5d9
[javac] at com.sun.tools.javac.jvm.Code._$1(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Code.emitop1(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Items$ImmediateItem._$1(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Items$ImmediateItem.load(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genArgs(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitApply(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$Apply.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genExpr(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitAssign(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$Assign.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genExpr(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitConditional(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$Conditional.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genExpr(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genArgs(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitApply(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$Apply.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genExpr(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitAssign(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$Assign.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genExpr(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitExec(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$Exec.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genDef(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genStat(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genStat(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genStats(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitBlock(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$Block.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genDef(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genStat(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genMethod(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.visitMethodDef(Unknown Source)
[javac] at com.sun.tools.javac.tree.Tree$MethodDef.accept(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genDef(Unknown Source)
[javac] at com.sun.tools.javac.jvm.Gen.genClass(Unknown Source)
[javac] at com.sun.tools.javac.main.JavaCompiler.genCode(Unknown Source)
[javac] at com.sun.tools.javac.main.JavaCompiler.compile(Unknown Source)
[javac] at com.sun.tools.javac.main.Main.compile(Unknown Source)
[javac] at com.sun.tools.javac.main.Main.compile(Unknown Source)
[javac] at com.sun.tools.javac.Main.compile(Unknown Source)
[javac] at com.sun.tools.javac.Main.main(Unknown Source)

BUILD FAILED
E:\workspace\pm\jocky_build.xml:57: Compile failed; see the compiler error output for details.

Total time: 13 seconds

TOP

seam的例子使用aom2.0M1的jsf实现报错

seam的例子使用aom2.0M1的jsf实现报错,seam的前途大大的,要想也使operamasks前途大大的,就要有好的集成方式和文档,不过。。。。

TOP

在tomcat6.0中部署rcdemos.war问题

使用的环境:
操作系统:windowsXP
JDK版本:1.5.0_12
AOM版本:2.0
将operamasks-faces.jar和operamasks-skins.jar以及lib下除spring下的jar包都放在了tomcat6.0/lib下了,由于rcdemos下的web.xml文件包含需要修改的

  ResourceServlet
  org.operamasks.faces.render.resource.ResourceServlet
 

 
  ResourceServlet
  /_global/*
 

我直接将rcdemos.war放在webapp下,启动tomcat时就报下面的错误:
信息: Deploying web application archive rcdemos.war
2008-3-25 11:55:00 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "org.operamasks.faces.config.FacesConfigLoader" is already configured for this context. The duplicate definition has been ignored.
2008-3-25 11:55:00 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "org.operamasks.faces.render.graph.ChartKeeper" is already configured for this context. The duplicate definition has been ignored.
2008-3-25 11:55:01 org.operamasks.faces.config.FacesConfig loadFromMetaInf
信息: 读取JSF配置文件:file:/C:/JavaHome/Tomcat%206.0/webapps/rcdemos/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
2008-3-25 11:55:01 org.operamasks.faces.config.FacesConfig loadFromWebInf
信息: 读取JSF配置文件:/localhost/rcdemos/WEB-INF/faces-config.xml
2008-3-25 11:55:01 org.operamasks.faces.config.FacesConfig loadFromWebInf
信息: 读取JSF配置文件:/localhost/rcdemos/WEB-INF/operamasks.xml
2008-3-25 11:55:01 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2008-3-25 11:55:01 org.apache.catalina.core.StandardContext start
严重: Context [/rcdemos] startup failed due to previous errors
2008-3-25 11:55:03 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.ContextListener" is already configured for this context. The duplicate definition has been ignored.
2008-3-25 11:55:03 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.SessionListener" is already configured for this context. The duplicate definition has been ignored.ContextListener: attributeAdded('org.operamasks.faces.ChartKeeper', 'org.operamasks.faces.render.graph.ChartKeeper@d3c6a3')
2008-3-25 11:55:04 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8181
2008-3-25 11:55:04 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2008-3-25 11:55:04 org.apache.catalina.startup.Catalina start
信息: Server startup in 4334 ms

TOP

解决办法

楼上的使用的是aom 2.0的m1版本吧,这个问题这样处理:
1)把你应用中的elite.jar中的javax目录删除。
2) 把javaee.jar拷贝到你的tomcat下的lib目录中

[ 本帖最后由 celin 于 2008-3-25 13:30 编辑 ]

TOP

使用AOM2.0,将rcdemos部署在tomcat6上.可以参考一下这个文章:http://www.operamasks.org/bbs/vi ... 1957&extra=page%3D1

TOP

还是不行啊

对啊 使用的是aom 2.0的m1版本,应用中的elite.jar中没有javax目录,启动tomcat后还是报错

信息: Deploying web application archive rcdemos.war
2008-3-25 14:36:44 org.operamasks.faces.config.FacesConfig loadFromMetaInf
信息: 读取JSF配置文件:file:/C:/JavaHome/Tomcat%206.0/webapps/rcdemos/WEB-INF/li
b/jsf-facelets.jar!/META-INF/faces-config.xml
2008-3-25 14:36:44 org.operamasks.faces.config.FacesConfig loadFromWebInf
信息: 读取JSF配置文件:/localhost/rcdemos/WEB-INF/faces-config.xml
2008-3-25 14:36:44 org.operamasks.faces.config.FacesConfig loadFromWebInf
信息: 读取JSF配置文件:/localhost/rcdemos/WEB-INF/operamasks.xml
2008-3-25 14:36:45 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2008-3-25 14:36:45 org.apache.catalina.core.StandardContext start
严重: Context [/rcdemos] startup failed due to previous errors
2008-3-25 14:36:46 org.apache.catalina.core.StandardContext addApplicationListen
er
信息: The listener "listeners.ContextListener" is already configured for this co
ntext. The duplicate definition has been ignored.
2008-3-25 14:36:46 org.apache.catalina.core.StandardContext addApplicationListen
er
信息: The listener "listeners.SessionListener" is already configured for this co
ntext. The duplicate definition has been ignored.
2008-3-25 14:36:46 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8181
2008-3-25 14:36:46 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2008-3-25 14:36:46 org.apache.catalina.startup.Catalina start
信息: Server startup in 3051 ms

TOP

1)你有没有把javaee.jar拷贝到你的tomcat下的lib目录中?
2)把apusic domains/mydomain/deploy/下的东东都删除
另外,建议你使用AOM2.0M2版

[ 本帖最后由 celin 于 2008-3-25 14:46 编辑 ]

TOP

谢谢 已经解决了

我是借鉴了liqi发的那篇帖子之后,有所感想。
我将rcdemos.war文件放在webapp下后,使用operamasks-faces_SNAP20080324下lib中的jar文件(el-api.jar文件除外)拷到tomcat/lib下。启动tomcat后,redemos.war部署好后,我删除了rcdemos.war这个文件(可能因为这个文件里还有一些jar文件与tomcat的有冲突吧)也删除了部署后生成的rcdemos目录下的web-inf下lib中的所有jar文件。重启tomcat就好了,还是要好好的谢谢你啊~~ 回答很迅速啊~~

TOP

AOM2.0M2发布了吗?

AOM2.0M2还没有发布吧?
对了,金蝶的应用服务器和studio要钱吗?
中国总算是有个开源的东西了,技术还这么新,8错8错!!

TOP