[GLASSFISH-19027] NPE Problem happened while setting proxy Created: 21/Aug/12  Updated: 26/Mar/13  Resolved: 26/Mar/13

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.0_b81
Fix Version/s: 4.0_b82_EE7MS7

Type: Bug Priority: Critical
Reporter: TangYong Assignee: Anissa Lam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

1 Windows XP
2 2012/8/20 Updated Trunk



 Description   

1 building 2012/8/20 Updated Trunk and starting domain

2 Accessing Glassfish Admin Console and Navigating Update Tool Configuration

3 After setting Proxy and clicking Save Button, the following error happened on the server.log

[#|2012-08-21T17:25:22.812+0900|SEVERE|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=21;_ThreadName=admin-listener(4);|java.lang.NullPointerException
at org.glassfish.uc.admingui.UpdateCenterHandlers.setProxyInfo(UpdateCenterHandlers.java:314)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:150)
at com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:98)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:818)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:166)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:791)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1256)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:181)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:641)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:339)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:283)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:660)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:600)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:337)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:240)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:230)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:175)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547)
at java.lang.Thread.run(Thread.java:662)

#]

The problem is very fatal, and wish update tool team can investigate it.



 Comments   
Comment by TangYong [ 09/Jan/13 ]

Hi Snjezana,

Can you confirm the issue because many companies set proxy to access internet, so I wish the issue can be fixed as soon as possible.

Thanks
--Tang

Comment by Snjezana Sevo-Zenzerovic [ 25/Mar/13 ]

Moving to appropriate subcategory.

Comment by Anissa Lam [ 26/Mar/13 ]

The NPE is due to the fact that there is no update center image/info available. I fixed the code now to ensure image is not null, and provide error msg to user about this problem.
Also added client side validation for port # to ensure integer is added.

Comment by TangYong [ 26/Mar/13 ]

Anissa,

Thanks for quick fixing. Here, I still have a question as following,

As for GF 3.1.2.2, after clicking "save" button, the popuped message is "New values successfully saved.", and Now, fixed popuped message is "Cannot create update center Image for D:\20130125\glassfish8\glassfish4; Update Center functionality will not be available in Admin Console".

I think the message is a litter curious because whether Update Center functionality is available should not depend on whether can create update center Image. And I am also curious about why saving a configuration depends on creating update center Image.

In fact, I have created a bug about "Update Center functionality will not be available ".

Thanks
--Tang

Comment by Snjezana Sevo-Zenzerovic [ 26/Mar/13 ]

Tang,

reading the initial description, all of this happened with the GlassFish distribution you built yourself, presumably using default Maven build profile, is that correct?

In that case, resulting GlassFish installation is not based on IPS packaging and does not contain valid IPS image. So, update center functionality will not be available on such installation. Bug was valid in a sense that this situation must still be gracefully handled by Admin GUI.

In order to create GlassFish distributions with integrated Update Center functionality support, you must build in ips profile. However, this also requires much more complex build setup since in addition to Maven and JDK you also require UC 2.x toolkit files and the ability to run build IPS package repository. I am not sure if we have full set of setup instructions for this build type on public Wiki, but I'll try to locate them.

Comment by TangYong [ 26/Mar/13 ]

Thanks Snjezana's detailed explaination very much! I have understande what you said.

Generated at Thu Mar 05 03:18:10 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.