Continuou a mesma coisa, mudei a conexão do banco para SQL Server, segue novo código.
package connection;
import java.sql.Connection;
import java.sql.DriverManager;
//Responsável por fazer a conexão com o banco de dados
public class SingleConnection {
private static String banco = "jdbc:sqlserver://localhost:1433/CONSULTORIO?autoReconnect=true";
private static String password="32313099";
private static String user = "sa";
private static Connection connection =null;
static {
conectar();
}
public SingleConnection(){
conectar();
}
private static void conectar(){
try{
if(connection == null)// se for null faz a conexao se não retornar a conexao que já existe
{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
connection = DriverManager.getConnection(banco,user,password);
connection.setAutoCommit(false); // Não permitir commitar automaticamente
}
{
}
}catch(Exception e){
throw new RuntimeException("Erro ao Conectar com o banco de dados" + e);
}
}
public static Connection getConnection(){
return connection;
}
}
mai 24, 2017 11:48:21 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:ProjetoFinal’ did not find a matching property.
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version: Apache Tomcat/8.0.32
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built: Feb 2 2016 19:34:53 UTC
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server number: 8.0.32.0
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name: Windows 7
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version: 6.1
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture: x86
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Java Home: C:\Program Files (x86)\Java\jre1.8.0_121
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version: 1.8.0_121-b13
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor: Oracle Corporation
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE: C:\apache-tomcat-8.0.32
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME: C:\apache-tomcat-8.0.32
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=C:\apache-tomcat-8.0.32
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\apache-tomcat-8.0.32
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=C:\apache-tomcat-8.0.32\wtpwebapps
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\apache-tomcat-8.0.32\endorsed
mai 24, 2017 11:48:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252
mai 24, 2017 11:48:21 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: 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 (x86)\Java\jre1.8.0_121\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre1.8.0_121/bin/client;C:/Program Files (x86)/Java/jre1.8.0_121/bin;C:/Program Files (x86)/Java/jre1.8.0_121/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Skype\Phone;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\FTC_TE1\eclipse;;.
mai 24, 2017 11:48:22 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler [“http-nio-8080”]
mai 24, 2017 11:48:23 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
mai 24, 2017 11:48:23 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler [“ajp-nio-8009”]
mai 24, 2017 11:48:23 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
mai 24, 2017 11:48:23 PM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 2532 ms
mai 24, 2017 11:48:23 PM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Catalina
mai 24, 2017 11:48:23 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.0.32
mai 24, 2017 11:48:24 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMAÇÕES: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
mai 24, 2017 11:48:24 PM org.apache.catalina.core.StandardContext filterStart
GRAVE: Exception starting filter filter
java.lang.ExceptionInInitializerError
at filter.Filter.init(Filter.java:47)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4659)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Erro ao Conectar com o banco de dadosjava.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at connection.SingleConnection.conectar(SingleConnection.java:42)
at connection.SingleConnection.(SingleConnection.java:18)
… 13 more
mai 24, 2017 11:48:24 PM org.apache.catalina.core.StandardContext filterStart
GRAVE: Exception starting filter filter.Filter
java.lang.NoClassDefFoundError: Could not initialize class connection.SingleConnection
at filter.Filter.init(Filter.java:47)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4659)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
mai 24, 2017 11:48:24 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more Filters failed to start. Full details will be found in the appropriate container log file
mai 24, 2017 11:48:24 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/ProjetoFinal] startup failed due to previous errors
mai 24, 2017 11:48:24 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\apache-tomcat-8.0.32\webapps\docs
mai 24, 2017 11:48:24 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\apache-tomcat-8.0.32\webapps\docs has finished in 65 ms
mai 24, 2017 11:48:24 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\apache-tomcat-8.0.32\webapps\examples
mai 24, 2017 11:48:24 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: ContextListener: contextInitialized()
mai 24, 2017 11:48:24 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: SessionListener: contextInitialized()
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\apache-tomcat-8.0.32\webapps\examples has finished in 716 ms
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\apache-tomcat-8.0.32\webapps\host-manager
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\apache-tomcat-8.0.32\webapps\host-manager has finished in 58 ms
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\apache-tomcat-8.0.32\webapps\manager
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\apache-tomcat-8.0.32\webapps\manager has finished in 57 ms
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\apache-tomcat-8.0.32\webapps\ROOT
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\apache-tomcat-8.0.32\webapps\ROOT has finished in 45 ms
mai 24, 2017 11:48:25 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler [“http-nio-8080”]
mai 24, 2017 11:48:25 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler [“ajp-nio-8009”]
mai 24, 2017 11:48:25 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 2095 ms