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 132941 - stclient.exe conflict
Summary: stclient.exe conflict
Status: RESOLVED DUPLICATE of bug 150198
Alias: None
Product: obsolete
Classification: Unclassified
Component: Registration (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: mslama
URL:
Keywords:
: 143787 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-16 00:04 UTC by happydeveloper
Modified: 2009-02-19 20:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Install log file with the error in it. (8.80 KB, text/plain)
2008-04-16 00:06 UTC, happydeveloper
Details
Install log as requested. (173.76 KB, text/plain)
2008-04-16 15:56 UTC, happydeveloper
Details
registration.xml file for 6.1 RC1 (1.54 KB, text/plain)
2008-04-16 17:46 UTC, happydeveloper
Details
nbi\log for version 6.1 RC1 install failure (175.52 KB, text/plain)
2008-04-16 17:49 UTC, happydeveloper
Details
Screen prints that show where the install starts and where it hangs. (34.61 KB, text/plain)
2008-04-16 19:13 UTC, happydeveloper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description happydeveloper 2008-04-16 00:04:45 UTC
I dowloaded the full distribution for both version 6.0.1 and RC1 for 6.1.  

I am running JDK Standard edition 1.6_5.

Both installers fail at the same place with the same message.

An unexpected exception happened in thrwead Thread-20

Exception:
 java.lang.IllegalArgumentException:
 "null" expected to be an integer.
Comment 1 happydeveloper 2008-04-16 00:06:32 UTC
Created attachment 60240 [details]
Install log file with the error in it.
Comment 2 dlipin 2008-04-16 10:57:24 UTC
Hi,

Could you please attach the *installation* log file, not the netbeans log file?

The installation log file is available at C:\Documents and Settings\soliphant\.nbi\log directory.

Could you please attach the file C:\Program Files\NetBeans 6.0.1\nb6.0\servicetag\registration.xml ?


From the messages.log I see:
java.lang.IllegalArgumentException: "null" expected to be an integer
	at com.sun.servicetag.Util.getIntValue(Util.java:66)
	at com.sun.servicetag.Registry.parseServiceTag(Registry.java:460)
	at com.sun.servicetag.Registry.getServiceTag(Registry.java:424)
	at org.netbeans.modules.reglib.NbServiceTagSupport.installSystemServiceTag(NbServiceTagSupport.java:639)
	at org.netbeans.modules.reglib.NbServiceTagSupport.createNbServiceTag(NbServiceTagSupport.java:194)
	at org.netbeans.modules.registration.NbInstaller.restored(NbInstaller.java:98)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:378)
[catch] at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:297)

Something wrong with registration...
Comment 3 happydeveloper 2008-04-16 15:56:03 UTC
Created attachment 60284 [details]
Install log as requested.
Comment 4 happydeveloper 2008-04-16 15:59:52 UTC
oops.  I had already deleted the failed install.  I will run the install again and load the registration file from 
that one.

Steve
Comment 5 dlipin 2008-04-16 16:15:15 UTC
Looks like the same issue when calling createNbServiceTag from installer...

java.lang.IllegalArgumentException: "null" expected to be an integer
at org.netbeans.modules.servicetag.Util.getIntValue(Util.java:101)
at org.netbeans.modules.servicetag.Registry.parseServiceTag(Registry.java:495)
at org.netbeans.modules.servicetag.Registry.getServiceTag(Registry.java:459)
at org.netbeans.modules.reglib.NbServiceTagSupport.installSystemServiceTag(NbServiceTagSupport.java:639)
at org.netbeans.modules.reglib.NbServiceTagSupport.createNbServiceTag(NbServiceTagSupport.java:194)
at 
org.netbeans.installer.wizard.components.actions.netbeans.NbServiceTagCreateAction.createSTNetBeans(NbServiceTagCreateAction.java:178)
at 
org.netbeans.installer.wizard.components.actions.netbeans.NbServiceTagCreateAction.execute(NbServiceTagCreateAction.java:150)
at org.netbeans.installer.wizard.components.WizardAction$1.run(WizardAction.java:120)
Comment 6 happydeveloper 2008-04-16 17:46:08 UTC
Created attachment 60300 [details]
registration.xml file for 6.1 RC1
Comment 7 happydeveloper 2008-04-16 17:49:30 UTC
Created attachment 60301 [details]
nbi\log for version 6.1 RC1 install failure
Comment 8 dlipin 2008-04-16 18:43:09 UTC
Marek,

