Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apache-maven-tomcat7-plugin #21

Open
jscamara opened this issue Jun 11, 2014 · 9 comments
Open

apache-maven-tomcat7-plugin #21

jscamara opened this issue Jun 11, 2014 · 9 comments

Comments

@jscamara
Copy link
Contributor

As mensagens de i18n não são renderizadas no jsp quando utilizo o plugin do apache tomcat. Mas ao utilizar o servidor normal (que foi adicionado pelo wizard do eclipse) as mensagens são exibidas.

Dependencias utilizadas

<dependency>
    <groupId>br.com.caelum</groupId>
    <artifactId>vraptor</artifactId>
    <version>4.0.0.Final</version>
</dependency>
<dependency>
    <groupId>br.com.caelum.vraptor</groupId>
    <artifactId>vraptor-i18n</artifactId>
    <version>4.0.1</version>
</dependency>

Plugin Tomcat7

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.2</version>
    <configuration>
        <path>/${project.build.finalName}</path>
    </configuration>
</plugin>
@lucascs
Copy link
Member

lucascs commented Jun 12, 2014

Aparece algum erro ou warning no console quando vc sobe pelo maven?

2014-06-11 9:42 GMT-03:00 Jonathan Camara notifications@github.com:

As mensagens de i18n não são renderizadas no jsp quando utilizo o plugin
do apache tomcat. Mas ao utilizar o servidor normal (que foi adicionado
pelo wizard do eclipse) as mensagens são exibidas.

Dependencias utilizadas

br.com.caelum vraptor 4.0.0.Final br.com.caelum.vraptor vraptor-i18n 4.0.1

Plugin Tomcat7

org.apache.tomcat.maven tomcat7-maven-plugin 2.2 /${project.build.finalName}


Reply to this email directly or view it on GitHub
#21.

@jscamara
Copy link
Contributor Author

Fala Lucas,
Segue o log do console quando subo o tomcat

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building CakeShop Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ cakeshop ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cakeshop ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop ---
[INFO] Running war on http://localhost:8080/cakeshop
[INFO] Using existing Tomcat server configuration at D:\workspaces\privateWorkspace\cakeshopV4\target\tomcat
[INFO] create webapp with contextPath: /cakeshop
Jun 12, 2014 8:35:21 AM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-bio-8080"]
Jun 12, 2014 8:35:22 AM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Tomcat
Jun 12, 2014 8:35:22 AM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/7.0.47
Jun 12, 2014 8:35:25 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Log4jServletContainerInitializer starting up Log4j in Servlet 3.0+ environment.
Jun 12, 2014 8:35:25 AM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: 2.1.2 (Final)
Jun 12, 2014 8:35:26 AM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Jun 12, 2014 8:35:26 AM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 5.1.0.Final
Jun 12, 2014 8:35:26 AM org.hibernate.validator.internal.xml.ValidationXmlParser unmarshal
INFO: HV000007: META-INF/validation.xml found. Parsing XML based configuration.
Jun 12, 2014 8:35:28 AM org.jboss.weld.environment.tomcat7.Tomcat7Container initialize
INFO: Tomcat 7+ detected, CDI injection will be available in Servlets and Filters. Injection into Listeners is not supported
Jun 12, 2014 8:35:28 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Log4jServletContextListener ensuring that Log4j starts up properly.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Jun 12, 2014 8:35:29 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Log4jServletFilter initialized.
Jun 12, 2014 8:35:29 AM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-bio-8080"]

@lucascs
Copy link
Member

lucascs commented Jun 14, 2014

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.

Tenta adicionar uma impl do slf4j, por exemplo a do log4j e veja o log
novamente.

On Thu, Jun 12, 2014 at 8:38 AM, Jonathan Camara notifications@github.com
wrote:

Fala Lucas,
Segue o log do console quando subo o tomcat

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CakeShop Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ cakeshop ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cakeshop ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop ---
[INFO] Running war on http://localhost:8080/cakeshop
[INFO] Using existing Tomcat server configuration at D:\workspaces\privateWorkspace\cakeshopV4\target\tomcat
[INFO] create webapp with contextPath: /cakeshop
Jun 12, 2014 8:35:21 AM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-bio-8080"]
Jun 12, 2014 8:35:22 AM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Tomcat
Jun 12, 2014 8:35:22 AM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/7.0.47
Jun 12, 2014 8:35:25 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Log4jServletContainerInitializer starting up Log4j in Servlet 3.0+ environment.
Jun 12, 2014 8:35:25 AM org.jboss.weld.bootstrap.WeldStartup
INFO: WELD-000900: 2.1.2 (Final)
Jun 12, 2014 8:35:26 AM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Jun 12, 2014 8:35:26 AM org.hibernate.validator.internal.util.Version
INFO: HV000001: Hibernate Validator 5.1.0.Final
Jun 12, 2014 8:35:26 AM org.hibernate.validator.internal.xml.ValidationXmlParser unmarshal
INFO: HV000007: META-INF/validation.xml found. Parsing XML based configuration.
Jun 12, 2014 8:35:28 AM org.jboss.weld.environment.tomcat7.Tomcat7Container initialize
INFO: Tomcat 7+ detected, CDI injection will be available in Servlets and Filters. Injection into Listeners is not supported
Jun 12, 2014 8:35:28 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Log4jServletContextListener ensuring that Log4j starts up properly.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Jun 12, 2014 8:35:29 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Log4jServletFilter initialized.
Jun 12, 2014 8:35:29 AM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-bio-8080"]


