YUI Compressor Fatal Error

160 views
Skip to first unread message

Peter Robinett

unread,
Oct 5, 2009, 1:23:12 PM10/5/09
to Lift
Hi all,

I've been compiling and running my Lift app on my personal machine
without any problems but when I try to run it on another machine
(where it had previously worked), I am getting fatal YUI Compressor
errors.

Not knowing YUI Compressor or how Lift and Maven use it (but willing
to learn!), I'd appreciate any tips on how to get it to work again.

Thanks in advance,
Peter Robinett

PS I thought I already posted a version of this message but I don't
see it on the Groups site. My apologies if this message is a
duplicate.

$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]
------------------------------------------------------------------------
[INFO] Building server
[INFO] task-segment: [jetty:run]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing jetty:run
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [yuicompressor:compress {execution: default}]
[INFO] equalnetworks.css (267b) -> equalnetworks.css (197b)[73%]
[INFO] dashboard.css (5511b) -> dashboard.css (4478b)[81%]
[INFO] jquery.tooltip.css (172b) -> jquery.tooltip.css (145b)[84%]
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException
at
com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber
(JavaScriptCompressor.java:299)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse
(JavaScriptCompressor.java:335)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>
(JavaScriptCompressor.java:532)
at net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile
(YuiCompressorMojo.java:178)
at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir
(MojoSupport.java:151)
at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute
(MojoSupport.java:105)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:558)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle
(DefaultLifecycleExecutor.java:924)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle
(DefaultLifecycleExecutor.java:767)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:529)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal
(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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:616)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:
315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Oct 05 17:18:57 UTC 2009
[INFO] Final Memory: 27M/66M
[INFO]
------------------------------------------------------------------------

jon

unread,
Oct 5, 2009, 1:25:41 PM10/5/09
to Lift
Is there a syntax problem in one of your javascript files?

Ross Mellgren

unread,
Oct 5, 2009, 1:32:36 PM10/5/09
to lif...@googlegroups.com
I thought someone mentioned this a little while ago and it was due to
OpenJDK (and only related to the YUI compressor)?

-Ross

Peter Robinett

unread,
Oct 5, 2009, 4:10:41 PM10/5/09
to Lift
Ross, I am using OpenJDK:
$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)
OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

Is it possible to use YUI Compressor at all with OpenJDK?

Peter

Ross Mellgren

unread,
Oct 5, 2009, 4:17:20 PM10/5/09
to lif...@googlegroups.com
I don't remember hearing any solution that involved staying with
OpenJDK in the original thread -- I personally use the Sun JDK and so
never noticed this problem.

With ubuntu you can add the Sun JDK by installing the sun-java-6-jdk
package. Then you have to fiddle with /etc/alternatives to repoint at
it.

-Ross

David Pollak

unread,
Oct 5, 2009, 6:10:29 PM10/5/09
to lif...@googlegroups.com
I'm setting up an OpenJDK ubuntu instance to test
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

Peter Robinett

unread,
Oct 5, 2009, 7:34:58 PM10/5/09
to Lift
Such service! Thanks, David.

On Oct 6, 12:10 am, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> Beginning Scalahttp://www.apress.com/book/view/1430219890

David Pollak

unread,
Oct 5, 2009, 8:06:45 PM10/5/09
to lif...@googlegroups.com
dpp@david-desktop:~/Desktop/liftweb/examples/example$ java -version
Picked up JAVA_TOOL_OPTIONS: -Xmx1024M
java version "1.6.0_0"
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK Client VM (build 1.6.0_0-b11, mixed mode, sharing)
dpp@david-desktop:~/Desktop/liftweb/examples/example$

I'm running on Ubuntu 8.04 with the OpenJDK installation.

I get compilation failures on about half the runs.  They appear to be random.

Scala Actors do not work (I'm not trying to throw gasoline on any fires, just reporting what I'm seeing) when powering Lift's comet stuff.  However, Lift Actors do work.

I'm not seeing any explicit issues with other libraries.

What OS are you running under your OpenJDK installation?

On Mon, Oct 5, 2009 at 1:10 PM, Peter Robinett <pe...@bubblefoundry.com> wrote:



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890

Ross Mellgren

unread,
Oct 5, 2009, 8:19:07 PM10/5/09
to lif...@googlegroups.com
According to his version number he's running ubuntu and that particular version corresponds to jaunty jackalope (9.04)

Unless he spliced that package into debian or something else.

-Ross

David Bernard

unread,
Oct 6, 2009, 2:50:29 AM10/6/09
to lif...@googlegroups.com
yuicompressor 2.3.x doesn't work with openjdk
(https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/287035)
But it seems that yuicompressor 2.4.2 works
(http://www.electrictoolbox.com/minify-javascript-css-yui-compressor/)

It's a long time I didn't update yuicompressor-maven-plugin. I'll
deploy a new version latter this week.

/davidB

Peter Robinett

unread,
Oct 6, 2009, 4:39:48 AM10/6/09
to Lift
Thanks, all. While David Bernard's plan to update the maven plugin is
very welcome, the fact that Scala Actors don't work for Comet actors
suggests that I should switch to the Sun JVM.

Peter
> > Beginning Scalahttp://www.apress.com/book/view/1430219890

David Pollak

unread,
Oct 6, 2009, 1:10:27 PM10/6/09
to lif...@googlegroups.com
On Tue, Oct 6, 2009 at 1:39 AM, Peter Robinett <pe...@bubblefoundry.com> wrote:

Thanks, all. While David Bernard's plan to update the maven plugin is
very welcome, the fact that Scala Actors don't work for Comet actors
suggests that I should switch to the Sun JVM.

Keep in mind I was on Ubuntu 8.04 (granted this is the LTS version).

I'll try on 9.04 today.



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890

Peter Robinett

unread,
Oct 8, 2009, 8:23:00 AM10/8/09
to Lift
Hi all,

I just switched to the Sun JVM and everything works now, so it
definitely was OpenJDK. Oh well.

Peter

Dirk Louwers

unread,
Oct 8, 2009, 8:46:14 AM10/8/09
to Lift
Hi,

I am running 9.04 and have used a workaround to fix the YUI compressor
issue.

See: https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255149

If I remember correctly I romoved a symlink to the rhino jar from /usr/
lib/jvm/java-6-openjdk/jre/lib and that fixed it (without any
noticable side-effects so far).

Best,

Dirk

David Bernard

unread,
Oct 25, 2009, 12:17:26 PM10/25/09
to lif...@googlegroups.com
FYI:

I released a new version of yuicompressor-maven-plugin (same code but
use yuicompressor-2.4.2)
Note that the groupId was changed, and that the plugin is not yet
available on central repo :

<repository>
<name>oss.sonatype.org - github-releases</name>
<id>oss.sonatype.org-releases</id>
<url>http://oss.sonatype.org/content/repositories/github-releases</url>
</repository>

...

<dependency>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>0.9</version>
</dependency>

If you have some trouble, issue, use the githug issue tracker :
http://github.com/davidB/yuicompressor-maven-plugin/issues

/davidB
Reply all
Reply to author
Forward
0 new messages