Problema ao gerar um war e executar no TomCat

Bom dia pessoal, eu fiz um pequenino projeto no eclipse. Na minha máquina local, ele roda perfeitamente, com o tomcat local. A versão do tomcat local da minha máquina é a mesma do servidor que eu tento jogar. Quando eu exportei o projeto para *.war e joguei o arquivo dentro do servidor de aplicação num servidor linux. Aparece alguns erros.
Aqui estão:


An Error Occurred:
javax.el.ELException: /pages/grafico.xhtml @66,63 value="#{procurarRelatorio.listarTodos}": Error reading 'listarTodos' on type br.gov.ce.srh.grafico.bean.ProcurarRelatorio
+- Stack Trace

javax.faces.FacesException: javax.el.ELException: /pages/grafico.xhtml @66,63 value="#{procurarRelatorio.listarTodos}": Error reading 'listarTodos' on type br.gov.ce.srh.grafico.bean.ProcurarRelatorio
	at javax.faces.component.UISelectItems.getValue(UISelectItems.java:144)
	at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:283)
	at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:783)
	at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:280)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
	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.BaseFilter.doFilter(BaseFilter.java:532)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
	at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
	at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
	at org.apache.jsp.index_jsp._jspService(index_jsp.java:61)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	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:175)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.el.ELException: /pages/grafico.xhtml @66,63 value="#{procurarRelatorio.listarTodos}": Error reading 'listarTodos' on type grafico.bean.ProcurarRelatorio
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
	at javax.faces.component.UISelectItems.getValue(UISelectItems.java:141)
	... 53 more
Caused by: java.lang.NullPointerException
	at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
	at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at br.gov.ce.srh.grafico.util.DataBaseUtil.getConnection(DataBaseUtil.java:33)
	at br.gov.ce.srh.grafico.util.DataBaseUtil.getStatement(DataBaseUtil.java:51)
	at br.gov.ce.srh.grafico.dao.MaterialDAO.listarTodos(MaterialDAO.java:48)
	at br.gov.ce.srh.grafico.bean.ProcurarRelatorio.listarMateriais(ProcurarRelatorio.java:43)
	at br.gov.ce.srh.grafico.bean.ProcurarRelatorio.getListarTodos(ProcurarRelatorio.java:93)
	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:53)
	at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
	at org.apache.el.parser.AstValue.getValue(AstValue.java:114)
	at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
	... 54 more

+- Component Tree

<AjaxViewRoot id="_viewRoot" immediate="false" locale="pt_BR" renderKitId="HTML_BASIC" renderRegionOnly="false" rendered="true" selfRendered="false" submitted="false" transient="false" viewId="/pages/grafico.xhtml">

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Gerar Gráfico Consumo</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script language="javascript" type="text/javascript"> function formatar_mascara(src, mascara) { var campo = src.value.length; var saida = mascara.substring(0,1); var texto = mascara.substring(campo); if(texto.substring(0,1) != saida) { src.value += texto.substring(0,1); } } </script> <style> #topo {background:url(/GraficoMaterial/pages/images/grafico_r1_c1.jpg) no-repeat; width:auto; height:88px; background-position:center; } #conteudo {background:url(/GraficoMaterial/pages/images/conteudo-fundo.jpg) no-repeat; width:auto; height:280px; background-position:center; text-align:center; } #rodape {background:url(/GraficoMaterial/pages/images/grafico2_r7_c1.jpg) no-repeat; width:auto; height:75px; background-position:center; } td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; text-align:left; height:58px; } table { position: absolute; left: 360px; } </style> </head>

    <body>

    <HtmlForm enctype="application/x-www-form-urlencoded" id="j_id3" prependId="true" rendered="true" submitted="false" transient="false">

        &lt;center&gt;<img />&lt;/center&gt; &lt;hr/&gt; &lt;div id="topo"/&gt; &lt;div id="conteudo"&gt; &lt;table width="544" border="0"&gt; &lt;tr&gt; &lt;td width="135"&gt;&lt;strong&gt;Nome do Material:&lt;/strong&gt;&lt;/td&gt; &lt;td width="399"&gt;

        &lt;HtmlSelectOneMenu disabled="false" id="j_id5" immediate="false" localValueSet="false" readonly="false" rendered="true" required="false" transient="false" valid="true"&gt;

            &lt;UISelectItem id="j_id6" itemDisabled="false" itemEscaped="true" itemLabel="" rendered="true" transient="false"/&gt;

            &lt;UISelectItems id="j_id7" rendered="true" transient="false"/&gt;

        &lt;/HtmlSelectOneMenu&gt;

        &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Data Inicial: &lt;/strong&gt;&lt;/td&gt; &lt;td&gt;

        &lt;HtmlInputText disabled="false" id="j_id9" immediate="false" localValueSet="false" maxlength="10" onkeypress="javascript:formatar_mascara(this, '##/##/####');" readonly="false" rendered="true" required="false" size="10" transient="false" valid="true"/&gt;

        &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Data Final: &lt;/strong&gt;&lt;/td&gt; &lt;td&gt;

        &lt;HtmlInputText disabled="false" id="j_id11" immediate="false" localValueSet="false" maxlength="10" onkeypress="javascript:formatar_mascara(this, '##/##/####');" readonly="false" rendered="true" required="false" size="10" transient="false" valid="true"/&gt;

        &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Nome do Arquivo: &lt;/strong&gt;&lt;/td&gt; &lt;td&gt;

        &lt;HtmlInputText disabled="false" id="j_id13" immediate="false" localValueSet="false" maxlength="-2147483648" readonly="false" rendered="true" required="false" size="-2147483648" transient="false" valid="true"/&gt;

        &lt;HtmlCommandButton action="#{procurarRelatorio.GerarGrafico}" actionExpression="#{procurarRelatorio.GerarGrafico}" disabled="false" id="j_id14" immediate="false" readonly="false" rendered="true" transient="false" type="submit" value="Gerar Grafico"/&gt;

        &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;div id="rodape"/&gt;

    &lt;/HtmlForm&gt;

    &lt;/body&gt;

    &lt;/html&gt;

&lt;/AjaxViewRoot&gt;

+- Scoped Variables
Request ParametersName	Value
None
Request AttributesName	Value
ajaxContext	org.ajax4jsf.context.AjaxContextImpl@11dc21
procurarRelatorio	br.gov.ce.srh.grafico.bean.ProcurarRelatorio@8b02c5
Session AttributesName	Value
None
Application AttributesName	Value
None
06/01/2010 08:49:46 - Generated by Facelets

… aqui está meu web.xml


&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
 &lt;description&gt;Facelets StarterKit&lt;/description&gt;
 &lt;display-name&gt;GraficoMaterial&lt;/display-name&gt;

 
 &lt;!-- RichFaces Config --&gt;
 &lt;context-param&gt;	
		&lt;param-name&gt;org.richfaces.SKIN&lt;/param-name&gt;
		&lt;param-value&gt;emeraldTown&lt;/param-value&gt;
		&lt;!-- &lt;param-value&gt;classic&lt;/param-value&gt;  --&gt;
		&lt;!-- &lt;param-value&gt;blueSky&lt;/param-value&gt; --&gt;
		&lt;!-- &lt;param-value&gt;ruby&lt;/param-value&gt; --&gt;
		&lt;!-- &lt;param-value&gt;wine&lt;/param-value&gt; --&gt;
		&lt;!-- &lt;param-value&gt;deepMarine&lt;/param-value&gt; --&gt;
		&lt;!-- &lt;param-value&gt;japanCherry&lt;/param-value&gt; --&gt;
		&lt;!-- &lt;param-value&gt;plain&lt;/param-value&gt; --&gt;
	&lt;/context-param&gt;

	&lt;context-param&gt;
		&lt;param-name&gt;org.richfaces.CONTROL_SKINNING&lt;/param-name&gt;
		&lt;param-value&gt;enable&lt;/param-value&gt;
	&lt;/context-param&gt;

	&lt;filter&gt;
		&lt;display-name&gt;RichFaces Filter&lt;/display-name&gt;
		&lt;filter-name&gt;richfaces&lt;/filter-name&gt;
		&lt;filter-class&gt;org.ajax4jsf.Filter&lt;/filter-class&gt;
	&lt;/filter&gt;
	&lt;filter-mapping&gt;
		&lt;filter-name&gt;richfaces&lt;/filter-name&gt;
		&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
		&lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
		&lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
		&lt;dispatcher&gt;INCLUDE&lt;/dispatcher&gt;
	&lt;/filter-mapping&gt;

	&lt;context-param&gt;
		&lt;param-name&gt;org.ajax4jsf.SKIN&lt;/param-name&gt;
		&lt;param-value&gt;classic&lt;/param-value&gt;
	&lt;/context-param&gt;
	&lt;filter&gt;
		&lt;display-name&gt;Ajax4jsf Filter&lt;/display-name&gt;
		&lt;filter-name&gt;ajax4jsf&lt;/filter-name&gt;
		&lt;filter-class&gt;org.ajax4jsf.Filter&lt;/filter-class&gt;
	&lt;/filter&gt;
	&lt;filter-mapping&gt;
		&lt;filter-name&gt;ajax4jsf&lt;/filter-name&gt;
		&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
		&lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
		&lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
		&lt;dispatcher&gt;INCLUDE&lt;/dispatcher&gt;
	&lt;/filter-mapping&gt;

  &lt;context-param&gt;
 
  &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;
  &lt;param-value&gt;.xhtml&lt;/param-value&gt;
 &lt;/context-param&gt;
 &lt;context-param&gt;
  &lt;param-name&gt;facelets.REFRESH_PERIOD&lt;/param-name&gt;
  &lt;param-value&gt;2&lt;/param-value&gt;
 &lt;/context-param&gt;
 &lt;context-param&gt;
  &lt;param-name&gt;facelets.DEVELOPMENT&lt;/param-name&gt;
  &lt;param-value&gt;true&lt;/param-value&gt;
 &lt;/context-param&gt;
 &lt;context-param&gt;
  &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
  &lt;param-value&gt;client&lt;/param-value&gt;
 &lt;/context-param&gt;
 &lt;context-param&gt;
  &lt;param-name&gt;com.sun.faces.validateXml&lt;/param-name&gt;
  &lt;param-value&gt;true&lt;/param-value&gt;
 &lt;/context-param&gt;
 &lt;context-param&gt;
  &lt;param-name&gt;com.sun.faces.verifyObjects&lt;/param-name&gt;
  &lt;param-value&gt;true&lt;/param-value&gt;
 &lt;/context-param&gt;
 &lt;servlet&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
 &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
 &lt;/servlet-mapping&gt;
 &lt;login-config&gt;
  &lt;auth-method&gt;BASIC&lt;/auth-method&gt;
 &lt;/login-config&gt;
