Java compilation issues as of 2d62593f14

12 views
Skip to first unread message

Joel Hughes

unread,
Nov 15, 2017, 2:09:35 PM11/15/17
to foam-framework-discuss
Attempting to compile FOAM Java to deploy to GAE, first time in a while, and running into a few compilation failures.

Error: ENOENT: no such file or directory, open '/Users/jhughes/workspace/jbbmobile/repos/seadm/node_modules/foam2/build/README.md'

What is the process for running jsdoc - assuming this is what I need to generate the README.md?


/Users/jhughes/workspace/jbbmobile/repos/seadm/build/foam-java-bin.js:41591
foam.__context__.registerElement(foam.u2.tag.Image);
                 ^

TypeError: foam.__context__.registerElement is not a function


Thanks
Joel

Joel Hughes

unread,
Nov 17, 2017, 1:20:09 PM11/17/17
to foam-framework-discuss
OK, down to the following issue, if it rings any bells for anyone.

building sefoam2
generating java to /Users/jhughes/workspace/jbbmobile/repos/seadm/build/src/java
core boot time:  15
/Users/jhughes/workspace/jbbmobile/repos/seadm/build/foam-java-bin.js:43680
      this.window.addEventListener('load', this.onLoad, false);
                  ^

TypeError: this.window.addEventListener is not a function

Thanks
Joel

Joel Hughes

unread,
Nov 17, 2017, 2:06:16 PM11/17/17
to foam-framework-discuss
Refactored my build to call out to foam's maven for it's build, using foams genjava and classes.js layout for my projects which include using foam.js and nanos.js instead of my build of foam in my genjava. 

Down to the following:
assert.js:41
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: Could not find any registered class for foam.u2.ActionView
    at Console.assert (console.js:188:23)
    at Object.assert (/Users/jhughes/workspace/jbbmobile/repos/seadm/node_modules/foam2/src/foam/core/lib.js:81:13)

Added foam.u2.ActionView to classes but no change.

Joel

Joel Hughes

unread,
Nov 17, 2017, 10:23:12 PM11/17/17
to foam-framework-discuss
Resolved the ActionView issue. We refine it and it required a flags: ['js'] to suppress the java generation. 
Now on to the next issue:

/Users/jhughes/workspace/jbbmobile/repos/seadm/build/sefoam-java-bin.js:3708
            value: foam.u2.ControllerMode.EDIT
                                         ^

TypeError: Cannot read property 'EDIT' of undefined
    at Object.<anonymous> (/Users/jhughes/workspace/jbbmobile/repos/seadm/build/sefoam-java-bin.js:3708:42)

Joel

Kevin Greer

unread,
Nov 17, 2017, 11:26:34 PM11/17/17
to Joel Hughes, foam-framework-discuss
ControllerMode is an enum defined at the top of Element.js, so whatever file is referring to ControllerMode.EDIT should be loaded after Element.js.

--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joel Hughes

unread,
Nov 17, 2017, 11:45:35 PM11/17/17
to foam-framework-discuss
Resolved.  Figuring out ControllerMode which we use in a refine of a foam class revealed that the issue was occurring for every refine we made of a foam class.  So in our classes.js we need flag: ['js'] to suppress the java processing.  It didn't occur to me after ActionView earlier. 
All good now. 
Thanks for letting me type out loud to someone. 

Joel 
Reply all
Reply to author
Forward
0 new messages