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 112904 - NPE from identity after securing service using WSIT
Summary: NPE from identity after securing service using WSIT
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Identity (show other bugs)
Version: 6.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: Peter Liu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-15 16:03 UTC by Lukas Jungmann
Modified: 2007-08-24 14:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
output (7.34 KB, text/plain)
2007-08-15 17:37 UTC, Lukas Jungmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2007-08-15 16:03:09 UTC
base IDE with enterprise and identity clusters

-have a ws with some dummy operations in a web project
-open it in design view
-check secure service
-click on "Advanced..." button

=>java.lang.NullPointerException
	at
org.netbeans.modules.identity.profile.api.configurator.impl.file.AMConfigManager.getAMConfigInternal(AMConfigManager.java:110)
	at org.netbeans.modules.identity.profile.api.configurator.impl.file.AMConfigManager.getAMConfig(AMConfigManager.java:72)
	at org.netbeans.modules.identity.profile.api.configurator.impl.file.ProviderConfigImpl.<init>(ProviderConfigImpl.java:64)
	at org.netbeans.modules.identity.profile.api.configurator.ProviderConfigFactory.newInstance(ProviderConfigFactory.java:42)
	at org.netbeans.modules.identity.profile.api.configurator.ProviderConfigurator.init(ProviderConfigurator.java:136)
	at
org.netbeans.modules.identity.profile.api.configurator.ProviderConfigurator.getConfigurator(ProviderConfigurator.java:108)
	at org.netbeans.modules.identity.profile.ui.WSPSecurityPanel.<init>(WSPSecurityPanel.java:61)
	at org.netbeans.modules.identity.profile.ui.WSPSectionNode.createNodeInnerPanel(WSPSectionNode.java:64)
	at org.netbeans.modules.xml.multiview.SectionNode.createInnerPanel(SectionNode.java:93)
	at org.netbeans.modules.xml.multiview.ui.SectionNodePanel.createInnerpanel(SectionNodePanel.java:104)
	at org.netbeans.modules.xml.multiview.ui.SectionPanel.openInnerPanel(SectionPanel.java:188)
	at org.netbeans.modules.xml.multiview.ui.SectionNodePanel.openInnerPanel(SectionNodePanel.java:114)
	at org.netbeans.modules.xml.multiview.ui.SectionNodePanel.setExpandedViewMode(SectionNodePanel.java:80)
	at org.netbeans.modules.xml.multiview.ui.SectionNodePanel.<init>(SectionNodePanel.java:56)
	at org.netbeans.modules.xml.multiview.ui.SectionNodePanel.<init>(SectionNodePanel.java:45)
	at org.netbeans.modules.xml.multiview.SectionNode.createSectionNodePanel(SectionNode.java:175)
	at org.netbeans.modules.xml.multiview.SectionNode.getSectionNodePanel(SectionNode.java:165)
	at org.netbeans.modules.xml.multiview.ui.SectionNodeView.setRootNode(SectionNodeView.java:73)
	at org.netbeans.modules.identity.profile.ui.WSPSecurityView.<init>(WSPSecurityView.java:36)
	at org.netbeans.modules.identity.profile.ui.editor.SecurityWSEditor.setUpSecurityPanel(SecurityWSEditor.java:153)
	at org.netbeans.modules.identity.profile.ui.editor.SecurityWSEditor.createWSEditorComponent(SecurityWSEditor.java:81)
	at org.netbeans.modules.websvc.core.wseditor.support.EditWSAttributesPanel.addTabs(EditWSAttributesPanel.java:48)
[catch] at
org.netbeans.modules.websvc.core.wseditor.support.EditWSAttributesCookieImpl$1.run(EditWSAttributesCookieImpl.java:77)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
...
Comment 1 Lukas Jungmann 2007-08-15 17:35:47 UTC
similar exception is thrown also during the deployment of webapp (buildscript's output is attached)

I performed following steps (in hudson #2518)
-create new secured ws sample project
-run both parts
-invoke EditWS attrs action on the service and client, don't change anything there
-double click on the web service node (for opening it in the editor/designer)
-reached issue 112904
-restart the IDE, server
-open edit ws attributes dialog, changed some WSIT related settings
-invoked undeploy & deploy on the project with websvc
-invoked run on the project with websvc client

=>see attachment
Comment 2 Lukas Jungmann 2007-08-15 17:37:13 UTC
Created attachment 46680 [details]
output
Comment 3 Lukas Jungmann 2007-08-15 17:44:18 UTC
it seems to be enough the delete amserver directory in the project to bypass this exception
Comment 4 Peter Liu 2007-08-16 23:08:11 UTC
Lukas, 

Could you check to see if the same problem occurs on windows?  I can't reproduce this issue on my windows machine.


Comment 5 Lukas Jungmann 2007-08-20 14:40:10 UTC
yup, I'll try it on win ASAP.

Anyway it seems that you are converting paths using ie. "amConfigFile.replace('\\', '/')"? I don't know your code, but
you should use "...replace('\\', File.separatorChar)" for it, IMO.

I did only simple grep on identity folder and it shows this pattern in:
profileapi/src/org/netbeans/modules/identity/profile/api/configurator/impl/dynamic/ProviderConfigImpl.java:       
amConfigFile = amConfigFile.replace('\\', '/');

profileapi/src/org/netbeans/modules/identity/profile/api/configurator/impl/file/AMConfigManager.java:        String
normalizedPath = path.replace('\\', '/');

profileapi/src/org/netbeans/modules/identity/profile/api/configurator/ProviderConfigurator.java:        return (value ==
null) ? null : value.replace('\\', '/');
Comment 6 Peter Liu 2007-08-20 18:21:46 UTC
I finally reproduced the issue by restarting the IDE after enabling the AM security.  Also, I think this is related to
jaxb context and not the file separator issue.  Anyway, I'll try to see if I can fix this problem now that I know how to
reproduce it.

Comment 7 Lukas Jungmann 2007-08-20 18:24:07 UTC
great:)
Comment 8 Peter Liu 2007-08-20 20:46:59 UTC
This issue is due to a recent reorganization of the jaxws21 and jaxb21 library module.  The fix is to make the
identity.profile.api module a friend to that module.

The fix is checked in NB 6 trunk.

Comment 9 Lukas Jungmann 2007-08-24 14:14:15 UTC
v.