dentro de minha intranet faço uma captura do banco de dados SqlServer para mostrar o ponto biometrico dos funcionáros em uma página, Isso já funciona. Agora preciso fazer uma outra busca para mostrar um outro ponto que foi corrigido, só que acessando uma base do Firebird. no SqlServer eu faço assim como mostra abaixo, mas no firebird não estou conseguindo pois o problema esta sendo no sql. Alguem pode me ajudar?
[code]public Collection<LogPontoCorrigido> selectPontoByFuncCorrigido(String mat, String dI, String dF) {
try {
this.sql = "SELECT CAST(PPONFPTO.DFPILDATA AS VARCHAR(10)), PPONFPTO.DFPILHORA" +
" FROM PPONFPTO" +
" WHERE PPONFPTO.DFFUNCRACHA = ? " +
" AND PPONFPTO.DFPILDATA <= ? AND PPONFPTO.DFPILDATA <= ? " +
" ORDER BY DFPILDATA DESC";
System.out.println("---------------->" + sql);
String mat1 = "";
mat1 += "00000000000"+mat;
this.ps = con.prepareStatement(sql);
this.ps.setString(1, mat1);
this.ps.setString(2, dI);
this.ps.setString(3, dF);
rs = this.ps.executeQuery();
List<LogPontoCorrigido> list1 = new ArrayList<LogPontoCorrigido>();
while (rs.next()) {
LogPontoCorrigido lponto = new LogPontoCorrigido();
lponto.setDt(rs.getString("CAST"));
lponto.setHr(rs.getInt("DFPILHORA"));
list1.add(lponto);
}
Collections.reverse(list1);
return list1;
} catch (Exception ex) {
System.out.println(ex.getMessage());
return null;
} finally {
ForpontoCon.close(con, ps, rs);
}
}
[/code]
[size=18]Erro[/size][b]
Conexão estabelicida com Sucesso - ForPonto
---------------->SELECT CAST(PPONFPTO.DFPILDATA AS VARCHAR(10)), PPONFPTO.DFPILHORA FROM PPONFPTO WHERE PPONFPTO.DFFUNCRACHA = ? AND PPONFPTO.DFPILDATA <= ? AND PPONFPTO.DFPILDATA <= ? ORDER BY DFPILDATA DESC
null
12/01/2010 11:46:51 com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/ui/pontoCorrigido.xhtml]
javax.faces.FacesException: javax.el.ELException: /ui/pontoCorrigido.xhtml @101,51 value="#{pontoCorrigidoController.pontoByFuncCorrigido}": Error reading 'pontoByFuncCorrigido' on type br.com.scp.intranet.controller.PontoCorrigidoController
at javax.faces.component.UIData.getValue(UIData.java:612)
at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1644)
at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:65)
at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:59)
at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:125)
at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)
at org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339)
at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:124)
at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:206)
at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:194)
at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
at javax.faces.component.UIData.encodeBegin(UIData.java:962)
at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1220)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:232)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:239)
at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:180)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:127)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:285)
at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:280)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:112)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
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:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.el.ELException: /ui/pontoCorrigido.xhtml @101,51 value="#{pontoCorrigidoController.pontoByFuncCorrigido}": Error reading 'pontoByFuncCorrigido' on type br.com.scp.intranet.controller.PontoCorrigidoController
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
at javax.faces.component.UIData.getValue(UIData.java:609)
... 63 more
Caused by: java.lang.NullPointerException
at br.com.scp.intranet.controller.PontoCorrigidoController.getLinhasEspelhoCorrigido(PontoCorrigidoController.java:55)
at br.com.scp.intranet.controller.PontoCorrigidoController.getPontoByFuncCorrigido(PontoCorrigidoController.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:118)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
... 64 more