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 147177 - Error While Processing Element The device is not ready
Summary: Error While Processing Element The device is not ready
Status: RESOLVED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Viktor Lapitski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-13 13:12 UTC by aquaglia
Modified: 2008-10-02 21:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
UML project (1.21 MB, text/plain)
2008-09-19 12:57 UTC, aquaglia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aquaglia 2008-09-13 13:12:45 UTC
Code generation end with failed status.
In the middle of the log you can see the error in summary.
The code is generated correctly apparently.
What is the meaning of the error message?



Begin processing Generate Code: 39 items

Code Generation selected options:
  Source Folder Location - H:\jrc\INSPIRERegistriesAdmin\src
  Backup Sources - true
  Generate Markers - true
  Show Generate Code Dialog - true

Processing element 1 of 39: Interface java::io::Serializable ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\java\io\Serializable.java
  Merging with the existing source file ... Ok
Processing element 2 of 39: Class eu::inspiregeoportal::registries::iso19135::CharacterString ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CharacterString.java
  Merging with the existing source file ... Ok
Processing element 3 of 39: Class eu::inspiregeoportal::registries::iso19135::CI_Citation ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_Citation.java
  Merging with the existing source file ... Ok
Processing element 4 of 39: Class eu::inspiregeoportal::registries::iso19135::CI_OnlineResource ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_OnlineResource.java
  Merging with the existing source file ... Ok
Processing element 5 of 39: Class eu::inspiregeoportal::registries::iso19135::CI_ResponsibleParty ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_ResponsibleParty.java
  Merging with the existing source file ... Ok
Processing element 6 of 39: Class eu::inspiregeoportal::registries::iso19135::Date ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\Date.java
  Merging with the existing source file ... Ok
Processing element 7 of 39: Class eu::inspiregeoportal::registries::iso19135::Integer ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\Integer.java
  Merging with the existing source file ... Ok
Processing element 8 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_AdditionInformation ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_AdditionInformation.java
  Merging with the existing source file ... Ok
Processing element 9 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_AlternativeExpression ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_AlternativeExpression.java
  Merging with the existing source file ... Ok
Processing element 10 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_AlternativeName ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_AlternativeName.java
  Merging with the existing source file ... Ok
Processing element 11 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_AmendmentInformation ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_AmendmentInformation.java
  Merging with the existing source file ... Ok
Processing element 12 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_ClarificationInformation ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_ClarificationInformation.java
  Merging with the existing source file ... Ok
Processing element 13 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_FieldOfApplication ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_FieldOfApplication.java
  Merging with the existing source file ... Ok
Processing element 14 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_ItemClass ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_ItemClass.java
  Merging with the existing source file ... Ok
Processing element 15 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_Locale ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Locale.java
  Merging with the existing source file ... Ok
Processing element 16 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_ProposalManagementInformation ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_ProposalManagementInformation.java
  Merging with the existing source file ... Ok
Processing element 17 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_Reference ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
Error While Processing Element The device is not ready
Processing element 18 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_ReferenceSource ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_ReferenceSource.java
  Merging with the existing source file ... Ok
Processing element 19 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_Register ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Register.java
  Merging with the existing source file ... Ok
Processing element 20 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_RegisterItem ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_RegisterItem.java
  Merging with the existing source file ... Ok
Processing element 21 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_RegisterManager ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_RegisterManager.java
  Merging with the existing source file ... Ok
Processing element 22 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_RegisterOwner ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_RegisterOwner.java
  Merging with the existing source file ... Ok
Processing element 23 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_SubmittingOrganization ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_SubmittingOrganization.java
  Merging with the existing source file ... Ok
Processing element 24 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_Version ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Version.java
  Merging with the existing source file ... Ok
Processing element 25 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::RE_AmendmentType ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_AmendmentType.java
  Merging with the existing source file ... Ok
Processing element 26 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::RE_DecisionStatus ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_DecisionStatus.java
  Merging with the existing source file ... Ok
Processing element 27 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::RE_Disposition ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Disposition.java
  Merging with the existing source file ... Ok
Processing element 28 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::RE_ItemStatus ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_ItemStatus.java
  Merging with the existing source file ... Ok
Processing element 29 of 39: Class eu::inspiregeoportal::registries::iso19135::URL ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\URL.java
  Merging with the existing source file ... Ok
Processing element 30 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::CI_RoleCode ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_RoleCode.java
  Merging with the existing source file ... Ok
