I followed your instructions, and trying to compile the index.lzx
through the browser I got:
Error: java.lang.NullPointerException
        at 
org.openlaszlo.compiler.CompilationEnvironment.addLZOFile(CompilationEnvironment.java:308)
        at 
org.openlaszlo.compiler.DefaultFileResolver.resolveInternal(FileResolver.java:206)
        at 
org.openlaszlo.compiler.DefaultFileResolver.resolve(FileResolver.java:110)
        at 
org.openlaszlo.cm.TrackingFileResolver.resolve(TrackingFileResolver.java:56)
        at org.openlaszlo.compiler.Parser.expandIncludes(Parser.java:646)
        at org.openlaszlo.compiler.Parser.readExpanded(Parser.java:418)
        at org.openlaszlo.compiler.Parser.parse(Parser.java:707)
        at org.openlaszlo.compiler.Compiler.compile(Compiler.java:386)
        at org.openlaszlo.compiler.Compiler.compile(Compiler.java:208)
        at 
org.openlaszlo.cm.CompilationManager.compileItem(CompilationManager.java:753)
        at 
org.openlaszlo.cm.CompilationManager.getItem(CompilationManager.java:467)
        at 
org.openlaszlo.cm.CompilationManager.getLastModified(CompilationManager.java:435)
        at 
org.openlaszlo.servlets.responders.ResponderCompile.getLastModified(ResponderCompile.java:400)
        at 
org.openlaszlo.servlets.responders.ResponderCompile.respondImpl(ResponderCompile.java:184)
        at 
org.openlaszlo.servlets.responders.Responder.respond(Responder.java:278)
        at org.openlaszlo.servlets.LZServlet._doGet(LZServlet.java:448)
        at org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:362)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:680)

Using "lzc --dir build --output index.swf index.lzx", I got the same
error on the command line.

Raju



On Mon, Sep 12, 2011 at 10:01 AM, Rami Ojares / AMG
<[email protected]> wrote:
> Hi Donald,
>
> Here I present the simplest possible testcase.
>
> Create mytext.lzx
> <library>
>     <class name="mytext" extends="text">
>         <attribute name="text" value="Hello World!"/>
>     </class>
> </library>
>
> Then create index.lzx that uses the previous class
> <canvas>
>     <include href="mytext.lzx"/>
>     <mytext/>
> </canvas>
>
> Now compile
>
> lzc --dir somewhere --output index.swf index.lzx
>
> All is fine and works as expected.
> Now let's compile mytext.lzx into lzo library
> (using also -a switch)
>
> lzc -c -a --dir laszlo_home/lps/components --output mytext.lzo mytext.lzx
>
> Now we have laszlo_home/lps/components/mytext.lzo
> as expected.
>
> Then let's try to compile index.lzx against that library.
> Change index.lzx to:
> <canvas>
>     <include href="mytext.lzo"/>
>     <mytext/>
> </canvas>
>
> and run
> lzc --dir somewhere --output index.swf index.lzx
>
> And that's when you should be getting the error I reported.
>
> - rami
>
> On 09/09/2011 07:25 PM, Donald Anderson wrote:
>
> Hi Rami,
> Sorry for the late reply.  This is being tracked in
> JIRA: http://jira.openlaszlo.org/jira/browse/LPP-10066
> I haven't seen this, and I'm not aware of any recent changes to the compiler
> in that area.
> I just ran the lzunit test suite ('ant runlzunit' from the top level).  That
> does several lzo compilations and linking
> against them in various combinations, and that ran clean.
> I have not tried putting an lzo file into lps/components, perhaps that is
> confusing things.
> Any chance you could put together a test case that fails this way?
>  Including steps to compile it, move it, link against it?
> Thanks!
> - Don
> On Sep 5, 2011, at 6:23 AM, Rami Ojares / AMG wrote:
>
> Hi,
>
> Now I started getting the following error
>
> Exception in thread "main" java.lang.NullPointerException
>    at
> org.openlaszlo.compiler.CompilationEnvironment.addLZOFile(CompilationEnvironment.java:308)
>    at
> org.openlaszlo.compiler.DefaultFileResolver.resolveInternal(FileResolver.java:206)
>    at
> org.openlaszlo.compiler.DefaultFileResolver.resolve(FileResolver.java:110)
>    at org.openlaszlo.compiler.Parser.expandIncludes(Parser.java:646)
>    at org.openlaszlo.compiler.Parser.readExpanded(Parser.java:418)
>    at org.openlaszlo.compiler.Parser.parse(Parser.java:707)
>    at org.openlaszlo.compiler.Compiler.compile(Compiler.java:386)
>    at org.openlaszlo.compiler.Compiler.compile(Compiler.java:208)
>    at org.openlaszlo.compiler.Main.compile(Main.java:399)
>    at org.openlaszlo.compiler.Main.lzc(Main.java:339)
>    at org.openlaszlo.compiler.Main.main(Main.java:105)
>
> This happens when linking against my own lzo library that is located at
> lps/components
>
> The method where the npe occurs looks like this
>
> public void addLZOFile(File lzo) {
>    getGenerator().addLZOFile(lzo);
> }
>
> So it must be the getGenerator that returns null.
>
> SWF writer that compilation within this
> * environment writes to.
> * @return the object writer
> */
> ObjectWriter getGenerator() {
>    return mObjectWriter;
> }
>
> so mObjectWriter is somehow null.
> This problem does not arise when compiling the library.
>
> Was this caused by some recent change or something?
>
> - rami
>
>
>
> --
> Don Anderson
> Java/C/C++, Berkeley DB, systems consultant
>
> voice: 617-306-2057
> email: [email protected]
> www: http://www.ddanderson.com
> blog: http://libdb.wordpress.com
>
>
>
>
>
>

Reply via email to