Reply to this email directly or view it on GitHub
#21 (comment).

@jscamara
Copy link
Contributor Author

Fala Lucas,

Segue o log,

D:\workspaces\privateWorkspace\cakeshopV4>mvn tomcat7:run
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CakeShop Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cakeshop ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cakeshop ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ cakeshop ---
[INFO] Running war on http://localhost:8080/cakeshop
[INFO] Using existing Tomcat server configuration at D:\workspaces\privateWorkspace\cakeshopV4\target\tomcat
[INFO] create webapp with contextPath: /cakeshop
Jun 15, 2014 4:50:35 PM org.apache.coyote.AbstractProtocol init
INFORMAÃıES: Initializing ProtocolHandler ["http-bio-8080"]
Jun 15, 2014 4:50:35 PM org.apache.catalina.core.StandardService startInternal
INFORMAÃıES: Starting service Tomcat
Jun 15, 2014 4:50:35 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÃıES: Starting Servlet Engine: Apache Tomcat/7.0.47
Jun 15, 2014 4:50:37 PM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: 2.1.2 (Final)
Jun 15, 2014 4:50:38 PM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Jun 15, 2014 4:50:38 PM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 5.1.0.Final
Jun 15, 2014 4:50:38 PM org.hibernate.validator.internal.xml.ValidationXmlParser unmarshal
INFO: HV000007: META-INF/validation.xml found. Parsing XML based configuration.
Jun 15, 2014 4:50:42 PM org.jboss.weld.environment.tomcat7.Tomcat7Container initialize
INFO: Tomcat 7+ detected, CDI injection will be available in Servlets and Filters. Injection into Listeners is not supported
81 [localhost-startStop-1] INFO br.com.caelum.vraptor.core.DefaultConverters - Registering bundled converters
92 [localhost-startStop-1] INFO br.com.caelum.vraptor.core.DefaultConverters - Registering bundled converters
260 [localhost-startStop-1] INFO br.com.caelum.vraptor.http.route.DefaultRouteBuilder - /client/new                                       [GET] -> public void br.com.cakeshop.controller.ClientController.form()
260 [localhost-startStop-1] INFO br.com.caelum.vraptor.http.route.DefaultRouteBuilder - /client                                           [GET] -> public void br.com.cakeshop.controller.ClientController.list()
266 [localhost-startStop-1] INFO br.com.caelum.vraptor.http.route.DefaultRouteBuilder - /client                                           [POST] -> public void br.com.cakeshop.controller.ClientController.save(br.com.cakeshop.domain.model.client.Client)
272 [localhost-startStop-1] INFO br.com.caelum.vraptor.http.route.DefaultRouteBuilder - /                                                 [ALL] -> public void br.com.cakeshop.controller.IndexController.index()
322 [localhost-startStop-1] INFO br.com.caelum.vraptor.VRaptor - VRaptor 4.0.0.Final successfuly initialized
Jun 15, 2014 4:50:43 PM org.apache.coyote.AbstractProtocol start
INFORMAÃıES: Starting ProtocolHandler ["http-bio-8080"]

@nykolaslima
Copy link
Contributor

Você conseguiu corrigir este erro?

Estou usando embedded tomcat, adicionei a dependencia do vraptor-i18n mas o "t" não é reconhecido no JSP.

@jscamara
Copy link
Contributor Author

N
Em 18/07/2014 18:27, "Nykolas Laurentino de Lima" notifications@github.com
escreveu:

Você conseguiu corrigir este erro?

Estou usando embedded tomcat, adicionei a dependencia do vraptor-i18n mas
o "t" não é reconhecido no JSP.


Reply to this email directly or view it on GitHub
#21 (comment).

@nykolaslima
Copy link
Contributor

@lucascs sabe o que pode ser isso?

Pelo que vi o embedded tomcat usa libs proprias pro servlet-api e el. Será que essas libs não são compativeis?

+- org.apache.tomcat:tomcat-jasper:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-juli:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-el-api:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-api:jar:7.0.34:compile
[INFO] |  \- org.apache.tomcat:tomcat-util:jar:7.0.34:compile

@lucascs
Copy link
Member

lucascs commented Jul 28, 2014

no tomcat 7 vc precisa do weld tb no classpath. vc colocou?

2014-07-21 12:51 GMT-03:00 Nykolas Laurentino de Lima <
notifications@github.com>:

@lucascs https://github.com/lucascs sabe o que pode ser isso?

Pelo que vi o embedded tomcat usa libs proprias pro servlet-api e el. Será
que essas libs não são compativeis?

+- org.apache.tomcat:tomcat-jasper:jar:7.0.34:compile
[INFO] | +- org.apache.tomcat:tomcat-servlet-api:jar:7.0.34:compile
[INFO] | +- org.apache.tomcat:tomcat-juli:jar:7.0.34:compile
[INFO] | +- org.apache.tomcat:tomcat-el-api:jar:7.0.34:compile
[INFO] | +- org.apache.tomcat:tomcat-api:jar:7.0.34:compile
[INFO] | - org.apache.tomcat:tomcat-util:jar:7.0.34:compile


Reply to this email directly or view it on GitHub
#21 (comment).

@jscamara
Copy link
Contributor Author

Fala Lucas, no meu pom já estava adicionado o weld.

<dependency>
    <groupId>org.jboss.weld.servlet</groupId>
    <artifactId>weld-servlet</artifactId>
    <version>2.1.2.Final</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants