This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 165463 - When building jar and jad files, 8 spaces or 2 tabs are inserted at the start of the jad file
Summary: When building jar and jad files, 8 spaces or 2 tabs are inserted at the start...
Status: REOPENED
Alias: None
Product: javame
Classification: Unclassified
Component: Build System (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Suchomel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 08:13 UTC by andrsoze
Modified: 2015-09-03 08:52 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
build-impl.xml, autogenerated vs reformated (279.08 KB, image/jpeg)
2015-09-03 08:39 UTC, miocr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andrsoze 2009-05-19 08:13:02 UTC
When building jar and jad files, 8 spaces or 2 tabs are inserted at the start of the jad file, like "        
MicroEdition-Profile: MIDP-2.0". This results in the error message "Line has invalid format. Line: "        "
Missing mandatory attribute "MicroEdition-Profile"" at the update-jad: face, and not being able to run the files in 
SonyEricsson emulators (Nokia seems to ignore the extra characters). This problem suddenly showed up, I haven't changed 
any build files or anything similar so I don't know what triggered the problem.
Comment 1 Denis Anisimov 2009-05-28 13:39:26 UTC
I cannot reproduce the issue.
Please provide exact information about OS, build number, jdk which you use.
Also describe steps which leads to result jad file.
Do you press just "Build" popup menu item on project node or something else ?
Comment 2 andrsoze 2009-05-28 14:35:12 UTC
Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23
System: Windows Vista version 6.0 running on x86; Cp1252; sv_SE (nb)

I solved the problem for me by reverting back to some old project
files. I don't think I had done anything special before the issue
appeared (eventhough I might have, without knowing it) - I first
noticed it when switching from a Nokia to a SonyEricsson emulator
since the Nokia wasn't senisible to the extra spaces, but the
SonyEricsson was.
Comment 3 Petr Suchomel 2009-05-28 14:48:03 UTC
This is very strange, I would like to see some reproducible case. If you succeed, please go ahead.
Comment 4 Denis Anisimov 2009-05-29 06:40:40 UTC
Please check this issue against recent NB version.
Otherwise we will close it as WORKSFORME.
We unable to reproduce it.
Thanks.
Comment 5 andrsoze 2009-05-29 08:17:58 UTC
Ok, you can close this issue. I can't reproduce in 6.7.
Comment 6 andrsoze 2009-05-29 08:27:21 UTC
One more thing FYI: what I can't reproduce is the corruption of the project files. The corrupted project files from 6.5 
still produce the same problem in 6.7. Thanks.
Comment 7 Denis Anisimov 2009-05-29 09:57:00 UTC
Can you attach your "corrupted" project to this issue ?
And also please describe exactly the steps to reproduce as I have requested .
Is it just "Build" project popup menu item usage or something else?

Without exact steps to reproduce we cannot identify the reason of issue.
We need all information for issue evaluation.
Comment 8 Denis Anisimov 2009-06-02 09:59:52 UTC
No response from user and I'm unable to reproduce it.
Comment 9 miocr 2015-09-03 08:39:39 UTC
Created attachment 155847 [details]
build-impl.xml, autogenerated vs reformated
Comment 10 miocr 2015-09-03 08:40:34 UTC
Bug is still in NetBeans. I suddenly had the same issue. The problem arises because the file "build-impl.xml" was opened and reformatted. Attached image shows the differences for functional project (Application2) and dysfunctional project (Application3), in which the file "build-xml" has been reformatted.

Auto generated "build-impl.xml". 
Close tag </nb-output> is gapless at the beginning of line
-----------------------------------------
  <!--create JAD-->
    <target name="add-configuration" unless="contains.manifest.configuration">
      <nb-output file="......">MicroEdition-Configuration: ${platform.configuration}
</nb-output>  
-----------------------------------------

Reformated "build-impl.xml"
Here are the formating gaps before </nb-output> close tag, which are inserted into the JAD and cause a compilation problem.
-----------------------------------------
  <!--create JAD-->
    <target name="add-configuration" unless="contains.manifest.configuration">
      <nb-output file="......">MicroEdition-Configuration: ${platform.configuration}
      </nb-output>  
-----------------------------------------