Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Applet served by Java Web Start problem  (Read 2604 times)
0 Members and 1 Guest are viewing this topic.
Offline arielsan
« Posted 2010-12-29 17:50:55 »

I am having a similar problem to this one.

I am using applets through webstart, and they are starting really slow, like loading each resource/class separated when needed instead loading all jars at start, sometimes failing too.

1  
2  
3  
4  
5  
.... 2.6.32-26-generic-pae) Java/1.6.0_22"
**** - - [29/Dec/2010:14:56:31 -0200] "
GET /prototipos/discoverthename-release/resources-0.0.1-SNAPSHOT.jar HTTP/1.1" 200 812712 "-" "Mozilla/4.0 (Linux 2.6.32-26-generic-pae) Java/1.6.0_22"
**** - - [29/Dec/2010:14:56:36 -0200] "
GET /prototipos/discoverthename-release/resources-0.0.1-SNAPSHOT.jar HTTP/1.1" 200 812712 "-" "Mozilla/4.0 (Linux 2.6.32-26-generic-pae) Java/1.6.0_22"
**** - - [29/Dec/2010:14:56:40 -0200] "
GET /prototipos/discoverthename-release/resources-0.0.1-SNAPSHOT.jar HTTP/1.1" 200 812712 "-" "Mozilla/4.0 (Linux 2.6.32-26-generic-pae) Java/1.6.0_22"
**** - - [29/Dec/2010:14:56:44 -0200] "
GET /prototipos/discoverthename-release/resources-0.0.1-SNAPSHOT.jar HTTP/1.1" 200 812712 "-"


That is happening with my new applets, I have others working right, using webstart too, The only difference I can think between old and new applets is the dependencies (resources and nativelibs).

I have tried to put download="eager" to all resources and nativelibs in the jnlp but didn't work either, it kept the lazy behavior.

Hope anyone knows a solution Cheesy


Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #1 - Posted 2010-12-29 18:12:34 »

you can try using <param name="codebase_lookup" value="false"> to see if that helps.
Offline arielsan
« Reply #2 - Posted 2010-12-29 18:22:52 »

tried that, it seems it didn't work either.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline arielsan
« Reply #3 - Posted 2010-12-29 18:54:59 »

The problem seems to be other, I said classes and resources were loaded separately, but no, all jars are loaded at start and validated, but then when trying to get a class from
1  
JNLP2ClassLoader.findClass
it fails and try to get permissions to access a jar.

This is a trace example:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
basic: JNLP2ClassLoader.findClass: org.newdawn.slick.AppletGameContainer$1: try again ..
basic: JNLP2ClassLoader.findClass: org.newdawn.slick.GameContainer: try again ..
basic: JNLP2ClassLoader.findClass: org.newdawn.slick.gui.GUIContext: try again ..
basic: JNLP2ClassLoader.findClass: org.newdawn.slick.AppletGameContainer$Container: try again ..
basic: JNLP2ClassLoader.findClass: org.newdawn.slick.AppletGameContainer$2: try again ..
basic: Subprograma cargado.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 151070 us, pluginInit dt 18048582 us, TotalTime: 18199652 us
basic: JNLP2ClassLoader.findClass: com.gemserk.games.discoverthename.Game: try again ..
basic: JNLP2ClassLoader.getPermissions() ..
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
security: JAVAWS AppPolicy Permission requested for: http://www.gemserk.com/prototipos/discoverthename-release/main-0.0.1-SNAPSHOT.jar
basic: JNLP2ClassLoader.getPermissions() X
basic: JNLP2ClassLoader.findClass: org.newdawn.slick.state.StateBasedGame: try again ..
basic: JNLP2ClassLoader.findClass: org.newdawn.slick.Game: try again ..

Offline arielsan
« Reply #4 - Posted 2010-12-30 12:15:02 »

Again, the problem seems to be other, but it is really difficult to debug or to find information over the web.

