[jbosstools-commits] JBoss Tools SVN: r35657 - trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Oct 14 09:33:29 EDT 2011


Author: snjeza
Date: 2011-10-14 09:33:29 -0400 (Fri, 14 Oct 2011)
New Revision: 35657

Modified:
   trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
Log:
JBIDE-9913 NPE on start and publish of servers

Modified: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java	2011-10-14 12:21:15 UTC (rev 35656)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java	2011-10-14 13:33:29 UTC (rev 35657)
@@ -45,9 +45,12 @@
 import org.eclipse.wst.server.core.IServerWorkingCopy;
 import org.eclipse.wst.server.core.ServerCore;
 import org.eclipse.wst.server.core.ServerUtil;
+import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
 import org.jboss.ide.eclipse.as.core.server.bean.JBossServerType;
 import org.jboss.ide.eclipse.as.core.server.bean.ServerBean;
 import org.jboss.ide.eclipse.as.core.server.bean.ServerBeanLoader;
+import org.jboss.ide.eclipse.as.core.util.ServerCreationUtils;
 import org.jboss.tools.runtime.as.detector.IJBossRuntimePluginConstants;
 import org.jboss.tools.runtime.as.detector.Messages;
 import org.jboss.tools.runtime.as.detector.RuntimeAsActivator;
@@ -282,10 +285,15 @@
 			}
 		}
 		IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID[index]);
+		
+		//IServer server = ServerCreationUtils.createServer2(runtime, serverType, name, LocalPublishMethod.LOCAL_PUBLISH_METHOD);
 		IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
 
+		server.setRuntime(runtime);
 		server.setHost(JBOSS_AS_HOST);
 		server.setName(name);
+		server.setServerConfiguration(null);
+		server.setAttribute(IDeployableServer.SERVER_MODE, LocalPublishMethod.LOCAL_PUBLISH_METHOD); 
 		
 		if (index != JBOSS_AS7_INDEX) {
 			// JBossServer.DEPLOY_DIRECTORY



More information about the jbosstools-commits mailing list