Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-03-03 Thread Robert Turner
On Thu, Mar 3, 2022 at 1:10 PM Berneburg, Cris J. - US
 wrote:

> > Running Tomcat in a container via Docker Desktop on a Windows host
> > with the web application served from a location on the host mounted
> > /bound to the container is insecure.
>
> So the app resides on the "host" OS file system and is mounted into the
> Docker "guest" container, rather than residing on a Docker volume or in the
> guest container's file system?
>

Correct (as far as my experience was concerned).

The problem only occured for us when we had the Tomcat webapps folder
"bound" (or mounted) to a folder on the host file system. If the webapps
folder was just on a volume in the Docker container, it worked without
issue. Technically I haven't tried it in the container's file system, only
a volume attached to the container, but I expect that would also be without
issue.


RE: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-03-03 Thread Berneburg, Cris J. - US
Mark, et al

> Running Tomcat in a container via Docker Desktop on a Windows host
> with the web application served from a location on the host mounted
> /bound to the container is insecure.

So the app resides on the "host" OS file system and is mounted into the Docker 
"guest" container, rather than residing on a Docker volume or in the guest 
container's file system?

--
Cris Berneburg
CACI Senior Software Engineer




This electronic message contains information from CACI International Inc or 
subsidiary companies, which may be company sensitive, proprietary, privileged 
or otherwise protected from disclosure. The information is intended to be used 
solely by the recipient(s) named above. If you are not an intended recipient, 
be aware that any review, disclosure, copying, distribution or use of this 
transmission or its contents is prohibited. If you have received this 
transmission in error, please notify the sender immediately.


Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-03-03 Thread Robert Turner
> > 
> > Hello World!
> >
> > field1=${failing.field1}
> > 
> > 
> >
> > 4. Add the following contents to
> > file src/main/java/com/example/rt/Failing.java:
> >
> > package com.example.rt;
> >
> > public class Failing {
> >
> >  private final String field1 = "field1_value";
> >
> >  public String getField1() {
> >  return field1;
> >  }
> >
> > }
> >
> >
> > 5. Build the web app
> >
> > mvn package
> >
> >
> > 6. Create a local folder to mount/bind into the Docker container
> >
> > mkdir webapps
> >
> >
> > 7. Copy the WAR file to the new folder
> >
> > cp target/test-el-resolver.war webapps/
> >
> >
> > 8. Start a docker container binding the local web apps folder
> >
> > docker run -d -p 8075:8080 --mount
> > type=volume,src=`pwd`/webapps,dst=/usr/local/tomcat/webapps
> >   tomcat:9.0.58-jre11-openjdk
> >
> >
> > 9. Using a browser (or equivalent), access the app:
> >
> > curl http://localhost:8075/test-el-resolver/
> >
> >
> > 10. Observe the following exception in the error page:
> >
> > Stacktrace:
> >
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:610)
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:489)
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
> > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> > Root Causejavax.servlet.ServletException:
> > java.lang.NoClassDefFoundError: com/example/rt/Failing (wrong
> > name: com/example/rt/failing)
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:657)
> > org.apache.jsp.index_jsp._jspService(index_jsp.java:145)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
> > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> > Root Causejava.lang.NoClassDefFoundError:
> > com/example/rt/Failing (wrong name:
> > com/example/rt/failing)
> > java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > java.base/java.lang.ClassLoader.defineClass(Unknown Source)
> > java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
> > javax.el.ImportHandler.findClass(ImportHandler.java:477)
> > javax.el.ImportHandler.resolveClass(ImportHandler.java:421)
> >
> javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:85)
> > org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:124)
> > org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:93)
> > org.apache.el.parser.AstValue.getValue(AstValue.java:136)
> > org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
> >
> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:692)
> > org.apache.jsp.index_jsp._jspService(index_jsp.java:130)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
> > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> > Note The full stack trace of the root cause is available
> in
> > the server logs.Apache
> > Tomcat/9.0.58
> >
> >
> > 

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-03-03 Thread Mark Thomas
apper.java:610)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:489)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Causejavax.servlet.ServletException:
java.lang.NoClassDefFoundError: com/example/rt/Failing (wrong
name: com/example/rt/failing)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:657)
org.apache.jsp.index_jsp._jspService(index_jsp.java:145)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Causejava.lang.NoClassDefFoundError:
com/example/rt/Failing (wrong name:
com/example/rt/failing)
java.base/java.lang.ClassLoader.defineClass1(Native Method)
java.base/java.lang.ClassLoader.defineClass(Unknown Source)
java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
javax.el.ImportHandler.findClass(ImportHandler.java:477)
javax.el.ImportHandler.resolveClass(ImportHandler.java:421)
javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:85)
org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:124)
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:93)
org.apache.el.parser.AstValue.getValue(AstValue.java:136)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:692)
org.apache.jsp.index_jsp._jspService(index_jsp.java:130)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note The full stack trace of the root cause is available in
the server logs.Apache
Tomcat/9.0.58


And a "working" scenario, replace step 8 with the following:

docker run -d -p 8075:8080 tomcat:9.0.58-jre11-openjdk
docker cp target/test-e-resolver.war
:/usr/local/tomcat/webapps/

Accessing the page with the curl command above will result in the expect
page being displayed (and no exception).


Robert



On Tue, Feb 8, 2022 at 9:39 AM Robert Turner  wrote:


Mark,

Thanks for the quick follow up.

Based on your comments I have some ideas on what it might be, and I should
be able to narrow that down further for you, and provide all the details
that you requested.

A few notes on the environment I'm using:

Docker (the host) is running on my Mac (12.2), not in AWS. AWS Linux is
only involved in the Docker image (as per the Dockerfile I shared earlier).
Moreover, it happens with Debian in the Docker image as well.
What I think is important is that I have "/work" and
"/webapps" mounted to file folders on the Mac, so I am suspecting
it's something to do with that "mounting" of the volume to the host OS, and
how Docker is mapping those and handling filename casing, etc. My MacOS
file system is APFS, Encrypted (and I thought I had case sensitivity
enabled, but I can no longer see that option -- maybe not an option for
APFS).

I will try to confirm suspicions and provide details in a few hours
(hopefully -- got a few meetings today that will get in the way).

Thanks again,

Robert


On Tue, Feb 8, 2022 at 8:51 AM Mark Thomas  wrote:


Robert,

I agree this is something to do with the Docker environment.

I think case insensitivity is involved somewhere as I can trigger the
error if I copy my equivalent of Failure.class to failure.class and then
call the JSP.

I understand why it only occurs for * imports. In that instance, Tomcat
has to check if the class can be loaded from each of the imported
packages. Tomcat checks the file system first as that is faster than
trying (and failing) to load a class. The file system checks a

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Robert Turner
That's good to know.

I suppose the key use case we would have is having the ability to "hot
deploy" from an IDE into the webapps folder rather than a full build,
package, deploy cycle (which can be time consuming).

Robert

On Tue, Feb 8, 2022 at 11:41 AM Mark Eggers 
wrote:

> Just a note:
>
> On 2/8/2022 8:32 AM, Rob Sargent wrote:
> >
> >
> > On 2/8/22 08:11, Robert Turner wrote:
> >> Okay. Yep, my most recent suspicion was correct -- it's related to the
> >> Docker bind to a local folder containing the webapps. As such, I believe
> >> it's a Docker issue of some sort and not Tomcat specific. However, you
> >> may
> >> want to understand it more completely in any case.
> >>
> >> Thanks for your help Mark, Rob S and Neil.
> >>
> >>
> > Is docker the new regexp?  You know: I had a problem. Used docker to
> > solve it.  Now I have two problems.
>
> When you attach a volume to a container from a case-insensitive file
> system (Windows, MacOS), then that directory will be case-insensitive.
>
> At least that's what a quick search indicates. I run all of my local
> Docker images from WSL2 (Ubuntu 20.04 LTS) on Windows 10 Pro, so I don't
> experience a case issue.
>
> This may or may not help
>
> . . . just my two cents
> /mde/
>


Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Mark Eggers

Just a note:

On 2/8/2022 8:32 AM, Rob Sargent wrote:



On 2/8/22 08:11, Robert Turner wrote:

Okay. Yep, my most recent suspicion was correct -- it's related to the
Docker bind to a local folder containing the webapps. As such, I believe
it's a Docker issue of some sort and not Tomcat specific. However, you 
may

want to understand it more completely in any case.

Thanks for your help Mark, Rob S and Neil.


Is docker the new regexp?  You know: I had a problem. Used docker to 
solve it.  Now I have two problems.


When you attach a volume to a container from a case-insensitive file 
system (Windows, MacOS), then that directory will be case-insensitive.


At least that's what a quick search indicates. I run all of my local 
Docker images from WSL2 (Ubuntu 20.04 LTS) on Windows 10 Pro, so I don't 
experience a case issue.


This may or may not help

. . . just my two cents
/mde/


OpenPGP_signature
Description: OpenPGP digital signature


Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Rob Sargent




On 2/8/22 08:11, Robert Turner wrote:

Okay. Yep, my most recent suspicion was correct -- it's related to the
Docker bind to a local folder containing the webapps. As such, I believe
it's a Docker issue of some sort and not Tomcat specific. However, you may
want to understand it more completely in any case.

Thanks for your help Mark, Rob S and Neil.


Is docker the new regexp?  You know: I had a problem. Used docker to 
solve it.  Now I have two problems.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Robert Turner
Okay. Yep, my most recent suspicion was correct -- it's related to the
Docker bind to a local folder containing the webapps. As such, I believe
it's a Docker issue of some sort and not Tomcat specific. However, you may
want to understand it more completely in any case.

Thanks for your help Mark, Rob S and Neil.


Here are the full details of the reproduction scenario:

Host system: MacOS 12.2; Docker Desktop v4.4.2 (73305), Engine 20.10.12

1. Using Maven Archetypes, do the following:

 mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=1.4

When prompted for configuration values, use the following:

groupId: com.example.rt
artifactId: test-el-resolver
version: 1.0-SNAPSHOT
package: com.example.rt

2. Switch to the new folder created for the web app

cd test-el-resolver

3. Modify the index.jsp file (src/main/webapp/index.jsp) to have the
following contents:

<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
<%@page import="com.example.rt.Failing"%>
<%
final Failing failing = null;
pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}



4. Add the following contents to
file src/main/java/com/example/rt/Failing.java:

package com.example.rt;

public class Failing {

private final String field1 = "field1_value";

public String getField1() {
return field1;
}

}


5. Build the web app

mvn package


6. Create a local folder to mount/bind into the Docker container

mkdir webapps


7. Copy the WAR file to the new folder

cp target/test-el-resolver.war webapps/


8. Start a docker container binding the local web apps folder

docker run -d -p 8075:8080 --mount
type=volume,src=`pwd`/webapps,dst=/usr/local/tomcat/webapps
 tomcat:9.0.58-jre11-openjdk


9. Using a browser (or equivalent), access the app:

curl http://localhost:8075/test-el-resolver/


10. Observe the following exception in the error page:

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:610)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:489)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Causejavax.servlet.ServletException:
java.lang.NoClassDefFoundError: com/example/rt/Failing (wrong
name: com/example/rt/failing)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:657)
org.apache.jsp.index_jsp._jspService(index_jsp.java:145)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Causejava.lang.NoClassDefFoundError:
com/example/rt/Failing (wrong name:
com/example/rt/failing)
java.base/java.lang.ClassLoader.defineClass1(Native Method)
java.base/java.lang.ClassLoader.defineClass(Unknown Source)
java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
javax.el.ImportHandler.findClass(ImportHandler.java:477)
javax.el.ImportHandler.resolveClass(ImportHandler.java:421)
javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:85)
org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:124)
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:93)
org.apache.el.parser.AstValue.getValue(AstValue.java:136)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:692)
org.apache.jsp.index_jsp._jspService(index_jsp.java:130)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:7

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Robert Turner
Mark,

Thanks for the quick follow up.

Based on your comments I have some ideas on what it might be, and I should
be able to narrow that down further for you, and provide all the details
that you requested.

A few notes on the environment I'm using:

Docker (the host) is running on my Mac (12.2), not in AWS. AWS Linux is
only involved in the Docker image (as per the Dockerfile I shared earlier).
Moreover, it happens with Debian in the Docker image as well.
What I think is important is that I have "/work" and
"/webapps" mounted to file folders on the Mac, so I am suspecting
it's something to do with that "mounting" of the volume to the host OS, and
how Docker is mapping those and handling filename casing, etc. My MacOS
file system is APFS, Encrypted (and I thought I had case sensitivity
enabled, but I can no longer see that option -- maybe not an option for
APFS).

I will try to confirm suspicions and provide details in a few hours
(hopefully -- got a few meetings today that will get in the way).

Thanks again,

Robert


On Tue, Feb 8, 2022 at 8:51 AM Mark Thomas  wrote:

> Robert,
>
> I agree this is something to do with the Docker environment.
>
> I think case insensitivity is involved somewhere as I can trigger the
> error if I copy my equivalent of Failure.class to failure.class and then
> call the JSP.
>
> I understand why it only occurs for * imports. In that instance, Tomcat
> has to check if the class can be loaded from each of the imported
> packages. Tomcat checks the file system first as that is faster than
> trying (and failing) to load a class. The file system checks are
> designed to be case sensitive - even on case insensitive file systems.
> Something seems to be going wrong here and I'm still not sure what.
>
> I have tried to recreate this on AWS without success. If you have time,
> I think we'd need the following to dig into this further:
>
> - Source for the simplest possible test WAR that demonstrates this
>issue. I think a single class and a single JSP page should be
>sufficient.
>
> - The WAR you created from the above (to rule out any build issues).
>
> - A minimal Dockerfile to create a Tomcat instance that demonstrates
>this issue. Should just copy the WAR to the container and start it
>with JPDA enabled.
>
> - Which AMI you used to create the AWS instance. I'm using the AWS free
>tier so I used a t2.micro instance with
>amzn2-ami-kernel-5.10-hvm-2.0.20220121.0-x86_64-gp2
>
> Thanks,
>
> Mark
>
>
> On 08/02/2022 13:24, Robert Turner wrote:
> > One thing to add is that my "conclusion" about OS variances I believe to
> be
> > incorrect. Our tests typically run on Linux, so I think it's still
> > something to do with a difference in the Docker-based environment.
> >
> > Let me know if you need any more details on anything...(but I suspect
> with
> > a debugger up on the Expression Resolvers, you will at least narrow it
> down
> > quickly...)
> >
> > On Tue, Feb 8, 2022 at 7:55 AM Robert Turner 
> wrote:
> >
> >> Thanks Mark. Much appreciated.
> >>
> >> On Tue., Feb. 8, 2022, 04:06 Mark Thomas,  wrote:
> >>
> >>> Robert,
> >>>
> >>> Thank you for putting the effort in to debugging this. Narrowing down
> >>> the issue to a simple test case is extremely helpful.
> >>>
> >>> The behaviour you describe looks odd to me. I'd expect consistent
> >>> behaviour across platforms irrespective of the case sensitivity of the
> >>> file system in use.
> >>>
> >>> I'm going to use your test case to investigate this further. I'll
> report
> >>> back here with my findings - hopefully later today.
> >>>
> >>> Mark
> >>>
> >>>
> >>> On 08/02/2022 03:29, Robert Turner wrote:
>  Okay, so I have finally narrowed it down the trivial failure case,
> and I
>  think I have an explanation as a result:
> 
>  [1] works (in docker), and [2] fails (in docker) but works outside.
> The
>  difference between the two is the import directive being a wildcard
> >>> (ugly,
>  but historical in our app in some places we haven't yet cleaned up).
> 
>  I am therefore speculating based on the Expression Language
> >>> specification
>  that because the class wasn't explicitly imported, it's not in the
> list
> >>> of
>  available classes for static class resolution, and thus it fails.
>  Combine this with MacOS and Windows not caring about filename cases,
> and
>  Linux caring, then I suspect it's just matching differently in both
> >>> cases.
> 
>  Workaround/fix would be:
>  - to ensure we explicitly import the class (instead or in addition to
> >>> the
>  wildcard)
>  OR
>  - rename the attribute so it doesn't map directly to the class name.
> 
> 
>  So I think I can bring my overly-detailed thread to an end...unless my
>  guess at the reasoning is incorrect and someone has a better
> >>> explanation.
> 
>  Thanks Rob S and Neil for having a look and providing suggestions --
> in
>  part, it was someth

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Mark Thomas

Robert,

I agree this is something to do with the Docker environment.

I think case insensitivity is involved somewhere as I can trigger the 
error if I copy my equivalent of Failure.class to failure.class and then 
call the JSP.


I understand why it only occurs for * imports. In that instance, Tomcat 
has to check if the class can be loaded from each of the imported 
packages. Tomcat checks the file system first as that is faster than 
trying (and failing) to load a class. The file system checks are 
designed to be case sensitive - even on case insensitive file systems. 
Something seems to be going wrong here and I'm still not sure what.


I have tried to recreate this on AWS without success. If you have time, 
I think we'd need the following to dig into this further:


- Source for the simplest possible test WAR that demonstrates this
  issue. I think a single class and a single JSP page should be
  sufficient.

- The WAR you created from the above (to rule out any build issues).

- A minimal Dockerfile to create a Tomcat instance that demonstrates
  this issue. Should just copy the WAR to the container and start it
  with JPDA enabled.

- Which AMI you used to create the AWS instance. I'm using the AWS free
  tier so I used a t2.micro instance with
  amzn2-ami-kernel-5.10-hvm-2.0.20220121.0-x86_64-gp2

Thanks,

Mark


On 08/02/2022 13:24, Robert Turner wrote:

One thing to add is that my "conclusion" about OS variances I believe to be
incorrect. Our tests typically run on Linux, so I think it's still
something to do with a difference in the Docker-based environment.

Let me know if you need any more details on anything...(but I suspect with
a debugger up on the Expression Resolvers, you will at least narrow it down
quickly...)

On Tue, Feb 8, 2022 at 7:55 AM Robert Turner  wrote:


Thanks Mark. Much appreciated.

On Tue., Feb. 8, 2022, 04:06 Mark Thomas,  wrote:


Robert,

Thank you for putting the effort in to debugging this. Narrowing down
the issue to a simple test case is extremely helpful.

The behaviour you describe looks odd to me. I'd expect consistent
behaviour across platforms irrespective of the case sensitivity of the
file system in use.

I'm going to use your test case to investigate this further. I'll report
back here with my findings - hopefully later today.

Mark


On 08/02/2022 03:29, Robert Turner wrote:

Okay, so I have finally narrowed it down the trivial failure case, and I
think I have an explanation as a result:

[1] works (in docker), and [2] fails (in docker) but works outside. The
difference between the two is the import directive being a wildcard

(ugly,

but historical in our app in some places we haven't yet cleaned up).

I am therefore speculating based on the Expression Language

specification

that because the class wasn't explicitly imported, it's not in the list

of

available classes for static class resolution, and thus it fails.
Combine this with MacOS and Windows not caring about filename cases, and
Linux caring, then I suspect it's just matching differently in both

cases.


Workaround/fix would be:
- to ensure we explicitly import the class (instead or in addition to

the

wildcard)
OR
- rename the attribute so it doesn't map directly to the class name.


So I think I can bring my overly-detailed thread to an end...unless my
guess at the reasoning is incorrect and someone has a better

explanation.


Thanks Rob S and Neil for having a look and providing suggestions -- in
part, it was something related to what you both said, but I believe in
different contexts than you expected.

Robert


[1]
$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"

isELIgnored="false" %>

<%@page import="com.example.rt.Failing" %>
<%
  final Failing failing = null;
  pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}


[2]
$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"

isELIgnored="false" %>

<%@page import="com.example.rt.*" %>
<%
  final Failing failing = null;
  pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}




On Mon, Feb 7, 2022 at 10:14 PM Robert Turner 

wrote:



So back to a divide and conquer approach I think.

I just created a trivial "example" [1] and it works as expected (i.e.

no

exception was generated) (on the same servers I was testing the

complex JAR

file) -- so possibly something else modifying the behaviour -- a JAR

on the

classpath, or something in the JSP file...

[1]

$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"

isELIgnored="false" %>

<%@page import="com.example.rt.Failing"%>
<%
  final Failing failing = null;
  pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}



$ cat src/main/java/com/example/rt/Failing.java
package com.example.rt;

public class Failing {

