This discussion is archived
4 Replies Latest reply: Feb 26, 2013 2:39 PM by JuliánIsaza RSS

JSF 2 and Primefaces with  WLS 11gR1(10.3.6) problem

924797 Newbie
Currently Being Moderated
Hi all,

I would like to create a web application in OEPE, which uses JSF 2 and Primefaces 3.2 and then deploy & develop onto WLS.
I added the primefaces jar to WEB-INF/lib.

See my publishing stacktrace below.

(I tried using the Shared JSF libraries and including jsf-api and impl in WEB-INF/lib, but neither of these options worked.)

Do you have any ideas what I am doing wrong? Thanks,
András Liter
----

<2012.04.14. 21:32:21 CEST> <Error> <javax.enterprise.resource.webcontainer.jsf.config> <BEA-000000> <Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
     at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
     at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
     at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:104)
     at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:309)
     at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:482)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:200)
     at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:3225)
     at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:247)
     at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:461)
     at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:1545)
     at weblogic.servlet.internal.WebAppModule.deactivate(WebAppModule.java:509)
     at weblogic.application.internal.flow.ModuleStateDriver$2.previous(ModuleStateDriver.java:387)
     at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
     at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
     at weblogic.application.internal.flow.ModuleStateDriver.deactivate(ModuleStateDriver.java:141)
     at weblogic.application.internal.flow.ScopedModuleDriver.deactivate(ScopedModuleDriver.java:206)
     at weblogic.application.internal.flow.ModuleListenerInvoker.deactivate(ModuleListenerInvoker.java:261)
     at weblogic.application.internal.flow.DeploymentCallbackFlow$2.previous(DeploymentCallbackFlow.java:547)
     at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
     at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:192)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:184)
     at weblogic.application.internal.BaseDeployment$2.previous(BaseDeployment.java:677)
     at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:63)
     at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
     at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)
     at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
     at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
     at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
     at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
     at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:149)
     at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
     at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
     at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
     at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
     at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
<2012.04.14. 21:32:21 CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1334431938841' for task '32'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
     at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1520)
     at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
     at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
     Truncated. see log file for complete stacktrace
Caused By: java.io.FileNotFoundException: \Oracle\Middleware\Oracle_OSB1\soa\connectors\FileAdapter.rar!fileAdapter.jar (The system cannot find the file specified)
     at java.util.zip.ZipFile.open(Native Method)
     at java.util.zip.ZipFile.<init>(ZipFile.java:127)
     at java.util.jar.JarFile.<init>(JarFile.java:135)
     at java.util.jar.JarFile.<init>(JarFile.java:72)
     at com.sun.faces.facelets.util.Classpath.getAlternativeJarFile(Classpath.java:252)
     Truncated. see log file for complete stacktrace
  • 1. Re: JSF 2 and Primefaces with  WLS 11gR1(10.3.6) problem
    csoto Pro
    Currently Being Moderated
    Hi,

    I think the problem here is that perhaps OEPE inludes JSF 1.2 and JSF 2.0 was not loaded when running your app, and JSF 1.2 was being used instead, and the two are not compatible.

    Take a look at the URLs below:
    http://docs.oracle.com/cd/E14545_01/help/oracle.eclipse.tools.common.doc/html/index.html
    http://docs.oracle.com/cd/E14545_01/help/org.eclipse.jst.jsf.facelet.doc.user/html/gettingstarted/tutorial/JSF%20Facelets%20Tools%20Tutorial.html

    Hope this helps.

    -Cris
  • 2. Re: JSF 2 and Primefaces with  WLS 11gR1(10.3.6) problem
    924797 Newbie
    Currently Being Moderated
    Hey Chris,

    thanks for the tip, but unfortunately I still couldn't solve the problem with creating User libraries as well. However, I decided to narrow down the problem, so I excluded Primefaces and just wanted to create a simple JSF 2 application, but I still get the ZipFile error... :S :S

    I wonder what could I do wrong, there must be a way to make a JSF2 project from OEPE work with WLS 10.3.6... :S :S

    regards,
    András
  • 3. Re: JSF 2 and Primefaces with  WLS 11gR1(10.3.6) problem
    164415 Oracle ACE
    Currently Being Moderated
    Hi --

    I just tried using OEPE 11.1.1.8.0 against a WLS 10.3.6.0 install to build and deploy a JSF 2.0 application and it worked successfully.

    The project is here if you want to take a look:

    http://dl.dropbox.com/u/15657493/oepe-test-jsf2.zip

    The only minor gotcha I found was that I needed to reorder the libraries on the project so that the Shared-Library[jsf] was higher than the WebLogic System Library - this then let me use the JSF 2.0 programming API successfully instead of the 1.2 version that is included in the WLS System Library.

    Here's a couple of screen shots of the facet and project as well as the overall development environment:

    http://dl.dropbox.com/u/15657493/oepe-jsf-facet.png
    http://dl.dropbox.com/u/15657493/oepe-project-libs.png
    http://dl.dropbox.com/u/15657493/oepe.png

    For that zip file error, one thing perhaps is to Check your CLASSPATH setting to see if it has an entry for that FileAdapter.rar. I don't know why it's causing that problem but if it's in the CLASSPATH try removing it and then starting the server.
  • 4. Re: JSF 2 and Primefaces with  WLS 11gR1(10.3.6) problem
    JuliánIsaza Newbie
    Currently Being Moderated
    Hi , solved the problem ?, I have the same problem....thanks for your answer...

    Julian

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points