Re: Debian Woody / Tomcat / Example JSPs

2002-03-23 Thread Jason Hendriks

Regarding: "*** Error: "beans" is either a misplaced package name or a
non-existent entity. An expression name is expected in this context." when
atempting to compile a JSP with a useBean tag.

I found the problem, I was right, it was the compiler.  I copied the entire
Tomcat instalation from machine B to machine A and I still got the same
error on A.  But the error went away when I replaced the /usr/bin/jikes
(2002/03/07) on A with /usr/bin/jikes (2001/11/13) from B.  The header file
in /usr/include/jikesapi.h didn't seem to make a difference.

I can send you the older /usr/bin/jikes if you want it.

Jason

- Original Message -
From: "Ralph Einfeldt" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 2:53 AM
Subject: AW: Debian Woody / Tomcat / Example JSPs


Sounds as if a fundamental java library (rt.jar) is not
in the classpath.

java.beans is a standard package since jdk 1.1.

> -Ursprüngliche Nachricht-
> Von: Marcus Bungert [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 21. März 2002 19:41
> An: [EMAIL PROTECTED]
> Betreff: Debian Woody / Tomcat / Example JSPs

> org.apache.jasper.JasperException: Unable to compile
> Found 1 semantic error compiling
> "/var/cache/tomcat/DEFAULT/examples/jsp/num/numguess_1.java":
>
>
> 69.   numguess = (num.NumberGuessBean)
> java.beans.Beans.instantiate(this.getClass().getClassLoader(),
> "num.NumberGuessBean");
>
> *** Error: "beans" is either a misplaced package name or a
non-existent
> entity. An expression name is expected in this context.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Debian Woody / Tomcat / Example JSPs *** Error: "beans" is either a misplaced package name or a non-existent entity

2002-03-22 Thread Jason Hendriks

I've got the same problem on my Debian install, version 3.3a-2 (is that the
version that installs with Woody??? I don't think so).

It occurs for every JSP that uses the  tag.  I was in the
process of moving some applications from another tomcat server (configured
in january) to this new one but I've had to abandon that temporarily until I
figure out what's causing this problem.

It's not rt.jar, because the error occurs for both JDK 1.1 (classes.zip) and
JDK 1.3 (rt.jar).  It's not Tomcat's servlet.jar because "java.beans.Beans"
is not found there.  I don't think it's the classpath or a permissions
problem, because every other aspect of Tomcat and the examples (and my
applications) work.

The error is so weird.  "An expression name is expected in this context."
More than likely somebody's messed up the JSP compile engine, the part that
recognizes the useBean tag.  I'm going to take bits of the old machine and
stick them on the new machine until it works.  I'll post my findings.

Jason



- Original Message -
From: "Marcus Bungert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 1:41 PM
Subject: Debian Woody / Tomcat / Example JSPs


> Hello everybody,
>
> first at all, I'm sorry for my poor english but I hope you understand my
> problem description.
>
> I tried to install Tomcat 3.3a with mod_jk for Apache 1.3.23 and
> Blackdown J2SDK1.3 to my Debian Woody.
>
> After the installation I'm able to access /examples via Port 8081 and
> via Apache (this is mod_jk?).
>
> The servlets are working all but if I try the example JSPs I get the
> following error (this is the output of numguess.jsp):
>
> Error: 500
>
> Location: /examples/jsp/num/numguess.jspInternal Servlet Error:
>
> org.apache.jasper.JasperException: Unable to compile
> Found 1 semantic error compiling
> "/var/cache/tomcat/DEFAULT/examples/jsp/num/numguess_1.java":
>
>
> 69.   numguess = (num.NumberGuessBean)
> java.beans.Beans.instantiate(this.getClass().getClassLoader(),
> "num.NumberGuessBean");
>
>
>
> <>
>
> *** Error: "beans" is either a misplaced package name or a non-existent
> entity. An expression name is expected in this context.
>
>
> at
> org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:800)
>
>
> at
>
org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:64
1)
>
>
> at
>
org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:446)
>
>
> at
>
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968
)
>
>
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:87
5)
>
>
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
>
>
> at
>
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Int
erceptor.java:213)
>
>
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477)
>
>
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:519)
>
> at java.lang.Thread.run(Thread.java:484)
>
> Everything with Java is very new to me. I do not know where to look for
> the reasons of this error.
>
> Thanks for help in advance...
>
> Marcus
>
> --
>
>  :: GPG Fingerprint  2196 F6E0 2DFE 36F0 4F69  4259 D12A CB99 834C CA31
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: AW: AW: AW: Debian Woody / Tomcat / Example JSPs

2002-03-22 Thread majobu

I only did 'javac Test.java' without any option.
Now, after your question for the classpath I changed
Test.java as below and tried:

1.)
javac Test.java

