You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Walter Botscher <wa...@gmx.de> on 2009/07/06 19:31:48 UTC

Tapestry5 and Applets

Hi,

I looked for some existing threads, but couldn't find any information on 
that issue.  Applets I would I like to use in some parts of the 
application with heavy use of graphics. For the rest I would prefer to 
use tapestry, which is new to me.

I tested a small example with JSF, no problem. Then I tried with 
tapestry based on Maven archetype (tapestry 5 quickstart 5.1.0.5)

Step1:  Quickstart Example runs perfect
Step2:  Modify start page and add dependencies -> Applet not shown

Information on Java Console is (sorry for the german version, however 
the rest should be clear):

==============================================================
Java Plug-in 1.6.0_13
Verwendung der JRE-Version 1.6.0_13 Java HotSpot(TM) Client VM
Home-Verzeichnis des Benutzers = /export/home/walter
----------------------------------------------------
c:   Konsole löschen
f:   Objekte in Finalisierungswarteschlange finalisieren
g:   Speicherbereinigung
h:   Diese Hilfemeldung anzeigen
l:   ClassLoader-Liste ausgeben
m:   Speicherbelegung anzeigen
o:   Protokollierung auslösen
p:   Proxy-Konfiguration neu laden
q:   Konsole ausblenden
r:   Richtlinien-Konfiguration neu laden
s:   System- und Bereitstellungseigenschaften ausgeben
t:   Threadliste ausgeben
v:   Thread-Stack ausgeben
x:   ClassLoader-Cache löschen
0-5: Trace-Stufe auf <n> setzen
----------------------------------------------------
ClassLoader-Cache löschen... abgeschlossen.
Trace-Stufe auf 5 (alle) setzen ... abgeschlossen.

basic: New window ID: 3618039
basic: Value of xembed: 1
basic: ClassLoader wird referenziert: sun.plugin.ClassLoaderInfo@c510e3, 
refcount=1
basic: setWindow: call before applet exists:3618039
basic: Fortschritts-Listener hinzugefügt: 
sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1e92e10
basic: Applet wird geladen...
basic: Applet wird initialisiert...
basic: Applet wird gestartet...
basic: completed perf rollup
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar, Version: 
null]
network: Verbindung von 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar mit 
Proxy=DIRECT wird hergestellt
network: Verbindung von socket://localhost:8080 mit Proxy=DIRECT wird 
hergestellt
network: Verbindung 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar mit 
Cookie " "
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar, Version: 
null]
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar, Version: 
null]
network: Verbindung von 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar mit 
Proxy=DIRECT wird hergestellt
network: Verbindung 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar mit 
Cookie " "
network: Ressource herunterladen: 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar
    Content-Length: -1
    Content-Encoding: gzip
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar, Version: 
null]
network: Verbindung von 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar mit 
Proxy=DIRECT wird hergestellt
network: Verbindung 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar mit 
Cookie " "
network: Ressource herunterladen: 
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar
    Content-Length: -1
    Content-Encoding: gzip
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar, Version: null]
network: Verbindung von 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar mit Proxy=DIRECT wird 
hergestellt
network: Verbindung http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
mit Cookie " "
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar, Version: null]
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar, Version: null]
network: Verbindung von 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar mit Proxy=DIRECT wird 
hergestellt
network: Verbindung http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
mit Cookie " "
network: Ressource herunterladen: 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar
    Content-Length: -1
    Content-Encoding: gzip
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar, Version: null]
network: Verbindung von 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar mit Proxy=DIRECT wird 
hergestellt
network: Verbindung http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
mit Cookie " "
network: Ressource herunterladen: 
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar
    Content-Length: -1
    Content-Encoding: gzip
network: Cache-Eintrag nicht gefunden [url: 
http://localhost:8080/WhvDemoTap2/mycompany/GlgControlPanel.class, 
Version: null]
network: Verbindung von 
http://localhost:8080/WhvDemoTap2/mycompany/GlgControlPanel.class mit 
Proxy=DIRECT wird hergestellt
network: Verbindung von socket://localhost:8080 mit Proxy=DIRECT wird 
hergestellt
network: Verbindung 
http://localhost:8080/WhvDemoTap2/mycompany/GlgControlPanel.class mit 
Cookie " "
java.lang.ClassFormatError: Incompatible magic value 1008813135 in class 
file mycompany/GlgControlPanel
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:208)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:143)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:682)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
    at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2315)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
    at sun.applet.AppletPanel.run(AppletPanel.java:368)
    at java.lang.Thread.run(Thread.java:619)
basic: Ausnahme: java.lang.ClassFormatError: Incompatible magic value 
1008813135 in class file mycompany/GlgControlPanel

===============================================================================

The interesting point is "Content-Length: -1". It seems, that all 
available jar files have not been transfered to the browser.

Who has an idea, what happend here and what is the reason?

Thanks for any small advise.

Walter



-- 
View this message in context: http://n2.nabble.com/Tapestry5-and-Applets-tp3214333p3214333.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

Re: Tapestry5 and Applets

Posted by Walter Botscher <wa...@gmx.de>.



  
  


Hi, 
yes a small step better, but not the solution. Here the the logs after
changes: 
=========================================================== 
Java Plug-in 1.6.0_13 
Verwendung der JRE-Version 1.6.0_13 Java HotSpot(TM) Client VM 
Home-Verzeichnis des Benutzers = /export/home/walter 
---------------------------------------------------- 
c:&nbsp;&nbsp; Konsole l&ouml;schen 
f:&nbsp;&nbsp; Objekte in Finalisierungswarteschlange finalisieren 
g:&nbsp;&nbsp; Speicherbereinigung 
h:&nbsp;&nbsp; Diese Hilfemeldung anzeigen 
l:&nbsp;&nbsp; ClassLoader-Liste ausgeben 
m:&nbsp;&nbsp; Speicherbelegung anzeigen 
o:&nbsp;&nbsp; Protokollierung ausl&ouml;sen 
p:&nbsp;&nbsp; Proxy-Konfiguration neu laden 
q:&nbsp;&nbsp; Konsole ausblenden 
r:&nbsp;&nbsp; Richtlinien-Konfiguration neu laden 
s:&nbsp;&nbsp; System- und Bereitstellungseigenschaften ausgeben 
t:&nbsp;&nbsp; Threadliste ausgeben 
v:&nbsp;&nbsp; Thread-Stack ausgeben 
x:&nbsp;&nbsp; ClassLoader-Cache l&ouml;schen 
0-5: Trace-Stufe auf &lt;n&gt; setzen 
---------------------------------------------------- 
basic: New window ID: 0 
basic: Applet wird angehalten... 
basic: Fortschritts-Listener entfernt:
sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@c10de0 
basic: Applet wird zerst&ouml;rt... 
basic: Applet wird verworfen... 
basic: Applet-Thread wird beigetreten... 
basic: Applet-Thread wurde beigetreten... 
basic: Informationen werden gesucht... 
basic: ClassLoader wird freigegeben: sun.plugin.ClassLoaderInfo@c017e9,
refcount=0 
basic: Fertig... 
basic: Applet wird beendet... 
basic: New window ID: 40011f3 
basic: Value of xembed: 1 
basic: ClassLoader wird referenziert:
sun.plugin.ClassLoaderInfo@8de972, refcount=1 
basic: setWindow: call before applet exists:40011f3 
basic: Fortschritts-Listener hinzugef&uuml;gt:
sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@16b9e62 
basic: Applet wird geladen... 
basic: Applet wird initialisiert... 
basic: Applet wird gestartet... 
basic: completed perf rollup 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar ,
Version: null] 
network: Verbindung von
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar  mit
Proxy=DIRECT wird hergestellt 
network: Verbindung von socket://localhost:8080 mit Proxy=DIRECT wird
hergestellt 
network: Verbindung
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar  mit
Cookie " " 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar ,
Version: null] 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar ,
Version: null] 
network: Verbindung von
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar  mit
Proxy=DIRECT wird hergestellt 
network: Verbindung
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar  mit
Cookie " " 
network: Ressource herunterladen:
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar 
&nbsp;&nbsp;&nbsp; Content-Length: 2.521 
&nbsp;&nbsp;&nbsp; Content-Encoding: null 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar ,
Version: null] 
network: Verbindung von
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar  mit
Proxy=DIRECT wird hergestellt 
network: Verbindung
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar  mit
Cookie " " 
network: Ressource herunterladen:
http://localhost:8080/WhvDemoTap2/WhvDemoLib2-1.0-SNAPSHOT.jar 
&nbsp;&nbsp;&nbsp; Content-Length: 2.521 
&nbsp;&nbsp;&nbsp; Content-Encoding: null 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar , Version: null] 
network: Verbindung von
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar  mit Proxy=DIRECT
wird hergestellt 
network: Verbindung http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
mit Cookie " " 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar , Version: null] 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar , Version: null] 
network: Verbindung von
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar  mit Proxy=DIRECT
wird hergestellt 
network: Verbindung http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
mit Cookie " " 
network: Ressource herunterladen:
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
&nbsp;&nbsp;&nbsp; Content-Length: 2.521 
&nbsp;&nbsp;&nbsp; Content-Encoding: null 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar , Version: null] 
network: Verbindung von
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar  mit Proxy=DIRECT
wird hergestellt 
network: Verbindung http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
mit Cookie " " 
network: Ressource herunterladen:
http://localhost:8080/WhvDemoTap2/genlogic-1.0.jar 
&nbsp;&nbsp;&nbsp; Content-Length: 2.521 
&nbsp;&nbsp;&nbsp; Content-Encoding: null 
network: Cache-Eintrag nicht gefunden [url:
http://localhost:8080/WhvDemoTap2/mycompany/GlgControlPanel.class ,
Version: null] 
network: Verbindung von
http://localhost:8080/WhvDemoTap2/mycompany/GlgControlPanel.class  mit
Proxy=DIRECT wird hergestellt 
network: Verbindung
http://localhost:8080/WhvDemoTap2/mycompany/GlgControlPanel.class  mit
Cookie " " 
java.lang.ClassFormatError: Incompatible magic value 1008813135 in
class file mycompany/GlgControlPanel 
&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.defineClass1(Native Method) 
&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 
&nbsp;&nbsp;&nbsp; at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) 
&nbsp;&nbsp;&nbsp; at
sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:208) 
&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:307) 
&nbsp;&nbsp;&nbsp; at
sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:143) 
&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:252) 
&nbsp;&nbsp;&nbsp; at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:682) 
&nbsp;&nbsp;&nbsp; at sun.applet.AppletPanel.createApplet(AppletPanel.java:785) 
&nbsp;&nbsp;&nbsp; at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2315) 
&nbsp;&nbsp;&nbsp; at sun.applet.AppletPanel.runLoader(AppletPanel.java:714) 
&nbsp;&nbsp;&nbsp; at sun.applet.AppletPanel.run(AppletPanel.java:368) 
&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Thread.java:619) 
basic: Ausnahme: java.lang.ClassFormatError: Incompatible magic value
1008813135 in class file mycompany/GlgControlPanel 
================================================================================ 

I wonder that for two different jar-files the same content length is
given. If that would be the amount of data for the first&nbsp; of&nbsp; several
packets it would make sense. But what happened then? 

--- 

Walter 



Thiago H. de Paula Figueiredo (via Nabble) schrieb:
Em
Mon, 06 Jul 2009 14:31:48 -0300, Walter Botscher &nbsp;
  
&lt; walter.botscher@... &gt; escreveu:
  
  
&gt; Hi,
  
  
Hi!
  
  
Tapestry, by default, compresses almost all files before sending them
to &nbsp;
  
the clieng. Maybe that's what causing your problem.
  
To deactivate it, add &nbsp;
  
configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, "false");
to &nbsp;
  
your AppModule's contributeApplicationDefaults() method:
  
  
public static void contributeApplicationDefaults(
  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MappedConfiguration&lt;String, String&gt;
configuration) {
  
  
&nbsp; &nbsp; &nbsp; &nbsp; ...
  
&nbsp; &nbsp; &nbsp; &nbsp; configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED,
"false");
  
  
}
  
  
Test this and tell us if it solved your problem. :)
  
  
-- 
Thiago H. de Paula Figueiredo
  
Independent Java consultant, developer, and instructor
  
  http://www.arsmachina.com.br/thiago 
  
---------------------------------------------------------------------
  
To unsubscribe, e-mail: users-unsubscribe@... 
  
For additional commands, e-mail: users-help@... 
  
  
  
  
  
  View
message @ http://n2.nabble.com/Tapestry5-and-Applets-tp3214333p3214537.html 
  
To start a new topic under Tapestry Users, email
ml-node+832-1415370784@n2.nabble.com 
  
To unsubscribe from Tapestry Users, click
here .
  
  





-- 
View this message in context: http://n2.nabble.com/Tapestry5-and-Applets-tp3214333p3220256.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

Re: Tapestry5 and Applets

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Mon, 06 Jul 2009 14:31:48 -0300, Walter Botscher  
<wa...@gmx.de> escreveu:

> Hi,

Hi!

Tapestry, by default, compresses almost all files before sending them to  
the clieng. Maybe that's what causing your problem.
To deactivate it, add  
configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, "false"); to  
your AppModule's contributeApplicationDefaults() method:

public static void contributeApplicationDefaults(
			MappedConfiguration<String, String> configuration) {

	...
	configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, "false");

}

Test this and tell us if it solved your problem. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org