Re: [jasmine-js] Re: Strange FileNotFoundException

248 views
Skip to first unread message

Sean Landis

unread,
Oct 25, 2012, 8:44:25 PM10/25/12
to jasmi...@googlegroups.com
Hi Tyler,
Yeah, Jasmine has totally confounded me. We must get together and commiserate.
Sean

On Tue, Oct 23, 2012 at 9:59 AM, Tyler Perkins <perkin...@gmail.com> wrote:
> Hey Sean,
> What a coincidence! Looks like we are having the same issue.
>
> My model object:
>
> UserInfo = Backbone.Model.extend({
> urlRoot : 'secure/users/current'
> });
>
> I also have nothing in my spec, so it is most likely happening when the test
> is being setup. Below is the error.
>
> Oct 23, 2012 9:47:40 AM
> com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController
> processSynchron
> INFO: Re-synchronized call to
> file:/home/tperkins/workspace/..../target/jasmine/secure/users/current
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 31.897s
> [INFO] Finished at: Tue Oct 23 09:47:40 MDT 2012
> [INFO] Final Memory: 44M/289M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> com.github.searls:jasmine-maven-plugin:1.2.0.0:test (default) on project
> PcsUI-webapp: The jasmine-maven-plugin encountered an exception:
> [ERROR] java.lang.RuntimeException: org.openqa.selenium.WebDriverException:
> com.gargoylesoftware.htmlunit.ScriptException: Exception invoking
> jsxGet_responseText
> [ERROR] Build info: version: '2.25.0', revision: '17482', time: '2012-07-18
> 22:18:01'
> [ERROR] System info: os.name: 'Linux', os.arch: 'amd64', os.version:
> '3.2.0-32-generic', java.version: '1.6.0_23'
> [ERROR] Driver info: driver.version: HtmlUnitDriver
> [ERROR] at
> com.github.searls.jasmine.runner.SpecRunnerExecutor.execute(SpecRunnerExecutor.java:40)
> [ERROR] at com.github.searls.jasmine.TestMojo.executeSpecs(TestMojo.java:57)
>
> ...........
>
> [ERROR] at
> com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:589)
> [ERROR] ... 44 more
> [ERROR] Caused by: java.lang.RuntimeException:
> java.io.FileNotFoundException:
> /home/tperkins/workspace/..../target/jasmine/secure/users/current (No such
> file or directory)
> [ERROR] at
> com.gargoylesoftware.htmlunit.WebResponseData.getInputStream(WebResponseData.java:154)
> [ERROR] at
> com.gargoylesoftware.htmlunit.WebResponse.getContentAsStream(WebResponse.java:217)
> [ERROR] at
> com.gargoylesoftware.htmlunit.WebResponse.getContentCharsetOrNull(WebResponse.java:156)
> [ERROR] at
> com.gargoylesoftware.htmlunit.WebResponse.getContentCharset(WebResponse.java:172)
>
>
>
> On Monday, August 27, 2012 1:08:49 PM UTC-6, Sean Landis wrote:
>>
>> I am running Jasmine using the Maven plugin. I have a model:
>>
>> /*global _ Backbone */
>>
>> var Configuration = Configuration||{}; // Create or use the Configuration
>> app namespace.
>>
>> Configuration.Models = (function() {
>>
>> var WhoAmI = Backbone.Model.extend({
>> defaults : {
>> userName : "",
>> name : "",
>> environment : "",
>> hostName : "",
>> modifyAuthorized : false,
>> logoutUri : window.location
>> },
>>
>> urlRoot : "apps/whoami"
>> });
>>
>> var Application = Backbone.Model.extend({
>> defaults : {
>> name : null,
>> lastConfigMod : null,
>> createdByNOC : false
>> },
>>
>> isGlobal : function() {
>> return this.get('name') === "global";
>> },
>>
>> toString: function() {
>> return 'Application{name: ' + this.get('name') + ', lastConfigMod: '
>> + this.get('lastConfigMod') + ', createdByNoc: '
>> + this.get('createdByNoc') + '}';
>> },
>>
>> urlRoot : "apps",
>> idAttribute : "name"
>> });
>>
>> var ApplicationList = Backbone.Collection.extend({
>>
>> toString: function() {
>> return 'ApplicationList';
>> },
>>
>> model : Application,
>> url : "apps"
>> });
>> ...
>>
>> I have a spec that does almost nothing, and I don't think it's even
>> getting loaded before the following error occurs:
>>
>> [INFO] --- jasmine-maven-plugin:1.1.0:test (default) @
>> Configuration-webapp ---
>> [INFO] Executing Jasmine Specs
>> Aug 27, 2012 12:20:57 PM
>> com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController
>> processSynchron
>> INFO: Re-synchronized call to
>> file:/Users/slandis/workspace/Configuration/Configuration-webapp/target/jasmine/apps/whoami
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 45.407s
>> [INFO] Finished at: Mon Aug 27 12:20:57 MDT 2012
>> [INFO] Final Memory: 23M/81M
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> com.github.searls:jasmine-maven-plugin:1.1.0:test (default) on project
>> Configuration-webapp: The jasmine-maven-plugin encountered an exception:
>> [ERROR] java.lang.RuntimeException:
>> org.openqa.selenium.WebDriverException:
>> com.gargoylesoftware.htmlunit.ScriptException: Exception invoking
>> jsxGet_responseText
>> [ERROR] Build info: version: '2.11.0', revision: '14435', time:
>> '2011-10-28 18:01:56'
>>
>> ....a bunch deleted...
>>
>> [ERROR] at
>> net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:429)
>> [ERROR] at
>> com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:267)
>> [ERROR] at
>> net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3183)
>> [ERROR] at
>> net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
>> [ERROR] at
>> com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:538)
>> [ERROR] at
>> com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:589)
>> [ERROR] ... 44 more
>> [ERROR] Caused by: java.lang.RuntimeException:
>> java.io.FileNotFoundException:
>> /Users/slandis/workspace/Configuration/Configuration-webapp/target/jasmine/apps/whoami
>> (No such file or directory)
>>
>>
>> The above file path is getting keyed off the rootUrl of the WhoAmI model
>> object. Why is this happening and how to I prevent it?
>> Let me point out that WhoAmI has a rootUrl of "apps/whoami",
>> ApplicationList has a url of "apps" and contains the Application model. I
>> wonder if WhoAmI being under "apps" is causing a problem?
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jasmine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/jasmine-js/-/4wczyfvSuLcJ.
> To post to this group, send email to jasmi...@googlegroups.com.
> To unsubscribe from this group, send email to
> jasmine-js+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jasmine-js?hl=en.
Reply all
Reply to author
Forward
0 new messages