You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ebt <no...@gmail.com> on 2010/06/16 00:06:55 UTC

Tapestry 5.1 pom.xml modifications results in BOOM

I could really use a hand in explaining what I am doing wrong..

my steps:
1)  mvn archetype:generate
-DarchetypeCatalog=http://tapestry.formos.com/maven-repository
2) Define value for property 'groupId': : com.foo
Define value for property 'artifactId': : foo
Define value for property 'version': 1.0-SNAPSHOT: 
Define value for property 'package': com.agate: com.foo.bar
3) copy src and pom into project folder in eclipse 3.5 (J2EE)
4) run on server->apache tomcat 6 = SUCCESS

5) change POM: Add (automated through m2e)
        <dependency>
        	<groupId>mysql</groupId>
        	<artifactId>mysql-connector-java</artifactId>
        	<version>5.1.12</version>
        	<type>jar</type>
        	<scope>compile</scope>
        </dependency>

6) restart apache tomcat
7) All hell breaks loose
INFO:validateJarFile(/home/adminuser/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/timekeeper/WEB-INF/lib/servlet-api-2.5.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
log4j:WARN No appenders could be found for logger
(org.apache.tapestry5.ioc.RegistryBuilder).
log4j:WARN Please initialize the log4j system properly.

Questions:
1) Website wont compile, all due to log4j not being configured properly? 
2) how would I force copy the log4j.properties file to the right place at
build time? (maven config I assume)

Apologies as I am very, VERY new to Tapestry and Java in general.
-- 
View this message in context: http://old.nabble.com/Tapestry-5.1-pom.xml-modifications-results-in-BOOM-tp28896910p28896910.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by ebt <no...@gmail.com>.
I don't disagree.

here is the full log output for reference. Again this is a brand new
archtype with one change and restart.
Jun 15, 2010 2:58:31 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib
Jun 15, 2010 2:58:31 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 15, 2010 2:58:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1629 ms
Jun 15, 2010 2:58:31 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 15, 2010 2:58:32 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Jun 15, 2010 2:58:32 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(/home/adminuser/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/timekeeper/WEB-INF/lib/servlet-api-2.5.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
log4j:WARN No appenders could be found for logger
(org.apache.tapestry5.ioc.RegistryBuilder).
log4j:WARN Please initialize the log4j system properly.
Jun 15, 2010 2:58:34 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 15, 2010 2:58:35 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 15, 2010 2:58:35 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/85  config=null
Jun 15, 2010 2:58:35 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3207 ms


I added a m2eclipse profile with a goal of jetty:run to eclipse and tried
debug. Stepping seemed to work without issue. Thanks to you both!



Robert Zeigler wrote:
> 
> Thiago is right.  You're not seeing compilation errors.  You're seeing
> application-generated warnings.
> The "jar not loaded" warning is harmless.  You have the servlet jar in
> your application library; the servlet container won't load it (it provides
> it's own version). 
> You can effectively ignore the log4j warning, as well, at least for now. 
> It won't kill your application to have it not properly configured.
> 
> Are you sure that the only thing you did was add the mysql-connector
> dependency? Also, you should check the output for exceptions.
> 
> Robert
> 
> On Jun 15, 2010, at 6/155:29 PM , ebt wrote:
> 
>> 
>>> Questions:
>>> 1) Website wont compile, all due to log4j not being configured properly?
>> 
>> Wanings are warnings, not compiling errors. Check your application. It's  
>> probably working.
>> 
>> application will not work
>> calling ttp://localhost:8080/foo/ returns <!-- Most of the page content,
>> including <head>, <body>, etc. tags, comes from Layout.tml
>> --><p>[[missing
>> key: greeting]]</p>
>> 
>> ie its not picking up the layout among other things
>> 
>>> 2) how would I force copy the log4j.properties file to the right place
>>> at
>>> build time? (maven config I assume)
>> 
>> Create a lo4j.properties in src/main/resource
>> 
>> 
>> its already there, created by the archtype
>> 
>> 
>> 
>> Thiago H. de Paula Figueiredo wrote:
>>> 
>>> On Tue, 15 Jun 2010 19:06:55 -0300, ebt <no...@gmail.com>
>>> wrote:
>>> 
>>>> Questions:
>>>> 1) Website wont compile, all due to log4j not being configured
>>>> properly?
>>> 
>>> Wanings are warnings, not compiling errors. Check your application. It's  
>>> probably working.
>>> 
>>>> 2) how would I force copy the log4j.properties file to the right place
>>>> at
>>>> build time? (maven config I assume)
>>> 
>>> Create a lo4j.properties in src/main/resources.
>>> 
>>> -- 
>>> Thiago H. de Paula Figueiredo
>>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
>>> and instructor
>>> Owner, Ars Machina Tecnologia da Informação Ltda.
>>> http://www.arsmachina.com.br
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/Tapestry-5.1-pom.xml-modifications-results-in-BOOM-tp28896910p28897105.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Tapestry-5.1-pom.xml-modifications-results-in-BOOM-tp28896910p28897307.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by Robert Zeigler <ro...@scazdl.org>.
Thiago is right.  You're not seeing compilation errors.  You're seeing application-generated warnings.
The "jar not loaded" warning is harmless.  You have the servlet jar in your application library; the servlet container won't load it (it provides it's own version). 
You can effectively ignore the log4j warning, as well, at least for now.  It won't kill your application to have it not properly configured.

Are you sure that the only thing you did was add the mysql-connector dependency? Also, you should check the output for exceptions.

Robert

On Jun 15, 2010, at 6/155:29 PM , ebt wrote:

> 
>> Questions:
>> 1) Website wont compile, all due to log4j not being configured properly?
> 
> Wanings are warnings, not compiling errors. Check your application. It's  
> probably working.
> 
> application will not work
> calling ttp://localhost:8080/foo/ returns <!-- Most of the page content,
> including <head>, <body>, etc. tags, comes from Layout.tml --><p>[[missing
> key: greeting]]</p>
> 
> ie its not picking up the layout among other things
> 
>> 2) how would I force copy the log4j.properties file to the right place at
>> build time? (maven config I assume)
> 
> Create a lo4j.properties in src/main/resource
> 
> 
> its already there, created by the archtype
> 
> 
> 
> Thiago H. de Paula Figueiredo wrote:
>> 
>> On Tue, 15 Jun 2010 19:06:55 -0300, ebt <no...@gmail.com> wrote:
>> 
>>> Questions:
>>> 1) Website wont compile, all due to log4j not being configured properly?
>> 
>> Wanings are warnings, not compiling errors. Check your application. It's  
>> probably working.
>> 
>>> 2) how would I force copy the log4j.properties file to the right place at
>>> build time? (maven config I assume)
>> 
>> Create a lo4j.properties in src/main/resources.
>> 
>> -- 
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context: http://old.nabble.com/Tapestry-5.1-pom.xml-modifications-results-in-BOOM-tp28896910p28897105.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 15 Jun 2010 22:49:28 -0300, Kalle Korhonen  
<ka...@gmail.com> wrote:

> I have great experience with Tomcat and Eclipse using the sysdeo's
> Tomcat plugin. I use both Tomcat and Jetty, but feature-wise, Sysdeo's
> Tomcat is superior.

I was talking about Eclipse's own plugins for Eclipse. Sysdeo's Tomcat  
Launcher is nice, working way better than the similar Eclipse plugins.

My preferred way of launching a web app is still to create a main method  
that launches an Jetty instance programatically.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by Kalle Korhonen <ka...@gmail.com>.
On Tue, Jun 15, 2010 at 3:42 PM, Thiago H. de Paula Figueiredo
<th...@gmail.com> wrote:
> On Tue, 15 Jun 2010 19:37:54 -0300, ebt <no...@gmail.com> wrote:
>> I should have also added that I am using the tomcat service from within
>> eclipse using run-as etc. I guess that might add a layer of complexity
>> that would be hard to pin down. I shut down tomcat and dropped into the
>> terminal and ran mvn jetty:run and everything ran normally.
> I have a very bad experience with the Tomcat support in Eclipse. Jetty is
> superior IMHO.

I have great experience with Tomcat and Eclipse using the sysdeo's
Tomcat plugin. I use both Tomcat and Jetty, but feature-wise, Sysdeo's
Tomcat is superior.

Kalle

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 15 Jun 2010 19:37:54 -0300, ebt <no...@gmail.com> wrote:

> I should have also added that I am using the tomcat service from within
> eclipse using run-as etc. I guess that might add a layer of complexity  
> that would be hard to pin down. I shut down tomcat and dropped into the  
> terminal and ran mvn jetty:run and everything ran normally.

I have a very bad experience with the Tomcat support in Eclipse. Jetty is  
superior IMHO.

> This points to a
> configuration issue rather than a Tapestry issue. I guess worse comes to
> worse I can try to figure out how to remote debug using jetty.

Just use m2eclipse, a run configuration that launches jetty:run and debug  
it normally. You don't need to configure remote debug.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by ebt <no...@gmail.com>.
I should have also added that I am using the tomcat service from within
eclipse using run-as etc. I guess that might add a layer of complexity that
would be hard to pin down. I shut down tomcat and dropped into the terminal
and ran mvn jetty:run and everything ran normally. This points to a
configuration issue rather than a Tapestry issue. I guess worse comes to
worse I can try to figure out how to remote debug using jetty.

Thanks!


ebt wrote:
> 
>> Questions:
>> 1) Website wont compile, all due to log4j not being configured properly?
> 
> Wanings are warnings, not compiling errors. Check your application. It's  
> probably working.
> 
> application will not work
> calling ttp://localhost:8080/foo/ returns <!-- Most of the page content,
> including <head>, <body>, etc. tags, comes from Layout.tml --><p>[[missing
> key: greeting]]</p>
> 
> ie its not picking up the layout among other things
> 
>> 2) how would I force copy the log4j.properties file to the right place at
>> build time? (maven config I assume)
> 
> Create a lo4j.properties in src/main/resource
> 
> 
> its already there, created by the archtype
> 
> 
> 
> Thiago H. de Paula Figueiredo wrote:
>> 
>> On Tue, 15 Jun 2010 19:06:55 -0300, ebt <no...@gmail.com> wrote:
>> 
>>> Questions:
>>> 1) Website wont compile, all due to log4j not being configured properly?
>> 
>> Wanings are warnings, not compiling errors. Check your application. It's  
>> probably working.
>> 
>>> 2) how would I force copy the log4j.properties file to the right place
>>> at
>>> build time? (maven config I assume)
>> 
>> Create a lo4j.properties in src/main/resources.
>> 
>> -- 
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Tapestry-5.1-pom.xml-modifications-results-in-BOOM-tp28896910p28897182.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by ebt <no...@gmail.com>.
> Questions:
> 1) Website wont compile, all due to log4j not being configured properly?

Wanings are warnings, not compiling errors. Check your application. It's  
probably working.

application will not work
calling ttp://localhost:8080/foo/ returns <!-- Most of the page content,
including <head>, <body>, etc. tags, comes from Layout.tml --><p>[[missing
key: greeting]]</p>

ie its not picking up the layout among other things

> 2) how would I force copy the log4j.properties file to the right place at
> build time? (maven config I assume)

Create a lo4j.properties in src/main/resource


its already there, created by the archtype



Thiago H. de Paula Figueiredo wrote:
> 
> On Tue, 15 Jun 2010 19:06:55 -0300, ebt <no...@gmail.com> wrote:
> 
>> Questions:
>> 1) Website wont compile, all due to log4j not being configured properly?
> 
> Wanings are warnings, not compiling errors. Check your application. It's  
> probably working.
> 
>> 2) how would I force copy the log4j.properties file to the right place at
>> build time? (maven config I assume)
> 
> Create a lo4j.properties in src/main/resources.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Tapestry-5.1-pom.xml-modifications-results-in-BOOM-tp28896910p28897105.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 pom.xml modifications results in BOOM

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 15 Jun 2010 19:06:55 -0300, ebt <no...@gmail.com> wrote:

> Questions:
> 1) Website wont compile, all due to log4j not being configured properly?

Wanings are warnings, not compiling errors. Check your application. It's  
probably working.

> 2) how would I force copy the log4j.properties file to the right place at
> build time? (maven config I assume)

Create a lo4j.properties in src/main/resources.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org