Processing element 31 of 39: Class eu::inspiregeoportal::registries::iso19135::CI_Contact ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_Contact.java
  Merging with the existing source file ... Ok
Processing element 32 of 39: Class eu::inspiregeoportal::registries::iso19135::CI_Telephone ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_Telephone.java
  Merging with the existing source file ... Ok
Processing element 33 of 39: Class eu::inspiregeoportal::registries::iso19135::CI_Address ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_Address.java
  Merging with the existing source file ... Ok
Processing element 34 of 39: Class eu::inspiregeoportal::registries::iso19135::CI_Date ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_Date.java
  Merging with the existing source file ... Ok
Processing element 35 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::CI_DateTypeCode ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\CI_DateTypeCode.java
  Merging with the existing source file ... Ok
Processing element 36 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::MD_CharacterSetCode ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\MD_CharacterSetCode.java
  Merging with the existing source file ... Ok
Processing element 37 of 39: Enumeration eu::inspiregeoportal::registries::iso19135::LanguageCode ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\LanguageCode.java
  Merging with the existing source file ... Ok
Processing element 38 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_SimilarityToSource ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_SimilarityToSource.java
  Merging with the existing source file ... Ok
Processing element 39 of 39: Class eu::inspiregeoportal::registries::iso19135::SpatialObjectTypeItem ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File - 
H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\SpatialObjectTypeItem.java
  Merging with the existing source file ... Ok

================================
Task Failed (total time: 27 seconds)
Comment 1 Viktor Lapitski 2008-09-15 18:23:13 UTC
I can't reproduce the issue. 

There are a couple of observations though:

1. the error "The device is not ready" looks like 
something coming from OS's IO subsystem

2. all other files except #17 (eu::inspiregeoportal::registries::iso19135::RE_Reference)
had their existing versions and new versions merged. 

The probable conclusion would be that there 
was IO error while accessing the existing version 
of eu::inspiregeoportal::registries::iso19135::RE_Reference, ie. file 

H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Reference.java

Please check whether the file was generated as expected or not. 
 
Comment 2 aquaglia 2008-09-16 07:27:22 UTC
I tried to delete the file and it was regenerated correctly.
I thought about a OS/disk problem but why does it always happen at the same point and also after rebooting the machine?

I have just tried again. The error message is still there. Is it possible to debug the code generation phase? How?
Thanks.
Comment 3 Viktor Lapitski 2008-09-17 08:22:51 UTC
could you please check for errors in the IDE log file and attach it if it is possible. 
The file is <userdir>/var/log/messages.log. By default on windows userdir would be 
something like C:\Documents and Settings\<USER_NAME>\.netbeans\dev

Also it may be helpful to check the <java.io.tmpdir>/generated_<some_numbers> directories 
where new versions of java files are generated before being merged with pre-existing versions
(though normally these directories should be deleted once generation/merge completed).
By default the <java.io.tmpdir> on windows is C:\Documents and Settings\<USER_NAME>\Local Settings\Temp.
It is also possible to explicitly specify another value for <java.io.tmpdir> in command 
line of the IDE using -J-Djava.io.tmpdir=<SOME_TMP_DIR_PATH_HERE> command line parameter 
or inside "netbeans_default_options" value inside <NETBEANS_INSTALL_DIR>/etc/netbeans.conf file.

Comment 4 aquaglia 2008-09-17 12:11:15 UTC
I checked C:\Users\angelo\AppData\Local\Temp (I am on Vista)
I found a few folders called generated_nnnnn.
I deleted them and ran the code generation again.
Same error.
Then I checked again the directory and found the newly created folder "generated_54484".
The folder contained only the file RE_Reference.java which was the only one that was not deleted.


I cannot find any messages.log in my system but I find messages.log.2 and messages.log.1. They are both old (May 2008).

Thanks.

Comment 5 Viktor Lapitski 2008-09-17 18:28:32 UTC
strange, normally the IDE always creates messages.log on startup. 
We need messages.log as the stacktrace of the exception is supposed 
to go there and also the log may contain other useful info.
 
To make sure where the userdir with messages.log is 
it is possible to start the IDE 
with explicitly specifying the <userdir> by command line parameter 
--userdir <path_for_new_userdir> or by editing "netbeans_default_userdir"  
parameter inside <NETBEANS_INSTALL_DIR>/etc/netbeans.conf file.

