ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Kumar" <ashutosh.ku...@ionidea.com>
Subject project.executetarget throwing nullpointer exception
Date Fri, 27 Aug 2004 07:19:53 GMT
What may be the reason of  project.executetarget throwing nullpointer
exception?
regds
 
 public void execute(Project project){
         Class wlConfigtaskDef=null;
          try {
            wlConfigtaskDef=
Class.forName("weblogic.ant.taskdefs.management.WLConfig");
          }
          catch (ClassNotFoundException ex) {
          }
 
         project.addTaskDefinition("wlconfig",wlConfigtaskDef);
           Target configWeblogic=new Target();
           configWeblogic.setName("test_config");
           WLServer wlserver=new WLServer();
           wlserver.setUserName("weblogic");
           wlserver.setPassword("weblogic") ;
           wlserver.setDomainName("testdomain") ;
           wlserver.setServerName("myserver") ;
           wlserver.setDir(new
File("C:/bea/user_projects/domains/testdomain"));
           wlserver.setHost("127.0.0.1") ;
           wlserver.setPort(7001) ;
           wlserver.setGenerateConfig(false) ;
           configWeblogic.addTask(wlserver);
           project.addTarget(configWeblogic);
           project.executeTarget("test_config");
 
  }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message