PDA

View Full Version : Error with Resin 2.1: element "canvas" not allowed in this context


paul.barry
04-05-2004, 11:26 AM
I downloaded lps 2.1, works fine with tomcat as far as I can tell. I have resin 2.1 installed, I copies everything from the webapps/lps-2.1.1 directory into a resin app-dir. Everything still seems to be working ok, the welcome page loads all the menus, the tutorials and examples work fine.

So then I started to write my own code. I have a hello.lzx in the my-apps dir, it looks like this:

<canvas>
<text>Hello</text>
</canvas>

When I go to http://localhost/my-apps/hello.lzx, it seems to be working, but I get this compilation error:

hello.lzx:1:9: element "canvas" not allowed in this context. Check whether it is spelled correctly, and whether a class with this name exists

Even though I get this error, it prints the hello. As I try more examples, I get more similar errors, but as far as I can tell, things are working. Any idea what would cause this?

bloch
04-05-2004, 12:01 PM
This is strange.... but could possibly be caused
by a classloader problem.

Do you have the server-classloader-hack turned on in resin.conf?

-Eric

paul.barry
04-05-2004, 12:45 PM
I had it off, so I tried turning it on, but it doesn't fix the problem.

bloch
04-05-2004, 01:15 PM
Interesting... what version of the JDK do you have?

-Eric

paul.barry
04-05-2004, 01:25 PM
The error seems to have gone away once I deleted everything under WEB-INF/tmp and WEB-INF/work. I guess the stuff got compiled under tomcat and when resin tried to run it, it caused problems. Once resin compiles that stuff itself, everything seems ok.

hqm
04-06-2004, 03:37 AM
I wonder if this has to do with the persistent caches, such as script cache, making use of Java object serialization? Perhaps the app server was running with a different JDK and thus could not read the stuff cached on disk...