Bom dia a todos…
Alguem pode me ajudar com este erro, o que estou fazendo de errado alguem pode em dar uma força.
Segue o erro.
12/09/2011 08:27:54 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files\Intel\DMIX;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;C:\Program Files\Windows Live\Shared;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files\Roxio\OEM\AudioCore\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\eclipse;
12/09/2011 08:27:54 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVISO: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:Museu' did not find a matching property.
12/09/2011 08:27:54 org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
12/09/2011 08:27:54 org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
12/09/2011 08:27:54 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 502 ms
12/09/2011 08:27:54 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
12/09/2011 08:27:54 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
12/09/2011 08:27:54 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
12/09/2011 08:27:55 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: /struts-tags is already defined
log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
12/09/2011 08:27:55 org.apache.catalina.core.StandardContext filterStart
GRAVE: Exception starting filter struts2
Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/Program%20Files/apache-tomcat-7.0.12/wtpwebapps/Museu/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:209)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4562)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5240)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5235)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/Program%20Files/apache-tomcat-7.0.12/wtpwebapps/Museu/WEB-INF/lib/struts2-core-2.0.6.jar!/struts-default.xml:8:69 - bean - jar:file:/C:/Program%20Files/apache-tomcat-7.0.12/wtpwebapps/Museu/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:194)
... 18 more
12/09/2011 08:27:55 org.apache.catalina.core.StandardContext startInternal
GRAVE: Error filterStart
12/09/2011 08:27:55 org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/Museu] startup failed due to previous errors
12/09/2011 08:27:55 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/Museu] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
12/09/2011 08:27:55 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/Museu] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
12/09/2011 08:27:55 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
12/09/2011 08:27:55 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
12/09/2011 08:27:55 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
12/09/2011 08:27:55 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
12/09/2011 08:27:55 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
12/09/2011 08:27:56 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
12/09/2011 08:27:56 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
12/09/2011 08:27:56 org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
12/09/2011 08:27:56 org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
12/09/2011 08:27:56 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1574 ms
Segue a Action
[code]package br.com.Museu.usuarios.action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Action;
import br.com.Museu.Dao.Bancos.UsuarioDAO;
import br.com.Museu.dados.usuarios;
public class AdicionaUsuariosAction {
private usuarios adicionausuario;
@Action(value="adicionarusuario",results={
@Result(name="OK",location="/index.jsp")
})
public String execute(){
new UsuarioDAO().inserirUsuario(adicionausuario);
return "OK";
}
public usuarios getusuario(){
return this.adicionausuario;
}
public void setusuario(usuarios adicionausuario){
this.adicionausuario = adicionausuario;
}
}[/code]
Segue pagina jsp.
[code]<%@ page language=“java” contentType=“text/html; charset=ISO-8859-1”
pageEncoding=“ISO-8859-1”%>
<%@ taglib prefix=“s” uri="/struts-tags"%>
<%@ taglib uri=“http://java.sun.com/jstl/core” prefix=“c”%>
<!DOCTYPE HTNL PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<s:head theme=“ajax” debug=“true” />
<link href=“main.css” rel=“stylesheet” type=“text/css” />
<meta http-equiv=“Content-Type” content=“text/html; charset=ISO-8859-1”>
<title>Museu do Computador</title>
</head>
<body>
<div align=“center”>
<table width=“200” border=“0” align=“center”>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
</div>
<hr />
<h3>Adicionar Usuário</h3>
<tr>
<div id=“cadastro”>
<form name=“adicionarusuario” method=“post” >
<label for="iduusuario"></label> N°: <label for="textfield8"></label> <input name="testecalt" type="text" id="textfield8" size="20" />
Nome: <label for="textedepartamento"></label> <input name="textenome" type="text" id="textfield3" size="106" />
Telefone: <label for="textfield10"></label> <input type="text" name="textetelefone" id="textfield10" /> Endereço: <input name="texteendereco" type="text" id="textfield11" size="68" />
Numero: <label for="textfield15"></label> <input name="textenumero" type="text" id="textfield15" accesskey="10" size="10" /> CEP: <label for="textfield16"></label> <input name="textecep" type="text" id="textfield16" size="15" /> Estado: <select name="jumpestado" id="jumpestado" onchange="MM_jumpMenu('parent',this,0)"> <option>São Paulo</option> <option>Minas Gerais</option> <option>Mato Grosso do Sul</option> <option>Mato Grosso</option> <option>Piaui</option> <option>Distrito Federal</option> </select> Bairro: <label for="textfield14"></label> <input name="textebairro" type="text" id="textfield14" size="20" />
idUsuario: <label for="texteendereco"></label> <input type="text" name="iduusuario" id="textfield4" /> Senha: <label for="textfield7"></label> <input type="password" name="textsenha" id="textfield7" /> Departemento: <label for="textecep"></label> <input type="text" name="textedepartamento" id="textfield5" />
Função: <select name="jumpfuncao" id="jumpfuncao" onchange="MM_jumpMenu('parent',this,0)"> <option>Programador</option> <option>Analista Programador</option> </select> Status: <select name="jumpstatus" id="jumpstatus" onchange="MM_jumpMenu('parent',this,0)"> <option>Admitido</option> <option>Demitido</option> </select> Permição: <select name="jumppermicao" id="jumppermicao" onchange="MM_jumpMenu('parent',this,0)"> <option>Administrador</option> <option>Usuario</option> </select>
<input type="submit" name="usuario.novo" id="usuario.novo" value="Salvar Novo" /> <input type="submit" name="usuario.alterar" id="usuario.alterar" value="Alterar Usuario" /> <input type="submit" name="usuario.deletar" id="usuario.deletar" value="Deletar usuario" />
</form> </td> </tr> </div><c:import url="rodape.jsp" /> </body> </html>[/code]
Segue a DAO.
[code]public class UsuarioDAO {
private Connection connection;
public UsuarioDAO (){
this.connection = new ConnectionFactory().getConnection();
}
public void inserirUsuario(usuarios usuariosdados){
String sql = “insert into usuarios (bairro, cp, cidade, data, endereco, estado, funcao, log, nome, numero, permicao, senha,” +
" status, telefone, usuario, idusuario) values (?,?,?,?,?,?,?,?,?,?,?,?,?," +
“?,?,?)”;
try {
PreparedStatement stmt = this.connection.prepareStatement(sql);
stmt.setString(1, usuariosdados.getBairroUsuario());
stmt.setString(2, usuariosdados.getCepUsuario());
stmt.setString(3, usuariosdados.getCidadeUsuario());
stmt.setString(4, usuariosdados.getDataCadastroUsuario());
stmt.setString(5, usuariosdados.getEnderecoUsuario());
stmt.setString(6, usuariosdados.getEstadoUsuario());
stmt.setString(7, usuariosdados.getFuncao());
stmt.setString(8, usuariosdados.getLogUsuario());
stmt.setString(9, usuariosdados.getNomeUsuario());
stmt.setString(10, usuariosdados.getNumeroUsuario());
stmt.setString(11, usuariosdados.getPermissaoUsuario());
stmt.setString(12, usuariosdados.getSenhaUsuario());
stmt.setString(13, usuariosdados.getStatusUsuario());
stmt.setString(14, usuariosdados.getTelefone());
stmt.setString(15, usuariosdados.getUsuario());
stmt.setString(16, usuariosdados.getIdUsuario());
stmt.execute();
stmt.close();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}[/code]
Estou precisando de ajuda.
Desde já muito agradecido pele colaboração.