Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330642 - build error - .mtj.tmp\emulation (Access is denied)
Summary: build error - .mtj.tmp\emulation (Access is denied)
Status: NEW
Alias: None
Product: MTJ
Classification: Tools
Component: Project Builder (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 04:47 EST by Patrick-Gilles Maillot CLA
Modified: 2011-10-10 02:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick-Gilles Maillot CLA 2010-11-19 04:47:35 EST
Get the following error, after a project that builds and run correctly has been closed and re-opened:

Errors occurred during the build.
Errors running builder 'Package Builder' on project 'myproject'.
C:dev\myproject\.mtj.tmp\emulation (Access is denied)

The only way out of this (that I found) was to completely delete the project and re-import it into the workbench... quite painful.

The ".mjt.tmp" directory is created and managed by Eclipse, so where is this denied access coming from during project clean/build?


-- Configuration Details --
Product: Eclipse 1.3.1.20100913-1228 (org.eclipse.epp.package.cpp.product)
Installed Features:
 org.eclipse.jdt 3.6.1.r361_v20100714-0800-7z8XFUSFLFlmgLc5z-Bvrt8-HVkH
Comment 1 Gorkem Ercan CLA 2010-11-19 06:06:43 EST
Is this a JavaME project? Package Builder and .mtj are coming from Eclipse Mobile tools for Java.
Comment 2 Patrick-Gilles Maillot CLA 2010-11-19 07:36:56 EST
(In reply to comment #1)
Yest this is JavaME project. Gorkem, you seem to imply in your comment there would be a build tool set for JavaME? if so, where can I find this? I am not an eclipse specialist (you probably guessed already :-) ). I did select JavaME perspective and imported the project with the javaME default parameters. The whole project builds and runs (debug or not) correctly with the emulator, until I close the project and then re-open it later where I get the access denied error...
Thanks for your help/support
-Patrick
Comment 3 Gorkem Ercan CLA 2010-11-19 07:55:08 EST
"Package builder" is the name of the MTJ builder that builds the jar files to be run on the emulator. There are no external tools required. It is part of Eclipse MTJ. 

Do you know what it your MTJ version? Which can be seen from Help>About Eclipse>Installation Details> on the features tab. The version of the feature named "Mobile Tools for Java Platform"

Also can you possibly attach the full .log (error log) file? It is available from the configuration tab on the above dialog.

Moving this report to MTJ..
Comment 4 Patrick-Gilles Maillot CLA 2010-11-19 08:06:15 EST
Thx Gorkem. 

Below the version numbers (Installed SW tab):
---------------------------------------------

  Eclipse IDE for C/C++ Developers	1.3.1.20100916-1202	epp.package.cpp
    EPP CPP Feature	1.3.1.20100916-1202	org.eclipse.epp.package.cpp.feature.feature.group
  Eclipse Java Development Tools	3.6.1.r361_v20100714-0800-7z8XFUSFLFlmgLc5z-Bvrt8-HVkH	org.eclipse.jdt.feature.group
    Eclipse Platform	3.6.1.r361_v20100909-9gF78GrkFqw7GrsZnvz0JWNTeb6fue6896L	org.eclipse.platform.feature.group
  Eclipse Platform	3.6.1.M20100909-0800	org.eclipse.platform.ide
    Equinox p2 Provisioning	2.0.1.r361_v20100903-897HFZFFZRuSD2LMtVxyz0Vr	org.eclipse.equinox.p2.user.ui.feature.group
  Mobile Tools for Java	1.1.1.v201009031435-7S7F5FFt6Zooas_UrpLo	org.eclipse.mtj.feature.group
  Mobile Tools for Java Examples	1.1.1.v201009031435-7804DZRDKDEBDYKeYl	org.eclipse.mtj.examples.feature.group






Error log:
-----------

!SUBENTRY 1 org.eclipse.mtj.core 4 999 2010-11-19 13:52:25.046
!MESSAGE C:\Documents and Settings\patrick\My Documents\Development\Mapz\.mtj.tmp\emulation (Access is denied)
!STACK 0
java.io.FileNotFoundException: C:\Documents and Settings\patrick\My Documents\Development\Mapz\.mtj.tmp\emulation (Access is denied)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at org.eclipse.mtj.internal.core.project.midp.ApplicationDescriptor.store(Unknown Source)
	at org.eclipse.mtj.internal.core.packaging.midp.DeployedJADWriter.writeJad(Unknown Source)
	at org.eclipse.mtj.internal.core.packaging.midp.DeployedJADWriter.writeDeployedJAD(Unknown Source)
	at org.eclipse.mtj.internal.core.build.packaging.PackageBuilder.updatePackage(Unknown Source)
	at org.eclipse.mtj.internal.core.build.packaging.PackageBuilder.doBuild(Unknown Source)
	at org.eclipse.mtj.internal.core.build.MTJIncrementalProjectBuilder.build(Unknown Source)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:344)
	at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:179)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Hope this helps!
-Patrick
Comment 5 Gorkem Ercan CLA 2011-10-10 02:37:54 EDT
I only see this behavior with some emulators, they seem to lock the jad or jar file that is used for the last run/debug session. Can you confirm if that is the case. Do you have an emulator running when you get this error?