[WSIT-1651] NPE on retrieve a response using WS-MakeConnection Created: 10/Aug/12  Updated: 11/Sep/13  Resolved: 11/Sep/13

Status: Resolved
Project: wsit
Component/s: makeconnection
Affects Version/s: 2.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: RameshT Assignee: Lukas Jungmann
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux RHEL 6.0


Attachments: Text File server.log     XML File wsit-mc.simpleapp.HelloWorld.xml    
Issue Links:
Duplicate
duplicates WSIT-1681 MakeConnection response does not seem... Open
Tags: exception, makeconnection, npe, null, pointer, simpleapp

 Description   

SimpleMCAppTest throws NPE while retriving a response for the requrest using WS-MakeConnection. Found in HA Metro test execution with GlassFish 4.0 build 48. These tests are getting passed in GF 3.1.2 latest Patch.

======================================================
Server log :

[#|2012-08-08T04:43:47.403-0700|FINER|44.0|com.sun.metro.rx|_ThreadID=111;_ThreadName=Thread-2;ClassName=[com.sun.xml.ws.rx.mc.runtime.McServerTube] ;MethodName=processRequest;|WSMC0111: No pending message found for selection UUID [ b3b91c05-5190-423e-9960-5db66a5b11c2 ]|#]

[#|2012-08-08T04:43:47.404-0700|FINER|44.0|com.sun.metro.commons|_ThreadID=111;_ThreadName=Thread-2;ClassName=[com.sun.xml.ws.commons.ha.HaContext] ;MethodName=processRequest;|[METRO-HA] Thread[http-listener-1(2),5,main] : Current HA state cleared|#]

[#|2012-08-08T04:43:49.240-0700|SEVERE|44.0|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=98;_ThreadName=Thread-2;|PWC3989: An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.apache.catalina.connector.Request.parseSessionCookiesId(Request.java:3873)
at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:629)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:277)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:240)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:172)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:169)
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:722)

#]

=========================================================

Stack trace :
Caused by: com.sun.xml.ws.rx.RxRuntimeException: WSMC0123: The attempts to retrieve a response for the request using WS-MakeConnection have timed out.
com.sun.xml.ws.rx.mc.runtime.MakeConnectionSenderTask.suspendedFibersReadyForResend(MakeConnectionSenderTask.java:157)
com.sun.xml.ws.rx.mc.runtime.MakeConnectionSenderTask.run(MakeConnectionSenderTask.java:146)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
java.lang.Thread.run(Thread.java:722)



 Comments   
Comment by Sreekanth [ 10/Aug/12 ]

Assigning to MartinG

Comment by Lukas Jungmann [ 11/Sep/13 ]

this is a duplicate of WSIT-1681. Closing this one since the other issue contains sample app.





[QUAQUA-134] NullPointerException in QuaquaLeopardFileChooserUI$SidebarSelectionListener Created: 16/May/11  Updated: 04/Jul/11  Resolved: 04/Jul/11

Status: Resolved
Project: quaqua
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Singer Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Quaqua 7.3.4


Tags: NPE, QuaquaLeopardFileChooserUI

 Description   

A customer of our software reported following exception:

java.lang.NullPointerException
	at ch.randelshofer.quaqua.leopard.QuaquaLeopardFileChooserUI$SidebarSelectionListener.valueChanged(QuaquaLeopardFileChooserUI.java:2216)
	at javax.swing.JTree.fireValueChanged(JTree.java:2820)
	at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3191)
	at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
	at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1078)
	at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
	at javax.swing.JTree.setSelectionInterval(JTree.java:2469)
	at ch.randelshofer.quaqua.QuaquaTreeUI$Handler.mousePressed(QuaquaTreeUI.java:1394)
	at java.awt.Component.processMouseEvent(Component.java:6371)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6139)
	at java.awt.Container.processEvent(Container.java:2085)
	at java.awt.Component.dispatchEventImpl(Component.java:4736)
	at java.awt.Container.dispatchEventImpl(Container.java:2143)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
	at java.awt.Container.dispatchEventImpl(Container.java:2129)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
	at java.awt.EventQueue.access$000(EventQueue.java:86)
	at java.awt.EventQueue$1.run(EventQueue.java:639)
	at java.awt.EventQueue$1.run(EventQueue.java:637)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$2.run(EventQueue.java:653)
	at java.awt.EventQueue$2.run(EventQueue.java:651)
...


 Comments   
Comment by Thomas Singer [ 18/May/11 ]

Our user added further information:

I think the problem with this issue stemmed from the fact that I am having
to split out my code between my OSX main computer and a Windows 7 VirtualBox
instance, using shared folders.

I have noticed other oddities with this in that these folders actually live
in the VPC but are shared out over the "network" to my host (this is all
local to my computer) and if I happen to reset the network connectivity on
the VPC for whatever reason or I lose airport on my OSX main computer and
have to reset the connection then the shared folder pipeline can break.

I haven't been able to figure it out entirely, but I think the issue with
SmartGit might boil down to needing some kind of "whoops, this resource
disappeared" error handling that lets me know that I need to fix that
connection, instead of just crashing the application.

Comment by wrandelshofer [ 04/Jul/11 ]

Fixed in revision 388.





[JSIP-392] IllegalStateException caused by NullPointerException Created: 30/Aug/11  Updated: 13/Oct/11

Status: Open
Project: jsip
Component/s: None
Affects Version/s: current
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Alex Saveliev Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File npe.patch    
Tags: npe, tls

 Description   

JAIN-SIP rev1962
Mobicents SIP Servlets 1.6-SNAPSHOT, rev18708

Seen in logs:

java.lang.IllegalStateException

at org.mobicents.servlet.sip.message.SipServletResponseImpl.send(SipServletResponseImpl.java:647)
at org.mobicents.servlet.sip.message.SipServletResponseImpl.send(SipServletResponseImpl.java:458)
....
at javax.servlet.sip.SipServlet.service(SipServlet.java:332)
....
at org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher.callServlet(MessageDispatcher.java:248)
at org.mobicents.servlet.sip.core.dispatchers.SubsequentRequestDispatcher$SubsequentDispatchTask.dispatch(SubsequentRequestDispatcher.java:501)
at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.dispatchAndHandleExceptions(DispatchTask.java:60)
at org.mobicents.servlet.sip.core.dispatchers.SubsequentRequestDispatcher.dispatchMessage(SubsequentRequestDispatcher.java:313)
at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.processRequest(SipApplicationDispatcherImpl.java:706)
at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:230)
at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:196)
at gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1298)
at gov.nist.javax.sip.stack.SIPServerTransaction.processRequest(SIPServerTransaction.java:863)
at gov.nist.javax.sip.stack.TLSMessageChannel.processMessage(TLSMessageChannel.java:799)
at gov.nist.javax.sip.parser.PipelinedMsgParser$Dispatch.run(PipelinedMsgParser.java:285)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:881)
at gov.nist.javax.sip.stack.IOHandler.putSocket(IOHandler.java:106)
at gov.nist.javax.sip.stack.IOHandler.sendBytes(IOHandler.java:593)
at gov.nist.javax.sip.stack.TLSMessageChannel.sendMessage(TLSMessageChannel.java:341)
at gov.nist.javax.sip.stack.TLSMessageChannel.sendMessage(TLSMessageChannel.java:432)
at gov.nist.javax.sip.stack.SIPServerTransaction.sendResponse(SIPServerTransaction.java:469)
at gov.nist.javax.sip.stack.SIPServerTransaction.sendMessage(SIPServerTransaction.java:975)
at gov.nist.javax.sip.stack.SIPServerTransaction.sendResponse(SIPServerTransaction.java:1553)
at org.mobicents.servlet.sip.message.SipServletResponseImpl.send(SipServletResponseImpl.java:628)
... 24 more

Indeed, there is a conflict between using ConcurrentHashMap implementation and code like

if (clientSock == null) {
.....
putSocket(key, clientSock);

with attempt to put null value to ConcurrentHashMap.

Please find proposed patch in attachments

Reported to Mobicents as http://code.google.com/p/mobicents/issues/detail?id=2811



 Comments   
Comment by deruelle_jean [ 13/Oct/11 ]

Patch committed in revision jsip~svn:1981

Thanks !





[JERSEY-1064] NPE when sending a NULL to UriComponent.encode(null, ??) Created: 03/Apr/12  Updated: 10/Sep/15  Resolved: 11/Apr/12

Status: Closed
Project: jersey
Component/s: security
Affects Version/s: 1.12
Fix Version/s: 1.13

Type: Bug Priority: Major
Reporter: nelz9999 Assignee: Martin Matula
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 30 minutes
Time Spent: Not Specified
Original Estimate: 30 minutes
Environment:

Mac OS X


Tags: npe, oauth

 Description   

Found by using a URL parameter that has an empty value. I.e. "...myfirst=whatever&myparam=&myother=test..."

To see this happen (w/TestNG env):
@Test
public void testNullAccepted()

{ assertNull(UriComponent.encode(null, UriComponent.Type.UNRESERVED)); }

First solution, in UriComponent
_encode(String s, Type t, boolean template, boolean contextualEncode) {
if (s == null)

{ return null; }

...

Second solution, if the first one is not appropriate in all cases, in OAuthSignature:
private static void addParam(String key, String value, List<String[]> list) {
list.add(new String[]

{ UriComponent.encode(key, UriComponent.Type.UNRESERVED), value == null ? null : UriComponent.encode(value, UriComponent.Type.UNRESERVED) }

);
}



 Comments   
Comment by Martin Matula [ 11/Apr/12 ]

Fixed in 1.13 snapshot. Thanks for the bug report.





[JAXB-888] Nullpointer from JAnnotationUse.getAnnotationMembers Created: 05/Mar/12  Updated: 05/Mar/12

Status: Open
Project: jaxb
Component/s: runtime
Affects Version/s: 2.2.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: AndreasZ Assignee: Martin Grebac
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Tags: Annotation, NPE, Nullpointer

 Description   

Calling JAnnotationUse.getAnnotationMembers before a param is added leads to a NPE because the uninitialized map is passed to Collections.unmodifiableMap(...)

Also See Comments on JAXB-784






[JAX_WS_COMMONS-100] NullPointerException in org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3-SNAPSHOT:wsimport Created: 18/Apr/13  Updated: 14/May/13  Resolved: 13/May/13

Status: Closed
Project: jax-ws-commons
Component/s: maven-plugin
Affects Version/s: 2.2.1
Fix Version/s: 2.2.1

Type: Bug Priority: Major
Reporter: qwazer Assignee: Lukas Jungmann
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows jdk1.6.0_23


Tags: npe

 Description   

[ERROR] Failed to execute goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3-SNAPSHOT:wsimport (default-cli) on project hpsm2jira: null: MojoExecutionException: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3-SNAPSHOT:wsimport (default-cli) on project hpsm2jira: null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.MojoExecutionException
at org.jvnet.jax_ws_commons.jaxws.WsImportMojo.execute(WsImportMojo.java:280)
at org.jvnet.jax_ws_commons.jaxws.MainWsImportMojo.execute(MainWsImportMojo.java:50)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 25 more
Caused by: java.lang.NullPointerException
at org.jvnet.jax_ws_commons.jaxws.WsImportMojo.getWSDLFiles(WsImportMojo.java:515)
at org.jvnet.jax_ws_commons.jaxws.WsImportMojo.execute(WsImportMojo.java:270)
... 28 more
[ERROR]



 Comments   
Comment by qwazer [ 18/Apr/13 ]

part of config is

<configuration>
<!-<httpproxy>127.0.0.1:5865</httpproxy>->
<packageName>my.pkg</packageName>
<verbose>true</verbose>
<wsdlUrls>
<wsdlUrl>
http://10.31.7.64:13080/service.wsdl
</wsdlUrl>
</wsdlUrls>

</configuration>

Comment by Lukas Jungmann [ 13/May/13 ]

I'm unable to reproduce this with given description but tried to fix it in https://java.net/projects/jax-ws-commons/sources/svn/revision/1036

Verify it, please.
Thanks!

Comment by Lukas Jungmann [ 14/May/13 ]

closing issues after 2.2.1 release





[JAX_WS-1106] JAX-WS returns NPE when the SOAP message doesn't have the prefix Created: 21/Feb/13  Updated: 21/Feb/13

Status: Open
Project: jax-ws
Component/s: runtime
Affects Version/s: 2.2.1
Fix Version/s: None

Type: Task Priority: Major
Reporter: skathire Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Web Service


Tags: NPE, SOAP, namespace, prefix

 Description   

I have a Web Service created using JAX-WS, which accepts a Complex Type Input and returns back a string.

It expects the SOAP message to have prefix in the methodName tag otherwise it returns NPE.
Whereas the same SOAP syntax works for other webservices created in Axis, Eclipse and .NET.

SOAP messages for comparison: Note: (hello tag in the SOAP Envelopes)

SOAP message generated from my WS Client:
------------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<hello xmlns="http://ws/">
<mycity>
<lat>1</lat>
<name>name</name>
</mycity>
<mycountry>
<capital>
<lat>3</lat>
<name>capname</name>
</capital>
<code>2</code>
</mycountry>
</hello>
</soapenv:Body>
</soapenv:Envelope>

What JAX-WS expects:
--------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://ws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<q0:hello>
<mycity>
<lat>1</lat>
<name>name</name>
</mycity>
<mycountry>
<capital>
<lat>3</lat>
<name>capname</name>
</capital>
<code>2</code>
</mycountry>
</q0:hello>
</soapenv:Body>
</soapenv:Envelope>






[JAX_WS-1003] [Bug 9477981] throw java.lang.exception when test web service operation. Created: 29/Aug/11  Updated: 20/Oct/11  Resolved: 20/Oct/11

Status: Closed
Project: jax-ws
Component/s: None
Affects Version/s: None
Fix Version/s: current

Type: Bug Priority: Major
Reporter: linguo Assignee: linguo
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: BugDB-9477981, NPE, operation, service, test, throw, web, when

 Description   

Migration of existing WebLogic / Oracle bug: https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=9477981

[Bug description]
When the method with @PostConstruct annotation in the webservice is called, Null pointer exception will be thrown.

[Problems Diagnosis]
Web services should default to not having as web methods that are annotated with @PostConstruct, @PreDestroy, @PostActivate, or @PrePassivate. These methods are lifecycle methods, not business methods. They should not be exposed as web services in WSDL.

[Conclusion]
According to notes from the wiki, QA has already agreed that RI has correct generation of legal web operations. So it's not needed to integrate this change to jaxws22.

Original fix: http://tamarac.us.oracle.com/describe.php?change=1388317






[JAVASERVERFACES-3965] NPE at UrlBuilder.java:318 when posting with query parameters to the same page Created: 17/Jun/15  Updated: 28/Jul/15  Resolved: 28/Jul/15

Status: Closed
Project: javaserverfaces
Component/s: facelets
Affects Version/s: 2.2.11
Fix Version/s: None

Type: Bug Priority: Major
Reporter: kamlesh.patel18 Assignee: Manfred Riem
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish v4.1 with javax.faces-2.2.11.jar


Tags: NPE, queryParam

 Description   

I have a page with query parameters page.xhtml?param=val&id=2

When I postback via h:commandButton to the same page with same uri page.xhtml?param=val&id=2 I get NPE as per below stacktrace.

In page.xhtml I am using viewAction

<f:metadata>
<f:viewAction
action="#

{myMBean.doAction(param.id, param.param3)}

" />
</f:metadata>

java.lang.NullPointerException
at java.net.URLEncoder.encode(URLEncoder.java:204)
at com.sun.faces.context.UrlBuilder.addValuesToParameter(UrlBuilder.java:318)
at com.sun.faces.context.UrlBuilder.addParameters(UrlBuilder.java:127)
at com.sun.faces.context.ExternalContextImpl.encodeBookmarkableURL(ExternalContextImpl.java:1059)
at com.sun.faces.application.view.MultiViewHandler.getBookmarkableURL(MultiViewHandler.java:407)
at javax.faces.application.ViewHandlerWrapper.getBookmarkableURL(ViewHandlerWrapper.java:272)
at org.jboss.weld.jsf.ConversationAwareViewHandler.getBookmarkableURL(ConversationAwareViewHandler.java:132)
at javax.faces.application.ViewHandlerWrapper.getBookmarkableURL(ViewHandlerWrapper.java:272)
at com.sun.faces.renderkit.html_basic.OutcomeTargetRenderer.getEncodedTargetURL(OutcomeTargetRenderer.java:194)
at com.sun.faces.renderkit.html_basic.OutcomeTargetLinkRenderer.renderAsActive(OutcomeTargetLinkRenderer.java:158)
at com.sun.faces.renderkit.html_basic.OutcomeTargetLinkRenderer.encodeBegin(OutcomeTargetLinkRenderer.java:96)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:864)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
at com.sun.faces.renderkit.html_basic.CompositeRenderer.encodeChildren(CompositeRenderer.java:78)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)



 Comments   
Comment by Manfred Riem [ 28/Jul/15 ]

Closing as per reporter





[JAVASERVERFACES-2597] Sessions not restored on redeploy with keepstate=true due to NPE in MultiViewHandler.calculateLocale(). Created: 13/Nov/12  Updated: 16/May/13  Resolved: 16/May/13

Status: Closed
Project: javaserverfaces
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Manfred Riem Assignee: Unassigned
Resolution: Incomplete Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Red Hat Linux, Glassfish 3.1.1


Issue Links:
Related
is related to GLASSFISH-17156 Sessions not restored on redeploy wit... Closed
Tags: 3_1_2-exclude, MultiViewHandler, admin, calculateLocale, npe, nullpointerexception, redeploy, session

 Description   

I am trying to redeploy an app in Glassfish 3.1.1 from an EAR file. With a session active I ran the following asadmin command from the command line:

./asadmin redeploy --keepstate=true --name=[appname] [parthToEarFile]

The redeploy is successful but the session is not kept after redeployment. I get the following stack trace in the log:

[#|2011-08-06T20:38:46.961-0500|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=30;_ThreadName=Thread-2;|WEB0517: Unable to restore sessions for web module [] from previous deployment
java.lang.NullPointerException
at com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188)
at com.ocpsoft.pretty.faces.application.PrettyViewHandler.calculateLocale(PrettyViewHandler.java:82)
at javax.faces.application.ViewHandlerWrapper.calculateLocale(ViewHandlerWrapper.java:108)
at com.sun.faces.application.resource.ResourceManager.getLocalePrefix(ResourceManager.java:467)
at com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:162)
at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:417)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.ArrayList.readObject(ArrayList.java:593)
at sun.reflect.GeneratedMethodAccessor1347.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1951)
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1859)
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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1144)
at org.apache.catalina.session.StandardManager.readSessions(StandardManager.java:492)
at com.sun.enterprise.web.WebModule.loadSessions(WebModule.java:1573)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2002)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:126)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)



 Comments   
Comment by Manfred Riem [ 19/Feb/13 ]

Can you verify if this is still a problem on the latest 2.1 release?

Comment by Manfred Riem [ 19/Mar/13 ]

Lowering priority because of no response

Comment by Manfred Riem [ 17/Apr/13 ]

Lowering priority because of no response

Comment by Manfred Riem [ 16/May/13 ]

Closing because of inactivity





[JAVASERVERFACES-2351] NullPointerException in case value of outputFormat resolved to null Created: 22/Mar/12  Updated: 26/Jun/12  Resolved: 20/May/12

Status: Closed
Project: javaserverfaces
Component/s: None
Affects Version/s: 2.1.4
Fix Version/s: 2.1.9, 2.2.0-m03

Type: Bug Priority: Major
Reporter: AndreyZ Assignee: rogerk
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JBoss AS 7.1.0.Final, JSF 2.1.5


Attachments: Text File changebundle-2351-trunk.txt     Text File changebundle-2351.txt    
Tags: npe, outputformat, value

 Description   

In case of value of outputFormat component resolved to 'null' - runtime NPE is thrown. E.g. the following causes the issue:
<h:outputFormat />
<h:outputFormat value="#

{null}

"/>
<h:outputFormat value="#

{bean.somethingMayBeNull}

"/>

Prior to 2.1.4 OutputMessageRenderer handled 'null' value like this:

Object currentObj = ((ValueHolder) component).getValue();
String currentValue;
if (currentObj != null)

{ currentValue = currentObj.toString(); }

else

{ // if the value is null, do not output anything. return; }

And in 2.1.4 it was changed to (fix of http://java.net/jira/browse/JAVASERVERFACES-2111):
String currentValue = getCurrentValue(context, component);

Null-check of 'currentValue' seems to be missed.

Stacktrace:
java.lang.NullPointerException: Argument Error: Parameter text is null
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.writeText(HtmlResponseWriter.java:877)
at javax.faces.context.ResponseWriter.writeText(ResponseWriter.java:275)
at com.sun.faces.renderkit.html_basic.OutputMessageRenderer.encodeEnd(OutputMessageRenderer.java:163)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)



 Comments   
Comment by rogerk [ 20/May/12 ]

Changes.

Comment by rogerk [ 20/May/12 ]

Committed to MOJARAA_2_1X_ROLLING branch:
Sending jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java
Adding test/agnostic/renderKit/basic/src/main/java/com/sun/faces/test/agnostic/renderKit/basic/Bean.java
Adding test/agnostic/renderKit/basic/src/main/webapp/outputFormat.xhtml
Adding test/agnostic/renderKit/basic/src/test/java/com/sun/faces/test/agnostic/renderKit/basic/Issue2351IT.java
Transmitting file data ....
Committed revision 10019.

Comment by rogerk [ 20/May/12 ]

trunk changes.

Comment by rogerk [ 20/May/12 ]

Committed to trunk:
Sending jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java
Adding test/agnostic/renderKit/basic/src/main/java/com/sun/faces/test/agnostic
Adding test/agnostic/renderKit/basic/src/main/java/com/sun/faces/test/agnostic/renderKit
Adding test/agnostic/renderKit/basic/src/main/java/com/sun/faces/test/agnostic/renderKit/basic
Adding test/agnostic/renderKit/basic/src/main/java/com/sun/faces/test/agnostic/renderKit/basic/Bean.java
Adding test/agnostic/renderKit/basic/src/main/webapp/outputFormat.xhtml
Adding test/agnostic/renderKit/basic/src/test/java/com/sun/faces/test/agnostic/renderKit/basic/Issue2351IT.java
Transmitting file data ....
Committed revision 10020.

Comment by rogerk [ 20/May/12 ]

Fix versions





[GLASSFISH-20188] ADMINGUI :Batch Process for an Instance throws NPE Created: 05/Apr/13  Updated: 09/Apr/13  Resolved: 09/Apr/13

Status: Resolved
Project: glassfish
Component/s: batch
Affects Version/s: 4.0_b83
Fix Version/s: 4.0_b84_RC1

Type: Bug Priority: Major
Reporter: RameshT Assignee: Mahesh Kannan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Win 7 IE 9


Tags: NPE, admin-gui, batch, console

 Description   

Create an instance named : Inst1
select the instance ( inst1 )
select batch tab menu.
Got an error as :
"An error has occurred
java.lang.NullPointerException"



 Comments   
Comment by Anissa Lam [ 05/Apr/13 ]

The stack trace shows the NPE is from backend, and the console screen is able to display that error properly, saying
An error has occurred
java.lang.NullPointerException

Assign to Mahesh. Here is the exception.

[#|2013-04-05T08:16:42.038-0700|SEVERE|glassfish 4.0|javax.enterprise.system.core|_ThreadID=139;_ThreadName=admin-listener(7);_TimeMillis=1365175002038;_LevelValue=1000;_MessageID=NCLS-CORE-00003;|
Exception while running a command
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:542)
at org.glassfish.batch.ListBatchJobsProxy.postInvoke(ListBatchJobsProxy.java:108)
at org.glassfish.batch.AbstractListCommandProxy.execute(AbstractListCommandProxy.java:122)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:235)
at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:161)
at org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGetLegacyFormat(TemplateCommandGetResource.java:75)
at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:217)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:231)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:227)
at org.glassfish.jersey.internal.Errors.process(Errors.java:275)
at org.glassfish.jersey.internal.Errors.process(Errors.java:257)
at org.glassfish.jersey.internal.Errors.process(Errors.java:227)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:191)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:819)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:325)
at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:318)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
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:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:722)

#]
Comment by Mahesh Kannan [ 09/Apr/13 ]

svn commit -m "Fix for 20190 and 20188. QL Passed"
Sending batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/AbstractListCommand.java
Sending batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/AbstractListCommandProxy.java
Sending batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/ListBatchJobExecutionsProxy.java
Sending batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/ListBatchJobStepsProxy.java
Sending batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/ListBatchJobs.java
Sending batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/ListBatchJobsProxy.java
Transmitting file data ......
Committed revision 61272.





[GLASSFISH-17156] Sessions not restored on redeploy with keepstate=true due to NPE in MultiViewHandler.calculateLocale(). Created: 07/Aug/11  Updated: 19/Feb/13  Resolved: 13/Nov/12

Status: Closed
Project: glassfish
Component/s: jsf
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gguarnera Assignee: rogerk
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Red Hat Linux, Glassfish 3.1.1


Issue Links:
Related
is related to JAVASERVERFACES-2597 Sessions not restored on redeploy wit... Closed
Tags: 3_1_2-exclude, MultiViewHandler, admin, calculateLocale, npe, nullpointerexception, redeploy, session

 Description   

I am trying to redeploy an app in Glassfish 3.1.1 from an EAR file. With a session active I ran the following asadmin command from the command line:

./asadmin redeploy --keepstate=true --name=[appname] [parthToEarFile]

The redeploy is successful but the session is not kept after redeployment. I get the following stack trace in the log:

[#|2011-08-06T20:38:46.961-0500|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=30;_ThreadName=Thread-2;|WEB0517: Unable to restore sessions for web module [] from previous deployment
java.lang.NullPointerException
at com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188)
at com.ocpsoft.pretty.faces.application.PrettyViewHandler.calculateLocale(PrettyViewHandler.java:82)
at javax.faces.application.ViewHandlerWrapper.calculateLocale(ViewHandlerWrapper.java:108)
at com.sun.faces.application.resource.ResourceManager.getLocalePrefix(ResourceManager.java:467)
at com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:162)
at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:417)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.ArrayList.readObject(ArrayList.java:593)
at sun.reflect.GeneratedMethodAccessor1347.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1951)
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1859)
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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1144)
at org.apache.catalina.session.StandardManager.readSessions(StandardManager.java:492)
at com.sun.enterprise.web.WebModule.loadSessions(WebModule.java:1573)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2002)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:126)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)



 Comments   
Comment by Hong Zhang [ 08/Aug/11 ]

assign to web team for initial evaluation

Comment by Shing Wai Chan [ 08/Aug/11 ]

The NPE is from com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188)

Assign to jsf team for investigation.

Comment by rogerk [ 09/Nov/11 ]

The stack trace shows that another JSF library is being used (Pretty Faces).
Until I can get the application and libs to test with I am excluding from 3.1.2.

Comment by Manfred Riem [ 13/Nov/12 ]

Closing as duplicate, see the associated issue for resolution.

Comment by Manfred Riem [ 19/Feb/13 ]

Can you verify if this is still a problem on the latest 2.1 release?





[GLASSFISH-16878] NPE on J2EETransaction on commit whent using a transaction manager in a remote client Created: 16/Jun/11  Updated: 17/Jun/11  Resolved: 17/Jun/11

Status: Closed
Project: glassfish
Component/s: jts
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: olamiral Assignee: marina vatkina
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP Professional SP3 (32-bits),Intel Core 2 Duo T5200@1.60GHz, 2GB RAM


Attachments: Zip Archive remote-jta-tester.zip    
Tags: glassfish, j2eetransaction, jta, npe, nullpointerexception, transaction, transactionmanager, xa

 Description   

When committing a remotely created XA transaction (using the container TransactionManager), the application is throwing a NPE (we are trying to send a JMS message from a remote client inside a distributed transaction).

Stacktrace:

java.lang.NullPointerException
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:511)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371)
at com.sun.enterprise.transaction.TransactionManagerHelper.commit(TransactionManagerHelper.java:63)
at RemoteJtaTester.main(RemoteJtaTester.java:48)

Source code attached.



 Comments   
Comment by marina vatkina [ 17/Jun/11 ]

NPE can happen only if the transaction.nonXA.optimizationis set to false, which is not a supported config.

Comment by olamiral [ 17/Jun/11 ]

Thank you for your quick reply, Marina.

Could you tell me where should check and set the value for this property, please?

Thank you once again!

Comment by marina vatkina [ 17/Jun/11 ]

It should not be set. Somehow it seems to be set to false in the server-config





[GLASSFISH-16778] RAR7093 : Error while cleaning up ManagedConnection - NullPointerException Created: 01/Jun/11  Updated: 11/Nov/11  Resolved: 11/Nov/11

Status: Closed
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: nbw Assignee: Shalini
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 3.1 FCS (bld 43), Windows 7 Ultimate Edition x64, JDK 1.6.0_22-b04 (32 bit)


Attachments: XML File connectionPoolSettings.xml    
Tags: 3_1-next, 3_1-next_need-more-info, 3_1_1-scrubbed, ConnectionPool, Glassfish, NPE, RAR

 Description   

Glassfish threw a NPE with the following stack trace [1]. This occurred shortly after Glassfish reported to the server.log a WARNING [2] of a possible connection leak in an Oracle JDBC connection pool it manages. The NPE may be a result of the connection leak reclamation process.

-Noah

[1] -

[#|2011-06-01T02:45:36.041-0400|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.allocator|_ThreadID=3;_ThreadName=Thread-1;|RAR7093 : Error while cleaning up ManagedConnection
java.lang.NullPointerException
at com.sun.gjc.spi.ManagedConnection.resetAutoCommit(ManagedConnection.java:507)
at com.sun.gjc.spi.ManagedConnection.resetConnectionProperties(ManagedConnection.java:493)
at com.sun.gjc.spi.ManagedConnection.cleanup(ManagedConnection.java:342)
at com.sun.enterprise.resource.allocator.AbstractConnectorAllocator.cleanup(AbstractConnectorAllocator.java:166)
at com.sun.enterprise.resource.pool.ConnectionPool.cleanupResource(ConnectionPool.java:1074)
at com.sun.enterprise.resource.pool.ConnectionPool.freeResource(ConnectionPool.java:1050)
at com.sun.enterprise.resource.pool.ConnectionPool.freeUnenlistedResource(ConnectionPool.java:1046)
at com.sun.enterprise.resource.pool.ConnectionPool.resourceClosed(ConnectionPool.java:1013)
at com.sun.enterprise.resource.pool.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:419)
at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:379)
at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77)
at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:769)
at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:214)
at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:539)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:464)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:504)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:487)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.decrementCallCount(DatasourceAccessor.java:274)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.rollbackTransaction(DatasourceAccessor.java:676)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.rollbackTransaction(DatabaseAccessor.java:1495)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicRollbackTransaction(AbstractSession.java:602)
at org.eclipse.persistence.sessions.server.ClientSession.basicRollbackTransaction(ClientSession.java:153)
at org.eclipse.persistence.internal.sessions.AbstractSession.rollbackTransaction(AbstractSession.java:3384)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4564)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.rollbackTransaction(RepeatableWriteUnitOfWork.java:504)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.release(UnitOfWorkImpl.java:4368)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.rollback(EntityTransactionImpl.java:127)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.finalize(EntityTransactionImpl.java:160)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

#]

[2] -

[#|2011-06-01T02:45:20.166-0400|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=114;_ThreadName=Thread-1;|A potential connection leak detected for connection pool EMPool. The stack trace of the thread is provided below :
com.sun.enterprise.resource.pool.ConnectionPool.setResourceStateToBusy(ConnectionPool.java:324)
com.sun.enterprise.resource.pool.ConnectionPool.getResourceFromPool(ConnectionPool.java:754)
com.sun.enterprise.resource.pool.ConnectionPool.getUnenlistedResource(ConnectionPool.java:632)
com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:526)
com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:242)
com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:167)
com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:341)
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:304)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:110)
org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:291)
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565)
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1434)
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305)
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.beginTransaction(DatasourceAccessor.java:238)
org.eclipse.persistence.internal.sessions.AbstractSession.basicBeginTransaction(AbstractSession.java:489)
org.eclipse.persistence.internal.sessions.AbstractSession.basicBeginTransaction(AbstractSession.java:478)
org.eclipse.persistence.sessions.server.ClientSession.addWriteConnection(ClientSession.java:615)
org.eclipse.persistence.sessions.server.ServerSession.acquireClientConnection(ServerSession.java:246)
org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:226)
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateObject(DatasourceCallQueryMechanism.java:750)
org.eclipse.persistence.internal.queries.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:432)
org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1159)
org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:291)
org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:808)
org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:711)
org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2842)
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1521)
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1503)
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)
org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:265)
org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:128)
org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3766)
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1404)
org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:616)
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1552)
org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:427)
org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:744)
com.foo.em.api.pn.EMManager.update(EMManager.java:485)
sun.reflect.GeneratedMethodAccessor287.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:167)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
com.sun.grizzly.ContextTask.run(ContextTask.java:71)
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
java.lang.Thread.run(Thread.java:662)

Monitoring Statistics :

Monitoring Statistics for
EMPool|#]



 Comments   
Comment by Shalini [ 05/Jun/11 ]

Could you please attach a test case to reproduce this issue along with the connection pool configuration?

Comment by nbw [ 06/Jun/11 ]

Connection pool settings in play when the null pointer exception occurred.

Comment by Shalini [ 06/Jun/11 ]

With the jdbc connection pool configuration mentioned by you, i was unable to reproduce this issue. My test case gets a connection in the EJB and does some insert operations in a table and forgets to close this connection. After 60 seconds, the connection is traced as leaked and also reclaimed with the following message in the server.log :

[#|2011-06-07T11:25:36.301+0530|INFO|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=69;_ThreadName=Thread-1;|Reclaiming the leaked connection of pool [ jdbc-connectionleaktracing ] and destroying it so as to avoid both the application that leaked the connection and any other request that can potentially acquire the same connection from the pool end up using the connection at the same time|#]

I'm using build 43. If you could attach a testcase (application/ear) to reproduce this issue, it would be great. Are you also seeing any connection validation failure messages in the server.log?

Comment by Shalini [ 12/Jun/11 ]

Tried to do a getConnection within a transaction and forgot to close the connection in the EJB. I got the expected messages that a connection is leaked in the server.log and when leak reclaim was set to true, it was reclaimed.

Need more info to reproduce this issue.

Comment by Shalini [ 11/Nov/11 ]

This issue is not reproducible with the connection pool settings attached. Need more info or an application to reproduce this issue. Hence closing this issue.





Generated at Fri Feb 12 15:42:57 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.