Olá, estou iniciando um projeto no eclipse e não tenho muita prática. O projeto é em JSF com MAVEN e não sei qual ou quais pontos estão me travando. se alguem poder me ajudar agradeço.
Console:
05/09/2013 12:44:50 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: /usr/java/jdk1.6.0_20/jre/lib/i386/server:/usr/java/jdk1.6.0_20/jre/lib/i386:/usr/java/jdk1.6.0_20/jre/../lib/i386:/usr/java/jdk1.6.0_20/jre/lib/i386/client:/usr/java/jdk1.6.0_20/jre/lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib
05/09/2013 12:44:50 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Integration' did not find a matching property.
05/09/2013 12:44:51 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
05/09/2013 12:44:51 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
05/09/2013 12:44:51 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1272 ms
05/09/2013 12:44:51 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
05/09/2013 12:44:51 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
05/09/2013 12:44:52 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/home/TTI1/alex/projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Integration/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
05/09/2013 12:44:54 org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Integration]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Integration]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.NullPointerException
at com.sun.faces.config.InitFacesContext.cleanupInitMaps(InitFacesContext.java:277)
at com.sun.faces.config.InitFacesContext.<init>(InitFacesContext.java:102)
at com.sun.faces.config.FacesInitializer.onStartup(FacesInitializer.java:116)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
05/09/2013 12:44:54 org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:691)
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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
05/09/2013 12:44:54 org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:691)
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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
05/09/2013 12:44:54 org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
05/09/2013 12:44:54 org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
05/09/2013 12:44:54 org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
05/09/2013 12:44:54 org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
05/09/2013 12:44:54 org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>JSF</display-name>
<!-- Change to "Production" when you are ready to deploy -->
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- Welcome page list -->
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<!-- JavaServer Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Servlet Mapping to URL pattern -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com</groupId>
<artifactId>Integration</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Integration Maven Webapp</name>
<url>http://maven.apache.org</url>
<build>
<finalName>Integration</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.4</version>
<configuration>
<downloadSources>false</downloadSources>
<wtpversion>1.5</wtpversion>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net.m2</id>
<name>java.net m2 repo</name>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>1.1.14</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>
<!-- PrimeFaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.5</version>
</dependency>
<!-- JSF 2 -->
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.11</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.11</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2</version>
</dependency>
<!--Hibernate default -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.2.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.7.2</version>
</dependency>
<!--Test Unit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- Looger -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
</project>
Clean Package do mavem:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Integration Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ Integration ---
[INFO] Deleting /home/TTI1/alex/projects/Integration/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ Integration ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ Integration ---
[INFO] Compiling 16 source files to /home/TTI1/alex/projects/Integration/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ Integration ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ Integration ---
[INFO] Compiling 3 source files to /home/TTI1/alex/projects/Integration/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.5:test (default-test) @ Integration ---
[INFO] Surefire report directory: /home/TTI1/alex/projects/Integration/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running model.UserTest
05/09/2013 12:54:18 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
05/09/2013 12:54:18 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.2.Final}
05/09/2013 12:54:18 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
05/09/2013 12:54:18 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
05/09/2013 12:54:18 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /META-INF/hibernate_test.cfg.xml
05/09/2013 12:54:18 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /META-INF/hibernate_test.cfg.xml
05/09/2013 12:54:18 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
05/09/2013 12:54:18 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
05/09/2013 12:54:18 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
05/09/2013 12:54:18 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
05/09/2013 12:54:18 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
05/09/2013 12:54:18 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [org.sqlite.JDBC] at URL [jdbc:sqlite:mydb.db]
05/09/2013 12:54:18 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=, password=****}
05/09/2013 12:54:19 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.SQLiteDialect
05/09/2013 12:54:19 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [2] less than 4
05/09/2013 12:54:19 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
05/09/2013 12:54:19 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
05/09/2013 12:54:19 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000227: Running hbm2ddl schema export
Hibernate:
drop table if exists activity
Hibernate:
drop table if exists customer
Hibernate:
drop table if exists customer_project
Hibernate:
drop table if exists project
Hibernate:
drop table if exists project_task
Hibernate:
drop table if exists task
Hibernate:
drop table if exists task_users
Hibernate:
drop table if exists users
Hibernate:
drop table if exists users_task
Hibernate:
create table activity (
id integer,
name varchar(255),
typeActivity integer,
task_id integer,
primary key (id)
)
Hibernate:
create table customer (
id integer,
cnpj varchar(255),
name varchar(255),
administrator_id integer,
primary key (id)
)
Hibernate:
create table customer_project (
customer_id integer not null,
projects_id integer not null
)
Hibernate:
create table project (
id integer,
name varchar(255),
customer_id integer,
primary key (id)
)
Hibernate:
create table project_task (
project_id integer not null,
tasks_id integer not null
)
Hibernate:
create table task (
id integer,
name varchar(255),
typeTask integer,
primary key (id)
)
Hibernate:
create table task_users (
task_id integer not null,
user_id integer not null
)
Hibernate:
create table users (
id integer,
cpf varchar(255),
email varchar(255),
login varchar(255),
name varchar(255),
senha varchar(255),
typePeople integer,
primary key (id)
)
Hibernate:
create table users_task (
users_id integer not null,
tasks_id integer not null
)
Hibernate:
alter table customer_project
add constraint UK_p4j1syv13xmwqx07blksqruya unique (projects_id)
05/09/2013 12:54:20 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table customer_project add constraint UK_p4j1syv13xmwqx07blksqruya unique (projects_id)
05/09/2013 12:54:20 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: near "constraint": syntax error
Hibernate:
alter table project_task
add constraint UK_m2taq5qtopjekob5xka7l2wyq unique (tasks_id)
05/09/2013 12:54:20 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table project_task add constraint UK_m2taq5qtopjekob5xka7l2wyq unique (tasks_id)
05/09/2013 12:54:20 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: near "constraint": syntax error
05/09/2013 12:54:20 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete
05/09/2013 12:54:20 model.UserTest create
INFO: Creating Contact entity that will be save to the sqlite database
05/09/2013 12:54:20 model.UserTest create
INFO: Saving to the database
Hibernate:
insert
into
users
(cpf, email, login, name, senha, typePeople)
values
(?, ?, ?, ?, ?, ?)
Hibernate:
select
last_insert_rowid()
05/09/2013 12:54:20 model.UserTest create
INFO: Committing the change in the database
Hibernate:
select
user0_.id as id1_7_,
user0_.cpf as cpf2_7_,
user0_.email as email3_7_,
user0_.login as login4_7_,
user0_.name as name5_7_,
user0_.senha as senha6_7_,
user0_.typePeople as typePeop7_7_
from
users user0_
User [id=1, name=kkkkkkkkkk, email=kkkkkkkkkk]
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.702 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1:war (default-war) @ Integration ---
[INFO] Packaging webapp
[INFO] Assembling webapp [Integration] in [/home/TTI1/alex/projects/Integration/target/Integration]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/TTI1/alex/projects/Integration/src/main/webapp]
[INFO] Webapp assembled in [203 msecs]
[INFO] Building war: /home/TTI1/alex/projects/Integration/target/Integration.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.841s
[INFO] Finished at: Thu Sep 05 12:54:23 BRT 2013
[INFO] Final Memory: 14M/127M
[INFO] ------------------------------------------------------------------------