YAWL resourceService deployment on websphere - websphere-7

Has anyone yet deployed YAWL resourceService on Websphere 7 or 8. We are trying to do the same, but it gives JSF error after entering the credentials. It seems the IBM websphere implementation for JSF is not compatible with the one used by resourceService. Can someone throw light on how to force WebSphere to use JSF implementation bundled within the application itself and not to use its own.
Here is the exception stack trace, I am getting.
[9/24/12 15:56:05:138 IST] 00000015 lifecycle E JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: "") Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl#3b803b8]
[9/24/12 15:56:05:143 IST] 00000015 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet Faces Servlet in application resourceService_war. Exception created : javax.servlet.ServletException: Array index out of range: 4
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1384)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at org.yawlfoundation.yawl.resourcing.jsf.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:71)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at org.yawlfoundation.yawl.util.CharsetFilter.doFilter(CharsetFilter.java:52)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:785)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1167)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1171)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1171)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1171)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1171)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1171)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1171)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1171)
at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:205)
at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:334)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:337)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:176)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 35 more

websphere by default provides JSF1.2 implementation.
In the case described, you can configure your application to use the version of JSF provided inside the application.
I guess THIS is what you are looking for.
Please follow the instructions in the above document to configure your server to take jsf from application.

Curious mind,
Please try changing the state saving mode to client side by changing the attribute in web.xml (STATE_SAVING_METHOD).

Related

IBM HTTP Server is showing HTTP 1.1 500 status in logs

I am new to IBM HTTP Server and Websphere commerce. I am trying to access our application, but access.log file is showing "HTTP 1.1 500" status code. When I checked the systemout.log for WAS Console, It is showing below error:
webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[Stores Request Servlet]: java.lang.NoClassDefFoundError: com.ibm.commerce.seo.url.helpers.SEOURLMapperSource (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
at com.ibm.commerce.webcontroller.RuntimeServletFilter.init(RuntimeServletFilter.java:151)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:548)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:462)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:319)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:379)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:860)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:935)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:503)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3954)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:942)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
I checked for SEOURLMappersource class, and it is there in SEO-BaseComponentLogic.jar, which is already present in my wc.ear and other relevent classes to SEO are present in SEO-BaseComponentLogic-FEP.jar.
Please guide me for the error.
The (initialization failure) means that a class failed initialization. There should be a Caused by explaining that problem, but if there's not, search the logs for SEOURLMapperSource.<clinit> to find the underlying problem. If that doesn't yield any results either, then wrap your static{} block in a try{}catch{} to print the real problem (and don't forget to move any static ... = ... initializations into the static{} block as well).
I ran into the same problem described by this WC stack exception. I found out that on our system the owner/group for the related jar files was not set for the wc user but for the root user. Thus even though the class/jar present, it was not read due to permissions. This initialization exception went away after chown/chgrp and a restart.

How to localize JSF composite component?

I'm having trouble localizing a composite component (Mojarra 2.2, Glassfish 4.0).
I tried BalusC's solution here to put the properties file in the same directory as the composite component with the same file name as the composite component and a .properties extension -- that works to externalize the strings from the composite component's definition.
But when I want to localize the strings (by adding _en suffix to the property file's filename) I get this error (only thing changed is the name of the properties file):
[2013-08-08T13:49:04.234-0500] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=24 _ThreadName=http-listener-1(5)] [timeMillis: 1375987744234] [levelValue: 900] [[
StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at javax.faces.component.UIComponent.findComponentResourceBundleLocaleMatch(UIComponent.java:1204)
at javax.faces.component.UIComponent.getResourceBundleMap(UIComponent.java:1007)
at sun.reflect.GeneratedMethodAccessor1226.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:227)
at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)
at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:115)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
...
I read an article (post from 24/Aug/12 03:50 PM) that JSF localizes differently than standard Java and that the properties files would go in resources/en/<library>/<component>.properties, so I put mycomp.properties there and got the error again.
My default locale is actually "en_US" -- I tried that as well with the same results.
So, this works:
resources/lib/mycomp.xhtml, resources/lib/mycomp.properties
These don't work:
resources/lib/mycomp.xhtml, resources/lib/mycomp_en.properties
resources/lib/mycomp.xhtml, resources/en/lib/mycomp.properties
What am I doing wrong?
I can reproduce your problem. This is quite embarrassing. Apparently something changed related to this in a newer Mojarra version. I can't get both the old and new approach to work in 2.2.0.
I peeked in the Mojarra source code again, starting at UIComponent#getResourceBundleMap(), and I learned that the resource bundle is first searched based on the FQN of the component's class. We could easily make use of it.
If not already done, first create a backing component class:
package com.example.composite;
#FacesComponent("myComposite")
public class MyComposite extends UINamingContainer {
// Can be kept empty.
}
And declare it in the composite component definition:
<cc:interface componentType="myComposite">
Then, you can simply put the MyComposite.properties, MyComposite_en.properties, etc in the very same com.example.composite package. It worked for me.

can not find org.apache.myfaces.el.ValueBindingImpl class in myfaces-impl 2.1.6

I am working on a jsf migration project. In the process of migration to jsf 2.0, I have replaced myfaces-api-1.1.5 and myfaces-impl1.1.5 with myfaces-impl(2.1.6). I got the following Exception.
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
Caused by: java.lang.NoClassDefFoundError: org/apache/myfaces/el/ValueBindingImpl
at java.lang.Class.getDeclaredConstructors0(Native Method) [:1.6.0_22]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) [:1.6.0_22]
at java.lang.Class.getConstructor0(Class.java:2699) [:1.6.0_22]
at java.lang.Class.getConstructor(Class.java:1657) [:1.6.0_22]
at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:105)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.myfaces.el.ValueBindingImpl from [Module "deployment.ASSET.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
... 11 more
When I try to find out ValueBindingImpl in the jar files, I am not able to find org.apache.myfaces.el.ValueBindingImpl in the myfaces-impl(2.1.6).. Is there any alternative?
It seems that your code is using MyFaces 1.1 specific implementation classes instead of the JSF 1.1 API classes. For example,
ValueBinding binding = new ValueBindingImpl(...);
instead of
ValueBinding binding = application.createValueBinding(...);
You'd need to fix the code to remove MyFaces 1.1 specific implementation classes.
Note that ValueBinding is deprecated since JSF 1.2, if you can, replace by ValueExpression.

Null Pointer Exception JSF

I'm getting a Null Pointer Exception when using my web app.
This exception is thrown at the login page. I enter both username and pass but it seems that the value or the evaluation of the expression #{userBean.user} or #{userBean.pass} is returning null.
My configuration: Apache Tomcat 7.0.22, Mojarra 2.1.6, RichFaces 4.1
Here's the stacktrace
javax.faces.el.EvaluationException: java.lang.NullPointerException
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1824)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at mx.gob.sagarpa.utilidades.Database.checkUser(Database.java:61)
at mx.gob.sagarpa.beans.UserBean.doLogin(UserBean.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.el.parser.AstValue.invoke(AstValue.java:262)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 24 more
What can I do?
You need to head to the bottomost "Caused by" part of the stacktrace for the real root cause. In your particular case that is the following:
Caused by: java.lang.NullPointerException
at mx.gob.sagarpa.utilidades.Database.checkUser(Database.java:61)
You see, at line 61 of Database class, inside the checkUser() method, some object reference is null while the code is accessing it by the period operator ..
someObject = null;
someObject.doSomething(); // NullPointerException!
To fix it, you'd need to either add a nullcheck
if (someObject != null) {
someObject.doSomething();
} else {
// Take alternate path?
}
or to make sure that it's never null
someObject = createItSomehow();
someObject.doSomething(); // Okay.
Which path to take depends on the concrete functional requirement which is not clear from the question. But you should now at least understand why a NullPointerException can occur. This is also explained in its javadoc (which should be the #1 source for finding information about classes, including exceptions):
Thrown when an application attempts to use null in a case where an object is required. These include:
Calling the instance method of a null object.
Accessing or modifying the field of a null object.
Taking the length of null as if it were an array.
Accessing or modifying the slots of null as if it were an array.
Throwing null as if it were a Throwable value.
Applications should throw instances of this class to indicate other illegal uses of the null object.
That said, this problem is not exactly related to JSF. It's just basic Java. I'd suggest to take some time to go through a decent basic Java book/tutorial.

JSF CRUD application and entities

I'm writing an administration part of the application which is responsible for CRUD operations. I decided to generate the jsf pages from the jpa entities but for some reason I keep getting this error:
org.apache.jasper.el.JspELException: /busStop/List.jsp(18,12) '#{busStop.pagingInfo.itemCount == 0}' Error reading 'pagingInfo' on type jsf.BusStopController
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:107)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:416)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1607)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:420)
at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:209)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: The type [null] is not the expected [EntityType] for the key class [class jpa.entities.BusStop].
at org.eclipse.persistence.internal.jpa.metamodel.MetamodelImpl.entity(MetamodelImpl.java:152)
at org.eclipse.persistence.internal.jpa.querydef.AbstractQueryImpl.from(AbstractQueryImpl.java:97)
at jpa.controllers.BusStopJpaController.getBusStopCount(BusStopJpaController.java:255)
at jsf.BusStopController.getPagingInfo(BusStopController.java:43)
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:597)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
at org.apache.el.parser.AstEqual.getValue(AstEqual.java:37)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
For the moment, the whole code is generated in Netbeans 6.9, using JSF 1.2 or 2.0 and postgresql 8.4 database. Is there any solution to that problem?
#{busStop.pagingInfo.itemCount == 0}
Error reading 'pagingInfo' on type jsf.BusStopController
The type [null] is not the expected [EntityType] for the key class [class jpa.entities.BusStop].
Summarized: #{busStop} is null. Make sure that it's in the desired scope.
The workarond for DI 101 and bug #338837 to fix the IAE issue for Criteria/Metamodel users attempting to use an EntityType that is not found is to specify the location of the classes (usually not required for Java EE environments)
This environment will exist in Java SE, Spring and certain implementations of Java EE 6 Web Profile.
Exception in thread "main" java.lang.IllegalArgumentException: The type [null] is not the expected [EntityType] for the key class [class org.eclipse.persistence.example.distributed.collatz.model.UnitOfWork].
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_101:_20100218:_Descriptor.javaClass_is_null_on_a_container_EM_for_a_specific_case
workaround is
http://bugs.eclipse.org/338837
<exclude-unlisted-classes>false</exclude-unlisted-classes>
or
<class>org.eclipse.persistence.example.distributed.collatz.model.UnitOfWork</class>

Resources