Erro mostrado no GlasshFish 4.1.1:
Fiz algumas alterações e agora obtenho essas pilha:
> Warning: A system exception occurred during an invocation on EJB AlunoController, method: public void br.edu.exemplojsf.controller.BaseController.salvarRegistro(javax.faces.event.ActionEvent)
> Warning: javax.ejb.EJBException
> at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:752)
> at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:702)
> at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:507)
> at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
> at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
> at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
> at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
> at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
> at com.sun.proxy.$Proxy196.salvarRegistro(Unknown Source)
> at br.edu.exemplojsf.controller.__EJB31_Generated__AlunoController__Intf____Bean__.salvarRegistro(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:434)
> at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
> at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
> at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:67)
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
> at br.edu.exemplojsf.controller.AlunoController$Proxy$_$$_Weld$EnterpriseProxy$.salvarRegistro(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at javax.el.ELUtil.invokeMethod(ELUtil.java:332)
> at javax.el.BeanELResolver.invoke(BeanELResolver.java:537)
> at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
> at com.sun.el.parser.AstValue.invoke(AstValue.java:283)
> at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
> at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
> at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
> at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
> at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:147)
> at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
> at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:814)
> at javax.faces.component.UICommand.broadcast(UICommand.java:300)
> at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
> 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:198)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
> at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.ClassCastException: br.edu.exemplojsf.entidades.Aluno cannot be cast to br.edu.exemplojsf.entidades.InterfaceEntidades
> at br.edu.exemplojsf.controller.BaseController.salvarRegistro(BaseController.java:145)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
> at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
> at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
> at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
> at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
> at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
> at
> Warning: /index.xhtml @32,143 actionListener="#{alunoController.salvarRegistro(event)}": javax.ejb.EJBException
> javax.el.ELException: /index.xhtml @32,143 actionListener="#{alunoController.salvarRegistro(event)}": javax.ejb.EJBException
> at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
> at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:147)
> at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
> at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:814)
> at javax.faces.component.UICommand.broadcast(UICommand.java:300)
> at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
> 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:198)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
> at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: javax.ejb.EJBException
> at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:752)
> at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:702)
> at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:507)
> at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
> at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
> at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
> at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
> at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
> at com.sun.proxy.$Proxy196.salvarRegistro(Unknown Source)
> at br.edu.exemplojsf.controller.__EJB31_Generated__AlunoController__Intf____Bean__.salvarRegistro(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:434)
> at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
> at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
> at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:67)
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
> at br.edu.exemplojsf.controller.AlunoController$Proxy$_$$_Weld$EnterpriseProxy$.salvarRegistro(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at javax.el.ELUtil.invokeMethod(ELUtil.java:332)
> at javax.el.BeanELResolver.invoke(BeanELResolver.java:537)
> at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
> at com.sun.el.parser.AstValue.invoke(AstValue.java:283)
> at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
> at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
> at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
> at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
> ... 38 more