Re: Anthill and StarTeam

Eric Minick <[email protected]>
Newsgroups gmane.comp.java.anthill
Message-ID <[email protected]>
David,

Error 2 is a file not found error. If I'm reading the log correctly, it 
is in the creation of the Java compile executable (javac) that the 
problem is happening.

My speculation is that javac was once on the path and while it was on 
the path, the CVS pagelets were compiled and those cached/compiled 
versions are still being used since there have been no changes to them. 
Sometime in between the initial compile of the CVS pagelets and now, the 
environment changed so that javac was no longer on the path of the user 
running Anthill. Now when the you try to compile the Starteam pagelets, 
there are nasty errors.

As a first step, I would try to get javac back on the path and go from 
there.

Regards,
Eric

David Carver wrote:

> I'm having a problem getting the StarTeamRepositoryAdapter to work 
> with the default pagelets.   I have been able to get it to execute the 
> stcmd line option by hard coding the correct command line into the 
> code, but that defeats the purpose of dynamic pagelets.    I'm using 
> AnthillOS 1.8.5.303, and I'm receiving the following errors in the log 
> file:
>
> 18:02:29:667 [Thread - AnthillBuildDaemon] INFO  
> com.urbancode.anthill.BuildManager  - step 1) Retrieve working copy of 
> code from repository
> 18:02:29:788 [Thread - AnthillBuildDaemon] ERROR 
> com.urbancode.anthill.BuildManager  - Checkout failed: CreateProcess: 
> javac -classpath 
> "D:\Anthill\lib\activation.jar;D:\Anthill\lib\ant-junit.jar;D:\Anthill\lib\anthill-1.8.1.303.jar;D:\Anthill\lib\antlr.jar;D:\Anthill\lib\Butler-1.0.75.jar;D:\Anthill\lib\commons-logging.jar;D:\Anthill\lib\CommonsExecute.jar;D:\Anthill\lib\CommonsUtil-0.0.3.jar;D:\Anthill\lib\jakarta-regexp-1.2.jar;D:\Anthill\lib\log4j.jar;D:\Anthill\lib\mail_1_2.jar;D:\Anthill\lib\Pagelets-3.1.5.jar;D:\Anthill\lib\Pagelets-email-3.1.5.jar;D:\Anthill\lib\servlet_2_2b.jar;D:\Anthill\lib\xalan.jar;D:\Anthill\lib\xercesImpl.jar;D:\Anthill\lib\xml-apis.jar;;D:\Tomcat 
> 5.5\bin\bootstrap.jar" 
> D:\Anthill\pagelets\Win32\win_starteam\getWorkingProject_pgl.java error=2
> java.io.IOException: CreateProcess: javac -classpath 
> "D:\Anthill\lib\activation.jar;D:\Anthill\lib\ant-junit.jar;D:\Anthill\lib\anthill-1.8.1.303.jar;D:\Anthill\lib\antlr.jar;D:\Anthill\lib\Butler-1.0.75.jar;D:\Anthill\lib\commons-logging.jar;D:\Anthill\lib\CommonsExecute.jar;D:\Anthill\lib\CommonsUtil-0.0.3.jar;D:\Anthill\lib\jakarta-regexp-1.2.jar;D:\Anthill\lib\log4j.jar;D:\Anthill\lib\mail_1_2.jar;D:\Anthill\lib\Pagelets-3.1.5.jar;D:\Anthill\lib\Pagelets-email-3.1.5.jar;D:\Anthill\lib\servlet_2_2b.jar;D:\Anthill\lib\xalan.jar;D:\Anthill\lib\xercesImpl.jar;D:\Anthill\lib\xml-apis.jar;;D:\Tomcat 
> 5.5\bin\bootstrap.jar" 
> D:\Anthill\pagelets\Win32\win_starteam\getWorkingProject_pgl.java error=2
>    at java.lang.ProcessImpl.create(Native Method)
>    at java.lang.ProcessImpl.<init>(Unknown Source)
>    at java.lang.ProcessImpl.start(Unknown Source)
>    at java.lang.ProcessBuilder.start(Unknown Source)
>    at java.lang.Runtime.exec(Unknown Source)
>    at java.lang.Runtime.exec(Unknown Source)
>    at java.lang.Runtime.exec(Unknown Source)
>    at 
> com.urbancode.pagelet.PageletCompiler.compile(PageletCompiler.java:82)
>    at com.urbancode.pagelet.Pagelet.compile(Pagelet.java:214)
>    at com.urbancode.pagelet.Pagelet.service(Pagelet.java:154)
>    at com.urbancode.pagelet.Pagelet.service(Pagelet.java:122)
>    at 
> com.urbancode.anthill.adapter.ProfileRepositoryAdapter.getWorkingProjectCopy(ProfileRepositoryAdapter.java:287) 
>
>    at com.urbancode.anthill.BuildManager.build(BuildManager.java:104)
>    at 
> com.urbancode.anthill.AnthillProject.releaseProject(AnthillProject.java:231) 
>
>    at com.urbancode.anthill.BuildDefinition.run(BuildDefinition.java:158)
>    at com.urbancode.anthill.BuildDaemon.run(BuildDaemon.java:73)
>
>
> The issue is when the ProfileRepositoryAdapter is trying to retrieve 
> the command line.  It always fails no matter what you put in the pagelet.
>
> The default pagelet looks like the following:
>
> <%@ import="com.urbancode.anthill.ProjectProperties" %>
> <%@ import="com.urbancode.anthill.adapter.*" %>
> <%@ import="com.urbancode.anthill.util.FileUtils" %>
> <%@ import="com.urbancode.anthill.Anthill" %>
> <%
> Anthill anthill = Anthill.getAnthill();
>
> ProjectProperties pp = (ProjectProperties)context.get("Properties");
> ProfileRepositoryAdapter ra = 
> (ProfileRepositoryAdapter)context.get("Adapter");
>
> String connectString = 
> pp.getProperty(StarTeamRepositoryAdapter.CONNECT_KEY);
> String passwdFile = 
> pp.getProperty(StarTeamRepositoryAdapter.PASSWD_FILE_KEY);
> String workDir = pp.getProperty(StarTeamRepositoryAdapter.WORK_DIR_KEY);
> String workDirectory = anthill.getAnthillRootDir().getAbsolutePath() +
>               File.separator + workDir;
>
> workDirectory = FileUtils.getOSDependentPath(workDirectory);
> String version = (String)context.get("Version");
> String labelString = "";
> if (version != null && version.length() > 0) {
>       labelString = "-vl \"" + version + "\"";
> }
>
> if ((passwdFile != null) && (!passwdFile.trim().equals(""))) {
> %>
>   cmd /x/c stcmd co -p "<%=connectString%>" -x -stop -pwdfile 
> "<%=passwdFile%>" -is -o -rp "<%=workDirectory%>" <%=labelString%> "*"
> <%
> }
> else {
> %>
>   cmd /x/c stcmd co -p "<%=connectString%>" -x -stop -is -o -rp 
> "<%=workDirectory%>" <%=labelString%> "*"
> <%
> }
> %>
>
> The command line is never retrieved.  The CVS pagelet works, and as 
> far as I can tell the StarTeamRepositoryAdapter should be getting the 
> command, but that is never displayed in the log files.
>
> Any help would be appreciated.
>
> Dave
>
>_______________________________________________
>Anthill mailing list
>Anthill-IWHQxnLZ/[email protected]
>http://lists.urbancode.com/mailman/listinfo/anthill
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.