It seems that installSystemServiceTag() is executed thus stcclient is presented on the system (windows), right?
has this scenario been already tested? CC-ing Marian.
Comment 9 happydeveloper 2008-04-16 18:48:08 UTC
Just in case we have two separate issues, I am going to download version 6.0.1 and re-install that one.
Comment 10 happydeveloper 2008-04-16 19:13:28 UTC
Created attachment 60304 [details]
Screen prints that show where the install starts and where it hangs.
Comment 11 happydeveloper 2008-04-16 19:16:05 UTC
In answer to your question, stcclient is the task that is running and appears to be hung.
Comment 12 happydeveloper 2008-04-16 19:17:45 UTC
I just realized something that could be causing a problem. I have Tumbleweed installed already for another 
application.  Could this be causing a conflict of some sort?
Comment 13 dlipin 2008-04-16 19:59:03 UTC
Hi,

As far as I understand, Tumbleweed has STClient.exe installed (probably) at 
C:\Program Files\Tumbleweed\STClient\STClient.exe

Sun`s client is usualy installed at
C:\Program Files\Sun\servicetag\stclient.exe

The stclient.exe (whatever installed) is also "registered" it at HKLM\software\microsoft\windows\currentversion\app 
paths\stclient.exe on the first execution (if I am not mistaken)

The JDK`s ServiceTag implementation reads this registry key (Util.getWindowsStClientFile()) and uses Tumbleweed`s 
stclient for the servicetag purposes. That is likely wrong...
Comment 14 mslama 2008-04-16 20:43:58 UTC
We did not have stclient for Windows. Where did you get it? I will try to reproduce it. Simply stclient returns
unexpected output.

You also said that you have installer hang. I do not know if it is the same problem or not. Please could you attach
thread dump of installer JVM when installer hangs?
Comment 15 mslama 2008-04-16 20:49:00 UTC
If Dmitry is right it is *bad* conflict. I do not know how to detect it. I will pass this to JDK. In current code we
have our own private copy of com.sun.servicetag so we will try to handle this in our code.

Dmitry: Log from installer when it calls reglib is NOT sufficient. Please is there any way how to print call stack of
eventual exception thrown from reglib?
Comment 16 happydeveloper 2008-04-16 20:50:29 UTC
The stclient is installed as part of my full Tumbleweed FTP client install.  I have this application installed for 
some technnical support for another project.

Can you tell me where the thread dump is kept and I will upload it.
Comment 17 mslama 2008-04-16 20:52:23 UTC
Where to get Tumbleweed? On Google this word is quite common. No idea what search result is relevant. Thanks.

Lowering priority to P3 as this happens only to unfortunates using Tumbleweed which is not very common hopefully. Anyway
we will try to fix it soon.
Comment 18 dlipin 2008-04-17 08:40:02 UTC
> Dmitry: Log from installer when it calls reglib is NOT sufficient. 
What is the sufficient log then?

> Please is there any way how to print call stack of eventual exception thrown from reglib?
Is the following stack now full ? Actually it is the almost the same as in messsages.log.
java.lang.IllegalArgumentException: "null" expected to be an integer
at org.netbeans.modules.servicetag.Util.getIntValue(Util.java:101)
at org.netbeans.modules.servicetag.Registry.parseServiceTag(Registry.java:495)
at org.netbeans.modules.servicetag.Registry.getServiceTag(Registry.java:459)
at org.netbeans.modules.reglib.NbServiceTagSupport.installSystemServiceTag(NbServiceTagSupport.java:639)
at org.netbeans.modules.reglib.NbServiceTagSupport.createNbServiceTag(NbServiceTagSupport.java:194)
....

Anyway the same exception is thrown in the netbeans messages log file so, I guess, you know the way how to handle it in 
the way you like.
Comment 19 mslama 2008-04-17 08:54:07 UTC
How to get thread dump: First you must get PID of JVM process. Use jps (it is utility from JDK located in bin
directory). Once you have PID you can use jstack <PID> to log thread dump to console. You can redirect it to file:
jstack <PID> > threaddump.txt. Eg. if you find installer has PID 2135 you will use: jstack 2135 > threaddump.txt and
attach generated file to issue.
Comment 20 Lukas Hasik 2008-04-17 09:46:05 UTC
1, what has been tested with registration? -> http://wiki.netbeans.org/TS_61_UserRegistration
A Tumbleweed scenario hasn't been covered (and probably won't for future however we will see)

2, How to generate thread dump? -> http://wiki.netbeans.org/GenerateThreadDump
Comment 21 happydeveloper 2008-04-17 16:45:32 UTC
I will try to get time today for a thread dump. I may not get to it until the weekend, however.

In any case, it looks to me that the solution, for now, is to install NetBeans somewhere else or remove Tumbelweed 
from my machine.
Comment 22 mslama 2008-04-21 14:44:32 UTC
Yes Dmitry is right. What is value below HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\app
paths\stclient.exe? If it points to different exe than Sun's stclient.exe then it is wrong.
Comment 23 happydeveloper 2008-04-21 16:13:21 UTC
The values under 

HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\app
paths\stclient.exe

are:

Key: (Default)  C:\Program Files\Tumbleweed\STClient\stclient.exe

Key: DESTDIR    C:\Program Files\Tumbleweed\STClient

I imagine that if I change that, then NetBeans will work and Tumbleweed will not.
Comment 24 mslama 2008-04-21 20:07:20 UTC
Yes. It is reason why it fails. You can use command line option -J-Dnb.registration.enabled=false to disable
registration module. This way exception will not happen. It is workaround. I passed this problem to JDK.
Comment 25 happydeveloper 2008-04-21 20:59:14 UTC
I added the command line argument you suggested and the IDE comes up.  It also has the message "Cannot connect to 
internet" in three different places.

Is that due to the stclient issue or would this be due to our Websense application?

Comment 26 mslama 2008-04-21 21:14:31 UTC
This should not break anything else. Are there any details in IDE log? (messages.log file in user dir)
Comment 27 happydeveloper 2008-04-21 23:33:37 UTC
I get the following message several times.  I expect it is websense doing this.  Other applications will pop up a user 
ID password box to send back to websense so that the connection can go through for that application.

java.io.IOException: java.io.IOException: Server returned HTTP response code: 401 for URL: 
http://10.10.1.125:15871/cgi-bin/authenticate.cgi?ws-session=3592152686
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.notifyException
(AutoupdateCatalogCache.java:183)
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.copy(AutoupdateCatalogCache.java:178)
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.writeCatalogToCache
(AutoupdateCatalogCache.java:103)
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider.refresh
(AutoupdateCatalogProvider.java:121)
	at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl.refresh(UpdateUnitProviderImpl.java:162)
	at org.netbeans.api.autoupdate.UpdateUnitProvider.refresh(UpdateUnitProvider.java:158)
[catch] at org.netbeans.modules.autoupdate.ui.actions.AutoupdateCheckScheduler$3.run(AutoupdateCheckScheduler.java:127)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 28 mslama 2008-04-22 10:30:24 UTC
You should configure your security software to allow IDE connect to Update Center. It has nothing to do with
registration. Though if registration is enabled it also can check registration status on IDE start to confirm product
registration status.
Comment 29 mslama 2008-05-15 13:23:56 UTC
This is handled by JDK as issue #6696399. I will leave this issue open. I will port fix into our code.
Comment 30 mslama 2008-09-01 13:40:00 UTC
*** Issue 143787 has been marked as a duplicate of this issue. ***
Comment 31 mslama 2008-11-11 15:25:27 UTC
Fixed as issue #150198. Search for stclient.exe is now more specific - also path is checked to make sure it is
stclient.exe from service tag infrastructure.

*** This issue has been marked as a duplicate of 150198 ***