Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

data-uri function #54

Open
idashevskii opened this issue Jun 9, 2014 · 2 comments
Open

data-uri function #54

idashevskii opened this issue Jun 9, 2014 · 2 comments

Comments

@idashevskii
Copy link

  1. If is not absolute path in data-uri() funciton, the plugin cant found it, because it works with /tmp/file.less copy.
  2. If is absolute path, it also not works:
Compiling LESS source: viewer_dark.less...
/home/***/src/main/java/../webapp/less/main/viewer_dark.less [0:0]: Error compiling LESS source
org.lesscss.LessException: RuntimeError: error evaluating function `data-uri`: Cannot convert org.mozilla.javascript.NativeArray@103af23c to byte[] (jar:file:/home/***/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js#145) in /tmp/tmp6500585619073531749less.tmp on line 382, column 44:
381     
382     .pv-clear-all,.pv-cat-clear{background:data-uri("@{embedImgBase}/clear.png") no-repeat 50% 50%;}
383     .pv-clear-all{width:60px; margin:0 0 4px 0; padding:0 5px; line-height:24px; float:right; color:@color-control-text-dark2; background-position:54px 50% ;visibility:hidden;}

    at org.lesscss.LessCompiler.compile(LessCompiler.java:423)
    at org.lesscss.LessCompiler.compile(LessCompiler.java:330)
    at org.lesscss.LessCompiler.compile(LessCompiler.java:474)
    at org.lesscss.LessCompiler.compile(LessCompiler.java:498)
    at org.lesscss.mojo.CompileMojo.compileIfChanged(CompileMojo.java:187)
    at org.lesscss.mojo.CompileMojo.executeInternal(CompileMojo.java:157)
    at org.lesscss.mojo.CompileMojo.execute(CompileMojo.java:122)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.mozilla.javascript.JavaScriptException: Error: RuntimeError: error evaluating function `data-uri`: Cannot convert org.mozilla.javascript.NativeArray@103af23c to byte[] (jar:file:/home/***/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js#145) in /tmp/tmp6500585619073531749less.tmp on line 382, column 44:
381     
382     .pv-clear-all,.pv-cat-clear{background:data-uri("@{embedImgBase}/clear.png") no-repeat 50% 50%;}
383     .pv-clear-all{width:60px; margin:0 0 4px 0; padding:0 5px; line-height:24px; float:right; color:@color-control-text-dark2; background-position:54px 50% ;visibility:hidden;}
(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js#9361)
    at org.mozilla.javascript.gen.jar_file__home_accelerate__m2_repository_org_lesscss_lesscss_1_7_0_1_1_lesscss_1_7_0_1_1_jar__META_INF_less_rhino_1_7_0_js_1._c_writeError_660(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js:9361)
    at org.mozilla.javascript.gen.jar_file__home_accelerate__m2_repository_org_lesscss_lesscss_1_7_0_1_1_lesscss_1_7_0_1_1_jar__META_INF_less_rhino_1_7_0_js_1.call(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
    at org.mozilla.javascript.gen.jar_file__home_accelerate__m2_repository_org_lesscss_lesscss_1_7_0_1_1_lesscss_1_7_0_1_1_jar__META_INF_less_rhino_1_7_0_js_1._c_anonymous_665(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js:9746)
    at org.mozilla.javascript.gen.jar_file__home_accelerate__m2_repository_org_lesscss_lesscss_1_7_0_1_1_lesscss_1_7_0_1_1_jar__META_INF_less_rhino_1_7_0_js_1.call(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js)
    at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
    at org.mozilla.javascript.gen.jar_file__home_accelerate__m2_repository_org_lesscss_lesscss_1_7_0_1_1_lesscss_1_7_0_1_1_jar__META_INF_less_rhino_1_7_0_js_1._c_script_0(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js:9448)
    at org.mozilla.javascript.gen.jar_file__home_accelerate__m2_repository_org_lesscss_lesscss_1_7_0_1_1_lesscss_1_7_0_1_1_jar__META_INF_less_rhino_1_7_0_js_1.call(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
    at org.mozilla.javascript.gen.jar_file__home_accelerate__m2_repository_org_lesscss_lesscss_1_7_0_1_1_lesscss_1_7_0_1_1_jar__META_INF_less_rhino_1_7_0_js_1.call(jar:file:/home/accelerate/.m2/repository/org/lesscss/lesscss/1.7.0.1.1/lesscss-1.7.0.1.1.jar!/META-INF/less-rhino-1.7.0.js)
    at org.lesscss.LessCompiler.compile(LessCompiler.java:383)
    ... 27 more
------------------------------------------------------------------------
BUILD FAILURE
@codler
Copy link

codler commented Sep 13, 2014

I do also get that error

@Sergey63
Copy link

Hi.
I also caught the problem. Someone has solved this case?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants