Well, I'm not sure exactly what the problem was but I upgraded to tomcat
5.5.12 and everything started working just fine.
Thanks for all the help,
Rich
Matt Raible wrote:
It looks like they've updated the POM. Formerly, I didn't have
commons-codec and everything worked fine - but it's possible I'm not
using advanced features in JSF. The NoClassDefFound usually happens
when you have different versions of a library in your classpath.
Since MEV-136 has been fixed (commons-codec version), I updated my
pom.xml to be the following:
http://jira.codehaus.org/browse/MEV-136
<dependency>
<artifactId>myfaces-all</artifactId>
<groupId>myfaces</groupId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
</exclusions>
</dependency>
... and all the other ones previously listed of course.
Matt
On 12/2/05, Richard Wallace <[EMAIL PROTECTED]> wrote:
Arg! Ok I tried accessing a jsf page and I got a
"java.lang.NoClassDefFoundError:
org/apache/commons/codec/binary/Base64". So I removed the exclusion on
commons-codec and now I'm back to getting the "Caused by:
java.io.FileNotFoundException: /files1142159423 (Permission denied)"
which cause" and "2005-12-02 09:18:07,310 1332557 ERROR
[http-8080-Processor25] org.apache.jasper.compiler.Compiler
(Compiler.java:407) - Error compiling file:
/opt/tomcat5/work/Catalina/localhost/revman//org/apache/jsp/index_jsp.java
[javac] Compiling 1 source file"
Any ideas why this is happening? What would cause tomcat to try and
compile to /?
Richard Wallace wrote:
Ok, I found the problem with compiling the JSPs. What I was trying to
do was use the separate jars, like spring-hibernate, spring-dao, etc.
But they aren't complete by any means. Once I switched to using the
spring-1.2.6.jar the problem went away.
I'm still not sure what to do about the dependency on both
commons-collections-3.1 and commons-collections-2.1. Can I include
them both in the dependencies to have them both included in my war or
will only one ever be included?
Thanks,
Rich
PS Sorry about the last message having a screwy time, I didn't have
the clock type set on my machine for local and was dual-booting with
Windows.
Richard Wallace wrote:
One other thing having to do with dependencies that I'm worried is an
issue is that I'm using struts and it and spring want
commons-collections-2.1 but one of my utilities needs
commons-collections-3.1 as does myfaces it looks like. What's the
best way to solve this conflict?
I did change it so that commons-collections-2.1 was used but now I
get a different error when trying to access a jsp for the first time:
Error creating temporary file
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:426)
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:371)
at
org.apache.tools.ant.taskdefs.compilers.Jikes.execute(Jikes.java:202)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
and
Caused by: java.io.FileNotFoundException: /files273067436 (Permission
denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at java.io.FileWriter.<init>(FileWriter.java:73)
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:412)
... 41 more
--- Nested Exception ---
java.io.FileNotFoundException: /files273067436 (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at java.io.FileWriter.<init>(FileWriter.java:73)
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:412)
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:371)
at
org.apache.tools.ant.taskdefs.compilers.Jikes.execute(Jikes.java:202)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
Everything else on this tomcat server works great. I've deployed
other webapps successfully. I tried just a test webapp project that
includes Matts dependencies and that deployed and ran a test jsp just
fine. Why would tomcat be trying to compile jsps for this particular
webapp to the root directory?
Thanks,
Rich
Matt Raible wrote:
Here's what I use for Equinox's MyFaces 1.1.1 + Spring 1.2.6 +
Hibernate 3.0.5 combination:
<dependencies>
<dependency>
<artifactId>cargo</artifactId>
<groupId>cargo</groupId>
<version>0.6</version>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>commons-lang</artifactId>
<groupId>commons-lang</groupId>
<version>2.0</version>
</dependency>
<dependency>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
<version>1.0.4</version>
</dependency>
<dependency>
<artifactId>displaytag</artifactId>
<groupId>displaytag</groupId>
<version>1.0</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>xalan</artifactId>
<groupId>xalan</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>dwr</artifactId>
<groupId>uk.ltd.getahead</groupId>
<version>1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<artifactId>hibernate</artifactId>
<groupId>org.hibernate</groupId>
<version>3.0.5</version>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>javax.transaction</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>geronimo-spec-jta</artifactId>
<groupId>geronimo-spec</groupId>
<version>1.0.1B-rc4</version>
</dependency>
<dependency>
<artifactId>jmock</artifactId>
<groupId>jmock</groupId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>webtest</artifactId>
<groupId>com.canoo</groupId>
<version>586</version>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
<version>1.2.11</version>
</dependency>
<dependency>
<artifactId>postgresql</artifactId>
<groupId>postgresql</groupId>
<version>8.0-312.jdbc3</version>
</dependency>
<dependency>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<artifactId>jstl</artifactId>
<groupId>javax.servlet</groupId>
<version>1.1.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<artifactId>standard</artifactId>
<groupId>taglibs</groupId>
<version>1.1.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<artifactId>sitemesh</artifactId>
<groupId>opensymphony</groupId>
<version>2.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<artifactId>myfaces-all</artifactId>
<groupId>myfaces</groupId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
<!-- http://jira.codehaus.org/browse/MEV-136 (excluded
for bad version #) -->
<exclusion>
<artifactId>commons-codec</artifactId>
<groupId>commons-codec</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>tomahawk</artifactId>
<groupId>myfaces</groupId>
<version>1.1.1</version>
</dependency>
<dependency>
<artifactId>jsp-api</artifactId>
<groupId>javax.servlet</groupId>
<version>2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>spring</artifactId>
<groupId>springframework</groupId>
<version>1.2.6</version>
</dependency>
<dependency>
<artifactId>spring-mock</artifactId>
<groupId>springframework</groupId>
<version>1.2.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spring-jdbc</artifactId>
<groupId>springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-web</artifactId>
<groupId>springframework</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Matt
http://equinox.dev.java.net
On 11/30/05, Richard Wallace <[EMAIL PROTECTED]> wrote:
Hey everybody,
I've got an app that uses Hibernate 3.0.5, Spring 1.2.6 and Myfaces
1.1.1. I'm having massive problems getting this thing to deploy
with m2
and I think it has to do with missing or conflicting
dependencies. The
error I'm getting now when I try and hit a JSP is:
java.lang.NoClassDefFoundError
org.apache.log4j.Category.forcedLog(Category.java:372)
org.apache.log4j.Category.log(Category.java:864)
org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:193)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:387)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
I've tried piece-mealing the deps together and it seems to be the
spring
jars that are causing the problem. The really confusing thing is that
in my testing I stripped down my web.xml to just the display-name and
welcome-file-list elements, so nothing should even be trying to load
spring. I'm guessing it's a static log field that is being created
when
the jars are first loaded. I've got it to the point where I can
say for
sure that a simple jsp with a simple web.xml works without the
spring-*-1.2.6.jar libs. But as soon as I try and add the spring-core
jar I start getting that error above.
Anybody know the right dependencies to include in my war pom since the
spring poms are bare ATM?
Thanks,
Rich
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]