PDA

View Full Version : Can't even run demo apps in Tomcat 5


wpoziombka
10-14-2004, 07:06 AM
Steps to reproduce:

get core only
untar tomcat
untar lps-2.2-core
move lps-2.2 directory to tomcat webapps directory
start tomcat
browse to LPS app, select demos.
try to run any of the demos.

End up with something like the following message:

Error: D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\demos\dashboard\dashboard.lzx: The system cannot find the path specified

Attached are lps.log and tomcat log files.

bloch
10-14-2004, 08:08 AM
Hm...

Is D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\demos\dashboard\dashboard.lzx

accessible/readable ?

Does http://localhost:8080/lps-2.2/demos/dashboard/dashboard.lzx?lzt=swf
work?

wpoziombka
10-14-2004, 08:16 AM
Yes the file is present readable, as are all in the distribution.

No, that URL does not work either. Using the lps webapp nothing works including the hello world example etc.

Wade

bloch
10-14-2004, 08:20 AM
I haven't yet tried tomcat 5.0.28.

Is the file readable by the owner of the java process?

Is there anything interesting in the stderr or stdout logs?

-Eric

wpoziombka
10-14-2004, 09:00 AM
Nothing of interest. There is a stack trace in the lps.log (attached in original post). Subsiquent requests get same message (in browser) but no stack trace in the log.

I am running on win xp and not doing anything creative. Doing steps exactly in first post.

D:\Java\jakarta-tomcat-5.0.28\bin>set JAVA_HOME=D:\Java\j2sdk1.4.2_05

D:\Java\jakarta-tomcat-5.0.28\bin>set PATH=%JAVA_HOME%\bin

D:\Java\jakarta-tomcat-5.0.28\bin>set JAVA_OPTS="-Xmx256m"

D:\Java\jakarta-tomcat-5.0.28\bin>java -fullversion
java full version "1.4.2_05-b04"

D:\Java\jakarta-tomcat-5.0.28\bin>startup.bat
Using CATALINA_BASE: D:\Java\jakarta-tomcat-5.0.28
Using CATALINA_HOME: D:\Java\jakarta-tomcat-5.0.28
Using CATALINA_TMPDIR: D:\Java\jakarta-tomcat-5.0.28\temp
Using JAVA_HOME: D:\Java\j2sdk1.4.2_05
D:\Java\jakarta-tomcat-5.0.28\bin>

bloch
10-14-2004, 09:21 AM
I wonder if the problem is triggered by tomcat 5.0.28...

We ship with an earlier version (5.0.24)

-Eric

wpoziombka
10-14-2004, 09:58 AM
I believe that it is a defect in the serialization of the Option class.

A NullPointerException is thrown at line 161 of Option.java. This is a call to
allowList.add(new RE(p));

It seems the author of this class doesn't fully understand serialization.

"allowList" is initialized on construction to a new ArrayList. However, when deserializing an object it is not officially "constructed" it is restored. Since there is custom serialization (read/writeObject()) the allowList is null.

I have attached an example to illustrate my point. When run under JDK 1.4.2_05 it produces the following output:

<init> Note how many times am I called.
guess what! value=null

Java Object Serialization sucks. I am disappointed to see it used so much in this project.

bloch
10-14-2004, 10:35 AM
Thanks.

The exceptions reported are

a) known and
b) shouldn't keep your LPS from compiling and serving apps

With the server halted, if you remove the lps-2.2/WEB-INF/lps/work/cache directory, you won't see the exceptions.

We're re-working the LPS cache persistence mechanisms.

-Eric

wpoziombka
10-15-2004, 08:26 AM
Removing the cache directory eliminates the exception however the net effect is the same.

15 Oct 2004 11:20:17 () INFO servlets.LZServlet - ------------------------------------
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Laszlo Presentation Server, 2.2, initialized
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Running in context:Apache Tomcat/5.0.28
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Build: lps-2.2-001144-0001
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Built on: 07:57 PM 04-Oct-2004
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Running against JRE 1.4.2_05
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Running with Java CLASSPATH: d:\Java\j2sdk1.4.2_05\lib\tools.jar;D:\Java\jakart a-tomcat-5.0.28\bin\bootstrap.jar
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Running on Windows XP 5.1
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Running as user wade
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Max memory: 254.06 MB
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Total memory: 6.7 MB
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - Available memory: 1.29 MB
15 Oct 2004 11:20:17 () INFO servlets.LZServlet - LPS_HOME is: D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2
15 Oct 2004 11:20:17 () INFO responders.ResponderCompile - application cache is at D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\WEB-INF\lps\work\cache
15 Oct 2004 11:20:17 () INFO responders.ResponderMEDIA - Media Cache is at D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\WEB-INF\lps\work\mcache
15 Oct 2004 11:20:17 () INFO data.HTTPDataSource - using connection pool
15 Oct 2004 11:20:17 () INFO data.HTTPDataSource - using HTTP 1.1
15 Oct 2004 11:20:18 () INFO responders.ResponderDATA - Data Cache is at D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\WEB-INF\lps\work\dcache
15 Oct 2004 11:20:18 () INFO servlets.LZServlet - Default request type is app_console
15 Oct 2004 11:20:18 (127.0.0.1 1) INFO servlets.LZServlet - Request for D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\demos\dashboard\dashboard.lzo
15 Oct 2004 11:20:18 (127.0.0.1 1) INFO responders.ResponderCompile - application cache is at D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\WEB-INF\lps\work\cache
15 Oct 2004 11:20:18 (127.0.0.1 1) INFO responders.Responder - Responding with error (text/html): D:\Java\jakarta-tomcat-5.0.28\webapps\lps-2.2\demos\dashboard\dashboard.lzx: The system cannot find the path specified

bloch
10-15-2004, 08:32 AM
I wonder if somehow it's one of those windows filesystem case issues... perhaps the capital 'J' in java is causing probs. This does seem unlikely since the default install is under C:\Program Files\...

Next would be to edit .../lps-2.2/WEB-INF/lps/config/lps.xml and change the logging from INFO to DEBUG to see if we can decipher who's throwing the exception.

hmm....

Or you could try running against 5.0.24 which is known to work.


-Eric

rollatwork
11-26-2004, 05:49 PM
Just wondering if wpoziombka was able to get this running correctly in 5.0.28?

In a standard LPS install I am not having issues on 5.0.28. However, I am experiencing this issue on Tomcat when deployed on Liferay 3.0 Professional with Tomcat 5.0.28 as the container.

Note I am not experiencing this issue on Jetty with Liferay (however, there appears to be XML parsing classloader issues... sigh)

Your solution might prove useful.

Thanks,
Roll

wpoziombka
11-29-2004, 07:43 AM
I have not tried any further.

Perhaps will come back at some point.

Good luck,

Wade