Error with AutoReload

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
willypow
Posts: 66
Joined: 19 Jul 2008, 16:23
Location: Greenbrae, CA
Contact:

Error with AutoReload

Postby willypow » 09 Jun 2009, 18:35

I'm getting an error when I update my extension class files:

Exception in thread "extensionReloader" java.lang.ClassFormatError: Truncated class file

Any idea why that would be?
sstark
Posts: 77
Joined: 21 Nov 2008, 16:06

Postby sstark » 09 Jun 2009, 19:58

a corrupt file, or missing a } would be my first guesses.
User avatar
willypow
Posts: 66
Joined: 19 Jul 2008, 16:23
Location: Greenbrae, CA
Contact:

Postby willypow » 09 Jun 2009, 20:11

The extensions load fine when the server is restarted. The issue is only when auto-reloading.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 10 Jun 2009, 14:09

Are you deploying just one file or multiple class files?
Also try reloading from the AdminTool, you shouldn't get that problem, if it is what I think it is...
If AdminTool is okay I will explain... :)
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
willypow
Posts: 66
Joined: 19 Jul 2008, 16:23
Location: Greenbrae, CA
Contact:

Postby willypow » 17 Jun 2009, 16:41

I can reload from the Admin tool. Oddly, the admin tool shows one of my java extensions as type Actionscript.

What is the issue?

Also, there are multiple class files. Some are not extensions.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 17 Jun 2009, 19:39

Hi,
I can reload from the Admin tool. Oddly, the admin tool shows one of my java extensions as type Actionscript.

reloading from the Admin Tool should never fail.
Unfortunately the auto-reload can fail at times if the server realizes that new files were written and starts reloading while the files are still being transferred.

We'll try to better address this problem in a next release, but there is no perfect solution to this because there's no way to know how many files are being written. In fact the reloading is triggered when the server sees a change in the "last modified" date of the main extension file.

When there's many files being transferred or the transfer is slow (e.g. via FTP / HTTP) the prolem can arise.

Reloading from AdminTool does not incur in this issue for obvious reason: the developer first transfer the data then goes to the admin tool and hits the Reload button, acting as a mean of synchronization :)
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
willypow
Posts: 66
Joined: 19 Jul 2008, 16:23
Location: Greenbrae, CA
Contact:

Postby willypow » 17 Jun 2009, 20:40

That makes perfect sense and explains why this doesn't happen in our local environment. We will use the Admin tool.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 56 guests