I have been trying to get my application working under JBoss 7 but have finally hit a problem that I cannot find an answer to.
The application is a web based application using springwebflow,cdi,jsf (primefaces).
it gets deployed without an error and renders the first page (login.xhtml). once i'm logged in, if i try to click list of accounts (users's accounts) link (which invokes the webflow for list of Accounts) which display a list of accounts but when the server looks for the resource to use for rendering the view, it fails with FileNotFoundException when attempting to load a resource as below. javax.faces.FacesException: Error Checking Last Modified for jndi:/localhost/datapTest/AccountSelect.xhtml For some reason the default view of the flow (Accountflow) is being converted to a jndi resource location. Can anybody help?
Updated :
after changing the param javax.faces.FACELETS_REFRESH_PERIOD value to 1
exception :
Caused by: javax.faces.FacesException: java.io.FileNotFoundException: Facelet /accountSelect.xhtml not found at: jndi:/default-host/datapTest/accountSelect.xhtml
I was having a similar problem, and i found out that the problem was a conflict with the omnifaces lib. The problem occurs because omnifaces registers a view handler called RestorableViewHandler and this view handler does not know how to solve the id's from the flows files.
To solve that, we need to add the view handler of spring-webflow locally on our faces-config.xml file:
<application>
<view-handler>org.springframework.faces.webflow.FlowViewHandler</view-handler>
</application>
PS: Or you can just remove the omnifaces dependence from your application.
Related
I have 2 faces-config.xml file.
I created a new page and added bean into the second file.
However, the first faces-config file automatically keeps adding bean to it as well.
Thus, every time I tried to refresh a page there is a classNotFoundException because there are 2 classes
for that page.
Can anyone tell me the cause and how to fix this?
(I am using ibm rad6)
in a web project using myFaces 2.1.8, I use the following line of code in a composite component in order to include external content (located at the application server, outside of the webapp-folder):
<ui:include src="file:/#{someSingletonBean.externalContentDir}/#{cc.attrs.externalContentFilename}" />
The FACELETS_REFRESH_PERIOD context param is set to 2 hours.
Changes made to the external content files are however not refreshed until the server gets restarted.
Is there a way to populate these changes to myFaces without restarting the server?
There is a bug recently found and fixed in 2.2.4 that cause the problem. See MYFACES-3890 for details.
I upgraded icefaces version from 1.8 to 3 and I'm facing the following problem:
everytime I call a method in a backing bean form pages inside WEB-INF, I have the error "Network connection interrupted" and, in firefox I see when I hover the button, POST mypage.jsf , STATUS 404 Not Found.
Can anybody help me, please?
If I move the pages outside WEB-INF it works, but I wouldn't change all the structure of my project...
Thank you very much
I suggest you to move pages outside WEB-INF. This directory has a specific meaning in web application deployment. It holds configuration and (e.g.) classes used by servlet.
Web container should not serve the content of this directory, if in 1.8 this happen, probably it's a bug that has been fixed.
I have been struggling with the unholy alliance that is WebSphere 7+ and Mojarra 2.0.4 and have run into something of a showstopper.
I followed the directions as specified at this forum post and got Mojarra 2.0.4 initializing properly: http://forum.primefaces.org/viewtopic.php?f=3&t=6860
Basically I created an isolated classloader shared library that refers externally to the Mojarra and Primefaces jars, added the shared library to the webapp and reversed the classloader to go PARENT_LAST. All of that works.
When I attempt to access my web app http://server:port/context/index.xhtml it is hitting the FacesServlet correctly but then instantly the Request Dispatcher is redirecting to index.jsp???
I don't have any JSP specified ANYWHERE in my code, my app, my web.xml, and in fact I specified DEFAULT-SUFFIX to be .xhtml and that didn't help. All my web pages are .xhtml extension and FacesServlet is mapped correctly to *.xhtml.
I have tried adding XHTML as a mime type to WebSphere, disabling the Request Dispatcher, all to no avail. I have been able to get this running correctly on Tomcat 6-7, JBoss 6 and Glassfish 3 with no problems but for some reason WebSphere insists on a JSP file extension?
I appreciate any help you might have.
WAS7 sometimes does not undeploy the web applications properly. Clearing WAS_PROFILE_HOME/temp and WAS_PROFILE_HOME/wstemp may help.
Please help with this issue, I'm going mad...
I'm trying to make a client-server web application using Weblogic 10 as an application server and IIS as a webserver (corporate constraints), with EJB 3 and Struts 2. I am however having strage problems which I cannot solve.
Using Struts 2.2 I get the following stack trace while starting the server:
<12-ott-2010 16.02.21 CEST> <Error> <HTTP> <BEA-101165> <Could not load user def
ined filter in web.xml: org.apache.struts2.dispatcher.FilterDispatcher.
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inj
ect.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 295 - com/opensymphony/xwork2/inject/ContainerImpl.java:295:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.
java:190)
at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterMa
nager.java:320)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
Truncated. see log file for complete stacktrace
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[...]
java.lang.IllegalArgumentException: Javassist library is missing in classpath! P
lease add missed dependency!
at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)
[...]
However, the Javassist package is clearly visible in the web classpath (/WEB-INF/lib direcotry) among all the other Struts-related libraries, I can also browse its packages and classes. I also put it in the CLASSPATH library and in Weblogic initializaion parameters but nothing works. I don't know what to think. Is this a Struts 2/Weblogic integration bug?
Even weirder is the fact that initially I managed to make Struts 2 work. Then for some reason (I don't really know what for) it stopped and I can't get rid of that error.
Thanks for your help.
Often solutions come when all hope is lost. Apparently all I had to do was moving all Struts libraries (including Javassist) to the /lib directory of the parent EAR project. This sounds weird to me, but it works and I'm sticking with the solution.
I'm not very familiar with Weblogic and Enterprise apps in general, so it didn't came to mind readily that the server treats the EAR as the base context and not the contained WAR.