[jbosstools-issues] [JBoss JIRA] (JBIDE-10704) Add Server XPath Error when adding a server

Rob Stryker (JIRA) jira-events at lists.jboss.org
Tue Feb 14 04:18:05 EST 2012


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

Rob Stryker commented on JBIDE-10704:
-------------------------------------

I am completely incapable of tracking this down or even reproducing it. There are only two entry points to addQuery(xpath), and only one entry point to loadDefaultPortQueries(etc). (The other entry to addQuery is from the servers view after the server is created and so does not apply here).

In the loadDefaultPortQueries entrypoint, a category is created WITH a server initially. This server will always be non-null because it's ONLY entry point is from a serverAdded() call from the server tools framework. So a category is created here, it's server is set, and the default ports for the category are set. After it creates each query, it adds it to the category. It then goes to setEffectiveBaseDir, and on line 119 we see the following:

dir = getCategory().getServer().getRuntime().getLocation().append(dir);

The only ways to get an error here are if category is null (impossible), it's server is null (also impossible), the runtime is null (not possible for as71 servers as the wizard sets it), the runtime's location is null (not possible), or "dir" is null, which is not possible since the line directly before it has a null check on that line.

Furthermore, this error, IF it could occur, would occur at the moment you finish making the server and runtime objects. You would never need to finish a new dynamic web project wizard to enter this code,ever. This code is only entered the moment a new IServer is created, which is before you even finish the first page of teh dynamic web project wizard.

I really can see absolutely no way this can happen. With only one entry point to this code, everything seems in order already. I have no idea how people are getting this bug. There are null checks everywhere.

                
> Add Server XPath Error when adding a server
> -------------------------------------------
>
>                 Key: JBIDE-10704
>                 URL: https://issues.jboss.org/browse/JBIDE-10704
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS/Servers
>    Affects Versions: 3.3.0.M5
>         Environment: jbdevstudio-product-universal-5.0.0.v201112150534M-H62-M5.jar
> Mac OS X 10.7 Lion
>            Reporter: Martin Malina
>            Assignee: Rob Stryker
>             Fix For: 3.3.0.Beta1
>
>
> When adding a server runtime for the first time in a workspace there is an error that appears for a second and then disappears again and everything seems ok.
> See the screencast here: http://screencast.com/t/3kIRPSUs
> The error says:
> 'Add Server XPath Details' has encountered a problem.
> An internal error occurred during: "Add Server XPath Details"
> Note that this happens on the M5 build with both EAP 6.0 DR11 and JBoss AS 7.1 CR1b
> This is in the log:
> !ENTRY org.eclipse.core.jobs 4 2 2012-01-25 10:37:32.660
> !MESSAGE An internal error occurred during: "Add Server XPath Details".
> !STACK 0
> java.lang.NullPointerException
> 	at org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery.setEffectiveBaseDir(XPathQuery.java:111)
> 	at org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery.setCategory(XPathQuery.java:254)
> 	at org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory.addQuery(XPathCategory.java:105)
> 	at org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel.loadDefaults(XPathModel.java:297)
> 	at org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel.handleAddJBoss7XPaths(XPathModel.java:90)
> 	at org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel.access$0(XPathModel.java:89)
> 	at org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel$1.run(XPathModel.java:81)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

--
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