  private final String field1 = "fiel

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Robert Turner
One thing to add is that my "conclusion" about OS variances I believe to be
incorrect. Our tests typically run on Linux, so I think it's still
something to do with a difference in the Docker-based environment.

Let me know if you need any more details on anything...(but I suspect with
a debugger up on the Expression Resolvers, you will at least narrow it down
quickly...)

On Tue, Feb 8, 2022 at 7:55 AM Robert Turner  wrote:

> Thanks Mark. Much appreciated.
>
> On Tue., Feb. 8, 2022, 04:06 Mark Thomas,  wrote:
>
>> Robert,
>>
>> Thank you for putting the effort in to debugging this. Narrowing down
>> the issue to a simple test case is extremely helpful.
>>
>> The behaviour you describe looks odd to me. I'd expect consistent
>> behaviour across platforms irrespective of the case sensitivity of the
>> file system in use.
>>
>> I'm going to use your test case to investigate this further. I'll report
>> back here with my findings - hopefully later today.
>>
>> Mark
>>
>>
>> On 08/02/2022 03:29, Robert Turner wrote:
>> > Okay, so I have finally narrowed it down the trivial failure case, and I
>> > think I have an explanation as a result:
>> >
>> > [1] works (in docker), and [2] fails (in docker) but works outside. The
>> > difference between the two is the import directive being a wildcard
>> (ugly,
>> > but historical in our app in some places we haven't yet cleaned up).
>> >
>> > I am therefore speculating based on the Expression Language
>> specification
>> > that because the class wasn't explicitly imported, it's not in the list
>> of
>> > available classes for static class resolution, and thus it fails.
>> > Combine this with MacOS and Windows not caring about filename cases, and
>> > Linux caring, then I suspect it's just matching differently in both
>> cases.
>> >
>> > Workaround/fix would be:
>> > - to ensure we explicitly import the class (instead or in addition to
>> the
>> > wildcard)
>> > OR
>> > - rename the attribute so it doesn't map directly to the class name.
>> >
>> >
>> > So I think I can bring my overly-detailed thread to an end...unless my
>> > guess at the reasoning is incorrect and someone has a better
>> explanation.
>> >
>> > Thanks Rob S and Neil for having a look and providing suggestions -- in
>> > part, it was something related to what you both said, but I believe in
>> > different contexts than you expected.
>> >
>> > Robert
>> >
>> >
>> > [1]
>> > $ cat src/main/webapp/index.jsp
>> > <%@page contentType="text/html" pageEncoding="UTF-8"
>> isELIgnored="false" %>
>> > <%@page import="com.example.rt.Failing" %>
>> > <%
>> >  final Failing failing = null;
>> >  pageContext.setAttribute("failing", failing);
>> > %>
>> > 
>> > 
>> > Hello World!
>> >
>> > field1=${failing.field1}
>> > 
>> >
>> > [2]
>> > $ cat src/main/webapp/index.jsp
>> > <%@page contentType="text/html" pageEncoding="UTF-8"
>> isELIgnored="false" %>
>> > <%@page import="com.example.rt.*" %>
>> > <%
>> >  final Failing failing = null;
>> >  pageContext.setAttribute("failing", failing);
>> > %>
>> > 
>> > 
>> > Hello World!
>> >
>> > field1=${failing.field1}
>> > 
>> >
>> >
>> >
>> > On Mon, Feb 7, 2022 at 10:14 PM Robert Turner 
>> wrote:
>> >
>> >> So back to a divide and conquer approach I think.
>> >>
>> >> I just created a trivial "example" [1] and it works as expected (i.e.
>> no
>> >> exception was generated) (on the same servers I was testing the
>> complex JAR
>> >> file) -- so possibly something else modifying the behaviour -- a JAR
>> on the
>> >> classpath, or something in the JSP file...
>> >>
>> >> [1]
>> >>
>> >> $ cat src/main/webapp/index.jsp
>> >> <%@page contentType="text/html" pageEncoding="UTF-8"
>> isELIgnored="false" %>
>> >> <%@page import="com.example.rt.Failing"%>
>> >> <%
>> >>  final Failing failing = null;
>> >>  pageContext.setAttribute("failing", failing);
>> >> %>
>> >> 
>> >> 
>> >> Hello World!
>> >>
>> >> field1=${failing.field1}
>> >> 
>> >> 
>> >>
>> >> $ cat src/main/java/com/example/rt/Failing.java
>> >> package com.example.rt;
>> >>
>> >> public class Failing {
>> >>
>> >>  private final String field1 = "field1_value";
>> >>
>> >>  public String getField1() {
>> >>  return field1;
>> >>  }
>> >>
>> >> }
>> >>
>> >>
>> >>
>> >> On Mon, Feb 7, 2022 at 9:51 PM Robert Turner 
>> wrote:
>> >>
>> >>> I'm just avoiding sharing product details or things I think only
>> serves
>> >>> to confuse the problem. Sorry if you felt I wasn't sharing. It wasn't
>> my
>> >>> intention to be obtuse. I didn't believe they added any value for the
>> >>> diagnostics (of course that assumes I know enough about the problem).
>> >>>
>> >>> However, since you think they might be useful, here they the name
>> mapping
>> >>> from the exception and the Java and JSP code excerpts:
>> >>>
>> >>>"package1" -> "model"
>> >>>"Class1" -> "Organization"
>> >>>"class1" -> "organization"
>> >>>
>> >>> The class is present in the package (see [1]) -- otherwise it w

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Robert Turner
Thanks Mark. Much appreciated.

On Tue., Feb. 8, 2022, 04:06 Mark Thomas,  wrote:

> Robert,
>
> Thank you for putting the effort in to debugging this. Narrowing down
> the issue to a simple test case is extremely helpful.
>
> The behaviour you describe looks odd to me. I'd expect consistent
> behaviour across platforms irrespective of the case sensitivity of the
> file system in use.
>
> I'm going to use your test case to investigate this further. I'll report
> back here with my findings - hopefully later today.
>
> Mark
>
>
> On 08/02/2022 03:29, Robert Turner wrote:
> > Okay, so I have finally narrowed it down the trivial failure case, and I
> > think I have an explanation as a result:
> >
> > [1] works (in docker), and [2] fails (in docker) but works outside. The
> > difference between the two is the import directive being a wildcard
> (ugly,
> > but historical in our app in some places we haven't yet cleaned up).
> >
> > I am therefore speculating based on the Expression Language specification
> > that because the class wasn't explicitly imported, it's not in the list
> of
> > available classes for static class resolution, and thus it fails.
> > Combine this with MacOS and Windows not caring about filename cases, and
> > Linux caring, then I suspect it's just matching differently in both
> cases.
> >
> > Workaround/fix would be:
> > - to ensure we explicitly import the class (instead or in addition to the
> > wildcard)
> > OR
> > - rename the attribute so it doesn't map directly to the class name.
> >
> >
> > So I think I can bring my overly-detailed thread to an end...unless my
> > guess at the reasoning is incorrect and someone has a better explanation.
> >
> > Thanks Rob S and Neil for having a look and providing suggestions -- in
> > part, it was something related to what you both said, but I believe in
> > different contexts than you expected.
> >
> > Robert
> >
> >
> > [1]
> > $ cat src/main/webapp/index.jsp
> > <%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false"
> %>
> > <%@page import="com.example.rt.Failing" %>
> > <%
> >  final Failing failing = null;
> >  pageContext.setAttribute("failing", failing);
> > %>
> > 
> > 
> > Hello World!
> >
> > field1=${failing.field1}
> > 
> >
> > [2]
> > $ cat src/main/webapp/index.jsp
> > <%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false"
> %>
> > <%@page import="com.example.rt.*" %>
> > <%
> >  final Failing failing = null;
> >  pageContext.setAttribute("failing", failing);
> > %>
> > 
> > 
> > Hello World!
> >
> > field1=${failing.field1}
> > 
> >
> >
> >
> > On Mon, Feb 7, 2022 at 10:14 PM Robert Turner 
> wrote:
> >
> >> So back to a divide and conquer approach I think.
> >>
> >> I just created a trivial "example" [1] and it works as expected (i.e. no
> >> exception was generated) (on the same servers I was testing the complex
> JAR
> >> file) -- so possibly something else modifying the behaviour -- a JAR on
> the
> >> classpath, or something in the JSP file...
> >>
> >> [1]
> >>
> >> $ cat src/main/webapp/index.jsp
> >> <%@page contentType="text/html" pageEncoding="UTF-8"
> isELIgnored="false" %>
> >> <%@page import="com.example.rt.Failing"%>
> >> <%
> >>  final Failing failing = null;
> >>  pageContext.setAttribute("failing", failing);
> >> %>
> >> 
> >> 
> >> Hello World!
> >>
> >> field1=${failing.field1}
> >> 
> >> 
> >>
> >> $ cat src/main/java/com/example/rt/Failing.java
> >> package com.example.rt;
> >>
> >> public class Failing {
> >>
> >>  private final String field1 = "field1_value";
> >>
> >>  public String getField1() {
> >>  return field1;
> >>  }
> >>
> >> }
> >>
> >>
> >>
> >> On Mon, Feb 7, 2022 at 9:51 PM Robert Turner 
> wrote:
> >>
> >>> I'm just avoiding sharing product details or things I think only serves
> >>> to confuse the problem. Sorry if you felt I wasn't sharing. It wasn't
> my
> >>> intention to be obtuse. I didn't believe they added any value for the
> >>> diagnostics (of course that assumes I know enough about the problem).
> >>>
> >>> However, since you think they might be useful, here they the name
> mapping
> >>> from the exception and the Java and JSP code excerpts:
> >>>
> >>>"package1" -> "model"
> >>>"Class1" -> "Organization"
> >>>"class1" -> "organization"
> >>>
> >>> The class is present in the package (see [1]) -- otherwise it wouldn't
> >>> work in one environment and not the other -- I believe I have confirmed
> >>> that carefully. Full class paths (with path-names relativised to
> compare
> >>> between environments) listed below [2], and the code that emitted the
> >>> listing is here [3]. I post-processed the log lines as follows [4].
> Docker
> >>> file for the Tomcat container provided [5]. JDK details listed in [6].
> >>> Tomcat version is 9.0.58 in all cases.
> >>>
> >>> What seems to be different is:
> >>>   - the way the EL resolver is working
> >>> OR
> >>>   - the behaviour of the class loader differs

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-08 Thread Mark Thomas

Robert,

Thank you for putting the effort in to debugging this. Narrowing down 
the issue to a simple test case is extremely helpful.


The behaviour you describe looks odd to me. I'd expect consistent 
behaviour across platforms irrespective of the case sensitivity of the 
file system in use.


I'm going to use your test case to investigate this further. I'll report 
back here with my findings - hopefully later today.


Mark


On 08/02/2022 03:29, Robert Turner wrote:

Okay, so I have finally narrowed it down the trivial failure case, and I
think I have an explanation as a result:

[1] works (in docker), and [2] fails (in docker) but works outside. The
difference between the two is the import directive being a wildcard (ugly,
but historical in our app in some places we haven't yet cleaned up).

I am therefore speculating based on the Expression Language specification
that because the class wasn't explicitly imported, it's not in the list of
available classes for static class resolution, and thus it fails.
Combine this with MacOS and Windows not caring about filename cases, and
Linux caring, then I suspect it's just matching differently in both cases.

Workaround/fix would be:
- to ensure we explicitly import the class (instead or in addition to the
wildcard)
OR
- rename the attribute so it doesn't map directly to the class name.


So I think I can bring my overly-detailed thread to an end...unless my
guess at the reasoning is incorrect and someone has a better explanation.

Thanks Rob S and Neil for having a look and providing suggestions -- in
part, it was something related to what you both said, but I believe in
different contexts than you expected.

Robert


[1]
$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
<%@page import="com.example.rt.Failing" %>
<%
 final Failing failing = null;
 pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}


[2]
$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
<%@page import="com.example.rt.*" %>
<%
 final Failing failing = null;
 pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}




On Mon, Feb 7, 2022 at 10:14 PM Robert Turner  wrote:


So back to a divide and conquer approach I think.

I just created a trivial "example" [1] and it works as expected (i.e. no
exception was generated) (on the same servers I was testing the complex JAR
file) -- so possibly something else modifying the behaviour -- a JAR on the
classpath, or something in the JSP file...

[1]

$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
<%@page import="com.example.rt.Failing"%>
<%
 final Failing failing = null;
 pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}



$ cat src/main/java/com/example/rt/Failing.java
package com.example.rt;

public class Failing {

 private final String field1 = "field1_value";

 public String getField1() {
 return field1;
 }

}



On Mon, Feb 7, 2022 at 9:51 PM Robert Turner  wrote:


I'm just avoiding sharing product details or things I think only serves
to confuse the problem. Sorry if you felt I wasn't sharing. It wasn't my
intention to be obtuse. I didn't believe they added any value for the
diagnostics (of course that assumes I know enough about the problem).

However, since you think they might be useful, here they the name mapping
from the exception and the Java and JSP code excerpts:

   "package1" -> "model"
   "Class1" -> "Organization"
   "class1" -> "organization"

The class is present in the package (see [1]) -- otherwise it wouldn't
work in one environment and not the other -- I believe I have confirmed
that carefully. Full class paths (with path-names relativised to compare
between environments) listed below [2], and the code that emitted the
listing is here [3]. I post-processed the log lines as follows [4]. Docker
file for the Tomcat container provided [5]. JDK details listed in [6].
Tomcat version is 9.0.58 in all cases.

What seems to be different is:
  - the way the EL resolver is working
OR
  - the behaviour of the class loader differs in the different
environments.
OR
  - something else I do not understand is relevant

The working environments are MacOS and Windows, and the failing
environment is either Debian or AWS Linux 2 running in a docker container.
If the class loaders behaviour differently, then that could explain the
issues, however, that would surprise me if they differed in any material
way on the different platforms.

I hope that helps provide more detail that might be useful...

Robert


[1]
$ unzip -l target/app.war | grep "model\/Organization\.class"
 66246  02-07-2022 20:17   WEB-INF/classes/model/Organization.class


[2]
java.class.path=/bin/bootstrap.jar:/bin/tomcat-juli.jar
Class loader URLs:
   

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
Okay, so I have finally narrowed it down the trivial failure case, and I
think I have an explanation as a result:

[1] works (in docker), and [2] fails (in docker) but works outside. The
difference between the two is the import directive being a wildcard (ugly,
but historical in our app in some places we haven't yet cleaned up).

I am therefore speculating based on the Expression Language specification
that because the class wasn't explicitly imported, it's not in the list of
available classes for static class resolution, and thus it fails.
Combine this with MacOS and Windows not caring about filename cases, and
Linux caring, then I suspect it's just matching differently in both cases.

Workaround/fix would be:
- to ensure we explicitly import the class (instead or in addition to the
wildcard)
OR
- rename the attribute so it doesn't map directly to the class name.


So I think I can bring my overly-detailed thread to an end...unless my
guess at the reasoning is incorrect and someone has a better explanation.

Thanks Rob S and Neil for having a look and providing suggestions -- in
part, it was something related to what you both said, but I believe in
different contexts than you expected.

Robert


[1]
$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
<%@page import="com.example.rt.Failing" %>
<%
final Failing failing = null;
pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}


[2]
$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
<%@page import="com.example.rt.*" %>
<%
final Failing failing = null;
pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}




On Mon, Feb 7, 2022 at 10:14 PM Robert Turner  wrote:

> So back to a divide and conquer approach I think.
>
> I just created a trivial "example" [1] and it works as expected (i.e. no
> exception was generated) (on the same servers I was testing the complex JAR
> file) -- so possibly something else modifying the behaviour -- a JAR on the
> classpath, or something in the JSP file...
>
> [1]
>
> $ cat src/main/webapp/index.jsp
> <%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
> <%@page import="com.example.rt.Failing"%>
> <%
> final Failing failing = null;
> pageContext.setAttribute("failing", failing);
> %>
> 
> 
> Hello World!
>
> field1=${failing.field1}
> 
> 
>
> $ cat src/main/java/com/example/rt/Failing.java
> package com.example.rt;
>
> public class Failing {
>
> private final String field1 = "field1_value";
>
> public String getField1() {
> return field1;
> }
>
> }
>
>
>
> On Mon, Feb 7, 2022 at 9:51 PM Robert Turner  wrote:
>
>> I'm just avoiding sharing product details or things I think only serves
>> to confuse the problem. Sorry if you felt I wasn't sharing. It wasn't my
>> intention to be obtuse. I didn't believe they added any value for the
>> diagnostics (of course that assumes I know enough about the problem).
>>
>> However, since you think they might be useful, here they the name mapping
>> from the exception and the Java and JSP code excerpts:
>>
>>   "package1" -> "model"
>>   "Class1" -> "Organization"
>>   "class1" -> "organization"
>>
>> The class is present in the package (see [1]) -- otherwise it wouldn't
>> work in one environment and not the other -- I believe I have confirmed
>> that carefully. Full class paths (with path-names relativised to compare
>> between environments) listed below [2], and the code that emitted the
>> listing is here [3]. I post-processed the log lines as follows [4]. Docker
>> file for the Tomcat container provided [5]. JDK details listed in [6].
>> Tomcat version is 9.0.58 in all cases.
>>
>> What seems to be different is:
>>  - the way the EL resolver is working
>> OR
>>  - the behaviour of the class loader differs in the different
>> environments.
>> OR
>>  - something else I do not understand is relevant
>>
>> The working environments are MacOS and Windows, and the failing
>> environment is either Debian or AWS Linux 2 running in a docker container.
>> If the class loaders behaviour differently, then that could explain the
>> issues, however, that would surprise me if they differed in any material
>> way on the different platforms.
>>
>> I hope that helps provide more detail that might be useful...
>>
>> Robert
>>
>>
>> [1]
>> $ unzip -l target/app.war | grep "model\/Organization\.class"
>> 66246  02-07-2022 20:17   WEB-INF/classes/model/Organization.class
>>
>>
>> [2]
>> java.class.path=/bin/bootstrap.jar:/bin/tomcat-juli.jar
>> Class loader URLs:
>>   Class loader name=org.apache.catalina.loader.ParallelWebappClassLoader,
>> URL count=146
>> URL=file:/WEB-INF/classes/
>> URL=file:/WEB-INF/lib/FastInfoset-1.2.18.jar
>> URL=file:/WEB-INF/lib/SparseBitSet-1.2.jar
>> URL=file:/WEB-INF/lib/VeracodeAnnotations-1.2.1.jar
>> URL

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
So back to a divide and conquer approach I think.

I just created a trivial "example" [1] and it works as expected (i.e. no
exception was generated) (on the same servers I was testing the complex JAR
file) -- so possibly something else modifying the behaviour -- a JAR on the
classpath, or something in the JSP file...

[1]

$ cat src/main/webapp/index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false" %>
<%@page import="com.example.rt.Failing"%>
<%
final Failing failing = null;
pageContext.setAttribute("failing", failing);
%>


Hello World!

field1=${failing.field1}



$ cat src/main/java/com/example/rt/Failing.java
package com.example.rt;

public class Failing {

private final String field1 = "field1_value";

public String getField1() {
return field1;
}

}



On Mon, Feb 7, 2022 at 9:51 PM Robert Turner  wrote:

> I'm just avoiding sharing product details or things I think only serves to
> confuse the problem. Sorry if you felt I wasn't sharing. It wasn't my
> intention to be obtuse. I didn't believe they added any value for the
> diagnostics (of course that assumes I know enough about the problem).
>
> However, since you think they might be useful, here they the name mapping
> from the exception and the Java and JSP code excerpts:
>
>   "package1" -> "model"
>   "Class1" -> "Organization"
>   "class1" -> "organization"
>
> The class is present in the package (see [1]) -- otherwise it wouldn't
> work in one environment and not the other -- I believe I have confirmed
> that carefully. Full class paths (with path-names relativised to compare
> between environments) listed below [2], and the code that emitted the
> listing is here [3]. I post-processed the log lines as follows [4]. Docker
> file for the Tomcat container provided [5]. JDK details listed in [6].
> Tomcat version is 9.0.58 in all cases.
>
> What seems to be different is:
>  - the way the EL resolver is working
> OR
>  - the behaviour of the class loader differs in the different environments.
> OR
>  - something else I do not understand is relevant
>
> The working environments are MacOS and Windows, and the failing
> environment is either Debian or AWS Linux 2 running in a docker container.
> If the class loaders behaviour differently, then that could explain the
> issues, however, that would surprise me if they differed in any material
> way on the different platforms.
>
> I hope that helps provide more detail that might be useful...
>
> Robert
>
>
> [1]
> $ unzip -l target/app.war | grep "model\/Organization\.class"
> 66246  02-07-2022 20:17   WEB-INF/classes/model/Organization.class
>
>
> [2]
> java.class.path=/bin/bootstrap.jar:/bin/tomcat-juli.jar
> Class loader URLs:
>   Class loader name=org.apache.catalina.loader.ParallelWebappClassLoader,
> URL count=146
> URL=file:/WEB-INF/classes/
> URL=file:/WEB-INF/lib/FastInfoset-1.2.18.jar
> URL=file:/WEB-INF/lib/SparseBitSet-1.2.jar
> URL=file:/WEB-INF/lib/VeracodeAnnotations-1.2.1.jar
> URL=file:/WEB-INF/lib/activation-1.1.jar
> URL=file:/WEB-INF/lib/animal-sniffer-annotations-1.20.jar
> URL=file:/WEB-INF/lib/annotations-4.1.1.4.jar
> URL=file:/WEB-INF/lib/api-common-2.0.1.jar
> URL=file:/WEB-INF/lib/auto-value-annotations-1.8.2.jar
> URL=file:/WEB-INF/lib/avatax-rest-v2-api-java_2.11-21.12.1.jar
> URL=file:/WEB-INF/lib/aws-java-sdk-core-1.12.145.jar
> URL=file:/WEB-INF/lib/aws-java-sdk-kms-1.12.145.jar
> URL=file:/WEB-INF/lib/aws-java-sdk-s3-1.12.145.jar
> URL=file:/WEB-INF/lib/bcmail-jdk15on-1.70.jar
> URL=file:/WEB-INF/lib/bcpkix-jdk15on-1.70.jar
> URL=file:/WEB-INF/lib/bcprov-jdk15on-1.70.jar
> URL=file:/WEB-INF/lib/bcutil-jdk15on-1.70.jar
> URL=file:/WEB-INF/lib/castor-core-1.4.1.jar
> URL=file:/WEB-INF/lib/castor-xml-1.4.1.jar
> URL=file:/WEB-INF/lib/checker-qual-3.5.0.jar
> URL=file:/WEB-INF/lib/commons-beanutils-1.9.4.jar
> URL=file:/WEB-INF/lib/commons-codec-1.15.jar
> URL=file:/WEB-INF/lib/commons-collections-3.2.2.jar
> URL=file:/WEB-INF/lib/commons-collections4-4.4.jar
> URL=file:/WEB-INF/lib/commons-compress-1.21.jar
> URL=file:/WEB-INF/lib/commons-digester-2.1.jar
> URL=file:/WEB-INF/lib/commons-fileupload-1.4.jar
> URL=file:/WEB-INF/lib/commons-io-2.11.0.jar
> URL=file:/WEB-INF/lib/commons-lang3-3.12.0.jar
> URL=file:/WEB-INF/lib/commons-logging-1.2.jar
> URL=file:/WEB-INF/lib/commons-math3-3.6.1.jar
> URL=file:/WEB-INF/lib/commons-text-1.9.jar
> URL=file:/WEB-INF/lib/conscrypt-openjdk-uber-2.5.1.jar
> URL=file:/WEB-INF/lib/curvesapi-1.06.jar
> URL=file:/WEB-INF/lib/ecj-3.21.0.jar
> URL=file:/WEB-INF/lib/encoder-1.2.3.jar
> URL=file:/WEB-INF/lib/encoder-jsp-1.2.3.jar
> URL=file:/WEB-INF/lib/error_prone_annotations-2.9.0.jar
> URL=file:/WEB-INF/lib/failureaccess-1.0.1.jar
> URL=file:/WEB-INF/lib/fontbox-2.0.25.jar
> URL=file:/WEB-INF/lib/gax-2.3.0.jar
> URL=fil

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
I'm just avoiding sharing product details or things I think only serves to
confuse the problem. Sorry if you felt I wasn't sharing. It wasn't my
intention to be obtuse. I didn't believe they added any value for the
diagnostics (of course that assumes I know enough about the problem).

However, since you think they might be useful, here they the name mapping
from the exception and the Java and JSP code excerpts:

  "package1" -> "model"
  "Class1" -> "Organization"
  "class1" -> "organization"

The class is present in the package (see [1]) -- otherwise it wouldn't work
in one environment and not the other -- I believe I have confirmed that
carefully. Full class paths (with path-names relativised to compare between
environments) listed below [2], and the code that emitted the listing is
here [3]. I post-processed the log lines as follows [4]. Docker file for
the Tomcat container provided [5]. JDK details listed in [6]. Tomcat
version is 9.0.58 in all cases.

What seems to be different is:
 - the way the EL resolver is working
OR
 - the behaviour of the class loader differs in the different environments.
OR
 - something else I do not understand is relevant

The working environments are MacOS and Windows, and the failing
environment is either Debian or AWS Linux 2 running in a docker container.
If the class loaders behaviour differently, then that could explain the
issues, however, that would surprise me if they differed in any material
way on the different platforms.

I hope that helps provide more detail that might be useful...

Robert


[1]
$ unzip -l target/app.war | grep "model\/Organization\.class"
66246  02-07-2022 20:17   WEB-INF/classes/model/Organization.class


[2]
java.class.path=/bin/bootstrap.jar:/bin/tomcat-juli.jar
Class loader URLs:
  Class loader name=org.apache.catalina.loader.ParallelWebappClassLoader,