&lt;/web-app&gt;

fiz uma simples classe de conexao aqui …


public class Conexao {

    
    private static String NAME   = "sun.jdbc.odbc.JdbcOdbcDriver";  
    private static String URL   = "jdbc:odbc://172.31.128.23:1433/SistemasAccess/Controle de Materiais SRH-MATControle de Materiais SRH-MAT_be;";  
    private static String LOGIN   = "";  
    private static String PASS   = "";  
	
	public Conexao() {
		
	}
	
	    /** 
	     *  
	     * @return Conexao 
	     * @throws SQLException 
	     * @throws IOException 
	     */  
	    public static Connection connect() throws SQLException, IOException {  
	         
	       Connection con = null;  
	         
	       try {  
	          Class.forName(NAME);  
	          con   = DriverManager.getConnection(URL, LOGIN, PASS);  
	       } catch (ClassNotFoundException e) {  
	          System.out.print("\nNão foi possível estabelecer conexão com a base de dados.\n");  
	          e.printStackTrace();  
	          return null;  
	       }  
	       return con;  
	    }  
	  

}

Bom, pelo que vejo é erro com facelets, ou algo do tipo como web.xml … mas n consegui resolver… alguém teria alguma dica ?

private static String URL = "jdbc:odbc://172.31.128.23:1433/SistemasAccess/Controle de Materiais SRH-MATControle de Materiais SRH-MAT_be;";

Tem certeza que está correto?

Bom, como eu te expliquei, na minha maquina funciona, ou seja, tanto minha maquina quanto o servidor linux estão em rede. É para funcionar da mesma forma que funfa aqui na minha maquina. A diferença é que, a minha máquina é windows, e o servidor é linux.

Veja a exceção:

[code]# Caused by: java.lang.NullPointerException

at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)

at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)

at java.sql.DriverManager.getConnection(DriverManager.java:582) [/code]

Verifique se o driver de conexão está no servidor, se as portas utilizadas estão abertas, firewall e outros detalhes.

Temos outros aplicativos aqui que rodam dentro desse servidor sem se preocupar com os acessos, firewall e etc… e os demais projetos funcionam normalmente…

Bem, erro ne NPE na maioria das vezes são de programadores, então tente debugar a sua aplicação para tentar descobrir o erro.

Já descobri o motivo do erro. Só não sei como solucionar ainda.

O problema é porque o servidor é linux e eu estou tentando acessar arquivo do tipo *mdb, ou seja, access. Isso significa que, para que eu consiga tal feito, eu preciso criar uma fonte de dados no linux. Bem, isso no windows é muito simples, todos nós sabemos, mas e no linux ? Eu ouvi falar num tal de mdbtools. No qual faz com que o linux enxergue arquivos access dentro dele e possa trabalhar com sua base de dados.

Alguém teria algo para me indicar ?