Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 177820 - No logging in output window during execution
No logging in output window during execution
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Launchers&CLI
7.0
PC Windows 7 x64
: P2 with 16 votes (vote)
: 7.2
Assigned To: Jiri Rechtacek
issues@platform
:
: 192244 199762 201220 223665 (view as bug list)
Depends on:
Blocks: 209523
  Show dependency treegraph
 
Reported: 2009-11-29 23:02 UTC by gwaldon
Modified: 2013-01-07 16:49 UTC (History)
14 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Compile nbexec.exe, nbexec.dll, and netbeans as 64bit binaries. (2.06 KB, patch)
2012-01-16 14:39 UTC, oyarzun
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gwaldon 2009-11-29 23:02:02 UTC
On my new installation (windows 7 x64; Java: 1.6.0_17; NetBeans IDE 6.7.1 (Build 200907230233), logging in the output tab during execution from inside the IDE has disappeared. Typically I used to run a Netbeans-based platform application and follow thrown exceptions from hyperlinks inside the output tab, now I get the dry:

run:
run:
BUILD SUCCESSFUL (total time: x minutes xx seconds)

while messages.log are fully logged.

In that installation, windows 7 is an upgrade over Vista, the JDK and Netbeans are freshly installed, the userdir config folder is a copy from the previous Netbeans installation.
Comment 1 mslama 2009-12-09 06:13:23 UTC
Does it work with 6.7 or current dev build? Do you have netbeans.conf for you platform app with -J-Dnetbeans.logger.console=true? You can check in message.log
Comment 2 gwaldon 2009-12-09 08:07:55 UTC
Here is part of the log taken from the testuserdir:
"
Input arguments:
	-Dnetbeans.logger.console=true
	-ea
	-Xdebug
	-Xrunjdwp:transport=dt_socket,suspend=n,server=n,address=SanDiego:50594
	-Djdk.home=C:\Program
	Files\Java\jdk1.5.0_18
"

I am going test 6.7 afresh (...).
Comment 3 gwaldon 2009-12-10 17:22:57 UTC
I just installed NB6.8 and imported previous settings; I still do not get the execution logging in the output. I installed NB6.7 and created the settings de novo (setup platform and projects manually) but still do not get proper logging. From previous installations, where logging was correct, what has changed is 1) windows 7 OS instead of Windows vista OS and 2) jdk1.6.0_17 instead of jkd1.6.0_14.
Comment 4 adamgmetzler 2010-11-21 14:53:43 UTC
I have the same problem with NBs 6.9 and 6.9.1 with 64 bit JDK 1.6.0_20 through 1.6.0_22 on windows 7 x64. No System.out.println or Logger.log statements show even though the system property netbeans.logging.console is set to true. This seems to only be a problem with RCP apps. The only way to see the output is to leave the View IDE Logs menu available in the app and to view the logs from there.
Comment 5 adamgmetzler 2010-11-21 17:22:29 UTC
This bug is still present in NBs 7 beta with a 64 bit JDK on windows 7 64 bit.
Comment 6 Jesse Glick 2011-03-01 22:41:38 UTC
Completely wrong component.
Comment 7 gwaldon 2011-03-02 04:48:08 UTC
Changing component to Output Window.

Problem disappeared +- recently for me, I believe when I switched to 6.9. Here is local info:

Product Version: NetBeans IDE 6.9.1 (Build 201011082200)
Java: 1.6.0_21; Java HotSpot(TM) Client VM 17.0-b16
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Comment 8 mienamoo 2011-03-02 06:11:43 UTC
(In reply to comment #7)

> System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)