Another way to see messages.log on-the-fly would be to 
start IDE using 
<NETBEANS_INSTALL_DIR>/bin/nb.exe instead of 
<NETBEANS_INSTALL_DIR>/bin/netbeans.exe  - this would open 
command line window where the standard output and standard 
error streams of the IDE would be redirected.

 
Comment 6 aquaglia 2008-09-18 07:28:42 UTC
I ran nb.exe and reran the code generation. The "device not ready" message is still there but there is nothing in the log:
08:21:49,816 WARN  [DefaultSoapUICore] Missing folder [C:\Users\angelo\.netbeans\6.1\ext] for external libraries
08:21:50,144 INFO  [DefaultSoapUICore] initialized soapui-settings from [C:\Users\angelo\.netbeans\6.1\soapui-settings.xml]
08:21:50,868 INFO  [SoapUI] Initialized soapUI Core
08:21:50,882 INFO  [WorkspaceImpl] Loading workspace from [C:\Users\angelo\.netbeans\6.1\netbeans-soapui-workspace.xml]

This is the excerpt from the code generation output:
Processing element 17 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_Reference ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok
  Existing Source File -  H:\jrc\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Reference.java
  Merging with the existing source file ... Ok
Error While Processing Element The device is not ready
Processing element 18 of 39: Class eu::inspiregeoportal::registries::iso19135::RE_ReferenceSource ... 
  Generating source from template "Java/CompilationUnit.java" ... Ok

Thanks, Angelo
Comment 7 Viktor Lapitski 2008-09-19 10:57:48 UTC
1.You've mentioned that you can successfully regenerate the 
eu::inspiregeoportal::registries::iso19135::RE_Reference file after it was deleted, ie. 
when no merging involved.
Is the error there if you try to generate & merge (i.e. without deleting it before)
only one this file (i.e. select only this class node and choose Generate Code from the popup) ?

2. Would the error be there and where would it be if you generate & merge some 
proper subset of the whole set? I mean something like select last 30 files out of all 39 
and choose Generate Code from the popup. The reason for this experiment 
is that "The device is not ready" does look like some OS IO error that 
would have some timeout, something like 10-15 secs, and it would be useful 
to see is the error bound to RE_Reference or it just happens when the timeout is up.

3. If error is bound to RE_Reference - would it be possible to send us the file 
or the whole project?
Comment 8 aquaglia 2008-09-19 12:57:35 UTC
Created attachment 70143 [details]
UML project
Comment 9 aquaglia 2008-09-19 12:58:56 UTC
Hi,
1) The error is always there: if I delete the generated file or if I merge.
2) I get the error even if I generate the code only for RE_Reference
3) I have attached the project.

Thanks,
Angelo
Comment 10 Sergey Petrov 2008-09-19 13:19:05 UTC
I can reproduce the issue too.
Comment 11 Sergey Petrov 2008-09-19 13:20:52 UTC
also navigate to source do not work for RE_Reference even source file is generated.
Comment 12 George Vasick 2008-09-22 23:00:48 UTC
RE_Reference appears to be the offending model element.  Its source file artifacts is set to
"E:\quaglan\projects\geoportal\registry\deliverables\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Reference.java"
which may explain why the device not ready error is generated.
Comment 13 George Vasick 2008-09-22 23:09:23 UTC
Note, I spot checked the other elements in package iso19135.  RE_Reference seems to be the only one referencing device
E.  All of the others reference device C.
Comment 14 George Vasick 2008-09-23 00:16:14 UTC
Examining the model file, all elements have relative source file artifacts, for example:

sourcefile="..\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_ProposalManagementInformation.java"

except for RE_Reference, which has an absolute path:

sourcefile="E:\quaglan\projects\geoportal\registry\deliverables\INSPIRERegistriesAdmin\src\eu\inspiregeoportal\registries\iso19135\RE_Reference.java"
Comment 15 aquaglia 2008-09-23 06:07:59 UTC
Interesting.
I tried to rename in Netbeans project and containing directory from INSPIRERegistriesAdmin (which is the target for code
generation) to INSPIRERegistryAdmin and the error message disappeared.
Comment 16 aquaglia 2008-09-23 13:22:49 UTC
Interesting.
I tried to rename in Netbeans project and containing directory from INSPIRERegistriesAdmin (which is the target for code
generation) to INSPIRERegistryAdmin and the error message disappeared.
Comment 18 Trey Spiva 2008-10-02 21:08:03 UTC
Reviewed