On Mon, May 31, 2010 at 12:41 PM, Marko Vuksanovic <
markovuksano...@gmail.com> wrote:

> I'm working on a distributed build system for gwt and I seem to have
> run into 2 problems.
>
> First problem is related to UiBinder. Once I transfer all the files to
> the remote machine (that is src, required jars and result emitted by
> precompile step) I changed the classpath context and executed compile
> perms as follows:
>
> new CompilePerms(options).run(logger);
>
> where options is an instance of CompilePermsOptions.
>
> the error I get is
>
>   Scanning for additional dependencies: file:/D:/Devel/open-source/
> gwt-distributed-compiler/agent/0002/src/hr/example/orka/client/panels/
> MainPanel.java
>      Computing all possible rebind results for
> 'hr.example.orka.client.panels.MainPanel.MainPanelUiBinder'
>         Rebinding
> hr.tkd.orka.client.panels.MainPanel.MainPanelUiBinder
>            Invoking generator
> com.google.gwt.uibinder.rebind.UiBinderGenerator
>               [ERROR] Unable to find resource: hr/example/orka/client/
> panels/MainPanel.ui.xml
>

This is the primary error.  Are you sure that file is showing up on the
remote machine?  Before you invoke the compiler, you can try doing a
classLoader.getResource("hr/example/orka/client/panels/MainPanel.ui.xml")
and make sure it's found.


> Second problem is that once I transfer files to the other machine,
> where the CompilePerms is executed - once everything is finished  the
> jar files, which were added to the ClasspathContext using
> URLClasspathLoader don't seem to be unloaded even when the context is
> reverted to what it was before and all the references are set to null.
>
> prevClassLoader = Thread.currentThread().getContextClassLoader();
> URLClassLoader urlClassLoader = URLClassLoader.newInstance(
>                classpathURLs.toArray(new URL[] {}), prevClassLoader);
> Thread.currentThread().setContextClassLoader(urlClassLoader);
>
> new CompilePerms(options).run(logger);
> //System.gc();
> //System.gc();
> Thread.currentThread().setContextClassLoader(prevClassLoader);
> urlClassLoader = null;
> classpathURLs = null;
>
> Is it possible that some other classloader, within the gwt code, has
> set some references to hose jars?


It's probably the refs in ResourceOracleImpl.  We keep them around for
hosted mode refresh to be faster.  Take a look at that, describe your use
case, and we can talk about how those things can get cleaned up.

Scott

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to