I believe this issue is specific to Windows 7 64-bit. If you have switched to a 32-bit operating system or even possibly just a 32-bit JDK, that could explain why the problem disappeared. Have you tried recently on 64-bit?
Comment 9 gwaldon 2011-03-02 06:33:46 UTC
Good point. I run a 64-bit Intel Core2 Duo T6400, but... the current JDK (jdk1.6.0_21) is installed in the Program File (x86) folder and maybe more a 32-bit piece of software. I can see an old jdk1.6.0_17 installed in the Program Files folder and I remember of a 64-bit jdk version I installed a while ago, probably that one. That could fit.
Comment 10 Jesse Glick 2011-03-05 03:33:54 UTC
The issue likely relates to the NB launcher (nbexec.exe), or (less likely) Ant - not the Output Window which just gets a character stream to print.
Comment 11 tim_sa 2011-03-07 07:17:00 UTC
I don't think this is an Ant problem, as I have seen the problem with both Maven and Ant build types
Comment 12 Jesse Glick 2011-03-07 14:49:24 UTC
(In reply to comment #11)
> I have seen the problem with both Maven and Ant build types

Maven using which version of the plugin? http://jira.codehaus.org/browse/MNBMODULE-78 might be useful background; seems --console suppress was needed. Possibly blocks bug #85228. Needs to be evaluated by someone knowledgeable about nbexec.exe.
Comment 13 tim_sa 2011-03-07 15:16:57 UTC
(In reply to comment #12)
> Maven using which version of the plugin?
> http://jira.codehaus.org/browse/MNBMODULE-78 might be useful background; seems
> --console suppress was needed. Possibly blocks bug #85228. Needs to be
> evaluated by someone knowledgeable about nbexec.exe.

These are the 2 that I've tried, and am aware that the problem exists with.

Version: 4.9.1 Source: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
Version: 4.6.2 Source: NetBeans IDE 6.9.1

Just had a look at http://jira.codehaus.org/browse/MNBMODULE-78
This is exactly how both Ant and Maven are behaving - the output doesn't show on the command line, but shows in the log file
Comment 14 Jesse Glick 2011-03-07 15:26:35 UTC
(In reply to comment #13)
>> Maven using which version of the plugin?
> 
> These are the 2 that I've tried, and am aware that the problem exists with.
> 
> Version: 4.9.1 Source: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
> Version: 4.6.2 Source: NetBeans IDE 6.9.1

That's not what I asked; which version of nbm-maven-plugin? (Regardless of which version of the IDE you are developing with, or which version of the Platform you are developing against.)
Comment 15 tim_sa 2011-03-07 16:13:31 UTC
Apologies 

I'm using 3.3.
Will change to 3.5 and see if it makes a difference
Comment 16 tim_sa 2011-03-07 16:23:43 UTC
(In reply to comment #15)
> Apologies 
> 
> I'm using 3.3.
> Will change to 3.5 and see if it makes a difference

This fixes the Maven issues with both 32 bit and 64 bit vms
Comment 17 Jesse Glick 2011-03-07 17:11:55 UTC
(In reply to comment #16)
>> Will change to 3.5 and see if it makes a difference
> 
> This fixes the Maven issues with both 32 bit and 64 bit vms

This would suggest the following patch, which I cannot test myself:

diff --git a/apisupport.harness/release/run.xml b/apisupport.harness/release/run.xml
--- a/apisupport.harness/release/run.xml
+++ b/apisupport.harness/release/run.xml
@@ -174,6 +174,8 @@
             <arg file="${run.jdkhome}"/>
             <arg line="${run.args.common}"/>
             <arg line="${run.args.prepared}"/>
+            <arg value="--console"/>
+            <arg value="--suppress"/>
             <arg line="${run.args}"/>
             <arg line="${run.args.extra}"/>
             <arg line="${run.args.ide}"/>
diff --git a/nbbuild/build.xml b/nbbuild/build.xml
--- a/nbbuild/build.xml
+++ b/nbbuild/build.xml
@@ -922,6 +922,8 @@
       <arg file="${nbjdk.home}"/>
       <arg value="--userdir"/>
       <arg file="${test.user.dir}"/>
+      <arg value="--console"/>
+      <arg value="--suppress"/>
       <arg line="${tryme.args}"/>
       <arg line="${tryme.debug.args}" />
     </exec>
Comment 18 downingland 2011-03-08 23:59:56 UTC
Do the paths 
 a/apisupport.harness/release/run.xml
 a/nbbuild/build.xml b/nbbuild/build.xml

correspond to the files in my installed copy of netbeans?

I have [INSTALLDIR/harness/run.xml which has lines similar (at the same offset), I added the two lines suggested and it had no effect.

I can't find a build.xml that has lines similar to the patch so I could not make that modification.
Comment 19 Jesse Glick 2011-03-09 00:27:52 UTC
(In reply to comment #18)
>  apisupport.harness/release/run.xml
>  nbbuild/build.xml
> 
> correspond to the files in my installed copy of netbeans?

The first corresponds to harness/run.xml in your installation.

> I added the two lines suggested and it had no effect.

Assuming you were using the harness from the default platform (can verify using e.g. <echo>), some other fix is needed then.
Comment 20 Jesse Glick 2011-06-28 17:37:10 UTC
*** Bug 199762 has been marked as a duplicate of this bug. ***
Comment 21 EBashkoff 2011-06-28 18:13:02 UTC
(In reply to comment #20)
> *** Bug 199762 has been marked as a duplicate of this bug. ***

The comments in Bug 199762 indicate a problem with regard to Windows 7.  I am having the exact same problem in Windows XP 64 running NetBeans IDE 7.0 when executing NB Platform Modules.  This never happened on XP 64 with NB 7.0 when I was running Java Application Projects independent of a module.  When running a Java Desktop Application outside of a module, the text output always is successfully routed to the Output window of the IDE.
Comment 22 gwaldon 2011-06-28 18:29:09 UTC
In case you need, here is a simple workaround. I have jdk1.6.0_21 32-bits and jdk1.6.0_25 64-bits installed on the same computer. Just change the conf file to change the jdk:
e.g.
netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.6.0_21"
#netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_25"
Comment 23 Jesse Glick 2011-08-23 15:10:26 UTC
*** Bug 201220 has been marked as a duplicate of this bug. ***
Comment 24 Jesse Glick 2011-08-23 15:10:48 UTC
*** Bug 192244 has been marked as a duplicate of this bug. ***
Comment 25 cappicard 2011-11-16 14:38:03 UTC
I have encountered this issue with running NetBeans in Ubuntu Linux. However, it appears to have been resolved with NB 7.0.1.
Comment 26 javacavaj 2012-01-06 19:03:19 UTC
I am having the exact same problem in Windows 7 x64 running NetBeans IDE 7.1. 

The problem seems to occur only under these conditions:

-Executing a NB RCP application.
-JDK 1.7 x64

If I change to the 32-bit JDK or execute a Java Application Project the issue does not occur.

Any updates on this?
Comment 27 snowcrash 2012-01-08 21:36:18 UTC
Hi,

Same problem here when debugging a Netbeans Platform application under

- Windows 7 64-bit
- Netbeans 7.0.1
- JDK 1.7.0_02 x64

System.err.println output appears in the build logfile but not in the output window.  Both Netbeans and JDK are brand new, first time installs on this PC.

If I switch to the 32-bit x86 JDK, System.err.println output appears in the output window as expected.

I moved from the x86-JDK to x64- to work around the JVM creation failed bug, 183941, which does not appear resolved, despite the status on its report page!

  Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
  Operating System        = Windows 7 version 6.1 running on amd64
[Actually it's an Intel Core i5...]
  Java; VM; Vendor        = 1.7.0_02; Java HotSpot(TM) 64-Bit Server VM 22.0-b10; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_02-b13
  Java Home               = C:\Program Files\Java\jdk1.7.0_02\jre
  System Locale; Encoding = en_US (mxng); Cp1252

From messages.log:
  Diagnostic information
  Input arguments:
	-Dnetbeans.logger.console=true
        ...
	
Thanks in advance for any assistance.
Comment 28 Marian Mirilovic 2012-01-10 17:12:11 UTC
13 votes + 3 dups .... at least P2
Comment 29 oyarzun 2012-01-11 21:00:35 UTC
Another workaround is to either delete or rename javaw.exe from C:\Program Files\Java\jdk1.x.x_xx\jre\bin. As nbexec.exe will then use java.exe.

        if (!fileExists(javawExePath.c_str())) {
            logMsg("javaw.exe not exists, forcing java.exe");
            javawExePath = javaExePath;
        }

The problem seems to stem from here:

isConsoleAttached() in utilsfuncs.cpp returning false.

launcher.setSuppressConsole(!isConsoleAttached()); in nbexec.cpp

startOutProcJvm in jvmlauncher.cpp has the following:
string cmdLine = '\"' + (suppressConsole ? javawExePath : javaExePath) + '\"';

Hope this helps in coming up with a real fix.
Comment 30 oyarzun 2012-01-16 14:39:41 UTC
Created attachment 114931 [details]
Compile nbexec.exe, nbexec.dll, and netbeans as 64bit binaries.

64bit binaries for nbexec.exe, nbexec.dll, and netbeans.exe, would 
allow output to work properly under 64bit Windows using both the
32bit and 64bit JDK. 

A small change to the run.xml harness would check if the JDK's os.arch property
is amd64. If so nbexec64.exe is used instead of the 32bit version.

It looks like these binaries were built with gcc under cygwin.
I used cmake and visual studio 2008, so the attached patch is somewhat 
incomplete as it does not include any build files.

Mingw-w64 (http://mingw-w64.sourceforge.net) could be used to build the 
launcher, which would be more in line with the way it is currently built.
Comment 31 jsl123 2012-02-01 11:21:48 UTC
Similar problem here, 
Windows 7 x64, Netbeans 7.1, JDK 1.7.0_02 x86

Output works fine for a while when debugging a simple java app. But after a while, it goes blank with no further updates. All subsequent attempts to debug/run any other application come up with a blank output window (except for "run:" or "debug:" in the top left).

The only noticable text is "...line is too long, please switch to wrapped mode" on each line after about 4000 spaces. 

Restarting netbeans fixes it initially until the problem repeats after a short while.
Comment 32 Jiri Rechtacek 2012-02-16 16:57:26 UTC
Assigned to new owner.
Comment 33 wir33658 2012-02-17 08:52:36 UTC
What are those attachments for ?

And hopefully the owner-change will help to make this nasty bug finally go away.

(I cannot believe that this important thing is being blocked for such a long time).
Comment 34 Jiri Rechtacek 2012-02-17 11:24:51 UTC
(In reply to comment #33)
> What are those attachments for ?
Patches are always welcome. I'm going to integrate it.

> And hopefully the owner-change will help to make this nasty bug finally go
> away.
Now it's planned to be resolved in the current development version (upcoming NB7.2).
Comment 35 wir33658 2012-02-17 11:30:41 UTC
(In reply to comment #34)
> (In reply to comment #33)
> > What are those attachments for ?
> Patches are always welcome. I'm going to integrate it.
> 
> > And hopefully the owner-change will help to make this nasty bug finally go
> > away.
> Now it's planned to be resolved in the current development version (upcoming
> NB7.2).

Sounds great, looking forward to 7.2 ;-).
Comment 36 Libor Fischmeistr 2012-02-27 15:32:36 UTC
Works on this issue has moved to branch 64bit_installer_177820.

As mentioned above 64bit launcher is necessary.
Comment 37 swpalmer 2012-02-27 15:52:38 UTC
Is this related to the issue where NB puts nothing but spaces into the output window (which complaints that the lines are too long switch to wrapped mode)?

I find that sometime NB goes insane and fills the output widow with spaces instead of the proper bold/run output.  If I re-launch with the same settings and projects it is fixed.
Comment 38 Libor Fischmeistr 2012-02-27 16:01:47 UTC
(In reply to comment #37)
> Is this related to the issue where NB puts nothing but spaces into the output
> window (which complaints that the lines are too long switch to wrapped mode)?

This isn't related to your issue. I don't think that the problem with filling output with spaces has something common with this issue generally. Maybe it should be a new bug.
Comment 39 Jiri Rechtacek 2012-03-14 09:51:55 UTC
Integrated in trunk - core-main/rev/34fef02e9b05.
Build for verification will be available in a few days at http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 40 Quality Engineering 2012-03-17 10:38:55 UTC
Integrated into 'main-golden', will be available in build *201203170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/34fef02e9b05
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #177820: merged 64bit_installer_177820 branch
Comment 41 mienamoo 2012-03-20 07:18:21 UTC
Using build 201203180400 with JDK 7u3 on Windows 7, this fix works for Ant-based NetBeans Platform projects but NOT for Maven-based ones. Is anybody else able to replicate this behaviour?
Comment 42 Jiri Rechtacek 2012-03-20 08:05:15 UTC
(In reply to comment #41)
> Using build 201203180400 with JDK 7u3 on Windows 7, this fix works for
> Ant-based NetBeans Platform projects but 
Good to hear it.
> NOT for Maven-based ones. Is anybody
> else able to replicate this behaviour?
Well, it's a problem on Maven side - in Maven plugin pro NetBeans RCP. It is filed as https://jira.codehaus.org/browse/MNBMODULE-164

Regards.
Comment 43 mienamoo 2012-03-20 08:43:04 UTC
(In reply to comment #42)
> Well, it's a problem on Maven side - in Maven plugin pro NetBeans RCP. It is
> filed as https://jira.codehaus.org/browse/MNBMODULE-164

Thanks for the info. And thank you very much for the fix!
Comment 44 mienamoo 2012-08-28 06:03:51 UTC
(In reply to comment #42)
> Well, it's a problem on Maven side - in Maven plugin pro NetBeans RCP. It is
> filed as https://jira.codehaus.org/browse/MNBMODULE-164

This Maven plugin problem has now been fixed too! :D
Comment 45 mark_e_lowe 2012-09-15 11:52:34 UTC
I've been messing around like an eclipse user for 2 days now. I apologize for the tone but I'm a long term netbeans user and have been trying to promote its usage in my work environment and this issue doesn't seem resolved at all. 

When i run maven builds the output is redirected to cmd, which usefully closes once its finished. While I'm aware this is probably a maven plugin issue, I'm gob smacked any fix hasn't been rolled into 7.2. I understand that not all fixes can be rolled into releases, but what has to happen for something to be considered a blocker? So while I understand this maybe an issue with the maven plugin it still shipped with netbeans and as a user I perceive it as such. 

Since moving to windows 7 all versions for 7.* netbeans are renders near useless by the bug, and I've been left confused how it could exist for this long. 

I did get netbeans 7.0.1 working as usual then I was stupidly optimistically enough to allow updates and hey presto its writing to the cmd output again. I'm not convinced this is an issue with 64 bit as I'm running 32 bit JVM. 

Can someone please at least provide a workaround, a link to a fixed version (including the maven plugin). None of those submitted so far (at least those I've found associated with this issue) have worked. Like I said I've pretty much exhausted all of the 7.* versions. 

If it is indeed resolved please, please provide a link to the download. Like I mentioned 7.0.* versions until I was naive enough to allow plugins/modules to be upgraded. 

So yes windows 7 64 bit but 32 bit java version, I work in a very restricted organizational environment I cannot just install a different java version (64 bit or otherwise). 

java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode)

I've tried the following jee dists (operating independent versions, i cannot run installers on my work environment)
7.0-201104080000
7.1.2
7.2
7.0.1-201107282000
nightly-201209140001
Comment 46 Jiri Rechtacek 2012-09-15 12:31:13 UTC
(In reply to comment #45)

For future, don't change the version when the problem was reported and when was fixed. This is important information for keep tracking system in consistent mode. For discussing general problems let's use one of channels from NetBeans community forums - http://netbeans.org/community/lists/index.html
New defects or enhancements please file as new one - http://netbeans.org/community/issues.html

> I've been messing around like an eclipse user for 2 days now. I apologize for
> the tone but I'm a long term netbeans user and have been trying to promote its
> usage in my work environment and this issue doesn't seem resolved at all. 
> 
> When i run maven builds the output is redirected to cmd, which usefully closes
> once its finished. While I'm aware this is probably a maven plugin issue, I'm
> gob smacked any fix hasn't been rolled into 7.2. I understand that not all
> fixes can be rolled into releases, but what has to happen for something to be
> considered a blocker? So while I understand this maybe an issue with the maven
> plugin it still shipped with netbeans and as a user I perceive it as such. 
> 
> Since moving to windows 7 all versions for 7.* netbeans are renders near
> useless by the bug, and I've been left confused how it could exist for this
> long. 
> 
> I did get netbeans 7.0.1 working as usual then I was stupidly optimistically
> enough to allow updates and hey presto its writing to the cmd output again. I'm
> not convinced this is an issue with 64 bit as I'm running 32 bit JVM. 
> 
> Can someone please at least provide a workaround, a link to a fixed version
> (including the maven plugin). None of those submitted so far (at least those
> I've found associated with this issue) have worked. Like I said I've pretty
> much exhausted all of the 7.* versions. 
> 
> If it is indeed resolved please, please provide a link to the download. Like I
> mentioned 7.0.* versions until I was naive enough to allow plugins/modules to
> be upgraded. 
> 
> So yes windows 7 64 bit but 32 bit java version, I work in a very restricted
> organizational environment I cannot just install a different java version (64
> bit or otherwise). 
Since, NetBeans 7.2 you can run C:\Program Files (x86)\NetBeans 7.2\bin\netbeans64.exe which works correctly on 64-bit Windows platform.

> java version "1.6.0_16"
> Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
> Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode)
> 
> I've tried the following jee dists (operating independent versions, i cannot
> run installers on my work environment)
It's not a problem however you have to choose the correct one NetBeans launcher. If it's still doesn't work for you, please file it as new issue with description all available details. Thanks

> 7.0-201104080000
> 7.1.2
> 7.2
> 7.0.1-201107282000
> nightly-201209140001
Comment 47 mienamoo 2012-09-15 12:56:50 UTC
(In reply to comment #45)

For Maven-based applications, you have to use both NetBeans Platform 7.2 AND the latest nbm-maven-plugin (version 3.8). The latter you have to change in the pom.xml for existing applications independently of the platform version. Hope that helps!
Comment 48 Jiri Rechtacek 2013-01-07 16:49:34 UTC
*** Bug 223665 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo