[jboss-jira] [JBoss JIRA] Commented: (JBAS-7765) Farm deployment of exploded archive with 0-byte files fails with NullPointerException
Dennis Reed (JIRA)
jira-events at lists.jboss.org
Tue Feb 23 17:34:10 EST 2010
[ https://jira.jboss.org/jira/browse/JBAS-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12516192#action_12516192 ]
Dennis Reed commented on JBAS-7765:
-----------------------------------
The bug is in org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractFileWriteAction.
It has a member variable tempFile.
This variable is set to a newly created file in getTempFile(), which is called from getOutputStream(), which is called from writeBytes().
However, writeBytes is only called if there is data in the file.
(org.jboss.system.server.profileservice.repository.clustered.local.file.AddContentStreamAction.getNextBytes).
If the file is empty, tempFile is never set, and AbstractFileWriteAction.modifyTarget passes a null File parameter to FileUtil.localMove, where the NullPointerException happens.
To fix this bug, AbstractFileWriteAction.modifyTarget should call getTempFile() which will create the file if needed, instead of using tempFile directly which may be null.
> Farm deployment of exploded archive with 0-byte files fails with NullPointerException
> -------------------------------------------------------------------------------------
>
> Key: JBAS-7765
> URL: https://jira.jboss.org/jira/browse/JBAS-7765
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Clustering
> Affects Versions: JBossAS-5.1.0.GA, JBossAS-6.0.0.M2
> Reporter: Dennis Reed
> Assignee: Dennis Reed
>
> Deploying an exploded archive containing a 0-byte file causes the following NullPointerException exception on the remote node.
> The farm deployment process aborts at this point.
> (The following stack trace from EAP 5.0)
> ERROR [FileWriteAction] Caught exception in doPrepare()
> java.lang.NullPointerException
> at org.jboss.system.server.profileservice.repository.clustered.local.file.FileUtil.localMove(FileUtil.java:50)
> at org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractFileWriteAction.modifyTarget(AbstractFileWriteAction.java:88)
> at org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractLocalContentChangeAction.doPrepare(AbstractLocalContentChangeAction.java:91)
> at org.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationAction.prepare(AbstractSynchronizationAction.java:125)
> at org.jboss.system.server.profileservice.repository.clustered.local.AbstractLocalContentManager.prepareSynchronization(AbstractLocalContentManager.java:315)
> at org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler$ActiveSynchronization.prepare(DefaultRepositoryClusteringHandler.java:
> 1274)
> at org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.handlePrepare(DefaultRepositoryClusteringHandler.java:868)
> at org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.access$700(DefaultRepositoryClusteringHandler.java:68)
> at org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler$RpcTarget.prepare(DefaultRepositoryClusteringHandler.java:1119)
> 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.jgroups.blocks.MethodCall.invoke(MethodCall.java:331)
> at org.jboss.ha.framework.server.ClusterPartition$RpcHandler.handle(ClusterPartition.java:2313)
> ...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list