Test.java:3: cannot resolve symbol
symbol  : class Bean
location: package best
  System.out.println("Test: " + java.bean.Bean.isDesignTime());
 ^
1 error

2.)
javac -
classpath /usr/lib/j2sdk1.3/jre/lib/rt.jar:/usr/lib/j2sdk1.3/lib/tools.jar:/usr/
sh Test.java

Test.java:3: cannot resolve symbol
symbol  : class Bean
location: package best
  System.out.println("Test: " + java.bean.Bean.isDesignTime());
 ^
1 error

Zitiere Ralph Einfeldt <[EMAIL PROTECTED]>:

> Did you use the classpath to compile the class ?
> 
> /usr/lib/j2sdk1.3/jre/lib/rt.jar:/usr/lib/j2sdk1.3/lib/tools.jar:/usr/sh
> are/tomcat/lib/tomcat.jar
> 
> To get a better comparable error message change Test.java to:
> 
> public class Test { 
>public Test() {
>  System.out.println("Test: " + java.bean.Bean.isDesignTime());
>}
> }

 ::
 :: GPG Fingerprint  2196 F6E0 2DFE 36F0 4F69  4259 D12A CB99 834C CA31

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: AW: AW: Debian Woody / Tomcat / Example JSPs

2002-03-22 Thread Jean-Luc BEAUDET

[EMAIL PROTECTED] a écrit :

> Ralph,
>
> thanks for your help :)
> > /usr/lib/j2sdk1.3/bin/jar -tvf /usr/lib/j2sdk1.3/jre/lib/rt.jar
> > java/beans
>
> This worked perfect...
>
> > Test.java
> >
> > import java.bean.Bean;
> >
> >
> > public class Test {
> >   public Test() {
> > System.out.println("Test: " + Bean.isDesignTime());
> >   }
> > }
>
> When I try to compile this with 'javac Test.java' I get the following errors:
>
> Test.java:1: cannot resolve symbol
> symbol  : class Bean
> location: package bean
> import java.bean.Bean;
>  ^
>
> Test.java:5: cannot resolve symbol
> symbol  : variable Bean
> location: class Test
> System.out.println("Test: " + Bean.isDesignTime());
>   ^
> 2 errors
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 

Seems an environement problem...

Try CLASSPATH=.:$CLASSPATH; export CLASSPATH

Or pass yur new CLASSPATH directly to javac:
javac -classpath .:$CLASSPATH MyFile.java

To avoid such pb, i made a special dir: /opt/Tools
where i put some little tricky prog like that one just below

#!/bin/sh
# Javac -- the javac modified prog.

javac -classpath .:${CLASSPATH} $@

Finally yu'll enter

Javac MyFile.java

Assuming that /opt/Tools is in yur PATH...

Yu can do the same with java, too

#!/bin/sh
# Java -- the java modified prog.

java -classpath .:${CLASSPATH} $@

Hope this help

Jean-Luc B :O)




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




AW: AW: AW: Debian Woody / Tomcat / Example JSPs

2002-03-22 Thread Ralph Einfeldt

Did you use the classpath to compile the class ?

/usr/lib/j2sdk1.3/jre/lib/rt.jar:/usr/lib/j2sdk1.3/lib/tools.jar:/usr/sh
are/tomcat/lib/tomcat.jar

To get a better comparable error message change Test.java to:

public class Test { 
   public Test() {
 System.out.println("Test: " + java.bean.Bean.isDesignTime());
   }
}

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 22. März 2002 11:45
> An: Tomcat Users List
> Betreff: Re: AW: AW: Debian Woody / Tomcat / Example JSPs
> 
 
> When I try to compile this with 'javac Test.java' I get the 
> following errors:
> 
> Test.java:1: cannot resolve symbol
> symbol  : class Bean
> location: package bean
> import java.bean.Bean;
>  ^
 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: AW: AW: Debian Woody / Tomcat / Example JSPs

2002-03-22 Thread majobu

Ralph,

thanks for your help :)
> /usr/lib/j2sdk1.3/bin/jar -tvf /usr/lib/j2sdk1.3/jre/lib/rt.jar
> java/beans

This worked perfect...

> Test.java
> 
> import java.bean.Bean;
> 
> 
> public class Test { 
>   public Test() {
> System.out.println("Test: " + Bean.isDesignTime());
>   }
> }

When I try to compile this with 'javac Test.java' I get the following errors:

Test.java:1: cannot resolve symbol
symbol  : class Bean
location: package bean
import java.bean.Bean;
 ^

Test.java:5: cannot resolve symbol
symbol  : variable Bean
location: class Test
System.out.println("Test: " + Bean.isDesignTime());
  ^
2 errors

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




AW: AW: Debian Woody / Tomcat / Example JSPs

2002-03-22 Thread Ralph Einfeldt

So far that looks correct to me.

Some further guesses:
- the jar file is not readable for the user that runs tomcat
- the jar file is corrupt

Verify if the user that runs tomcat can read the jar file:

login as the user that runs tomcat and do
/usr/lib/j2sdk1.3/bin/jar -tvf /usr/lib/j2sdk1.3/jre/lib/rt.jar
java/beans


If that works, try to compile a small test case that uses 
a class in the bean package:

Test.java

import java.bean.Bean;


public class Test { 
  public Test() {
System.out.println("Test: " + Bean.isDesignTime());
  }
}


> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 22. März 2002 10:32
> An: Tomcat Users List
> Betreff: Re: AW: Debian Woody / Tomcat / Example JSPs

> With 'env | grep CLASSPATH' I get no result (done as root and 
> tomcat-user)

> Then I put an additional 'echo' statement to the 
> startupscript to get the
> CLASSPATH. The echo says on startup of tomcat:
> 
> classpath set to: 
> /usr/lib/j2sdk1.3/jre/lib/rt.jar:/usr/lib/j2sdk1.3/lib/tools.j
> ar:/usr/share/tomcat/lib/tomcat.jar


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: AW: Debian Woody / Tomcat / Example JSPs

2002-03-22 Thread majobu

Hello Ralph,
Maybe this is a stupid question, but how I check
the classpath and fix it permanently?

With 'env | grep CLASSPATH' I get no result (done as root and tomcat-user)

I looked around on my system and found rt.jar in /usr/lib/j2sdk1.3/jre/lib.
The Tomcat startscript in /etc/init.d/ says on startup:

Starting Tomcat servlet engine using Java from /usr/lib/j2sdk1.3

Then I put an additional 'echo' statement to the startupscript to get the
CLASSPATH. The echo says on startup of tomcat:

classpath set to: 
/usr/lib/j2sdk1.3/jre/lib/rt.jar:/usr/lib/j2sdk1.3/lib/tools.jar:/usr/share/tomc
at/lib/tomcat.jar


Zitiere Ralph Einfeldt <[EMAIL PROTECTED]>:

> Sounds as if a fundamental java library (rt.jar) is not 
> in the classpath.
> 
> java.beans is a standard package since jdk 1.1.


 ::
 :: GPG Fingerprint  2196 F6E0 2DFE 36F0 4F69  4259 D12A CB99 834C CA31


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




AW: Debian Woody / Tomcat / Example JSPs

2002-03-21 Thread Ralph Einfeldt

Sounds as if a fundamental java library (rt.jar) is not 
in the classpath.

java.beans is a standard package since jdk 1.1.

> -Ursprüngliche Nachricht-
> Von: Marcus Bungert [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 21. März 2002 19:41
> An: [EMAIL PROTECTED]
> Betreff: Debian Woody / Tomcat / Example JSPs

> org.apache.jasper.JasperException: Unable to compile 
> Found 1 semantic error compiling 
> "/var/cache/tomcat/DEFAULT/examples/jsp/num/numguess_1.java":
> 
> 
> 69.   numguess = (num.NumberGuessBean)
> java.beans.Beans.instantiate(this.getClass().getClassLoader(),
> "num.NumberGuessBean");
> 
> *** Error: "beans" is either a misplaced package name or a
non-existent 
> entity. An expression name is expected in this context.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Debian Woody / Tomcat / Example JSPs

2002-03-21 Thread Marcus Bungert

Hello everybody,

first at all, I'm sorry for my poor english but I hope you understand my
problem description.

I tried to install Tomcat 3.3a with mod_jk for Apache 1.3.23 and
Blackdown J2SDK1.3 to my Debian Woody.

After the installation I'm able to access /examples via Port 8081 and
via Apache (this is mod_jk?).

The servlets are working all but if I try the example JSPs I get the
following error (this is the output of numguess.jsp):

Error: 500

Location: /examples/jsp/num/numguess.jspInternal Servlet Error:
 
org.apache.jasper.JasperException: Unable to compile 
Found 1 semantic error compiling 
"/var/cache/tomcat/DEFAULT/examples/jsp/num/numguess_1.java":


69.   numguess = (num.NumberGuessBean)
java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"num.NumberGuessBean");


  
<>

*** Error: "beans" is either a misplaced package name or a non-existent 
entity. An expression name is expected in this context.


at
org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:800)


at
org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:641)


at
org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:446)


at
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)


at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)


at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)


at
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Interceptor.java:213)


at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477)


at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:519)

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

Everything with Java is very new to me. I do not know where to look for
the reasons of this error.

Thanks for help in advance...

Marcus

-- 

 :: GPG Fingerprint  2196 F6E0 2DFE 36F0 4F69  4259 D12A CB99 834C CA31


--
To unsubscribe:   
For additional commands: 
Troubles with the list: