Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Mobile Tools for Java (MTJ) » Problem during packaging: empty jar in \.mtj.tmp\emulation
Problem during packaging: empty jar in \.mtj.tmp\emulation [message #485552] Sun, 13 September 2009 11:19 Go to next message
BenH is currently offline BenHFriend
Messages: 39
Registered: July 2009
Member
Hi

After 4 years successfully using EclipseME, today I upgraded to MTJ. I
have encountered a problem generating packaged builds, both obfuscated and
non-obfuscated.

For some reason, the packaging process creates a fresh file in
\.mtj.tmp\emulation\ABC.jar that contains only the mainfest, ie all
classes and resources are missing. Perhaps the PackageBuilderVisitor class
isnt operating correctly?

Another thing: the error is detected late and indirectly by MTJ. The
actual error in the logs is "failed to inflate jar file", and it occurs
much later in the build process. Before that, Proguard had failed, and yet
MTJ just shows a popup and continues on heedless. I had to download and
read the MTJ source code to trace the cause back to the empty jar in the
emulation folder. Fail fast!

In PackageBuilder.updatePackage(), why not validate that the created Jar
has >= 1 classfile, before continuing to the next step, so as to detect
error states closer to where they happen?
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #503598 is a reply to message #485552] Mon, 14 December 2009 21:23 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 9
Registered: November 2009
Junior Member
Hi there,

this thread is a few months old, but I ran into the same problem today, and since roughly 800 people also looked at it, it seems still relevant.

For me, one of the two things fixed the problem (maybe a combination of the two):

close and re-open the project,
set another device configuration

after doing that my jar file contained classes and resources again. Hope that helps.

[Updated on: Mon, 14 December 2009 21:24]

Report message to a moderator

Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #503602 is a reply to message #503598] Mon, 14 December 2009 21:36 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 9
Registered: November 2009
Junior Member
I should mention, that I had an existing MIDP Project in my workspace, and updated Eclipse / MTJ then. That was when trouble started.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #505063 is a reply to message #485552] Sat, 26 December 2009 04:36 Go to previous messageGo to next message
VictorCLF is currently offline VictorCLFFriend
Messages: 4
Registered: December 2009
Junior Member
I had the same problem and searched the web to no avail but after much struggle I found the solution.

Go to the build tab in the Application Descriptor and make sure the directory with your source files(default is src) is ticked.

HtH.


Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #578610 is a reply to message #485552] Mon, 14 December 2009 21:23 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 9
Registered: November 2009
Junior Member
Hi there,

this thread is a few months old, but I ran into the same problem today, and since roughly 800 people also looked at it, it seems still relevant.

For me, one of the two things fixed the proble (maybe a combination of the two):

close and re-open the project,
set another device configuration

after doing that my jar file contained classes and resources again. Hope that helps.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #578630 is a reply to message #578610] Mon, 14 December 2009 21:36 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 9
Registered: November 2009
Junior Member
I should mention, that I had an existing MIDP Project in my workspace, and updated Eclipse / MTJ then. That was when trouble started.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #578712 is a reply to message #485552] Sat, 26 December 2009 04:37 Go to previous messageGo to next message
VictorCLF is currently offline VictorCLFFriend
Messages: 4
Registered: December 2009
Junior Member
I had the same problem and searched the web to no avail but after much struggle I found the solution.

Go to the build tab in the Application Descriptor and make sure the directory with your source files(default is src) is ticked.

HtH.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #671976 is a reply to message #578712] Thu, 19 May 2011 13:46 Go to previous message
Eclipse User is currently offline Eclipse UserFriend
Messages: 2
Registered: May 2011
Junior Member
I ve got the same problem with packaging after I converted my netbeans mobility project to eclipse pulsar.

In my case the reason of "empty" jar was a missing "build.properties" file in the root of the eclipse project. Looks like MTJ does not bother to notify a user about missing configuration file and does not recreate it.




Previous Topic:Corrupt JAR, error while reading: midlet/MIDlet.class
Next Topic:Install MTJ for Indigo
Goto Forum:
  


Current Time: Sat Dec 20 08:49:05 GMT 2014

Powered by FUDForum. Page generated in 0.01943 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software