Here in this log, each time I load an asset, it seems to try to get the jar again, local on my machine that works really fast, but on our games server it is slow, because there are a lot of requests...But we don't know if asset loading is related either.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
09:10:34.085 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/ball_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.099 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.107 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.115 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.125 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.134 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.144 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.155 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.163 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:34.173 [Thread-15] INFO  c.g.r.d.ClassPathDataSource - loading stream classpath://assets/images/block_crack_animation.png
network: Conectando http://acoppes-laptop.local/prototipos/discoverthename-latest/resources-0.0.1-SNAPSHOT.jar con proxy=DIRECT
09:10:36.511 [Thread-15] INFO  c.g.g.d.g.PlayingGameStateEntityBuilder - Leaving playing state

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #5 - Posted 2010-12-30 15:11:36 »

Personally had way too many problems with JWS and caching, just given up on it, something is seriously broken in there somewhere.

A workaround you could use is the AppletLoader. It has its own download mechanism and cache system so bypasses most the problems with JWS and its cache system.
Offline arielsan
« Reply #6 - Posted 2010-12-30 16:06:47 »

fu%$#$ keyboard shortcuts.... I wrote a big post and press back or something and firefox killed all my writings in 1 second.... Cry

Well.... first of all, as I said on slick forums:

Quote
... all games are working perfectly as independent webstart but not working when using new generation applets. Some old games are working even using that format too.

We cant find the difference between working and not working games.

It should be some new dependency or something we are doing differently inside the game.

We want to discover this applet bug because:
1) we believe using jws should be the right way to deploy our games, how the cache, update and stuff is managed
2) we have all the build and deploy process automated, we deploy for applet and webstart almost without extra cost
3) we cant sleep without knowing what the hell is happening Cheesy

Of course, we think to use lwjgl applet loader as the first option if we couldn't fix this.

Btw, we have no problems at all using webstart outside the browser.




Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #7 - Posted 2010-12-30 16:19:43 »


1) Have you tried different computers? i.e. is the issue reproducible at different computer.
2) Are you using a different server for the newer jars that have the issue?
3) Are you using some extra parameters maybe for the applet version as opposed to the jws version?
4) Does it also happen if you try it in different browsers?
5) If you have an older version of java somewhere maybe you can try that to see if its related to some recent change made in the jre itself.
Offline arielsan
« Reply #8 - Posted 2010-12-30 16:40:32 »

1) Have you tried different computers? i.e. is the issue reproducible at different computer.
2) Are you using a different server for the newer jars that have the issue?
3) Are you using some extra parameters maybe for the applet version as opposed to the jws version?
4) Does it also happen if you try it in different browsers?
5) If you have an older version of java somewhere maybe you can try that to see if its related to some recent change made in the jre itself.

1) I have tried on 3 different computers, on Windows and Linux and Firefox and Chrome (all combinations Cheesy)
2) Same server, same folder structure and permissions, etc. I am signing with same certificates, etc, certificates are not outdated.
3) Jnlp for applets have one difference with jnlp for webstart applciations (the applet tag) but running them from linux terminal with javaws http://....applet.jnlp works great, so I believe the problem is inside the browser Sad
4) answered on 1)
5) I have games working and games not working, compiled using the same jdk and running in the same jre, so I believe jre versions is not related. I have even "recompiled" with new jdk the old games and they keep working.

keep you updated if I found something.

Offline arielsan
« Reply #9 - Posted 2011-01-11 18:10:02 »

I am using logback for logging, I found if I remove the logback.xml (for configuring the appenders, etc) the applet loads fast. It is a first workaround, but I want to know why this happens exactly.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (52 views)
2014-04-15 18:08:23

BurntPizza (49 views)
2014-04-15 03:46:01

UprightPath (64 views)
2014-04-14 17:39:50

UprightPath (46 views)
2014-04-14 17:35:47

Porlus (63 views)
2014-04-14 15:48:38

tom_mai78101 (88 views)
2014-04-10 04:04:31

BurntPizza (147 views)
2014-04-08 23:06:04

tom_mai78101 (244 views)
2014-04-05 13:34:39

trollwarrior1 (203 views)
2014-04-04 12:06:45

CJLetsGame (210 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!