URL count=146
URL=file:/WEB-INF/classes/
URL=file:/WEB-INF/lib/FastInfoset-1.2.18.jar
URL=file:/WEB-INF/lib/SparseBitSet-1.2.jar
URL=file:/WEB-INF/lib/VeracodeAnnotations-1.2.1.jar
URL=file:/WEB-INF/lib/activation-1.1.jar
URL=file:/WEB-INF/lib/animal-sniffer-annotations-1.20.jar
URL=file:/WEB-INF/lib/annotations-4.1.1.4.jar
URL=file:/WEB-INF/lib/api-common-2.0.1.jar
URL=file:/WEB-INF/lib/auto-value-annotations-1.8.2.jar
URL=file:/WEB-INF/lib/avatax-rest-v2-api-java_2.11-21.12.1.jar
URL=file:/WEB-INF/lib/aws-java-sdk-core-1.12.145.jar
URL=file:/WEB-INF/lib/aws-java-sdk-kms-1.12.145.jar
URL=file:/WEB-INF/lib/aws-java-sdk-s3-1.12.145.jar
URL=file:/WEB-INF/lib/bcmail-jdk15on-1.70.jar
URL=file:/WEB-INF/lib/bcpkix-jdk15on-1.70.jar
URL=file:/WEB-INF/lib/bcprov-jdk15on-1.70.jar
URL=file:/WEB-INF/lib/bcutil-jdk15on-1.70.jar
URL=file:/WEB-INF/lib/castor-core-1.4.1.jar
URL=file:/WEB-INF/lib/castor-xml-1.4.1.jar
URL=file:/WEB-INF/lib/checker-qual-3.5.0.jar
URL=file:/WEB-INF/lib/commons-beanutils-1.9.4.jar
URL=file:/WEB-INF/lib/commons-codec-1.15.jar
URL=file:/WEB-INF/lib/commons-collections-3.2.2.jar
URL=file:/WEB-INF/lib/commons-collections4-4.4.jar
URL=file:/WEB-INF/lib/commons-compress-1.21.jar
URL=file:/WEB-INF/lib/commons-digester-2.1.jar
URL=file:/WEB-INF/lib/commons-fileupload-1.4.jar
URL=file:/WEB-INF/lib/commons-io-2.11.0.jar
URL=file:/WEB-INF/lib/commons-lang3-3.12.0.jar
URL=file:/WEB-INF/lib/commons-logging-1.2.jar
URL=file:/WEB-INF/lib/commons-math3-3.6.1.jar
URL=file:/WEB-INF/lib/commons-text-1.9.jar
URL=file:/WEB-INF/lib/conscrypt-openjdk-uber-2.5.1.jar
URL=file:/WEB-INF/lib/curvesapi-1.06.jar
URL=file:/WEB-INF/lib/ecj-3.21.0.jar
URL=file:/WEB-INF/lib/encoder-1.2.3.jar
URL=file:/WEB-INF/lib/encoder-jsp-1.2.3.jar
URL=file:/WEB-INF/lib/error_prone_annotations-2.9.0.jar
URL=file:/WEB-INF/lib/failureaccess-1.0.1.jar
URL=file:/WEB-INF/lib/fontbox-2.0.25.jar
URL=file:/WEB-INF/lib/gax-2.3.0.jar
URL=file:/WEB-INF/lib/gax-grpc-2.3.0.jar
URL=file:/WEB-INF/lib/gmbal-api-only-4.0.3.jar
URL=file:/WEB-INF/lib/google-auth-library-credentials-1.1.0.jar
URL=file:/WEB-INF/lib/google-auth-library-oauth2-http-1.1.0.jar
URL=file:/WEB-INF/lib/google-cloud-speech-1.30.5.jar
URL=file:/WEB-INF/lib/google-http-client-1.39.2.jar
URL=file:/WEB-INF/lib/google-http-client-gson-1.39.2.jar
URL=file:/WEB-INF/lib/googleauth-1.5.0.jar
URL=file:/WEB-INF/lib/grpc-alts-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-api-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-auth-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-context-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-core-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-grpclb-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-netty-shaded-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-protobuf-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-protobuf-lite-1.40.0.jar
URL=file:/WEB-INF/lib/grpc-stub-1.40.0.jar
URL=file:/WEB-INF/lib/gson-2.8.9.jar
URL=file:/WEB-INF/lib/guava-31.0.1-jre.jar
URL=file:/WEB-INF/

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Rob Sargent




On 2/7/22 19:13, Robert Turner wrote:

So, I've gone back and double-checked as much as I can (Tomcat version, JDK
version), and the classpath, and I have identical classpaths in both
environments (except the sort order of the URLs per "level" of
ClassLoader), and I've re-verified the behaviour:
  - fails in the docker environment
  - works locally
(Same WAR file on both).

I guess I'm in to one of the following approaches next:
  - build a debug version of Tomcat, and step through the code that breaks
and see if I can figure out why (not that I have time to do this of
course...but might be necessary)
  - construct a trivial application reproduction, along with docker layout,
and see if anyone else can reproduce... (assuming anyone else has time to
do that of course...)

Anyone got any suggestions of what to look into next?


On Mon, Feb 7, 2022 at 5:05 PM Rob Sargent  wrote:


As you appear averse to sharing names of things, seems you will need to 
do a lot of extra clean-up before you can share a docker image. Make 
sure you're clear on what NoClassDefFoundError indicates (present at 
compile time, absent at runtime) and how that translates to docker-ness 
(of which I know naught).



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
So, I've gone back and double-checked as much as I can (Tomcat version, JDK
version), and the classpath, and I have identical classpaths in both
environments (except the sort order of the URLs per "level" of
ClassLoader), and I've re-verified the behaviour:
 - fails in the docker environment
 - works locally
(Same WAR file on both).

I guess I'm in to one of the following approaches next:
 - build a debug version of Tomcat, and step through the code that breaks
and see if I can figure out why (not that I have time to do this of
course...but might be necessary)
 - construct a trivial application reproduction, along with docker layout,
and see if anyone else can reproduce... (assuming anyone else has time to
do that of course...)

Anyone got any suggestions of what to look into next?


On Mon, Feb 7, 2022 at 5:05 PM Rob Sargent  wrote:

>
>
> On 2/7/22 14:50, Robert Turner wrote:
> > All
> >
> > I'm hoping that someone can point me in the right direction as this issue
> > has been baffling me all day, and I'm starting to run out of ideas of
> what
> > to look at next.
> >
> > The logic below is working without issue until I move our test
> environment
> > into a Docker container. I'm using the same Tomcat version, and the same
> > JDK in both the container and the non-container environments.
> >
> >
> > I've got some EL in a JSP page, for example (simplified):
> >
> >   ${class1.field}
> >
> >
> > And an attribute is set on the page context as follows:
> >
> > final package1.Class1 objectValue = ...; // either value object of Class1
> > or null
> > pageContext.setAttribute("class1", objectValue);
> >
> >
> > Now, when objectValue is pointing to a valid object, everything is okay.
> > But when objectValue is null, this is where things get peculiar (and I
> get
> > both a working and non-working behaviour in the different environments).
> >
> > I can easily work around the issue by changing the EL to:
> >
> >${not empty class1 ? class1.field : ''$}
> >
> > But it is my understanding that EL should handle nulls on it's own, and
> > this shouldn't be necessary.
> >
> >
> > In the failure situation in the docker container, I'm seeing a
> > NoClassDefFoundError exception for "package1/Class1" below [1] during the
> > JSP page "rendering". Things work fine outside the docker container.
> >
> >
> > It might be worth noting that in my case, the attribute name is of the
> same
> > name as the actual class (with the first letter being lowercase for the
> > attribute instead of uppercase in the class).
> >
> > Note that I've also replaced my actual package name and class names with
> > "package1" and "Class1", and the attribute name with "class", but they
> > translate 1-to-1 as in what I've provided here and do not use reserved
> > names.
> >
> >
> > I've done a bit of digging into the EL scope resolution code in Tomcat,
> and
> > I'm suspecting it might be related to how it chooses the scope of the
> > object. Possibly related to maybe looking for static aspects of the
> class,
> > or something like that. After reviewing the Servlet / JSP / EL
> > documentation, I also haven't found anything obvious that would suggest
> > what the problem might be.
> >
> > Hopefully someone has encountered this before and can nudge me in the
> right
> > direction.
> >
> > Thanks in advance,
> >
> > Robert
> >
> >
> >
> > [1]
> > Caused by: java.lang.NoClassDefFoundError: package1/Class1 (wrong name:
> > package1/class1)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
> > at
> >
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
> > at javax.el.ImportHandler.findClass(ImportHandler.java:477)
> > at javax.el.ImportHandler.resolveClass(ImportHandler.java:421)
> > at
> >
> javax.servlet.j

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
Neil,

I'm not actually trying to have the class loaded. I want it to return
"null" in the EL evaluation as though the attribute is missing.

The "problem" is that I'm seeing a different behaviour in one environment
than another, and it's proving difficult to track down why.

I'm still working on the class path analysis as suggested by Rob S, even
though the class in question should be in the class path in both cases.

Thanks for the suggestion though.

Robert


On Mon, Feb 7, 2022 at 7:16 PM Neil Aggarwal  wrote:

> Robert:
>
> > Caused by: java.lang.NoClassDefFoundError: package1/Class1 (wrong name:
> > package1/class1)
>
> This seems to be the source of your problem.
> Java does not like that the case is different.
> Make sure everything matches, including the capitals.
>
> Thank you,
>   Neil
>
> --
> Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
> We offer 30 year loans on single family houses!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Neil Aggarwal
Robert:

> Caused by: java.lang.NoClassDefFoundError: package1/Class1 (wrong name:
> package1/class1)

This seems to be the source of your problem.
Java does not like that the case is different.
Make sure everything matches, including the capitals.

Thank you,
  Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
Okay, after further digging, here's where I'm at:

According to the specification (
https://download.oracle.com/javaee-archive/el-spec.java.net/users/att-0034/EL3.0.PFD.RC1.pdf),
section 1.22 suggests that if we have an import (which it seems we do --
legacy scriptlets code), that an expression containing a class name will be
resolved against the static members of the class.

So, as to why it is different between the two environments, maybe it's as
Rob S suggested (a classpath issue of some sort) -- I will continue looking
in this direction

On Mon, Feb 7, 2022 at 5:07 PM Robert Turner  wrote:

> Yep -- I can use the same WAR in both cases, and it's a .class file in the
> WAR.
>
> I've also just figured out that if I rename the attribute from "class1" to
> "cl1", it works -- so it's something to do with the attribute name matching
> the class name.
>
> On Mon, Feb 7, 2022 at 5:05 PM Rob Sargent  wrote:
>
>>
>>
>> On 2/7/22 14:50, Robert Turner wrote:
>> > All
>> >
>> > I'm hoping that someone can point me in the right direction as this
>> issue
>> > has been baffling me all day, and I'm starting to run out of ideas of
>> what
>> > to look at next.
>> >
>> > The logic below is working without issue until I move our test
>> environment
>> > into a Docker container. I'm using the same Tomcat version, and the same
>> > JDK in both the container and the non-container environments.
>> >
>> >
>> > I've got some EL in a JSP page, for example (simplified):
>> >
>> >   ${class1.field}
>> >
>> >
>> > And an attribute is set on the page context as follows:
>> >
>> > final package1.Class1 objectValue = ...; // either value object of
>> Class1
>> > or null
>> > pageContext.setAttribute("class1", objectValue);
>> >
>> >
>> > Now, when objectValue is pointing to a valid object, everything is okay.
>> > But when objectValue is null, this is where things get peculiar (and I
>> get
>> > both a working and non-working behaviour in the different environments).
>> >
>> > I can easily work around the issue by changing the EL to:
>> >
>> >${not empty class1 ? class1.field : ''$}
>> >
>> > But it is my understanding that EL should handle nulls on it's own, and
>> > this shouldn't be necessary.
>> >
>> >
>> > In the failure situation in the docker container, I'm seeing a
>> > NoClassDefFoundError exception for "package1/Class1" below [1] during
>> the
>> > JSP page "rendering". Things work fine outside the docker container.
>> >
>> >
>> > It might be worth noting that in my case, the attribute name is of the
>> same
>> > name as the actual class (with the first letter being lowercase for the
>> > attribute instead of uppercase in the class).
>> >
>> > Note that I've also replaced my actual package name and class names with
>> > "package1" and "Class1", and the attribute name with "class", but they
>> > translate 1-to-1 as in what I've provided here and do not use reserved
>> > names.
>> >
>> >
>> > I've done a bit of digging into the EL scope resolution code in Tomcat,
>> and
>> > I'm suspecting it might be related to how it chooses the scope of the
>> > object. Possibly related to maybe looking for static aspects of the
>> class,
>> > or something like that. After reviewing the Servlet / JSP / EL
>> > documentation, I also haven't found anything obvious that would suggest
>> > what the problem might be.
>> >
>> > Hopefully someone has encountered this before and can nudge me in the
>> right
>> > direction.
>> >
>> > Thanks in advance,
>> >
>> > Robert
>> >
>> >
>> >
>> > [1]
>> > Caused by: java.lang.NoClassDefFoundError: package1/Class1 (wrong name:
>> > package1/class1)
>> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
>> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
>> > at
>> >
>> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
>> > at
>> >
>> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLo

Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
Yep -- I can use the same WAR in both cases, and it's a .class file in the
WAR.

I've also just figured out that if I rename the attribute from "class1" to
"cl1", it works -- so it's something to do with the attribute name matching
the class name.

On Mon, Feb 7, 2022 at 5:05 PM Rob Sargent  wrote:

>
>
> On 2/7/22 14:50, Robert Turner wrote:
> > All
> >
> > I'm hoping that someone can point me in the right direction as this issue
> > has been baffling me all day, and I'm starting to run out of ideas of
> what
> > to look at next.
> >
> > The logic below is working without issue until I move our test
> environment
> > into a Docker container. I'm using the same Tomcat version, and the same
> > JDK in both the container and the non-container environments.
> >
> >
> > I've got some EL in a JSP page, for example (simplified):
> >
> >   ${class1.field}
> >
> >
> > And an attribute is set on the page context as follows:
> >
> > final package1.Class1 objectValue = ...; // either value object of Class1
> > or null
> > pageContext.setAttribute("class1", objectValue);
> >
> >
> > Now, when objectValue is pointing to a valid object, everything is okay.
> > But when objectValue is null, this is where things get peculiar (and I
> get
> > both a working and non-working behaviour in the different environments).
> >
> > I can easily work around the issue by changing the EL to:
> >
> >${not empty class1 ? class1.field : ''$}
> >
> > But it is my understanding that EL should handle nulls on it's own, and
> > this shouldn't be necessary.
> >
> >
> > In the failure situation in the docker container, I'm seeing a
> > NoClassDefFoundError exception for "package1/Class1" below [1] during the
> > JSP page "rendering". Things work fine outside the docker container.
> >
> >
> > It might be worth noting that in my case, the attribute name is of the
> same
> > name as the actual class (with the first letter being lowercase for the
> > attribute instead of uppercase in the class).
> >
> > Note that I've also replaced my actual package name and class names with
> > "package1" and "Class1", and the attribute name with "class", but they
> > translate 1-to-1 as in what I've provided here and do not use reserved
> > names.
> >
> >
> > I've done a bit of digging into the EL scope resolution code in Tomcat,
> and
> > I'm suspecting it might be related to how it chooses the scope of the
> > object. Possibly related to maybe looking for static aspects of the
> class,
> > or something like that. After reviewing the Servlet / JSP / EL
> > documentation, I also haven't found anything obvious that would suggest
> > what the problem might be.
> >
> > Hopefully someone has encountered this before and can nudge me in the
> right
> > direction.
> >
> > Thanks in advance,
> >
> > Robert
> >
> >
> >
> > [1]
> > Caused by: java.lang.NoClassDefFoundError: package1/Class1 (wrong name:
> > package1/class1)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
> > at
> >
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
> > at javax.el.ImportHandler.findClass(ImportHandler.java:477)
> > at javax.el.ImportHandler.resolveClass(ImportHandler.java:421)
> > at
> >
> javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:85)
> > at
> org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:124)
> > at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:93)
> > at org.apache.el.parser.AstValue.getValue(AstValue.java:136)
> > at org.apache.el.parser.AstFunction.getValue(AstFunction.java:188)
> > at
> org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
> > at
> >
> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:692)
> > at
> >
> And you're sure package1 is on the classpath of the docker version?
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Rob Sargent




On 2/7/22 14:50, Robert Turner wrote:

All

I'm hoping that someone can point me in the right direction as this issue
has been baffling me all day, and I'm starting to run out of ideas of what
to look at next.

The logic below is working without issue until I move our test environment
into a Docker container. I'm using the same Tomcat version, and the same
JDK in both the container and the non-container environments.


I've got some EL in a JSP page, for example (simplified):

  ${class1.field}


And an attribute is set on the page context as follows:

final package1.Class1 objectValue = ...; // either value object of Class1
or null
pageContext.setAttribute("class1", objectValue);


Now, when objectValue is pointing to a valid object, everything is okay.
But when objectValue is null, this is where things get peculiar (and I get
both a working and non-working behaviour in the different environments).

I can easily work around the issue by changing the EL to:

   ${not empty class1 ? class1.field : ''$}

But it is my understanding that EL should handle nulls on it's own, and
this shouldn't be necessary.


In the failure situation in the docker container, I'm seeing a
NoClassDefFoundError exception for "package1/Class1" below [1] during the
JSP page "rendering". Things work fine outside the docker container.


It might be worth noting that in my case, the attribute name is of the same
name as the actual class (with the first letter being lowercase for the
attribute instead of uppercase in the class).

Note that I've also replaced my actual package name and class names with
"package1" and "Class1", and the attribute name with "class", but they
translate 1-to-1 as in what I've provided here and do not use reserved
names.


I've done a bit of digging into the EL scope resolution code in Tomcat, and
I'm suspecting it might be related to how it chooses the scope of the
object. Possibly related to maybe looking for static aspects of the class,
or something like that. After reviewing the Servlet / JSP / EL
documentation, I also haven't found anything obvious that would suggest
what the problem might be.

Hopefully someone has encountered this before and can nudge me in the right
direction.

Thanks in advance,

Robert



[1]
Caused by: java.lang.NoClassDefFoundError: package1/Class1 (wrong name:
package1/class1)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
at javax.el.ImportHandler.findClass(ImportHandler.java:477)
at javax.el.ImportHandler.resolveClass(ImportHandler.java:421)
at
javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:85)
at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:124)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:93)
at org.apache.el.parser.AstValue.getValue(AstValue.java:136)
at org.apache.el.parser.AstFunction.getValue(AstFunction.java:188)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
at
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:692)
at


And you're sure package1 is on the classpath of the docker version?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Odd EL resolution issue - java.lang.NoClassDefFoundError: package/Class1 (wrong name: package/class1)

2022-02-07 Thread Robert Turner
All

I'm hoping that someone can point me in the right direction as this issue
has been baffling me all day, and I'm starting to run out of ideas of what
to look at next.

The logic below is working without issue until I move our test environment
into a Docker container. I'm using the same Tomcat version, and the same
JDK in both the container and the non-container environments.


I've got some EL in a JSP page, for example (simplified):

 ${class1.field}


And an attribute is set on the page context as follows:

final package1.Class1 objectValue = ...; // either value object of Class1
or null
pageContext.setAttribute("class1", objectValue);


Now, when objectValue is pointing to a valid object, everything is okay.
But when objectValue is null, this is where things get peculiar (and I get
both a working and non-working behaviour in the different environments).

I can easily work around the issue by changing the EL to:

  ${not empty class1 ? class1.field : ''$}

But it is my understanding that EL should handle nulls on it's own, and
this shouldn't be necessary.


In the failure situation in the docker container, I'm seeing a
NoClassDefFoundError exception for "package1/Class1" below [1] during the
JSP page "rendering". Things work fine outside the docker container.


It might be worth noting that in my case, the attribute name is of the same
name as the actual class (with the first letter being lowercase for the
attribute instead of uppercase in the class).

Note that I've also replaced my actual package name and class names with
"package1" and "Class1", and the attribute name with "class", but they
translate 1-to-1 as in what I've provided here and do not use reserved
names.


I've done a bit of digging into the EL scope resolution code in Tomcat, and
I'm suspecting it might be related to how it chooses the scope of the
object. Possibly related to maybe looking for static aspects of the class,
or something like that. After reviewing the Servlet / JSP / EL
documentation, I also haven't found anything obvious that would suggest
what the problem might be.

Hopefully someone has encountered this before and can nudge me in the right
direction.

Thanks in advance,

Robert



[1]
Caused by: java.lang.NoClassDefFoundError: package1/Class1 (wrong name:
package1/class1)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
at javax.el.ImportHandler.findClass(ImportHandler.java:477)
at javax.el.ImportHandler.resolveClass(ImportHandler.java:421)
at
javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:85)
at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:124)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:93)
at org.apache.el.parser.AstValue.getValue(AstValue.java:136)
at org.apache.el.parser.AstFunction.getValue(AstFunction.java:188)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
at
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:692)
at


Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-03-24 Thread Ravi Kumar
Thanks Remmy & Chris !

So ,We are trying to add our own custom SSLImplementation and for the
functioning of the same we need to use
org.apache.tomcat.util.net.SSLImplementation.getServerSocketFactory(AbstractEndpoint
abstractEP).
But with Tomcat 8.5.x and Tomcat 9, the api getServerSocketFactory is
removed from the SSLImplementation.java .
So, is there a way to get the callback from Tomcat api to our application
once the sslimplementation is set to our inhouse custom SSLImplementation ?

Please let me know.
Appreciate your help.

Many Thanks,
Ravi
Is there any other way of achieving this?

On Tue, Feb 23, 2021 at 9:55 PM Rémy Maucherat  wrote:

> On Tue, Feb 23, 2021 at 4:47 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > Ravi,
> >
> > On 2/23/21 10:19, Ravi Kumar wrote:
> > > Using this Interface , trying to obtain the object of type
> > > ServerSocketFactory in my application.
> > > Could you please point towards any other viable alternative ?
> > >
> > > @Override
> > > <http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
> > >  public ServerSocketFactory
> > > <
> >
> http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html
> > >
> > > getServerSocketFactory(AbstractEndpoint abstractendpoint) {
> > >  return new JSSESocketFactory(abstractendpoint);
> > >  }
> >
> > No, that's "how you are doing it". Nobody just wants to get a reference
> > to a ServerSocketFactory object because it looks pretty. What are you
> > actually trying to accomplish?
> >
> > (e.g. log the TLS protocol, customize the cipher suites, etc.)
> >
>
> I know people who extended this to add features. The problem is that this
> had to go following the removal of java.io in Tomcat, and now the
> SSLEngine
> has to be used instead [compatible with NIO and NIO2]. But it's a huge
> change.
>
> Rémy
>
>
> >
> > -chris
> >
> > > On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
> > > ch...@christopherschultz.net> wrote:
> > >
> > >> Ravi,
> > >>
> > >> Please don't email list members directly. I'm happy to offer paid
> > >> support if you want to email me directly.
> > >>
> > >> On 2/23/21 05:11, Ravi Kumar wrote:
> > >>> We are upgrading the tomcat web server getting used in our web
> > >>> application. Currently we are using tomcat 7 and now migrating to
> > TOMCAT
> > >>> 9.0.43.
> > >>> We have an existing  HTTPS based application created using tomcat 7.
> > >>> Now after migration and upgrading to tomcat 9, while starting this
> same
> > >>> https application, we are receiving the error message as mentioned
> > below
> > >>> *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> > >>> java.lang.NoClassDefFoundError:
> > >>> org/apache/tomcat/util/net/ServerSocketFactory*
> > >>> *
> > >>> *
> > >>>It seems that org.apache.tomcat.util.net
> > >>> <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> > >>> been removed since tomcat 8.5.53 and in Tomcat 9 also.
> > >>
> > >> Correct.
> > >>
> > >>> Requesting for the helpful suggestion to make our existing
> application
> > >>> working with Tomcat 9 and to resolve this error.
> > >>> Please let me know if more information is required.
> > >>
> > >> What do you need this class for? Tomcat's socket handling has been
> > >> refactored between 7.x and 8.x and that class was no longer necessary.
> > >>
> > >> If your code uses that class directly, you will have to find another
> way
> > >> to accomplish what you are doing.
> > >>
> > >> So... what are you trying to do?
> > >>
> > >> -chris
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > >> For additional commands, e-mail: users-h...@tomcat.apache.org
> > >>
> > >>
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-02-23 Thread Rémy Maucherat
On Tue, Feb 23, 2021 at 4:47 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Ravi,
>
> On 2/23/21 10:19, Ravi Kumar wrote:
> > Using this Interface , trying to obtain the object of type
> > ServerSocketFactory in my application.
> > Could you please point towards any other viable alternative ?
> >
> > @Override
> > <http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
> >  public ServerSocketFactory
> > <
> http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html
> >
> > getServerSocketFactory(AbstractEndpoint abstractendpoint) {
> >  return new JSSESocketFactory(abstractendpoint);
> >  }
>
> No, that's "how you are doing it". Nobody just wants to get a reference
> to a ServerSocketFactory object because it looks pretty. What are you
> actually trying to accomplish?
>
> (e.g. log the TLS protocol, customize the cipher suites, etc.)
>

I know people who extended this to add features. The problem is that this
had to go following the removal of java.io in Tomcat, and now the SSLEngine
has to be used instead [compatible with NIO and NIO2]. But it's a huge
change.

Rémy


>
> -chris
>
> > On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> >> Ravi,
> >>
> >> Please don't email list members directly. I'm happy to offer paid
> >> support if you want to email me directly.
> >>
> >> On 2/23/21 05:11, Ravi Kumar wrote:
> >>> We are upgrading the tomcat web server getting used in our web
> >>> application. Currently we are using tomcat 7 and now migrating to
> TOMCAT
> >>> 9.0.43.
> >>> We have an existing  HTTPS based application created using tomcat 7.
> >>> Now after migration and upgrading to tomcat 9, while starting this same
> >>> https application, we are receiving the error message as mentioned
> below
> >>> *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> >>> java.lang.NoClassDefFoundError:
> >>> org/apache/tomcat/util/net/ServerSocketFactory*
> >>> *
> >>> *
> >>>It seems that org.apache.tomcat.util.net
> >>> <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> >>> been removed since tomcat 8.5.53 and in Tomcat 9 also.
> >>
> >> Correct.
> >>
> >>> Requesting for the helpful suggestion to make our existing application
> >>> working with Tomcat 9 and to resolve this error.
> >>> Please let me know if more information is required.
> >>
> >> What do you need this class for? Tomcat's socket handling has been
> >> refactored between 7.x and 8.x and that class was no longer necessary.
> >>
> >> If your code uses that class directly, you will have to find another way
> >> to accomplish what you are doing.
> >>
> >> So... what are you trying to do?
> >>
> >> -chris
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-02-23 Thread Christopher Schultz

Ravi,

On 2/23/21 10:19, Ravi Kumar wrote:

Using this Interface , trying to obtain the object of type
ServerSocketFactory in my application.
Could you please point towards any other viable alternative ?

@Override
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
 public ServerSocketFactory
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html>
getServerSocketFactory(AbstractEndpoint abstractendpoint) {
 return new JSSESocketFactory(abstractendpoint);
 }


No, that's "how you are doing it". Nobody just wants to get a reference 
to a ServerSocketFactory object because it looks pretty. What are you 
actually trying to accomplish?


(e.g. log the TLS protocol, customize the cipher suites, etc.)

-chris


On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:


Ravi,

Please don't email list members directly. I'm happy to offer paid
support if you want to email me directly.

On 2/23/21 05:11, Ravi Kumar wrote:

We are upgrading the tomcat web server getting used in our web
application. Currently we are using tomcat 7 and now migrating to TOMCAT
9.0.43.
We have an existing  HTTPS based application created using tomcat 7.
Now after migration and upgrading to tomcat 9, while starting this same
https application, we are receiving the error message as mentioned below
*SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
java.lang.NoClassDefFoundError:
org/apache/tomcat/util/net/ServerSocketFactory*
*
*
   It seems that org.apache.tomcat.util.net
<http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
been removed since tomcat 8.5.53 and in Tomcat 9 also.


Correct.


Requesting for the helpful suggestion to make our existing application
working with Tomcat 9 and to resolve this error.
Please let me know if more information is required.


What do you need this class for? Tomcat's socket handling has been
refactored between 7.x and 8.x and that class was no longer necessary.

If your code uses that class directly, you will have to find another way
to accomplish what you are doing.

So... what are you trying to do?

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-02-23 Thread Ravi Kumar
Using this Interface , trying to obtain the object of type
ServerSocketFactory in my application.
Could you please point towards any other viable alternative ?

@Override
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
public ServerSocketFactory
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html>
getServerSocketFactory(AbstractEndpoint abstractendpoint) {
return new JSSESocketFactory(abstractendpoint);
}

Thanks in Advance,
Regards,
Ravi

On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Ravi,
>
> Please don't email list members directly. I'm happy to offer paid
> support if you want to email me directly.
>
> On 2/23/21 05:11, Ravi Kumar wrote:
> > We are upgrading the tomcat web server getting used in our web
> > application. Currently we are using tomcat 7 and now migrating to TOMCAT
> > 9.0.43.
> > We have an existing  HTTPS based application created using tomcat 7.
> > Now after migration and upgrading to tomcat 9, while starting this same
> > https application, we are receiving the error message as mentioned below
> > *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> > java.lang.NoClassDefFoundError:
> > org/apache/tomcat/util/net/ServerSocketFactory*
> > *
> > *
> >   It seems that org.apache.tomcat.util.net
> > <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> > been removed since tomcat 8.5.53 and in Tomcat 9 also.
>
> Correct.
>
> > Requesting for the helpful suggestion to make our existing application
> > working with Tomcat 9 and to resolve this error.
> > Please let me know if more information is required.
>
> What do you need this class for? Tomcat's socket handling has been
> refactored between 7.x and 8.x and that class was no longer necessary.
>
> If your code uses that class directly, you will have to find another way
> to accomplish what you are doing.
>
> So... what are you trying to do?
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-02-23 Thread Christopher Schultz

Ravi,

Please don't email list members directly. I'm happy to offer paid 
support if you want to email me directly.


On 2/23/21 05:11, Ravi Kumar wrote:
We are upgrading the tomcat web server getting used in our web 
application. Currently we are using tomcat 7 and now migrating to TOMCAT 
9.0.43.

We have an existing  HTTPS based application created using tomcat 7.
Now after migration and upgrading to tomcat 9, while starting this same 
https application, we are receiving the error message as mentioned below

*SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
java.lang.NoClassDefFoundError: 
org/apache/tomcat/util/net/ServerSocketFactory*

*
*
  It seems that org.apache.tomcat.util.net 
<http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has 
been removed since tomcat 8.5.53 and in Tomcat 9 also.


Correct.

Requesting for the helpful suggestion to make our existing application 
working with Tomcat 9 and to resolve this error.

Please let me know if more information is required.


What do you need this class for? Tomcat's socket handling has been 
refactored between 7.x and 8.x and that class was no longer necessary.


If your code uses that class directly, you will have to find another way 
to accomplish what you are doing.


So... what are you trying to do?

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-02-23 Thread Ravi Kumar
Dear Tomcat Team,

We are upgrading the tomcat web server getting used in our web application.
Currently we are using tomcat 7 and now migrating to TOMCAT 9.0.43.
We have an existing  HTTPS based application created using tomcat 7.
Now after migration and upgrading to tomcat 9, while starting this same
https application, we are receiving the error message as mentioned below

*SEVERE: Failed to initialize component
[Connector[HTTP/1.1-8443]]java.lang.NoClassDefFoundError:
org/apache/tomcat/util/net/ServerSocketFactory*

 It seems that org.apache.tomcat.util.net.*ServerSocketFaactory *class has
been removed since tomcat 8.5.53 and in Tomcat 9 also.

Requesting for the helpful suggestion to make our existing application
working with Tomcat 9 and to resolve this error.
Please let me know if more information is required.

Regards,
Ravi


RE: [EXTERNAL] Re: java.lang.NoClassDefFoundError: Could not initialize class net.sf.ehcache.Element

2019-07-11 Thread Hua, Gary - Saint Louis, MO - Contractor
Paul:

 Thanks.I put the ehcache-3.6.3.jar and the error seemed to be 
gone.

Gary

-Original Message-
From: Paul Carter-Brown [mailto:paul.carter-br...@jini.guru] 
Sent: Wednesday, July 10, 2019 3:42 PM
To: Tomcat Users List 
Subject: [EXTERNAL] Re: java.lang.NoClassDefFoundError: Could not initialize 
class net.sf.ehcache.Element

NoClassDefFoundError is not the same as ClassNotFoundException

Typically a NoClassDefFoundError is due to a class failing its static 
initialisation when first loaded by the classloader. Can you check in your logs 
for any prior errors (even at bootup) relating to class failing to be loaded

Paul



On Wed, Jul 10, 2019 at 6:42 PM Hua, Gary - Saint Louis, MO - Contractor 
 wrote:

> Tomcat Experts:
>
> I have a web application deployed to our DEV Tomcat server
> 9.0.13.   I try to put all the hibernate jars files to version
> Hibernate-3.6.10.  The following is the jar files under WEB-INF/lib:
>
>
> /opt/TomCat/tomcat/webapps/TOPS-WEB/WEB-INF/lib>ls -l total 56844
> -rw-r--r-- 1 atadmin atadmin   443432 Feb  8  2012
> antlr-2.7.6.jar
> -rw-r--r-- 1 atadmin atadmin16777 Jun 18 15:58
> asm-attrs.jar
> -rw-r--r-- 1 atadmin atadmin26360 Jun 18 15:58  asm.jar
> -rw-r--r-- 1 atadmin atadmin   281998 Jun 18 15:58
>  cglib-2.1.jar
> -rw-r--r-- 1 atadmin atadmin  4604132 Jun 18 15:58 
> com.ibm.ws.webcontainer.jar
> -rw-r--r-- 1 atadmin atadmin   188671 Jun 18 15:58
> commons-beanutils.jar
> -rw-r--r-- 1 atadmin atadmin   559366 Feb  8  2012
> commons-collections-3.1.jar
> -rw-r--r-- 1 atadmin atadmin   165119 Jun 18 16:00
> commons-collections.jar.old
> -rw-r--r-- 1 atadmin atadmin   205318 Mar 19 11:12
> commons-dbcp2-2.6.0.jar
> -rw-r--r-- 1 atadmin atadmin   168446 Jun 18 15:58
> commons-digester.jar
> -rw-r--r-- 1 atadmin atadmin70604 Jun 18 15:58
> commons-fileupload-1.3.3.jar
> -rw-r--r-- 1 atadmin atadmin   214788 Jun 18 15:58
> commons-io-2.6.jar
> -rw-r--r-- 1 atadmin atadmin   207723 Jun 18 15:58
> commons-lang-2.1.jar
> -rw-r--r-- 1 atadmin atadmin   315805 Jun 18 15:58
> commons-lang3-3.1.jar
> -rw-r--r-- 1 atadmin atadmin26388 Jun 18 15:58
> commons-logging.jar
> -rw-r--r-- 1 atadmin atadmin84462 Jun 18 15:58
> commons-validator.jar
> -rw-r--r-- 1 atadmin atadmin  4239628 Jun 18 15:58  db2jcc4.jar
> -rw-r--r-- 1 atadmin atadmin 2068 Jun 18 15:58
> db2jcc_license_cu.jar
> -rw-r--r-- 1 atadmin atadmin  2125577 Jun 18 15:58 db2jcc_V9FP6.jar
> -rw-r--r-- 1 atadmin atadmin   210432 Jun 18 15:58
> displaytag-1.1.jar
> -rw-r--r-- 1 atadmin atadmin12590 Jun 18 15:58
> displaytag-export-poi-1.1.jar
> -rw-r--r-- 1 atadmin atadmin   312509 Jun 18 16:00
> dom4j-1.5.2.jar.old
> -rw-r--r-- 1 atadmin atadmin   313898 Feb  8  2012
> dom4j-1.6.1.jar
> -rw-r--r-- 1 atadmin atadmin 10237841 Jul  9 12:29 ehcache-2.10.6.jar
> -rw-r--r-- 1 atadmin atadmin   989884 Jul  9 16:57
> ehcache-core-2.4.2.jar
> -rw-r--r-- 1 atadmin atadmin  4162825 Jul  3 10:43 hibernate3.jar
> -rw-r--r-- 1 atadmin atadmin  3123360 Jul  9 12:44 
> hibernate-core-3.6.10.Final.jar
> -rw-r--r-- 1 atadmin atadmin56287 Jul  9 12:29
> hibernate-ehcache-5.4.3.Final.jar
> -rw-r--r-- 1 atadmin atadmin65425 Jun 18 15:58
>  jakarta-oro.jar
> -rw-r--r-- 1 atadmin atadmin  1979523 Dec 17  2018 javaee-api-8.0.jar
> -rw-r--r-- 1 atadmin atadmin   633312 Feb  8  2012
>  javassist-3.12.0.GA.jar
> -rw-r--r-- 1 atadmin atadmin   153115 Jun 18 15:58  jdom.jar
> -rw-r--r-- 1 atadmin atadmin64597 Jun 18 15:58
> json-20180813.jar
> -rw-r--r-- 1 atadmin atadmin10899 Feb  8  2012  jta-1.1.jar
> -rw-r--r-- 1 atadmin atadmin   367444 Jun 18 15:58  log4j.jar
> -rw-r--r-- 1 atadmin atadmin  3698857 Jul  6 21:11  ojdbc7.jar
> -rw-r--r-- 1 atadmin atadmin   105355 Jun 18 15:58
> old_lcms-webtools.jar
> -rw-r--r-- 1 atadmin atadmin   795231 Jun 18 15:58
> poi-2.5-final-20040302.jar
> -rw-r--r-- 1 atadmin atadmin55210 Jun 18 15:58
> poi-contrib-2.5-final-20040302.jar
> -rw-r--r-- 1 atadmin atadmin   188942 Jun 18 15:58
> poi-scratchpad-2.5-final-20040302.jar
> -rw-r--r-- 1 atadmin atadmin   475943 Jun 18 15:58
> proxool-0.8.3.jar
> -rw-r--r-- 1 atadmin atadmin25496 Feb  8  2012
> slf4j-api-1.6.1.jar
> -rw-r--r-- 1 atadmin atadmin 7669 Mar 26 20:33
> slf4j-simple-1.6.1.jar
> -rw-r--r-- 1 atadmin atadmin   543706 Jun 18 15:58  struts.jar
> -rw-r--r-- 1 atadmin atadmin   495271 Jun 18 15:58
> Struts-Layout.jar
> -rw-r--r-- 1 atadmin atadmin68046 Jun 18 15:58
> struts-menu-2.4.3.jar
> -rw-r--r-- 1 atadmin atadmin39427 Jun 18 15:58
> taglibs-request.jar
> -rw-r--r-- 1 atadmin atadmin44061 Jun

Re: java.lang.NoClassDefFoundError: Could not initialize class net.sf.ehcache.Element

2019-07-10 Thread Paul Carter-Brown
 up.   When I click the "Serach"
> button on the Transportation Search screen after entering the origin and
> destination values, I get the following error:
>
> 81036 [https-jsse-nio-9443-exec-8] ERROR actions.DispatchAction  -
> Dispatch[/TransportationInquiryResults] to method
> 'searchTransportationViewResults' returned an exception
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
> at
> org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
> at
> org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
> at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
> at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
> :::
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> net.sf.ehcache.Element
> at
> net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion.put(EhcacheTransactionalDataRegion.java:139)
> at
> net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion.put(EhcacheTransactionalDataRegion.java:126)
> at
> net.sf.ehcache.hibernate.strategy.ReadOnlyEhcacheEntityRegionAccessStrategy.putFromLoad(ReadOnlyEhcacheEntityRegionAccessStrategy.java:63)
> at
> net.sf.ehcache.hibernate.nonstop.NonstopAwareEntityRegionAccessStrategy.putFromLoad(NonstopAwareEntityRegionAccessStrategy.java:180)
> at
> org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:195)
> at
> org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
> at org.hibernate.loader.Loader.doQuery(Loader.java:857)
> at
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
> at org.hibernate.loader.Loader.doList(Loader.java:2542)
> at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
> at org.hibernate.loader.Loader.list(Loader.java:2271)
> at
> org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
> at
> com.usps.nom.tops.util.CriteriaDelegate.list(CriteriaDelegate.java:127)
> at
> com.usps.nom.tops.dao.transportation.HibernateFacilityDAO.findFacilityByPk(HibernateFacilityDAO.java:38)
> at
> com.usps.nom.tops.service.transportation.TransportationServiceImpl.findFacilityByPk(TransportationServiceImpl.java:200)
> at
> com.usps.nom.tops.service.transportation.TransportationServiceImpl.findFacilityByPk(TransportationServiceImpl.java:313)
> at
> com.usps.nom.tops.web.struts.action.TransportationAction.searchTransportationViewResults(TransportationAction.java:1081)
>
>
>
>
>My  hibernate.cfg.xml  is the following:
>
> 
>  "-//Hibernate/Hibernate Configuration DTD//EN"
> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd
> ">
>
> 
> 
>
>  name="dialect">org.hibernate.dialect.OracleDialect
>
>  name="hibernate.connection.datasource">java:/comp/env/jdbc/TOPSDB
>
>
> false
> false
>
>
> false
> 
> 5
> 25
>  none
>
>   name="hibernate.cache.use_second_level_cache">true
>   name="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.EhCacheRegionFactory
>
> 
> 
> 
>  resource="com/usps/nom/tops/dao/hibernate/mapping/forecast/ForecastUpload.hbm.xml"/>
>  resource="com/usps/nom/tops/dao/hibernate/mapping/DomesticHardCloseoutImpl.hbm.xml"/>
>  resource="com/usps/nom/tops/da

java.lang.NoClassDefFoundError: Could not initialize class net.sf.ehcache.Element

2019-07-10 Thread Hua, Gary - Saint Louis, MO - Contractor
sults' returned an exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at 
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at 
org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
:::
Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
net.sf.ehcache.Element
at 
net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion.put(EhcacheTransactionalDataRegion.java:139)
at 
net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion.put(EhcacheTransactionalDataRegion.java:126)
at 
net.sf.ehcache.hibernate.strategy.ReadOnlyEhcacheEntityRegionAccessStrategy.putFromLoad(ReadOnlyEhcacheEntityRegionAccessStrategy.java:63)
at 
net.sf.ehcache.hibernate.nonstop.NonstopAwareEntityRegionAccessStrategy.putFromLoad(NonstopAwareEntityRegionAccessStrategy.java:180)
at 
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:195)
at 
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
at org.hibernate.loader.Loader.doQuery(Loader.java:857)
at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2542)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at 
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
at 
com.usps.nom.tops.util.CriteriaDelegate.list(CriteriaDelegate.java:127)
at 
com.usps.nom.tops.dao.transportation.HibernateFacilityDAO.findFacilityByPk(HibernateFacilityDAO.java:38)
at 
com.usps.nom.tops.service.transportation.TransportationServiceImpl.findFacilityByPk(TransportationServiceImpl.java:200)
at 
com.usps.nom.tops.service.transportation.TransportationServiceImpl.findFacilityByPk(TransportationServiceImpl.java:313)
at 
com.usps.nom.tops.web.struts.action.TransportationAction.searchTransportationViewResults(TransportationAction.java:1081)




   My  hibernate.cfg.xml  is the following:


http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>




org.hibernate.dialect.OracleDialect

java:/comp/env/jdbc/TOPSDB


false
false
  

false

5
25
 none

 true
 net.sf.ehcache.hibernate.EhCacheRegionFactory

  





 
 












So can anybody tell me what is wrong?  I suspect the Hibernate related 
jar files don't lineup properly.  I have tried different version combinations 
of ehcache-XXX.jar, ehcache-core-XXX.jar, hibernate3.jar, 
hibernate-core-XXX.jar, and hibernate-ehcache-XXX.jar, but it didn't work.




Thanks

Gary Hua
USPS - St. Louis - TOPS Team
Phone: 314-923-2522
E-Mail: gary@usps.gov



RE: Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/util/descriptor/tld/TldParser

2016-05-19 Thread Venkata Reddy P
Hi,



I am walking through the tomcat8 Class Loader 
(https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html), it looks 
like CLASSPATH variable is totally ignored in tomcat8 if tomcat server started 
using catalina.bat.

does it apply for startup.bat also? If yes, then  is there any other way to set 
the classpath variable like in tomcat6.x?





System — This class loader is normally initialized from the contents of the 
CLASSPATH environment variable. All such classes are visible to both Tomcat 
internal classes, and to web applications. However, the standard Tomcat startup 
scripts ($CATALINA_HOME/bin/catalina.sh or %CATALINA_HOME%\bin\catalina.bat) 
totally ignore the contents of the CLASSPATH environment variable itself, and 
instead build the System class loader from the following repositories:



◦$CATALINA_HOME/bin/bootstrap.jar — Contains the main() method that is used to 
initialize the Tomcat server, and the class loader implementation classes it 
depends on.

◦$CATALINA_BASE/bin/tomcat-juli.jar or $CATALINA_HOME/bin/tomcat-juli.jar — 
Logging implementation classes. These include enhancement classes to 
java.util.logging API, known as Tomcat JULI, and a package-renamed copy of 
Apache Commons

Logging library used internally by Tomcat. See logging documentation for more 
details.

If tomcat-juli.jar is present in $CATALINA_BASE/bin, it is used instead of the 
one in $CATALINA_HOME/bin. It is useful in certain logging configurations

◦$CATALINA_HOME/bin/commons-daemon.jar — The classes from Apache Commons Daemon 
project. This JAR file is not present in the CLASSPATH built by 
catalina.bat|.sh scripts, but is referenced from the manifest file of 
bootstrap.jar.



Many Thanks in advance.



-Original Message-
From: Venkata Reddy P [mailto:venkata.re...@trianz.com]
Sent: 19 May 2016 22:26
To: Tomcat Users List
Subject: Caused by: java.lang.NoClassDefFoundError: 
org/apache/tomcat/util/descriptor/tld/TldParser



Hi,



In tomcat8.0.33,while starting the tomcat server from 
\bin\startup.bat, it is getting the below NoClassDefFoundError.

I have verified 1) All the tomcat bundled jars are available under 
\lib folder including tomcat-util.jar.

2) I have also tried adding all the jars to property 
(tomcat.util.scan.StandardJarScanFilter.jarsToScan=,) in 
catalina.properties file



Could you please suggest me am I still missing anything else?



java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException:

Failed to start component 
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/poc]]

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)

at 
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)

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(FutureTask.java:266)

at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.catalina.LifecycleException: Failed to start component 
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/auth]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)

... 6 more

Caused by: java.lang.NoClassDefFoundError: 
org/apache/tomcat/util/descriptor/tld/TldParser



Many Thanks in advance.


Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/util/descriptor/tld/TldParser

2016-05-19 Thread Venkata Reddy P
Hi,

In tomcat8.0.33,while starting the tomcat server from 
\bin\startup.bat, it is getting the below NoClassDefFoundError.
I have verified 1) All the tomcat bundled jars are available under 
\lib folder including tomcat-util.jar.
2) I have also tried adding all the jars to property 
(tomcat.util.scan.StandardJarScanFilter.jarsToScan=,) in 
catalina.properties file

Could you please suggest me am I still missing anything else?

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException:
Failed to start component 
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/poc]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
at 
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
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(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component 
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/auth]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
... 6 more
Caused by: java.lang.NoClassDefFoundError: 
org/apache/tomcat/util/descriptor/tld/TldParser

Many Thanks in advance.


Re: Tomcat 6.0.37 - java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer

2014-09-27 Thread Prathyusha
Thanks. Does that mean I am using a servlet-API jar that's based on 3.0? Which 
version of servlet-API.jar should be used? I think I was using 2.4 version 
unless there is another version in the tomcat libs folder. I am using tomcat 
6.0.37.

> On Sep 26, 2014, at 5:05 PM, Mark Thomas  wrote:
> 
>> On 26/09/2014 21:11, Prathyusha Kanala wrote:
>> Hi
>> I have been using Atmosphere for a web application running on tomcat 7. I
>> now have to downgrade to Tomcat 6 due to dependency on other applications.
>> Here is my dependency list.
> 
> 
> 
>> In order to be compatible with tomcat 6, i changed the dynamic web module
>> from 3.0 to 2.5. Could you please help me resolve this?
> 
> In a word:
> 
> No.
> 
> javax.servlet.ServletContainerInitializer is a Servlet 3.0 class and
> therefore requires a minimum of Tomcat 7.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.37 - java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer

2014-09-26 Thread Mark Thomas
On 26/09/2014 21:11, Prathyusha Kanala wrote:
> Hi
> I have been using Atmosphere for a web application running on tomcat 7. I
> now have to downgrade to Tomcat 6 due to dependency on other applications.
> Here is my dependency list.



> In order to be compatible with tomcat 6, i changed the dynamic web module
> from 3.0 to 2.5. Could you please help me resolve this?

In a word:

No.

javax.servlet.ServletContainerInitializer is a Servlet 3.0 class and
therefore requires a minimum of Tomcat 7.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 6.0.37 - java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer

2014-09-26 Thread Prathyusha Kanala
Hi
I have been using Atmosphere for a web application running on tomcat 7. I
now have to downgrade to Tomcat 6 due to dependency on other applications.
Here is my dependency list.

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";>
>
> 4.0.0
>
> danfoss
>
> mws
>
> war
>
> 0.0.1-SNAPSHOT
>
> atmosphere Maven Webapp
>
> http://maven.apache.org
>
> 
>
> 
>
> junit
>
> junit
>
> 4.11
>
> test
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> org.atmosphere
>
> atmosphere-jersey
>
> 2.2.1
>
> 
>
> 
>
> org.atmosphere
>
> atmosphere-compat-tomcat7
>
> 2.0.1
>
> 
>
> 
>
> com.sun.jersey
>
> jersey-json
>
> 1.12
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> commons-codec
>
> commons-codec
>
> 1.2
>
> 
>
> 
>
> 
>
> com.wordnik
>
> swagger-jaxrs_2.9.1
>
> 1.2.0
>
> compile
>
> 
>
> 
>
> javax.servlet
>
> servlet-api
>
>   
>
> 
>
> 
>
> 
>
> 
>
> com.sun.jersey.jersey-test-framework
>
> jersey-test-framework-external
>
> 1.12
>
> test
>
> 
>
> 
>
> javax.servlet
>
> javax.servlet-api
>
>   
>
> 
>
> 
>
> 
>
> 
>
> com.sun.jersey.contribs.jersey-oauth
>
> oauth-client
>
> 1.12
>
> 
>
> 
>
> com.sun.jersey.contribs.jersey-oauth
>
> oauth-server
>
> 1.12
>
> 
>
> 
>
> com.sun.jersey.contribs.jersey-oauth
>
> oauth-signature
>
> 1.12
>
> 
>
> 
>
> c3p0
>
> c3p0
>
> 0.9.1.2
>
> 
>
> 
>
> 
>
> 
>
> 
>
> org.apache.maven.plugins
>
> maven-compiler-plugin
>
> 2.3.2
>
> 
>
> 1.7
>
> 1.7
>
> 
>
> 
>
> 
>
> org.apache.maven.plugins
>
> maven-war-plugin
>
> 2.3
>
> 
>
> 
>
> 
>
> 
>
> WebResources
>
> 
>
> 
>
> 
>
> 
>
> 
>
>  org.apache.maven.plugins
>
>  maven-surefire-plugin
>
>  2.9
>
>  
>
>   false
>
>  
>
>  
>
>   
>
>surefire-it
>
>integration-test
>
>
>
> test
>
>
>
>
>
> false
>
>
>
>   
>
>  
>
> 
>
> 
>
> mws
>
> 
>
> 
>
>
>
I keep getting the error:

17553 [http-8080-2] WARN  org.atmosphere.util.IOUtils  -
META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class
loader
17565 [http-8080-2] ERROR org.atmosphere.cpr.AtmosphereFramework  - Failed
to initialize Atmosphere Framework
java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2854)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.atmosphere.cpr.ApplicationConfig.(ApplicationConfig.java:796)
at
org.atmosphere.cpr.AtmosphereFramework.preventOOM(AtmosphereFramework.java:775)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:845)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:767)
at
org.atmosphere.cpr.AtmosphereServlet.configureFramework(AtmosphereServlet.java:101)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:80)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException:
javax.servlet.ServletContainerInitializer
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 25 more

In order to be compatible with tomcat 6, i changed the dynamic web module
from 3.0 to 2.5. Could you please help me resolve this?


Re: [tomcat 7.0.50] java.lang.NoClassDefFoundError: org/apache/tomcat/util/descriptor/DigesterFactory

2014-01-19 Thread Konstantin Kolinko
2014/1/17 Marek Jagielski :
> Hi,
>  I have simple REST application that I run locally using
> tomcat7-maven-plugin configured to use tomcat 7.0.47. Changing to version
> 7.0.50 causes an exception:
>
> Jan 17, 2014 3:01:30 PM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-bio-8080"]
> Jan 17, 2014 3:01:30 PM org.apache.catalina.core.StandardService
> startInternal
> INFO: Starting service Tomcat
> Jan 17, 2014 3:01:30 PM org.apache.catalina.core.StandardEngine
> startInternal
> INFO: Starting Servlet Engine: Apache Tomcat/7.0.50
> Jan 17, 2014 3:01:30 PM org.apache.catalina.core.ContainerBase startInternal
> SEVERE: A child container failed during start
> java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError:
> org/apache/tomcat/util/descriptor/DigesterFactory
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:188)
> at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
> at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:801)
> 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.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/tomcat/util/descriptor/DigesterFactory
> at
> org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:522)
> at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:843)
> at
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:389)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
> at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
> ... 6 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.tomcat.util.descriptor.DigesterFactory
> at
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
> at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
> at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
> ... 14 more
>
> Jan 17, 2014 3:01:30 PM 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[Tomcat].StandardHost[localhost]]
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:188)
> 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.Tomcat.start(Tomcat.java:341)
> at
> org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1238)
> at
> org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:592)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> at
> org.apache.maven.lifec

[tomcat 7.0.50] java.lang.NoClassDefFoundError: org/apache/tomcat/util/descriptor/DigesterFactory

2014-01-17 Thread Marek Jagielski
Hi,
 I have simple REST application that I run locally using
tomcat7-maven-plugin configured to use tomcat 7.0.47. Changing to version
7.0.50 causes an exception:

Jan 17, 2014 3:01:30 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 17, 2014 3:01:30 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Tomcat
Jan 17, 2014 3:01:30 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.50
Jan 17, 2014 3:01:30 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError:
org/apache/tomcat/util/descriptor/DigesterFactory
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:801)
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.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoClassDefFoundError:
org/apache/tomcat/util/descriptor/DigesterFactory
at
org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:522)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:843)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:389)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
... 6 more
Caused by: java.lang.ClassNotFoundException:
org.apache.tomcat.util.descriptor.DigesterFactory
at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 14 more

Jan 17, 2014 3:01:30 PM 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[Tomcat].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
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.Tomcat.start(Tomcat.java:341)
at
org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1238)
at
org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:592)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorIm

Re: java.lang.NoClassDefFoundError

2013-07-09 Thread Thomas Edison
Thanks Chuck.  Let me see if I can change the startup script.

Tom


On Tue, Jul 9, 2013 at 8:47 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Thomas Edison [mailto:justdoit.thomas.edi...@gmail.com]
> > Subject: java.lang.NoClassDefFoundError
>
> > *This is what I see when I start the webhdfs service:*
> > Using CLASSPATH:   /usr/share/tomcat7/bin/bootstrap.jar
>
> Whatever script you're using to start Tomcat has a serious error in it:
> the "Using CLASSPATH" message should include tomcat-juli.jar in the same
> directory as bootstrap.jar.  Without that, Tomcat cannot start.
>
> > *What I believe:*
> > Tomcat didn't load the jar file correctly.
>
> No; the startup script didn't set the command line parameters properly, so
> the JVM could not find the logging classes.
>
> > I also copied the tomcat-juli.jar file to the following location and
> restart
> > the service, but it still doesn't work.
>
> A very, very wrong thing to do.  The tomcat-juli.jar must only be in
> Tomcat's bin directory; do not attempt to move it or copy it.  Fix the
> startup script to build the command line properly.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail and
> its attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: java.lang.NoClassDefFoundError

2013-07-09 Thread Caldarale, Charles R
> From: Thomas Edison [mailto:justdoit.thomas.edi...@gmail.com] 
> Subject: java.lang.NoClassDefFoundError

> *This is what I see when I start the webhdfs service:*
> Using CLASSPATH:   /usr/share/tomcat7/bin/bootstrap.jar

Whatever script you're using to start Tomcat has a serious error in it: the 
"Using CLASSPATH" message should include tomcat-juli.jar in the same directory 
as bootstrap.jar.  Without that, Tomcat cannot start.

> *What I believe:*
> Tomcat didn't load the jar file correctly.

No; the startup script didn't set the command line parameters properly, so the 
JVM could not find the logging classes.

> I also copied the tomcat-juli.jar file to the following location and restart 
> the service, but it still doesn't work.

A very, very wrong thing to do.  The tomcat-juli.jar must only be in Tomcat's 
bin directory; do not attempt to move it or copy it.  Fix the startup script to 
build the command line properly.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



java.lang.NoClassDefFoundError

2013-07-09 Thread Thomas Edison
Hello all,

*Summary*
I'm trying to install Hadoop webhdfs from Cloudera CDH4.  This tool relies
on Tomcat to work.  The installation process seems to be fine and the
process can actually start.  However the program seems not to be running
correctly - I tried to access the service through a curl call, but it tells
me cannot connect to the server.

*This is what I see when I start the webhdfs service:*
Setting HTTPFS_HOME:  /usr/lib/hadoop-httpfs
Using   HTTPFS_CONFIG:/etc/hadoop-httpfs/conf
Sourcing:/etc/hadoop-httpfs/conf/httpfs-env.sh
Using   HTTPFS_LOG:   /var/log/hadoop-httpfs/
Using   HTTPFS_TEMP:   /var/run/hadoop-httpfs
Setting HTTPFS_HTTP_PORT: 14000
Setting HTTPFS_ADMIN_PORT: 14001
Setting HTTPFS_HTTP_HOSTNAME: ip-10-29-8-55.ec2.internal
Using   CATALINA_BASE:   /usr/lib/hadoop-httpfs
Using   HTTPFS_CATALINA_HOME:   /usr/lib/bigtop-tomcat
Setting CATALINA_OUT:/var/log/hadoop-httpfs//httpfs-catalina.out
Using   CATALINA_PID:/var/run/hadoop-httpfs/hadoop-httpfs-httpfs.pid

Using   CATALINA_OPTS:
Adding to CATALINA_OPTS: -Dhttpfs.home.dir=/usr/lib/hadoop-httpfs
-Dhttpfs.config.dir=/etc/hadoop-httpfs/conf
-Dhttpfs.log.dir=/var/log/hadoop-httpfs/
-Dhttpfs.temp.dir=/var/run/hadoop-httpfs -Dhttpfs.admin.port=14001
-Dhttpfs.http.port=14000 -Dhttpfs.http.hostname=ip-10-29-8-55.ec2.internal
Using CATALINA_BASE:   /usr/lib/hadoop-httpfs
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /var/run/hadoop-httpfs
Using JRE_HOME:/usr/java/jdk1.6.0_43
Using CLASSPATH:   /usr/share/tomcat7/bin/bootstrap.jar
Using CATALINA_PID:/var/run/hadoop-httpfs/hadoop-httpfs-httpfs.pid

*I checked the log file as shown above (highlighted in red) and here is
what I found:*
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.(Bootstrap.java:60)
Caused by: java.lang.ClassNotFoundException:
org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 1 more
Could not find the main class: org.apache.catalina.startup.Bootstrap.
 Program will exit.

*What I believe:*
Tomcat didn't load the jar file correctly.  I checked tomcat-juli.jar and I
can see the LogFactory class file is in there.  I also copied the
tomcat-juli.jar file to the following location and restart the service, but
it still doesn't work.
*
*
*/var/lib/tomcat7/common/classes/*
*/usr/lib/hadoop-httpfs/webapps/webhdfs/WEB-INF/lib/*

*Any suggestions??  What did I miss??  Thanks!!*

T.E.


RE: Tomcat 7 - java.lang.NoClassDefFoundError: Could not initialize class javax.servlet.http.Cookie

2012-01-20 Thread Guillermo GARCIA OCHOA
As suggested, the problem was the security manager:

Most of our login related classes are the CATALINA_BASE/lib folder. So 
uncommenting this lines in the catalina.policy files fix the problem:

// If using a per instance lib directory, i.e. ${catalina.base}/lib,
// then the following permission will need to be uncommented
grant codeBase "file:${catalina.base}/lib/-" {
 permission java.security.AllPermission;
};

Thanks to Konstantin Kolinko for the quick hint!

PS: Why the exception is not clear enough??

-Original Message-
From: Guillermo GARCIA OCHOA [mailto:guillermo.garcia-oc...@inova-software.com] 
Sent: vendredi 20 janvier 2012 13:11
To: Tomcat Users List
Subject: RE: Tomcat 7 - java.lang.NoClassDefFoundError: Could not initialize 
class javax.servlet.http.Cookie

Answers inline ...

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: vendredi 20 janvier 2012 13:06
To: Tomcat Users List
Subject: Re: Tomcat 7 - java.lang.NoClassDefFoundError: Could not initialize 
class javax.servlet.http.Cookie

2012/1/20 Guillermo GARCIA OCHOA :
> I have an application that use j_security for a form-based authentication. 
> When the application is deployed for the first time (or the tomcat is 
> restarted) user gets this exception when trying access a protected content 
> directly (without login).
>
> GRAVE: Servlet.service() for servlet [default] in context with path 
> [/mycontext]  threw exception [Could not initialize class 
> javax.servlet.http.Cookie] with root cause
>
>    java.lang.NoClassDefFoundError: Could not initialize class 
> javax.servlet.http.Cookie
>
>    at
> org.apache.catalina.core.ApplicationSessionCookieConfig.createSessionC
> ookie(ApplicationSessionCookieConfig.java:127)
>
>    at
> org.apache.catalina.connector.Request.doGetSession(Request.java:2875)
>
>    at
> org.apache.catalina.connector.Request.getSession(Request.java:2307)
>
>    at
> org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction
> .run(RequestFacade.java:216)
>
>    at
> org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction
> .run(RequestFacade.java:205)
>
>    at java.security.AccessController.doPrivileged(Native Method)
>
>    at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.j
> ava:894)
>
>    at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.j
> ava:909)
>
>    at
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletReq
> uestWrapper.java:238)
>
>    at
> com.mycompany.myfilter.SaasComponentImpl.getTenantId(SaasComponentImpl
> .java:284)
>
> The excepted behaviour is to redirect the user to the login form and when the 
> user logs in redirect him to the requested protected resource.
>
> But the weird thing is this works correctly if the first request send to the 
> rebooted server ask for the login form!!! It seems that after this tomcat 
> find and load correctly the cookie class and then all the request are handled 
> as expected.
>
> Why tomcat cannot find the Cookie class that is for sure in the 
> lib/servlet-api.jar? IMHO, no mmetter when this class is asked to be load for 
> the first time ... it should be there for any valve, servlet, filter, etc ... 
> I'm right?
>
> PS: This was working fine before the app was migrated from tomcat 6.
>

1. Your exact version of Tomcat x.y.z =? 

*** Tomcat 7.0.23

2. Your OS

* Windows server 2008

3. Do you think that you are running with Java's SecurityManager enabled? [1]

*** Is enabled whit  the same configurations that we used to use with 
tomcat 6

4. Is there anything else in the logs?

* Nothing else

I thing that the "Could not initialize class" message means that the class is 
found, but its initialization failed.

I wonder though why it is not an instance of ExceptionInInitializerError.

[1] http://tomcat.apache.org/tomcat-7.0-doc/security-manager-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 7 - java.lang.NoClassDefFoundError: Could not initialize class javax.servlet.http.Cookie

2012-01-20 Thread Guillermo GARCIA OCHOA
Answers inline ...

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: vendredi 20 janvier 2012 13:06
To: Tomcat Users List
Subject: Re: Tomcat 7 - java.lang.NoClassDefFoundError: Could not initialize 
class javax.servlet.http.Cookie

2012/1/20 Guillermo GARCIA OCHOA :
> I have an application that use j_security for a form-based authentication. 
> When the application is deployed for the first time (or the tomcat is 
> restarted) user gets this exception when trying access a protected content 
> directly (without login).
>
> GRAVE: Servlet.service() for servlet [default] in context with path 
> [/mycontext]  threw exception [Could not initialize class 
> javax.servlet.http.Cookie] with root cause
>
>    java.lang.NoClassDefFoundError: Could not initialize class 
> javax.servlet.http.Cookie
>
>    at 
> org.apache.catalina.core.ApplicationSessionCookieConfig.createSessionC
> ookie(ApplicationSessionCookieConfig.java:127)
>
>    at 
> org.apache.catalina.connector.Request.doGetSession(Request.java:2875)
>
>    at 
> org.apache.catalina.connector.Request.getSession(Request.java:2307)
>
>    at 
> org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction
> .run(RequestFacade.java:216)
>
>    at 
> org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction
> .run(RequestFacade.java:205)
>
>    at java.security.AccessController.doPrivileged(Native Method)
>
>    at 
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.j
> ava:894)
>
>    at 
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.j
> ava:909)
>
>    at 
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletReq
> uestWrapper.java:238)
>
>    at 
> com.mycompany.myfilter.SaasComponentImpl.getTenantId(SaasComponentImpl
> .java:284)
>
> The excepted behaviour is to redirect the user to the login form and when the 
> user logs in redirect him to the requested protected resource.
>
> But the weird thing is this works correctly if the first request send to the 
> rebooted server ask for the login form!!! It seems that after this tomcat 
> find and load correctly the cookie class and then all the request are handled 
> as expected.
>
> Why tomcat cannot find the Cookie class that is for sure in the 
> lib/servlet-api.jar? IMHO, no mmetter when this class is asked to be load for 
> the first time ... it should be there for any valve, servlet, filter, etc ... 
> I'm right?
>
> PS: This was working fine before the app was migrated from tomcat 6.
>

1. Your exact version of Tomcat x.y.z =? 

*** Tomcat 7.0.23

2. Your OS

* Windows server 2008

3. Do you think that you are running with Java's SecurityManager enabled? [1]

*** Is enabled whit  the same configurations that we used to use with 
tomcat 6

4. Is there anything else in the logs?

* Nothing else

I thing that the "Could not initialize class" message means that the class is 
found, but its initialization failed.

I wonder though why it is not an instance of ExceptionInInitializerError.

[1] http://tomcat.apache.org/tomcat-7.0-doc/security-manager-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 - java.lang.NoClassDefFoundError: Could not initialize class javax.servlet.http.Cookie

2012-01-20 Thread Konstantin Kolinko
2012/1/20 Guillermo GARCIA OCHOA :
> I have an application that use j_security for a form-based authentication. 
> When the application is deployed for the first time (or the tomcat is 
> restarted) user gets this exception when trying access a protected content 
> directly (without login).
>
> GRAVE: Servlet.service() for servlet [default] in context with path 
> [/mycontext]  threw exception [Could not initialize class 
> javax.servlet.http.Cookie] with root cause
>
>    java.lang.NoClassDefFoundError: Could not initialize class 
> javax.servlet.http.Cookie
>
>    at 
> org.apache.catalina.core.ApplicationSessionCookieConfig.createSessionCookie(ApplicationSessionCookieConfig.java:127)
>
>    at org.apache.catalina.connector.Request.doGetSession(Request.java:2875)
>
>    at org.apache.catalina.connector.Request.getSession(Request.java:2307)
>
>    at 
> org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction.run(RequestFacade.java:216)
>
>    at 
> org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction.run(RequestFacade.java:205)
>
>    at java.security.AccessController.doPrivileged(Native Method)
>
>    at 
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:894)
>
>    at 
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:909)
>
>    at 
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238)
>
>    at 
> com.mycompany.myfilter.SaasComponentImpl.getTenantId(SaasComponentImpl.java:284)
>
> The excepted behaviour is to redirect the user to the login form and when the 
> user logs in redirect him to the requested protected resource.
>
> But the weird thing is this works correctly if the first request send to the 
> rebooted server ask for the login form!!! It seems that after this tomcat 
> find and load correctly the cookie class and then all the request are handled 
> as expected.
>
> Why tomcat cannot find the Cookie class that is for sure in the 
> lib/servlet-api.jar? IMHO, no mmetter when this class is asked to be load for 
> the first time ... it should be there for any valve, servlet, filter, etc ... 
> I'm right?
>
> PS: This was working fine before the app was migrated from tomcat 6.
>

1. Your exact version of Tomcat x.y.z =?
2. Your OS = ?
3. Do you think that you are running with Java's SecurityManager enabled? [1]

4. Is there anything else in the logs?

I thing that the "Could not initialize class" message means that the
class is found, but its initialization failed.

I wonder though why it is not an instance of ExceptionInInitializerError.


[1] http://tomcat.apache.org/tomcat-7.0-doc/security-manager-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 7 - java.lang.NoClassDefFoundError: Could not initialize class javax.servlet.http.Cookie

2012-01-20 Thread Guillermo GARCIA OCHOA
I have an application that use j_security for a form-based authentication. When 
the application is deployed for the first time (or the tomcat is restarted) 
user gets this exception when trying access a protected content directly 
(without login).

GRAVE: Servlet.service() for servlet [default] in context with path 
[/mycontext]  threw exception [Could not initialize class 
javax.servlet.http.Cookie] with root cause

java.lang.NoClassDefFoundError: Could not initialize class 
javax.servlet.http.Cookie

at 
org.apache.catalina.core.ApplicationSessionCookieConfig.createSessionCookie(ApplicationSessionCookieConfig.java:127)

at org.apache.catalina.connector.Request.doGetSession(Request.java:2875)

at org.apache.catalina.connector.Request.getSession(Request.java:2307)

at 
org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction.run(RequestFacade.java:216)

at 
org.apache.catalina.connector.RequestFacade$GetSessionPrivilegedAction.run(RequestFacade.java:205)

at java.security.AccessController.doPrivileged(Native Method)

at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:894)

at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:909)

at 
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238)

at 
com.mycompany.myfilter.SaasComponentImpl.getTenantId(SaasComponentImpl.java:284)

The excepted behaviour is to redirect the user to the login form and when the 
user logs in redirect him to the requested protected resource.

But the weird thing is this works correctly if the first request send to the 
rebooted server ask for the login form!!! It seems that after this tomcat find 
and load correctly the cookie class and then all the request are handled as 
expected.

Why tomcat cannot find the Cookie class that is for sure in the 
lib/servlet-api.jar? IMHO, no mmetter when this class is asked to be load for 
the first time ... it should be there for any valve, servlet, filter, etc ... 
I'm right?

PS: This was working fine before the app was migrated from tomcat 6.



Re: java.lang.NoClassDefFoundError

2011-06-25 Thread Felix Schumacher
Am Samstag, den 25.06.2011, 12:57 +0200 schrieb Miguel Bonilla:
> Referenced Libraries is a folder in the eclipse webproyect. I added external
> JARs (in build path, libraries) to include CXF JARs, and eclipse puts the
> files into Referenced Libraries. I can't paste this files into WEB-INF/lib.
> But the bug with cxf/frontend is that this folder does not exist in apache
> CXF...
I downloaded the apache-cxf package apache-cxf-2.4.1.tar.gz and
extracted it. Inside apache-cxf-2.4.1/lib/cxf-2.4.1.jar I can find
org/apache/cxf/frontend/ClientProxy.class.

I don't know which package you've downloaded, since you haven't told us.

And if you want to run the webapp inside tomcat and outside of eclipse,
you will have to copy the cxf-libs into WEB-INF/lib, or tomcat can't
find them.

Felix
> 
> 2011/6/25 Felix Schumacher 
> 
> > Am Samstag, den 25.06.2011, 11:52 +0200 schrieb Miguel Bonilla:
> > > Yes, I have the cxf-libraries in References Libraries. But the 'frontend'
> > Is this 'References Libraries' an eclipse thing? If so, are the
> > libraries in your WEB-INF/lib dir - inside your webapplication inside
> > tomcat - too?
> >
> > Felix
> > > folder do not exist in cxf package.
> > >
> > > 2011/6/25 Felix Schumacher 
> > >
> > > > Am Samstag, den 25.06.2011, 11:23 +0200 schrieb Miguel Bonilla:
> > > > > I am trying to integrate a Java Application into a J2EE proyect using
> > a
> > > > JSP
> > > > > and
> > > > > a Servlet.
> > > > > I run the proyect as Java Application (in Eclipse J2EE) and works
> > > > perfectly,
> > > > > but I run the JSP in server and fails.
> > > > >
> > > > > This is the bug report:
> > > > >
> > > > > java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy
> > > > Do you have the cxf-libraries (jar-files) in a place accessible for
> > your
> > > > jsp, eg. WEB-INF/lib?
> > > >
> > > > Bye
> > > >  Felix
> > > > >
> > > > >
> > > >



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.NoClassDefFoundError

2011-06-25 Thread Miguel Bonilla
Referenced Libraries is a folder in the eclipse webproyect. I added external
JARs (in build path, libraries) to include CXF JARs, and eclipse puts the
files into Referenced Libraries. I can't paste this files into WEB-INF/lib.
But the bug with cxf/frontend is that this folder does not exist in apache
CXF...

2011/6/25 Felix Schumacher 

> Am Samstag, den 25.06.2011, 11:52 +0200 schrieb Miguel Bonilla:
> > Yes, I have the cxf-libraries in References Libraries. But the 'frontend'
> Is this 'References Libraries' an eclipse thing? If so, are the
> libraries in your WEB-INF/lib dir - inside your webapplication inside
> tomcat - too?
>
> Felix
> > folder do not exist in cxf package.
> >
> > 2011/6/25 Felix Schumacher 
> >
> > > Am Samstag, den 25.06.2011, 11:23 +0200 schrieb Miguel Bonilla:
> > > > I am trying to integrate a Java Application into a J2EE proyect using
> a
> > > JSP
> > > > and
> > > > a Servlet.
> > > > I run the proyect as Java Application (in Eclipse J2EE) and works
> > > perfectly,
> > > > but I run the JSP in server and fails.
> > > >
> > > > This is the bug report:
> > > >
> > > > java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy
> > > Do you have the cxf-libraries (jar-files) in a place accessible for
> your
> > > jsp, eg. WEB-INF/lib?
> > >
> > > Bye
> > >  Felix
> > > >
> > > >
> > >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> > > >
> > > >
> > >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> > > > com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> > > >
> > > >
> > > >
> > > > java.lang.ClassNotFoundException: org.apache.cxf.frontend.ClientProxy
> > > >
> > > >
> > >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
> > > >
> > > >
> > >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
> > > >
> > > >
> > >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> > > >
> > > >
> > >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> > > > com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> > > >
> > > >
> > > > Thanks!
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
> > >
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: java.lang.NoClassDefFoundError

2011-06-25 Thread Felix Schumacher
Am Samstag, den 25.06.2011, 11:52 +0200 schrieb Miguel Bonilla:
> Yes, I have the cxf-libraries in References Libraries. But the 'frontend'
Is this 'References Libraries' an eclipse thing? If so, are the
libraries in your WEB-INF/lib dir - inside your webapplication inside
tomcat - too?

Felix
> folder do not exist in cxf package.
> 
> 2011/6/25 Felix Schumacher 
> 
> > Am Samstag, den 25.06.2011, 11:23 +0200 schrieb Miguel Bonilla:
> > > I am trying to integrate a Java Application into a J2EE proyect using a
> > JSP
> > > and
> > > a Servlet.
> > > I run the proyect as Java Application (in Eclipse J2EE) and works
> > perfectly,
> > > but I run the JSP in server and fails.
> > >
> > > This is the bug report:
> > >
> > > java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy
> > Do you have the cxf-libraries (jar-files) in a place accessible for your
> > jsp, eg. WEB-INF/lib?
> >
> > Bye
> >  Felix
> > >
> > >
> > com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> > >
> > >
> > com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> > > com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> > >
> > >
> > >
> > > java.lang.ClassNotFoundException: org.apache.cxf.frontend.ClientProxy
> > >
> > >
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
> > >
> > >
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
> > >
> > >
> > com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> > >
> > >
> > com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> > > com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> > >
> > >
> > > Thanks!
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.NoClassDefFoundError

2011-06-25 Thread Miguel Bonilla
Yes, I have the cxf-libraries in References Libraries. But the 'frontend'
folder do not exist in cxf package.

2011/6/25 Felix Schumacher 

> Am Samstag, den 25.06.2011, 11:23 +0200 schrieb Miguel Bonilla:
> > I am trying to integrate a Java Application into a J2EE proyect using a
> JSP
> > and
> > a Servlet.
> > I run the proyect as Java Application (in Eclipse J2EE) and works
> perfectly,
> > but I run the JSP in server and fails.
> >
> > This is the bug report:
> >
> > java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy
> Do you have the cxf-libraries (jar-files) in a place accessible for your
> jsp, eg. WEB-INF/lib?
>
> Bye
>  Felix
> >
> >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> >
> >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> > com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >
> >
> >
> > java.lang.ClassNotFoundException: org.apache.cxf.frontend.ClientProxy
> >
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
> >
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
> >
> >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> >
> >
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> > com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >
> >
> > Thanks!
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: java.lang.NoClassDefFoundError

2011-06-25 Thread Felix Schumacher
Am Samstag, den 25.06.2011, 11:23 +0200 schrieb Miguel Bonilla:
> I am trying to integrate a Java Application into a J2EE proyect using a JSP
> and
> a Servlet.
> I run the proyect as Java Application (in Eclipse J2EE) and works perfectly,
> but I run the JSP in server and fails.
> 
> This is the bug report:
> 
> java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy
Do you have the cxf-libraries (jar-files) in a place accessible for your
jsp, eg. WEB-INF/lib?

Bye
 Felix
> 
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> 
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> 
> 
> 
> java.lang.ClassNotFoundException: org.apache.cxf.frontend.ClientProxy
> 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
> 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
> 
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)
> 
> com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
> com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> 
> 
> Thanks!



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



java.lang.NoClassDefFoundError

2011-06-25 Thread Miguel Bonilla
I am trying to integrate a Java Application into a J2EE proyect using a JSP
and
a Servlet.
I run the proyect as Java Application (in Eclipse J2EE) and works perfectly,
but I run the JSP in server and fails.

This is the bug report:

java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy

com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)

com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)



java.lang.ClassNotFoundException: org.apache.cxf.frontend.ClientProxy

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)

com.hp.io.soap.v1.IO_IOSoapServicePort_Client.setupConnection(IO_IOSoapServicePort_Client.java:85)

com.hp.io.soap.v1.IO_IOSoapServicePort_Client.principal(IO_IOSoapServicePort_Client.java:34)
com.hp.io.soap.v1.PruebaServlet.doGet(PruebaServlet.java:55)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


Thanks!


Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian,

On 5/19/2011 12:02 PM, Brian Braun wrote:
> I think I just understood what was the problem: The file that was missing
> contains all the intarfaces and abstract classes that declare what needs to
> be implemented, and the other file (that comes from Apache) implements it. I
> just downloaded the second file in the beginning.

Tomcat does not implement JSTL... you have to download both the "api"
and the "impl" libraries and install them both in your webapp in order
to use them.

As far as Tomcat is concerned, JSTL is a 3rd-party library.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3VfyAACgkQ9CaO5/Lv0PBYFgCggmW49PxBsSYf6oMnQRs48v72
AR8AoIwKrvA3O1kx3zTbsopAtd6N2JbX
=aKFT
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Brian Braun
I think I just understood what was the problem: The file that was missing
contains all the intarfaces and abstract classes that declare what needs to
be implemented, and the other file (that comes from Apache) implements it. I
just downloaded the second file in the beginning.



On Thu, May 19, 2011 at 10:35 AM, Brian Braun  wrote:

> Thanks Mark, that was the problem! Now it runs.
>
> I'm starting to think that you know more about java than I do
> ;-)
>
>
>
> On Thu, May 19, 2011 at 10:33 AM, Mark Thomas  wrote:
>
>> On 19/05/2011 16:30, Brian Braun wrote:
>> > Hi Mark,
>> >
>> > Do I also need to deploy that file?
>>
>> Almost certainly since that is where I would expect to find the missing
>> class.
>>
>> Mark
>>
>> >
>> > On Thu, May 19, 2011 at 10:28 AM, Mark Thomas  wrote:
>> >
>> >> On 19/05/2011 16:26, Brian Braun wrote:
>> >>> I did.
>> >>
>> >> Isn't there a jstl-api-1.2.jar you need as well?
>> >>
>> >> Mark
>> >>
>> >>>
>> >>> On Thu, May 19, 2011 at 10:24 AM, Yucca Nel 
>> wrote:
>> >>>
>> >>>> Either that classis part of a lib that must be included in your
>> >> WEB-INF/lib
>> >>>> or in your $CATALINA_HOME/lib directory or it needs to be included in
>> >> your
>> >>>> zipped up web app(.war).
>> >>>>
>> >>>> -Original Message- From: Brian Braun
>> >>>> Sent: Thursday, May 19, 2011 5:16 PM
>> >>>> To: Tomcat Users List
>> >>>> Subject: java.lang.NoClassDefFoundError:
>> >>>> javax/servlet/jsp/jstl/core/LoopTag
>> >>>>
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> I feel like a rookie, But I will ask for help on this. I will swallow
>> my
>> >>>> pride.
>> >>>> I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both
>> in
>> >>>> development and in production. I started using JSTL1.2 today. When I
>> run
>> >> my
>> >>>> app, I get this response:
>> >>>>
>> >>>> javax.servlet.ServletException: java.lang.NoClassDefFoundError:
>> >>>> javax/servlet/jsp/jstl/core/LoopTag
>> >>>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
>> >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>> >>>>
>> >>>>
>> >>
>> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
>> >>>>
>> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>> >>>>
>> >>>>
>> >>
>> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>> >>>>
>> >>>>
>> >>
>> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
>> >>>>
>> >>>>
>> >>
>> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
>> >>>>
>> >>>>
>> >>
>> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
>> >>>>
>> >>>>
>> >>
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
>> >>>>
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
>> >>>> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>> >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>> >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>> >>>>
>> >>>>
>> >>
>> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
>> >>>>
>> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>> >>>>
>> >>>>
>> >>
>> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>> >>>>
>> >>>>
>> >>
>> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
>> >>>> I already added the file "jstl-impl-1.2.jar" to my "lib" path, which
>> is
>> >>>> "C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I
>> >> confirmed
>> >>>> that when Eclipse is deploying my app, it is deloying the JST JAR. I
>> >> also
>> >>>> put this declaration on top of my JSP file:
>> >>>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
>> >>>>
>> >>>> So how can that class not be found?
>> >>>>
>> >>>> Thanks in advace,
>> >>>>
>> >>>> Brian
>> >>>>
>> >>>> -
>> >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> >>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> >>>>
>> >>>>
>> >>>
>> >>
>> >>
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> >> For additional commands, e-mail: users-h...@tomcat.apache.org
>> >>
>> >>
>> >
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>


Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Brian Braun
Thanks Mark, that was the problem! Now it runs.

I'm starting to think that you know more about java than I do
;-)



On Thu, May 19, 2011 at 10:33 AM, Mark Thomas  wrote:

> On 19/05/2011 16:30, Brian Braun wrote:
> > Hi Mark,
> >
> > Do I also need to deploy that file?
>
> Almost certainly since that is where I would expect to find the missing
> class.
>
> Mark
>
> >
> > On Thu, May 19, 2011 at 10:28 AM, Mark Thomas  wrote:
> >
> >> On 19/05/2011 16:26, Brian Braun wrote:
> >>> I did.
> >>
> >> Isn't there a jstl-api-1.2.jar you need as well?
> >>
> >> Mark
> >>
> >>>
> >>> On Thu, May 19, 2011 at 10:24 AM, Yucca Nel 
> wrote:
> >>>
> >>>> Either that classis part of a lib that must be included in your
> >> WEB-INF/lib
> >>>> or in your $CATALINA_HOME/lib directory or it needs to be included in
> >> your
> >>>> zipped up web app(.war).
> >>>>
> >>>> -Original Message- From: Brian Braun
> >>>> Sent: Thursday, May 19, 2011 5:16 PM
> >>>> To: Tomcat Users List
> >>>> Subject: java.lang.NoClassDefFoundError:
> >>>> javax/servlet/jsp/jstl/core/LoopTag
> >>>>
> >>>>
> >>>> Hi,
> >>>>
> >>>> I feel like a rookie, But I will ask for help on this. I will swallow
> my
> >>>> pride.
> >>>> I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in
> >>>> development and in production. I started using JSTL1.2 today. When I
> run
> >> my
> >>>> app, I get this response:
> >>>>
> >>>> javax.servlet.ServletException: java.lang.NoClassDefFoundError:
> >>>> javax/servlet/jsp/jstl/core/LoopTag
> >>>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
> >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>>>
> >>>>
> >>
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
> >>>>
> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
> >>>>
> >>>>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
> >>>>
> >>>>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
> >>>>
> >>>>
> >>
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
> >>>>
> >>>>
> >>
> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
> >>>>
> >>>>
> >>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
> >>>>
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> >>>> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
> >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>>>
> >>>>
> >>
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
> >>>>
> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
> >>>>
> >>>>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
> >>>>
> >>>>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
> >>>> I already added the file "jstl-impl-1.2.jar" to my "lib" path, which
> is
> >>>> "C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I
> >> confirmed
> >>>> that when Eclipse is deploying my app, it is deloying the JST JAR. I
> >> also
> >>>> put this declaration on top of my JSP file:
> >>>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
> >>>>
> >>>> So how can that class not be found?
> >>>>
> >>>> Thanks in advace,
> >>>>
> >>>> Brian
> >>>>
> >>>> -
> >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>>
> >>>>
> >>>
> >>
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Mark Thomas
On 19/05/2011 16:30, Brian Braun wrote:
> Hi Mark,
> 
> Do I also need to deploy that file?

Almost certainly since that is where I would expect to find the missing
class.

Mark

> 
> On Thu, May 19, 2011 at 10:28 AM, Mark Thomas  wrote:
> 
>> On 19/05/2011 16:26, Brian Braun wrote:
>>> I did.
>>
>> Isn't there a jstl-api-1.2.jar you need as well?
>>
>> Mark
>>
>>>
>>> On Thu, May 19, 2011 at 10:24 AM, Yucca Nel  wrote:
>>>
>>>> Either that classis part of a lib that must be included in your
>> WEB-INF/lib
>>>> or in your $CATALINA_HOME/lib directory or it needs to be included in
>> your
>>>> zipped up web app(.war).
>>>>
>>>> -Original Message- From: Brian Braun
>>>> Sent: Thursday, May 19, 2011 5:16 PM
>>>> To: Tomcat Users List
>>>> Subject: java.lang.NoClassDefFoundError:
>>>> javax/servlet/jsp/jstl/core/LoopTag
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I feel like a rookie, But I will ask for help on this. I will swallow my
>>>> pride.
>>>> I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in
>>>> development and in production. I started using JSTL1.2 today. When I run
>> my
>>>> app, I get this response:
>>>>
>>>> javax.servlet.ServletException: java.lang.NoClassDefFoundError:
>>>> javax/servlet/jsp/jstl/core/LoopTag
>>>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>
>>>>
>> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
>>>> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>>>>
>>>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>>>>
>>>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
>>>>
>>>>
>> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
>>>>
>>>>
>> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
>>>>
>>>>
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
>>>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
>>>> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>
>>>>
>> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
>>>> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>>>>
>>>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>>>>
>>>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
>>>> I already added the file "jstl-impl-1.2.jar" to my "lib" path, which is
>>>> "C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I
>> confirmed
>>>> that when Eclipse is deploying my app, it is deloying the JST JAR. I
>> also
>>>> put this declaration on top of my JSP file:
>>>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
>>>>
>>>> So how can that class not be found?
>>>>
>>>> Thanks in advace,
>>>>
>>>> Brian
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>>
>>>>
>>>
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Brian Braun
Hi Mark,

Do I also need to deploy that file?

On Thu, May 19, 2011 at 10:28 AM, Mark Thomas  wrote:

> On 19/05/2011 16:26, Brian Braun wrote:
> > I did.
>
> Isn't there a jstl-api-1.2.jar you need as well?
>
> Mark
>
> >
> > On Thu, May 19, 2011 at 10:24 AM, Yucca Nel  wrote:
> >
> >> Either that classis part of a lib that must be included in your
> WEB-INF/lib
> >> or in your $CATALINA_HOME/lib directory or it needs to be included in
> your
> >> zipped up web app(.war).
> >>
> >> -Original Message- From: Brian Braun
> >> Sent: Thursday, May 19, 2011 5:16 PM
> >> To: Tomcat Users List
> >> Subject: java.lang.NoClassDefFoundError:
> >> javax/servlet/jsp/jstl/core/LoopTag
> >>
> >>
> >> Hi,
> >>
> >> I feel like a rookie, But I will ask for help on this. I will swallow my
> >> pride.
> >> I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in
> >> development and in production. I started using JSTL1.2 today. When I run
> my
> >> app, I get this response:
> >>
> >> javax.servlet.ServletException: java.lang.NoClassDefFoundError:
> >> javax/servlet/jsp/jstl/core/LoopTag
> >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>
> >>
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
> >> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
> >>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
> >>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
> >>
> >>
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
> >>
> >>
> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
> >>
> >>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
> >> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> >> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>
> >>
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
> >> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
> >>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
> >>
> >>
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
> >> I already added the file "jstl-impl-1.2.jar" to my "lib" path, which is
> >> "C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I
> confirmed
> >> that when Eclipse is deploying my app, it is deloying the JST JAR. I
> also
> >> put this declaration on top of my JSP file:
> >> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
> >>
> >> So how can that class not be found?
> >>
> >> Thanks in advace,
> >>
> >> Brian
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Mark Thomas
On 19/05/2011 16:26, Brian Braun wrote:
> I did.

Isn't there a jstl-api-1.2.jar you need as well?

Mark

> 
> On Thu, May 19, 2011 at 10:24 AM, Yucca Nel  wrote:
> 
>> Either that classis part of a lib that must be included in your WEB-INF/lib
>> or in your $CATALINA_HOME/lib directory or it needs to be included in your
>> zipped up web app(.war).
>>
>> -Original Message- From: Brian Braun
>> Sent: Thursday, May 19, 2011 5:16 PM
>> To: Tomcat Users List
>> Subject: java.lang.NoClassDefFoundError:
>> javax/servlet/jsp/jstl/core/LoopTag
>>
>>
>> Hi,
>>
>> I feel like a rookie, But I will ask for help on this. I will swallow my
>> pride.
>> I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in
>> development and in production. I started using JSTL1.2 today. When I run my
>> app, I get this response:
>>
>> javax.servlet.ServletException: java.lang.NoClassDefFoundError:
>> javax/servlet/jsp/jstl/core/LoopTag
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>
>> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
>> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
>>
>> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
>>
>> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
>>
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
>> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>
>> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
>> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>>
>> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
>> I already added the file "jstl-impl-1.2.jar" to my "lib" path, which is
>> "C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I confirmed
>> that when Eclipse is deploying my app, it is deloying the JST JAR. I also
>> put this declaration on top of my JSP file:
>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
>>
>> So how can that class not be found?
>>
>> Thanks in advace,
>>
>> Brian
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Brian Braun
I did.

On Thu, May 19, 2011 at 10:24 AM, Yucca Nel  wrote:

> Either that classis part of a lib that must be included in your WEB-INF/lib
> or in your $CATALINA_HOME/lib directory or it needs to be included in your
> zipped up web app(.war).
>
> -Original Message- From: Brian Braun
> Sent: Thursday, May 19, 2011 5:16 PM
> To: Tomcat Users List
> Subject: java.lang.NoClassDefFoundError:
> javax/servlet/jsp/jstl/core/LoopTag
>
>
> Hi,
>
> I feel like a rookie, But I will ask for help on this. I will swallow my
> pride.
> I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in
> development and in production. I started using JSTL1.2 today. When I run my
> app, I get this response:
>
> javax.servlet.ServletException: java.lang.NoClassDefFoundError:
> javax/servlet/jsp/jstl/core/LoopTag
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
>
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
>
> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
>
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
>
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
> I already added the file "jstl-impl-1.2.jar" to my "lib" path, which is
> "C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I confirmed
> that when Eclipse is deploying my app, it is deloying the JST JAR. I also
> put this declaration on top of my JSP file:
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
>
> So how can that class not be found?
>
> Thanks in advace,
>
> Brian
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Yucca Nel
Either that classis part of a lib that must be included in your WEB-INF/lib 
or in your $CATALINA_HOME/lib directory or it needs to be included in your 
zipped up web app(.war).


-Original Message- 
From: Brian Braun

Sent: Thursday, May 19, 2011 5:16 PM
To: Tomcat Users List
Subject: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

Hi,

I feel like a rookie, But I will ask for help on this. I will swallow my
pride.
I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in
development and in production. I started using JSTL1.2 today. When I run my
app, I get this response:

javax.servlet.ServletException: java.lang.NoClassDefFoundError:
javax/servlet/jsp/jstl/core/LoopTag
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
I already added the file "jstl-impl-1.2.jar" to my "lib" path, which is
"C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I confirmed
that when Eclipse is deploying my app, it is deloying the JST JAR. I also
put this declaration on top of my JSP file:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>

So how can that class not be found?

Thanks in advace,

Brian 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

2011-05-19 Thread Brian Braun
Hi,

I feel like a rookie, But I will ask for help on this. I will swallow my
pride.
I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in
development and in production. I started using JSTL1.2 today. When I run my
app, I get this response:

javax.servlet.ServletException: java.lang.NoClassDefFoundError:
javax/servlet/jsp/jstl/core/LoopTag
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
I already added the file "jstl-impl-1.2.jar" to my "lib" path, which is
"C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib". I confirmed
that when Eclipse is deploying my app, it is deloying the JST JAR. I also
put this declaration on top of my JSP file:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>

So how can that class not be found?

Thanks in advace,

Brian


Re: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-19 Thread Mark Thomas
On 13/01/2011 15:47, Christopher Schultz wrote:
> 1. WAR file starts copying, whether a huge, local file or a
> moderately-sized remote file via the manager interface the point is
> that this takes some time
If done via the Manager interface this will never be an issue. The
Manager does a few extra things to protect against this. If you do scp
or similar then you might hit the issue.

Mark

> 2. Tomcat scans the webapps folder for .war files that have been changed
> since it's last auto-deploy cycle and finds the new webapp
> 3. Tomcat attempts to auto-deploy the webapp, but the war file is not
> complete, so Bad Things Happen
> 4. WAR file completes copying
> 
> :(
> 
> I can think of a few ways around this:
> 
> 1. Upgrade. It's possible issues with auto-deploy and/or manager have
> been resolved. Read the ChangeLog.
> 2. Only use the manager webapp to deploy your apps.
> 3. Disable auto-deploy AND only use the manager webapp to deploy your
> webapps. This will prevent mid-copy deployments.
> 4. Stop Tomcat before deploying, which will solve everything :)
> 
> Hope that helps,
> -chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sam,

On 1/19/2011 11:12 AM, Sam Zilverberg wrote:
> We changed cp to mv and there are no problems now :)

I thought of another strategy: ln

If you use a hard link, you get to keep the file in the old location and
in the new location. You also don't have to worry about whether Tomcat
will complain about symlinks.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk03FfIACgkQ9CaO5/Lv0PCOVACgkgJ3XrL76btAgGycAP2akUBo
6QkAn23Kj8ZCXQZF3dDJMD934MXhRZIi
=0cch
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-19 Thread Sam Zilverberg
We changed cp to mv and there are no problems now :)

Thanks for the help

On Thu, Jan 13, 2011 at 8:16 PM, Sam Zilverberg wrote:

> We copy using cp...
> I'll try some of the ideas you guys mentioned and reply sometime next week
> after I have some results.
> Thanks for the great ideas !
>
> -Sam
>


Re: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-13 Thread Sam Zilverberg
We copy using cp...
I'll try some of the ideas you guys mentioned and reply sometime next week
after I have some results.
Thanks for the great ideas !

-Sam


RE: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-13 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Subject: Re: app throws java.lang.NoClassDefFoundError sometimes, and 
> sometimes it doesnt

> I can think of a few ways around this:

> 1. Upgrade. It's possible issues with auto-deploy and/or manager have
> been resolved. Read the ChangeLog.
> 2. Only use the manager webapp to deploy your apps.
> 3. Disable auto-deploy AND only use the manager webapp to deploy your
> webapps. This will prevent mid-copy deployments.
> 4. Stop Tomcat before deploying, which will solve everything :)

Or copy the .war file with a different extension, then rename the file once it 
is completely transferred.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sam,

On 1/13/2011 8:47 AM, Sam Zilverberg wrote:
> I'm running a wicket app on tomcat 6.0.20.

Upgrade!

> Once in a while I need to redeploy it (after fixing some stuff, adding
> features and so on).
> This is how I redeploy:
> 1.Use tomcat manager to undeploy the running app.
> 2.Deploy the new app by copying the new WAR file to a library inside tomcat.

Do you do this on the server using a "cp" (or COPY) command? Or, do you
use Tomcat's manager app to deploy the updated webapp?

> Everything seems fine but when I use the app I sometimes get a java.lang.
> NoClassDefFoundError.
> The class can be just about any class in the project and its libs.
> Sometimes its a Hibernate related class, sometimes its a Wicket related
> class and
> sometimes its a class from my app.
> Redeploying once (or a couple of times) solves the problem.
>
> This is very inconsistent and bothering.
> After deploying I never know if the app is going to be ok or if one of its
> pages will keep throwing internal errors on account of the
> NoClassDefFoundError.
> 
> Did any one ever encounter this kind of problem?

I've heard about this happening with large .WAR files because something
like the following happens:

1. WAR file starts copying, whether a huge, local file or a
moderately-sized remote file via the manager interface the point is
that this takes some time
2. Tomcat scans the webapps folder for .war files that have been changed
since it's last auto-deploy cycle and finds the new webapp
3. Tomcat attempts to auto-deploy the webapp, but the war file is not
complete, so Bad Things Happen
4. WAR file completes copying

:(

I can think of a few ways around this:

1. Upgrade. It's possible issues with auto-deploy and/or manager have
been resolved. Read the ChangeLog.
2. Only use the manager webapp to deploy your apps.
3. Disable auto-deploy AND only use the manager webapp to deploy your
webapps. This will prevent mid-copy deployments.
4. Stop Tomcat before deploying, which will solve everything :)

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0vHqoACgkQ9CaO5/Lv0PDAdACeNQp/L6ZVaHl7zGv/jeDTwB/M
uvwAoK4rB5OVlq4PzbhVqQbnEQOac699
=KsuS
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-13 Thread André Warnier

user080701 wrote:

How to unsubscribe this email ?


Scroll to the end (all thr way down there), and follow the instructions.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-13 Thread user080701

How to unsubscribe this email ?

--
From: "Sam Zilverberg" 
Sent: Thursday, January 13, 2011 9:47 PM
To: "tomcat" 
Subject: app throws java.lang.NoClassDefFoundError sometimes, and sometimes 
it doesnt



Hi,

I'm running a wicket app on tomcat 6.0.20.
Once in a while I need to redeploy it (after fixing some stuff, adding
features and so on).
This is how I redeploy:
1.Use tomcat manager to undeploy the running app.
2.Deploy the new app by copying the new WAR file to a library inside 
tomcat.


Everything seems fine but when I use the app I sometimes get a java.lang.
NoClassDefFoundError.
The class can be just about any class in the project and its libs.
Sometimes its a Hibernate related class, sometimes its a Wicket related
class and
sometimes its a class from my app.
Redeploying once (or a couple of times) solves the problem.

This is very inconsistent and bothering.
After deploying I never know if the app is going to be ok or if one of its
pages will keep throwing internal errors on account of the
NoClassDefFoundError.

Did any one ever encounter this kind of problem?
Do you have any ideas on what is causing this or what I can do to diagnose
this problem?
I'm clueless at the moment :(

Thanks
-Sam



__ Information from ESET NOD32 Antivirus, version of virus 
signature database 5783 (20110113) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5783 (20110113) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



app throws java.lang.NoClassDefFoundError sometimes, and sometimes it doesnt

2011-01-13 Thread Sam Zilverberg
Hi,

I'm running a wicket app on tomcat 6.0.20.
Once in a while I need to redeploy it (after fixing some stuff, adding
features and so on).
This is how I redeploy:
1.Use tomcat manager to undeploy the running app.
2.Deploy the new app by copying the new WAR file to a library inside tomcat.

Everything seems fine but when I use the app I sometimes get a java.lang.
NoClassDefFoundError.
The class can be just about any class in the project and its libs.
Sometimes its a Hibernate related class, sometimes its a Wicket related
class and
sometimes its a class from my app.
Redeploying once (or a couple of times) solves the problem.

This is very inconsistent and bothering.
After deploying I never know if the app is going to be ok or if one of its
pages will keep throwing internal errors on account of the
NoClassDefFoundError.

Did any one ever encounter this kind of problem?
Do you have any ideas on what is causing this or what I can do to diagnose
this problem?
I'm clueless at the moment :(

Thanks
-Sam


Re: java.lang.NoClassDefFoundError: Could not initialize class

2010-05-31 Thread Konstantin Kolinko
2010/5/31 Licht Jiang :
> java.lang.NoClassDefFoundError: Could not initialize class
> com.myservice.web.TestClass
>

"Could not initialize" = the class is found, but its initialization
failed. There can be many reasons for that, e.g. 1) missing dependent
classes, 2) exception is thrown when executing a static{}
initialization block in the class.  It is hard to tell what exactly
went wrong without seeing the actual exception.

>
>> Show us the full stack trace(s); there are usually at least two in cases 
>> like this.
>
> Now I have no access to the service.
>

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.NoClassDefFoundError: Could not initialize class

2010-05-30 Thread Licht Jiang
Thanks Charles for your help!

>> java.lang.NoClassDefFoundError: Could not initialize class
>> com.myservice.web.TestClass
>
> Show us the full stack trace(s); there are usually at least two in cases like 
> this.

Now I have no access to the service.

>> But class "TestClass" is in "WEB-INF/classes/come/myservice/web"
>
> Note the discrepancy between "com.myservice.web" and "come/myservice/web"; is 
> one of them a typo?

2nd's a typo, should be com/myservice/web

> What is a "service deployment folder"?  What's in your server.xml?  What is 
> the exact structure under Tomcat's webapps directory?

The service is a war file, "MyService.war". It is put in "webapps"
folder of tomcat. "TestClass.class" is in the following folder:

tomcat_home/webapps/MyService/WEB-INF/classes/com/myservice/web

In web.xml, a servlet is defined (which calls TestClass in doget),
when requested, it generated the exception as posted.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: java.lang.NoClassDefFoundError: Could not initialize class

2010-05-30 Thread Caldarale, Charles R
> From: Licht Jiang [mailto:licht.ji...@gmail.com]
> Subject: java.lang.NoClassDefFoundError: Could not initialize class
> 
> java.lang.NoClassDefFoundError: Could not initialize class
> com.myservice.web.TestClass

Show us the full stack trace(s); there are usually at least two in cases like 
this.

> But class "TestClass" is in "WEB-INF/classes/come/myservice/web"

Note the discrepancy between "com.myservice.web" and "come/myservice/web"; is 
one of them a typo?

> under the service deployment folder

What is a "service deployment folder"?  What's in your server.xml?  What is the 
exact structure under Tomcat's webapps directory?

> So, what could be wrong?

Lots of things.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



java.lang.NoClassDefFoundError: Could not initialize class

2010-05-30 Thread Licht Jiang
I got the following error from a web service running in Apache
Tomcat/5.5.27 and JVM 1.6.0_17-b04-248-10M3025.

java.lang.NoClassDefFoundError: Could not initialize class
com.myservice.web.TestClass

TestClass is a class called by the servlet in doget().

But class "TestClass" is in "WEB-INF/classes/come/myservice/web" under
the service deployment folder in webapps of tomcat. According to the
following class loader how-to page of tomcat 5.5, I guess tomcat
should be able to find and load the class:

http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

So, what could be wrong?

Thanks,
-J

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RES: RES: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-11 Thread Gustavo A. Daud
That is it... Now it works... I really get the wrong file... I'm sorry for my 
mistake!

But, tankyou all... Mark, Chuck, André and Konstantin... for helping me...

I'll pay more attention now... I'm a beginner on tomcat yet...

Tank's fellas!!!


De: Mark Thomas [ma...@apache.org]
Enviado: quinta-feira, 11 de março de 2010 10:49
Para: Tomcat Users List
Assunto: Re: RES: TOMCAT 6 Error: Exception in thread "main" 
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

On 11/03/2010 13:23, André Warnier wrote:
> Mark Thomas wrote:
>> On 11/03/2010 12:49, Gustavo A. Daud wrote:
>>> Chuck,
>>>
>>> I install again the tomcat 6 and now I'm using other user to running
>>> tomcat, as you sugest. But, the error persists...
>>> Look at this line: "Using CLASSPATH: /opt/tomcat6/bin/bootstrap.jar".
>>> I perform a search on tomcat files looking for any bootstrap and here
>>> the result:
>>>
>>> gust...@suse-server:/opt/tomcat6> find . -iname bootstrap*
>>> ./res/META-INF/bootstrap.jar.manifest
>>> ./res/META-INF/bootstrap.jar
>>> ./java/org/apache/catalina/startup/Bootstrap.java
>>>
>>> There are no bootstrap.jar on tomcat6/bin/. Is this normal?
>>
>> That looks like you are trying to run Tomcat from a source
>> distribution rather than a binary one.
>>
> (Sound of 10 hands hitting 10 heads)
> See, that's why Mark is a Committer, and we are mere helpers here.
> Why did we not think of that ?

I think you are being a little hard on yourself and your fellow
contributors. This was the first post where there was enough information
to determine what was happening.

Of course, it helped that I have made a similar mistake (building from
source and running start.bat from the wrong directory) enough times
myself to recognise the error message...

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

"Esta mensagem é emitida exclusivamente com fins informativos, não devendo ser 
entendida ou utilizada  como uma oferta, requerimento para a compra ou venda de 
qualquer instrumento financeiro ou  confirmação de qualquer transação ou 
negócio. No caso desta mensagem conter dados ou outras  informações utilizadas 
pelo mercado financeiro  deverão estes ser  considerados como meras 
estimativas,  não lhes sendo outorgadas qualquer garantia quanto a  sua 
correção, estando  sujeitos a mudanças sem prévio aviso. Qualquer(Quaisquer) 
comentário(s) ou declaração(ões) aqui enunciadas não reflete(m), 
necessariamente, o posicionamento do Banco Sofisa S/A, suas coligadas, 
subsidiárias ou  filiais."


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: RES: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-11 Thread Mark Thomas

On 11/03/2010 13:23, André Warnier wrote:

Mark Thomas wrote:

On 11/03/2010 12:49, Gustavo A. Daud wrote:

Chuck,

I install again the tomcat 6 and now I'm using other user to running
tomcat, as you sugest. But, the error persists...
Look at this line: "Using CLASSPATH: /opt/tomcat6/bin/bootstrap.jar".
I perform a search on tomcat files looking for any bootstrap and here
the result:

gust...@suse-server:/opt/tomcat6> find . -iname bootstrap*
./res/META-INF/bootstrap.jar.manifest
./res/META-INF/bootstrap.jar
./java/org/apache/catalina/startup/Bootstrap.java

There are no bootstrap.jar on tomcat6/bin/. Is this normal?


That looks like you are trying to run Tomcat from a source
distribution rather than a binary one.


(Sound of 10 hands hitting 10 heads)
See, that's why Mark is a Committer, and we are mere helpers here.
Why did we not think of that ?


I think you are being a little hard on yourself and your fellow 
contributors. This was the first post where there was enough information 
to determine what was happening.


Of course, it helped that I have made a similar mistake (building from 
source and running start.bat from the wrong directory) enough times 
myself to recognise the error message...


Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: RES: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-11 Thread André Warnier

Mark Thomas wrote:

On 11/03/2010 12:49, Gustavo A. Daud wrote:

Chuck,

I install again the tomcat 6 and now I'm using other user to running 
tomcat, as you sugest. But, the error persists...
Look at this line: "Using CLASSPATH:   
/opt/tomcat6/bin/bootstrap.jar". I perform a search on tomcat files 
looking for any bootstrap and here the result:


gust...@suse-server:/opt/tomcat6>  find . -iname bootstrap*
./res/META-INF/bootstrap.jar.manifest
./res/META-INF/bootstrap.jar
./java/org/apache/catalina/startup/Bootstrap.java

There are no bootstrap.jar on tomcat6/bin/. Is this normal?


That looks like you are trying to run Tomcat from a source distribution 
rather than a binary one.



(Sound of 10 hands hitting 10 heads)
See, that's why Mark is a Committer, and we are mere helpers here.
Why did we not think of that ?

This link :
http://mirror.pop-sc.rnp.br/apache/tomcat/tomcat-6/v6.0.24/src/apache-tomcat-6.0.24-src.tar.gz
is for the /sources/ of Tomcat.
Right above this link, is a README which explains what each package 
contains.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RES: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-11 Thread Gustavo A. Daud
Hum,

To download tomcat I go to http://tomcat.apache.org/download-60.cgi and get 
from this link:

http://mirror.pop-sc.rnp.br/apache/tomcat/tomcat-6/v6.0.24/src/apache-tomcat-6.0.24-src.tar.gz

Is this wrong?


De: Konstantin Kolinko [knst.koli...@gmail.com]
Enviado: quinta-feira, 11 de março de 2010 10:05
Para: Tomcat Users List
Assunto: Re: TOMCAT 6 Error: Exception in thread "main" 
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010/3/11 Gustavo A. Daud :
> I install again the tomcat 6

How did you install Tomcat?
Did you download the proper distributive from http://tomcat.apache.org/ ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

"Esta mensagem é emitida exclusivamente com fins informativos, não devendo ser 
entendida ou utilizada  como uma oferta, requerimento para a compra ou venda de 
qualquer instrumento financeiro ou  confirmação de qualquer transação ou 
negócio. No caso desta mensagem conter dados ou outras  informações utilizadas 
pelo mercado financeiro  deverão estes ser  considerados como meras 
estimativas,  não lhes sendo outorgadas qualquer garantia quanto a  sua 
correção, estando  sujeitos a mudanças sem prévio aviso. Qualquer(Quaisquer) 
comentário(s) ou declaração(ões) aqui enunciadas não reflete(m), 
necessariamente, o posicionamento do Banco Sofisa S/A, suas coligadas, 
subsidiárias ou  filiais."


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-11 Thread Konstantin Kolinko
2010/3/11 Gustavo A. Daud :
> I install again the tomcat 6

How did you install Tomcat?
Did you download the proper distributive from http://tomcat.apache.org/ ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: RES: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-11 Thread Mark Thomas

On 11/03/2010 12:49, Gustavo A. Daud wrote:

Chuck,

I install again the tomcat 6 and now I'm using other user to running tomcat, as 
you sugest. But, the error persists...
Look at this line: "Using CLASSPATH:   /opt/tomcat6/bin/bootstrap.jar". I 
perform a search on tomcat files looking for any bootstrap and here the result:

gust...@suse-server:/opt/tomcat6>  find . -iname bootstrap*
./res/META-INF/bootstrap.jar.manifest
./res/META-INF/bootstrap.jar
./java/org/apache/catalina/startup/Bootstrap.java

There are no bootstrap.jar on tomcat6/bin/. Is this normal?


That looks like you are trying to run Tomcat from a source distribution 
rather than a binary one.


Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RES: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-11 Thread Gustavo A. Daud
Chuck,

I install again the tomcat 6 and now I'm using other user to running tomcat, as 
you sugest. But, the error persists...
Look at this line: "Using CLASSPATH:   /opt/tomcat6/bin/bootstrap.jar". I 
perform a search on tomcat files looking for any bootstrap and here the result:

gust...@suse-server:/opt/tomcat6> find . -iname bootstrap*
./res/META-INF/bootstrap.jar.manifest
./res/META-INF/bootstrap.jar
./java/org/apache/catalina/startup/Bootstrap.java

There are no bootstrap.jar on tomcat6/bin/. Is this normal?


The same error again:

Using CATALINA_BASE:   /opt/tomcat6
Using CATALINA_HOME:   /opt/tomcat6
Using CATALINA_TMPDIR: /opt/tomcat6/temp
Using JRE_HOME:/usr/lib/jvm/jdk1.6
Using CLASSPATH:   /opt/tomcat6/bin/bootstrap.jar
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/catalina/startup/Bootstrap
Caused by: java.lang.ClassNotFoundException: 
org.apache.catalina.startup.Bootstrap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: org.apache.catalina.startup.Bootstrap.  Program 
will exit.

Thank's
Gustavo.

De: Caldarale, Charles R [chuck.caldar...@unisys.com]
Enviado: quarta-feira, 10 de março de 2010 17:46
Para: Tomcat Users List
Assunto: RE: TOMCAT 6 Error: Exception in thread "main" 
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

> From: Gustavo A. Daud [mailto:gust...@sofisa.com.br]
> Subject: RES: TOMCAT 6 Error: Exception in thread "main"
> java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
>
> But as you can see, bootstrap.jar, is not in there

So you have a corrupted Tomcat installation; start over.

> I'm running Tomcat as a root user!

Not a good idea.  If you're not using ports less than 1024, you can run as a 
normal user with no other considerations.  If you do need ports below 1024, use 
jsvc or iptables, as described in the Tomcat doc and FAQ.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

"Esta mensagem é emitida exclusivamente com fins informativos, não devendo ser 
entendida ou utilizada  como uma oferta, requerimento para a compra ou venda de 
qualquer instrumento financeiro ou  confirmação de qualquer transação ou 
negócio. No caso desta mensagem conter dados ou outras  informações utilizadas 
pelo mercado financeiro  deverão estes ser  considerados como meras 
estimativas,  não lhes sendo outorgadas qualquer garantia quanto a  sua 
correção, estando  sujeitos a mudanças sem prévio aviso. Qualquer(Quaisquer) 
comentário(s) ou declaração(ões) aqui enunciadas não reflete(m), 
necessariamente, o posicionamento do Banco Sofisa S/A, suas coligadas, 
subsidiárias ou  filiais."


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-10 Thread Caldarale, Charles R
> From: Gustavo A. Daud [mailto:gust...@sofisa.com.br]
> Subject: RES: TOMCAT 6 Error: Exception in thread "main"
> java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
> 
> But as you can see, bootstrap.jar, is not in there

So you have a corrupted Tomcat installation; start over.

> I'm running Tomcat as a root user!

Not a good idea.  If you're not using ports less than 1024, you can run as a 
normal user with no other considerations.  If you do need ports below 1024, use 
jsvc or iptables, as described in the Tomcat doc and FAQ.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RES: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-10 Thread Gustavo A. Daud
The path /opt/tomcat6/bin exists and contain this files:

catalina-tasks.xml  digest.shshutdown.sh   version.bat
catalina.batservice.bat startup.bat version.sh
catalina.sh setclasspath.bat  startup.sh
cpappend.batsetclasspath.sh   tool-wrapper.bat
digest.bat  shutdown.bat tool-wrapper.sh

But as you can see, bootstrap.jar, is not in there, actually, isn't in any 
where.

I'm running Tomcat as a root user!

Ass: Gustavo



De: Caldarale, Charles R [chuck.caldar...@unisys.com]
Enviado: quarta-feira, 10 de março de 2010 17:19
Para: Tomcat Users List
Assunto: RE: TOMCAT 6 Error: Exception in thread "main" 
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

> From: Gustavo A. Daud [mailto:gust...@sofisa.com.br]
> Subject: TOMCAT 6 Error: Exception in thread "main"
> java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
>
> "Using CATALINA_BASE:   /opt/tomcat6
> Using CATALINA_HOME:   /opt/tomcat6
> Using CATALINA_TMPDIR: /opt/tomcat6/temp
> Using JRE_HOME:/usr/lib/jvm/jdk1.6
> Using CLASSPATH:   /opt/tomcat6/bin/bootstrap.jar

Does /opt/tomcat6/bin/bootstrap.jar actually exist?

Does the userid you're running Tomcat with have access to it?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

"Esta mensagem é emitida exclusivamente com fins informativos, não devendo ser 
entendida ou utilizada  como uma oferta, requerimento para a compra ou venda de 
qualquer instrumento financeiro ou  confirmação de qualquer transação ou 
negócio. No caso desta mensagem conter dados ou outras  informações utilizadas 
pelo mercado financeiro  deverão estes ser  considerados como meras 
estimativas,  não lhes sendo outorgadas qualquer garantia quanto a  sua 
correção, estando  sujeitos a mudanças sem prévio aviso. Qualquer(Quaisquer) 
comentário(s) ou declaração(ões) aqui enunciadas não reflete(m), 
necessariamente, o posicionamento do Banco Sofisa S/A, suas coligadas, 
subsidiárias ou  filiais."


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-10 Thread Caldarale, Charles R
> From: Gustavo A. Daud [mailto:gust...@sofisa.com.br]
> Subject: TOMCAT 6 Error: Exception in thread "main"
> java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
> 
> "Using CATALINA_BASE:   /opt/tomcat6
> Using CATALINA_HOME:   /opt/tomcat6
> Using CATALINA_TMPDIR: /opt/tomcat6/temp
> Using JRE_HOME:/usr/lib/jvm/jdk1.6
> Using CLASSPATH:   /opt/tomcat6/bin/bootstrap.jar

Does /opt/tomcat6/bin/bootstrap.jar actually exist?

Does the userid you're running Tomcat with have access to it?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



TOMCAT 6 Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap

2010-03-10 Thread Gustavo A. Daud
Hello,

I'm trying to install the tomcat 6 in a OpenSuse system, but when I start the 
aplication I recieved the following message:

"Using CATALINA_BASE:   /opt/tomcat6
Using CATALINA_HOME:   /opt/tomcat6
Using CATALINA_TMPDIR: /opt/tomcat6/temp
Using JRE_HOME:/usr/lib/jvm/jdk1.6
Using CLASSPATH:   /opt/tomcat6/bin/bootstrap.jar
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/catalina/startup/Bootstrap
Caused by: java.lang.ClassNotFoundException: 
org.apache.catalina.startup.Bootstrap
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program 
will exit."

I try to find any documentation on google about this, but I don't find 
anything. I also tried to change the JRE_HOME and CLASSPATH, but, nothing.

I don't find any archive bootstrap.jar on system!

I'm using:
-OpenSuse 11
-Tomcat 6
-JDK 1.6

I will thank's for any help.

Ass: Gustavo


"Esta mensagem é emitida exclusivamente com fins informativos, não devendo ser 
entendida ou utilizada como uma oferta, requerimento para a compra ou venda de 
qualquer instrumento financeiro ou confirmação de qualquer transação ou 
negócio. No caso desta mensagem conter dados ou outras informações utilizadas 
pelo mercado financeiro deverão estes ser considerados como meras estimativas, 
não lhes sendo outorgadas qualquer garantia quanto a sua correção, estando 
sujeitos a mudanças sem prévio aviso. Qualquer(Quaisquer) comentário(s) ou 
declaração(ões) aqui enunciadas não reflete(m), necessariamente, o 
posicionamento do Banco Sofisa S/A, suas coligadas, subsidiárias ou filiais."


Re: On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

2009-07-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

On 7/26/2009 5:47 AM, Paul van Hoven wrote:
> Yeah, that was it. Thanks for the great help. I deleted gwt-user.jar and
> now it runs perfectly fine.

For a bit of background, the Servlet API classes are supposed to be
located in one place only: in the server's main library directory.
Loading classes from anywhere else could be ... confusing, thus this
prohibition.

The application server is supposed to veto any classes loading from a
webapp's ClassLoader that are defined in certain packages (such as
java.* and javax.* ; see section 9.7.2 of the 2.5 Servlet Spec).

If you try to load servlet-api-x.y.z.jar into Tomcat, it does in fact
veto these classes and tells you about it. I'm not sure why Tomcat would
have a problem with gwt-servlet.jar, honestly, but since it contains the
classes from the Servlet API, at least those classes will be prohibited
from loading.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkptsV0ACgkQ9CaO5/Lv0PAFdwCfZSFk/RibGkW3O3cXfMHi2DJd
a5QAn3MdFN5fgejNGzSbjm4sBmsJ5Iz4
=e5Z/
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

2009-07-26 Thread Paul van Hoven
Yeah, that was it. Thanks for the great help. I deleted gwt-user.jar and 
now it runs perfectly fine.



Juha Laiho schrieb:

Caldarale, Charles R wrote:
  

From: Paul van Hoven [mailto:paul.van.ho...@googlemail.com]
Subject: Re: On my Webserver: java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServlet

gwt-servlet.jar
  

I have some recollection that the above jar is the trouble maker; take a look 
inside it.



Almost, but not quite.. I took an interest in this after seeing your response,
and found the following:
http://lkamal.blogspot.com/2007/07/jar-not-loaded-servletclass-gwt-tomcat.html

... which explains that gwt-user.jar is the problem, for which gwt-servlet.jar
is the correction. There's also a tutorial by the same author describing that
gwt-user.jar should be used for building and gwt-servlet.jar for deployment:
http://lkamal.blogspot.com/2008/09/java-gwt-servlets-web-app-tutorial.html
  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

2009-07-26 Thread Juha Laiho
Caldarale, Charles R wrote:
>> From: Paul van Hoven [mailto:paul.van.ho...@googlemail.com]
>> Subject: Re: On my Webserver: java.lang.NoClassDefFoundError:
>> javax/servlet/http/HttpServlet
>>
>> gwt-servlet.jar
> 
> I have some recollection that the above jar is the trouble maker; take a look 
> inside it.

Almost, but not quite.. I took an interest in this after seeing your response,
and found the following:
http://lkamal.blogspot.com/2007/07/jar-not-loaded-servletclass-gwt-tomcat.html

... which explains that gwt-user.jar is the problem, for which gwt-servlet.jar
is the correction. There's also a tutorial by the same author describing that
gwt-user.jar should be used for building and gwt-servlet.jar for deployment:
http://lkamal.blogspot.com/2008/09/java-gwt-servlets-web-app-tutorial.html
-- 
..Juha

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

2009-07-25 Thread Caldarale, Charles R
> From: Paul van Hoven [mailto:paul.van.ho...@googlemail.com]
> Subject: Re: On my Webserver: java.lang.NoClassDefFoundError:
> javax/servlet/http/HttpServlet
> 
> gwt-servlet.jar

I have some recollection that the above jar is the trouble maker; take a look 
inside it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

2009-07-25 Thread Paul van Hoven

Thanks for the answer. Here's a list of all the jars that i include:

activation.jar
antlr-2.7.6.jar
c3p0-0.9.1.2.jar
commons-beanutils-1.8.0.jar
commons-codec-1.3.jar
commons-collections-3.2.1.jar
commons-fileupload-1.2.1.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
ejb3-persistence.jar
ezmorph-1.0.6.jar
gwt-maps.jar
gwt-reverse-geocoder-1.0.8.1.jar
gwt-servlet.jar
gwt-user.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-testing.jar
hibernate3.jar
javassist-3.4.GA.jar
json-lib-2.2.3-jdk15.jar
jstl.jar
jta-1.1.jar
log4j.jar
mail.jar
mysql-connector-java-5.0.5-bin.jar
sanselan.jar
slf4j-api-1.5.2.jar
slf4j-log4j12.jar
spring-webmvc.jar
spring.jar
standard.jar

I'm not sure if they duplicate things from the servlet-api.jar.


David Smith schrieb:

What jars are in your webapp?  Did you include any that might duplicate
those distributed in the servlet-api.jar file?

--David

Paul van Hoven wrote:
  

I just rented a server for providing an internet service. Before, i
developped the application on my local machine which is running mac os
x leopard. I also installed tomcat for testing my application. After
creating a war file i place the webapp in the CATALINA_HOME/webapps
folder on my local machine. After starting tomcat i can access the
webapp on http://localhost:8080/myapp. It runs fine and everything
works as expected. I also include all the necessary jars in the
WEB-INF/lib folder.

Okay so far so good, now, i copied the war file (that actually runs
fine on my local machine) to the server into the folder
CATALINA_HOME/webapps, as it should be done. Then, i start tomcat
6.0.20. The webserver starts fine and accessing it by entering
http://www.myaddress.com:8080 the tomcat welcome page is greeting. I
switch into the manager and it tells me that my app is loaded. But
when i click on the link to the deployed webapp i get an error 500 and
the following exception is thrown:

javax.servlet.ServletException: Error allocating a servlet instance
  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


  
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)


  
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)


  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)


  
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

   java.lang.Thread.run(Thread.java:636)
root cause

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
   java.lang.ClassLoader.defineClass1(Native Method)
   java.lang.ClassLoader.defineClass(ClassLoader.java:637)
...

Actually i do not understand this. The environment variables are set
as follows:
/usr/local/apache-tomcat-6.0.20/bin# ./startup.sh
Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.20
Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.20/temp
Using JRE_HOME:   /usr/bin

But i also set the variables explicitly in my .bashrc by
export CATALINA_HOME=/usr/local/apache-tomcat-6.0.20
export CATALINA_BASE=/usr/local/apache-tomcat-6.0.20

I start tomcat with root privileges. Every other app like the ones in
http://www.myaddress.com:8080/examples/servlets/ are working fine.
What is causing this problem?





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

2009-07-25 Thread David Smith
What jars are in your webapp?  Did you include any that might duplicate
those distributed in the servlet-api.jar file?

--David

Paul van Hoven wrote:
> I just rented a server for providing an internet service. Before, i
> developped the application on my local machine which is running mac os
> x leopard. I also installed tomcat for testing my application. After
> creating a war file i place the webapp in the CATALINA_HOME/webapps
> folder on my local machine. After starting tomcat i can access the
> webapp on http://localhost:8080/myapp. It runs fine and everything
> works as expected. I also include all the necessary jars in the
> WEB-INF/lib folder.
>
> Okay so far so good, now, i copied the war file (that actually runs
> fine on my local machine) to the server into the folder
> CATALINA_HOME/webapps, as it should be done. Then, i start tomcat
> 6.0.20. The webserver starts fine and accessing it by entering
> http://www.myaddress.com:8080 the tomcat welcome page is greeting. I
> switch into the manager and it tells me that my app is loaded. But
> when i click on the link to the deployed webapp i get an error 500 and
> the following exception is thrown:
>
> javax.servlet.ServletException: Error allocating a servlet instance
>   
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>   
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>
>   
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
>
>   
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>
>   
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
>java.lang.Thread.run(Thread.java:636)
> root cause
>
> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
>java.lang.ClassLoader.defineClass1(Native Method)
>java.lang.ClassLoader.defineClass(ClassLoader.java:637)
> ...
>
> Actually i do not understand this. The environment variables are set
> as follows:
> /usr/local/apache-tomcat-6.0.20/bin# ./startup.sh
> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.20
> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.20
> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.20/temp
> Using JRE_HOME:   /usr/bin
>
> But i also set the variables explicitly in my .bashrc by
> export CATALINA_HOME=/usr/local/apache-tomcat-6.0.20
> export CATALINA_BASE=/usr/local/apache-tomcat-6.0.20
>
> I start tomcat with root privileges. Every other app like the ones in
> http://www.myaddress.com:8080/examples/servlets/ are working fine.
> What is causing this problem?
>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

2009-07-25 Thread Paul van Hoven
I just rented a server for providing an internet service. Before, i 
developped the application on my local machine which is running mac os x 
leopard. I also installed tomcat for testing my application. After 
creating a war file i place the webapp in the CATALINA_HOME/webapps 
folder on my local machine. After starting tomcat i can access the 
webapp on http://localhost:8080/myapp. It runs fine and everything works 
as expected. I also include all the necessary jars in the WEB-INF/lib 
folder.


Okay so far so good, now, i copied the war file (that actually runs fine 
on my local machine) to the server into the folder 
CATALINA_HOME/webapps, as it should be done. Then, i start tomcat 
6.0.20. The webserver starts fine and accessing it by entering 
http://www.myaddress.com:8080 the tomcat welcome page is greeting. I 
switch into the manager and it tells me that my app is loaded. But when 
i click on the link to the deployed webapp i get an error 500 and the 
following exception is thrown:


javax.servlet.ServletException: Error allocating a servlet instance
   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
   
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
   
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

   org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
   java.lang.Thread.run(Thread.java:636)
root cause

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
   java.lang.ClassLoader.defineClass1(Native Method)
   java.lang.ClassLoader.defineClass(ClassLoader.java:637)
...

Actually i do not understand this. The environment variables are set as 
follows:

/usr/local/apache-tomcat-6.0.20/bin# ./startup.sh
Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.20
Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.20/temp
Using JRE_HOME:   /usr/bin

But i also set the variables explicitly in my .bashrc by
export CATALINA_HOME=/usr/local/apache-tomcat-6.0.20
export CATALINA_BASE=/usr/local/apache-tomcat-6.0.20

I start tomcat with root privileges. Every other app like the ones in 
http://www.myaddress.com:8080/examples/servlets/ are working fine. What 
is causing this problem?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener

2008-12-20 Thread Ole Ersoy

Hmmm - I'm running with OpenJDK 1.6 (Should that have gcj stuff in it - I'm 
also using jsvc and APR - maybe it got mixed in somehow?):

java -version
java version "1.6.0_0"
IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 10.0-b19, mixed mode)

I'm going to try to setup everything from scratch and see if I can isolate the 
issue better.

Thanks,
- Ole


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener

2008-12-19 Thread Caldarale, Charles R
> From: Ole Ersoy [mailto:ole.er...@gmail.com]
> Subject: java.lang.NoClassDefFoundError:
> org.apache.catalina.mbeans.ServerLifecycleListener
>
> 19-Dec-08 2:39:58 PM org.apache.tomcat.util.digester.Digester
> startElement
> SEVERE: Begin event threw error
> java.lang.NoClassDefFoundError:
> org.apache.catalina.mbeans.ServerLifecycleListener
>at java.lang.Class.initializeClass(libgcj.so.9)
>at java.lang.Class.newInstance(libgcj.so.9)

Use a real JVM (Sun, IBM, BEA); gcj is not suitable for serious applications, 
such as Tomcat.  Repost if you still have errors.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener

2008-12-19 Thread Ole Ersoy

Hi,

I'm attempting to install Tomcat 6.0.18 on Linux.  Right now I'm getting this:

19-Dec-08 2:39:58 PM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.NoClassDefFoundError: 
org.apache.catalina.mbeans.ServerLifecycleListener
  at java.lang.Class.initializeClass(libgcj.so.9)
  at java.lang.Class.newInstance(libgcj.so.9)
  at 
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:206)
  at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
  at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
  at gnu.xml.stream.SAXParser.parse(libgcj.so.9)
  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
  at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
  at java.lang.reflect.Method.invoke(libgcj.so.9)
  at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
  at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:275)
  at java.lang.reflect.Method.invoke(libgcj.so.9)
  at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
Caused by: java.lang.ClassNotFoundException: 
javax.management.modelmbean.ModelMBeanNotificationBroadcaster not found in 
org.apache.catalina.loader.StandardClassLoader{urls=[file:/var/lib/tomcat/common/tomcat-i18n-fr.jar,file:/var/lib/tomcat/common/jsp-api.jar,file:/var/lib/tomcat/common/catalina-ant.jar,file:/var/lib/tomcat/common/tomcat-dbcp.jar,file:/var/lib/tomcat/common/annotations-api.jar,file:/var/lib/tomcat/common/tomcat-i18n-ja.jar,file:/var/lib/tomcat/common/jasper-el.jar,file:/var/lib/tomcat/common/tomcat-i18n-es.jar,file:/var/lib/tomcat/common/el-api.jar,file:/var/lib/tomcat/common/catalina-ha.jar,file:/var/lib/tomcat/common/catalina-tribes.jar,file:/var/lib/tomcat/common/servlet-api.jar,file:/var/lib/tomcat/common/jasper-jdt.jar,file:/var/lib/tomcat/common/tomcat-coyote.jar,file:/var/lib/tomcat/common/jasper.jar,file:/var/lib/tomcat/common/catalina.jar],
 
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/jvm/java/lib/tools.jar,file:/usr/share/tomcat/bin/
commons-daemon.jar,file:/usr/share/tomcat/bin/bootstrap.jar], 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}

Looking at the above it seems like the class loader knows where all the 
libraries are.  And they really are there:

[r...@ole conf]# ls -la /var/lib/tomcat/common
total 4764
drwxr-xr-x 2 root root  4096 2008-12-19 12:37 .
drwxr-xr-x 4 root root  4096 2008-12-19 12:37 ..
-rw-r--r-- 1 root tomcat   10797 2008-12-19 12:36 annotations-api.jar
-rw-r--r-- 1 root tomcat   49175 2008-12-19 12:36 catalina-ant.jar
-rw-r--r-- 1 root tomcat  122848 2008-12-19 12:36 catalina-ha.jar
-rw-r--r-- 1 root tomcat 1127397 2008-12-19 12:37 catalina.jar
-rw-r--r-- 1 root tomcat  228193 2008-12-19 12:36 catalina-tribes.jar
-rw-r--r-- 1 root tomcat   27671 2008-12-19 12:36 el-api.jar
-rw-r--r-- 1 root tomcat  102174 2008-12-19 12:36 jasper-el.jar
-rw-r--r-- 1 root tomcat  510002 2008-12-19 12:37 jasper.jar
-rw-r--r-- 1 root tomcat 1385552 2008-12-19 12:36 jasper-jdt.jar
-rw-r--r-- 1 root tomcat   72089 2008-12-19 12:36 jsp-api.jar
-rw-r--r-- 1 root tomcat   83556 2008-12-19 12:36 servlet-api.jar
-rw-r--r-- 1 root tomcat  741071 2008-12-19 12:36 tomcat-coyote.jar
-rw-r--r-- 1 root tomcat  197325 2008-12-19 12:36 tomcat-dbcp.jar
-rw-r--r-- 1 root tomcat   45634 2008-12-19 12:36 tomcat-i18n-es.jar
-rw-r--r-- 1 root tomcat   42659 2008-12-19 12:36 tomcat-i18n-fr.jar
-rw-r--r-- 1 root tomcat   48579 2008-12-19 12:36 tomcat-i18n-ja.jar

Any ideas on what could be causing the exception?  I start tomcat with jsvc 
like so:

export LD_LIBRARY_PATH=/usr/local/apr/lib:
CATALINA_HOME=/usr/share/tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/tomcat/temp
CATALINA_OPTS=
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
 start)
   #
   # Start Tomcat
   #
if [ -e /var/run/jsvc.pid ]
then
   echo "Tomcat is running already"
else
   echo -n "Starting tomcat"
   echo
   $DAEMON_LAUNCHER \
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
   -Djava.util.logging.config.file=$CATALINA_HOME/conf/logging.properties \
   -outfile /var/log/tomcat/catalina.out \
   -errfile '&1' \
   $CATALINA_OPTS \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap
   touch /var/lock/subsys/apache-tomcat
   #
   # To get a verbose JVM
   #-verbose # To get a debug of jsvc.
   #-debug
fi
   ;;

My java version is this:

java version "1.6.0_0"
IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 10.0-b19, mixed mode)

TIA,
- Ole


Re: HELP!!! java.lang.NoClassDefFoundError running CXF-based client in Tomcat

2008-11-26 Thread Steve Cohen

Thank you Larry!!!

That was it! I was barking up the wrong tree. The class that couldn't be 
loaded was indeed the "MyClient" class, which existed in a Utility Jar 
that I had not made a Java EE Module Dependency.


D'Oh!

Steve


Larry Isaacs wrote:

Be aware that in Eclipse WTP, your web project is "published" to the server to be served. Jars that 
are added to the project as runtime dependencies will be copied to the "WEB-INF/lib" of the 
"published" webapp.  Just adding a jar to the build path of the web project DOES NOT add the jar as 
a runtime dependency. The project builds fine, but won't work at runtime due to missing classes.  Normally, 
the Problems view will show warnings when this is the case.

Assuming this is your problem, go the Java EE Module Dependencies page in the web 
project's Properties dialog.  Make sure all the jars you want in "WEB-INF/lib" 
at runtime are checked.

Cheers,
Larry

-Original Message-
From: Steve Cohen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2008 11:44 AM
To: Tomcat Users List
Subject: Re: HELP!!! java.lang.NoClassDefFoundError running CXF-based client 
inTomcat

It's the Real Tomcat, but running inside Eclipse WTP, which starts and
stops the server.

Caldarale, Charles R wrote:
  

From: Steve Cohen [mailto:[EMAIL PROTECTED]
Subject: Re: HELP!!! java.lang.NoClassDefFoundError running
CXF-based client inTomcat

Another piece of information I omitted: JDK version
java-1.5.0-sun-1.5.0.13 running under Ubuntu Linux.

  

Is this a real Tomcat or a 3rd-party repackaged version?  If the latter, please 
install a real one from tomcat.apache.org and try again, as the 3rd-party ones 
often break things in subtle ways.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HELP!!! java.lang.NoClassDefFoundError running CXF-based client in Tomcat

2008-11-26 Thread Larry Isaacs
Be aware that in Eclipse WTP, your web project is "published" to the server to 
be served. Jars that are added to the project as runtime dependencies will be 
copied to the "WEB-INF/lib" of the "published" webapp.  Just adding a jar to 
the build path of the web project DOES NOT add the jar as a runtime dependency. 
The project builds fine, but won't work at runtime due to missing classes.  
Normally, the Problems view will show warnings when this is the case.

Assuming this is your problem, go the Java EE Module Dependencies page in the 
web project's Properties dialog.  Make sure all the jars you want in 
"WEB-INF/lib" at runtime are checked.

Cheers,
Larry

-Original Message-
From: Steve Cohen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2008 11:44 AM
To: Tomcat Users List
Subject: Re: HELP!!! java.lang.NoClassDefFoundError running CXF-based client 
inTomcat

It's the Real Tomcat, but running inside Eclipse WTP, which starts and
stops the server.

Caldarale, Charles R wrote:
>> From: Steve Cohen [mailto:[EMAIL PROTECTED]
>> Subject: Re: HELP!!! java.lang.NoClassDefFoundError running
>> CXF-based client inTomcat
>>
>> Another piece of information I omitted: JDK version
>> java-1.5.0-sun-1.5.0.13 running under Ubuntu Linux.
>>
>
> Is this a real Tomcat or a 3rd-party repackaged version?  If the latter, 
> please install a real one from tomcat.apache.org and try again, as the 
> 3rd-party ones often break things in subtle ways.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HELP!!! java.lang.NoClassDefFoundError running CXF-based client inTomcat

2008-11-26 Thread Steve Cohen
It's the Real Tomcat, but running inside Eclipse WTP, which starts and 
stops the server.


Caldarale, Charles R wrote:

From: Steve Cohen [mailto:[EMAIL PROTECTED]
Subject: Re: HELP!!! java.lang.NoClassDefFoundError running
CXF-based client inTomcat

Another piece of information I omitted: JDK version
java-1.5.0-sun-1.5.0.13 running under Ubuntu Linux.



Is this a real Tomcat or a 3rd-party repackaged version?  If the latter, please 
install a real one from tomcat.apache.org and try again, as the 3rd-party ones 
often break things in subtle ways.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HELP!!! java.lang.NoClassDefFoundError running CXF-based client inTomcat

2008-11-26 Thread Caldarale, Charles R
> From: Steve Cohen [mailto:[EMAIL PROTECTED]
> Subject: Re: HELP!!! java.lang.NoClassDefFoundError running
> CXF-based client inTomcat
>
> Another piece of information I omitted: JDK version
> java-1.5.0-sun-1.5.0.13 running under Ubuntu Linux.

Is this a real Tomcat or a 3rd-party repackaged version?  If the latter, please 
install a real one from tomcat.apache.org and try again, as the 3rd-party ones 
often break things in subtle ways.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >