[jbosstools-issues] [JBoss JIRA] (JBIDE-9874) Weird NPE when publishing

Rob Stryker (Commented) (JIRA) jira-events at lists.jboss.org
Fri Oct 21 05:03:46 EDT 2011


    [ https://issues.jboss.org/browse/JBIDE-9874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636396#comment-12636396 ] 

Rob Stryker commented on JBIDE-9874:
------------------------------------

There is still only one behaviour model, so there is a singleton lookup of the entry point.  It is all loaded upon first load of the model via extension points. So even if two different threads get in here at the same time, both threads will load the exact same model, since it is entirely loaded via extension points. There would then be two models, both containing the exact same thing, but only one would be stored in the variable. All subsequent calls will use the version stored in the variable. The second model will be garbage collected after the first use. 

What should be done to make the "dangerous singleton" less dangerous? 
                
> Weird NPE when publishing
> -------------------------
>
>                 Key: JBIDE-9874
>                 URL: https://issues.jboss.org/browse/JBIDE-9874
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS/Servers
>            Reporter: Max Rydahl Andersen
>            Assignee: Rob Stryker
>             Fix For: 3.3.0.Beta1
>
>
> Run as on a new project on AS7 and I got this:
> java.lang.NullPointerException
> 	at org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel.getPublishMethodType(BehaviourModel.java:39)
> 	at org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.getCurrentDeploymentMethodType(DeploymentPreferenceLoader.java:54)
> 	at org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.getCurrentDeploymentMethodType(DeploymentPreferenceLoader.java:50)
> 	at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.createPublishMethod(DeployableServerBehavior.java:110)
> 	at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.getOrCreatePublishMethod(DeployableServerBehavior.java:64)
> 	at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.publishStart(DeployableServerBehavior.java:57)
> 	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:927)
> 	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
> 	at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3027)
> 	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:341)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> project still seem to deploy.
> This is from what is in nightly build.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list