[1.2.4] Press 1.2.6 module troubleshooting help

120 views
Skip to first unread message

Jesper Rønn-Jensen

unread,
Jun 12, 2012, 4:46:54 PM6/12/12
to play-fr...@googlegroups.com



I installed Press 1.2.6 and want to use it both for my CSS and JS.

CSS works fine (even for images and fonts refered in the stylesheet) ^1

JS, however outputs an "empty" file. The only content of the file is

    /*Press 1.2.6*/


Since CSS just work, i tend to believe that my routes are configured correctly. I also have added the "#{press.compressed-script /}" in my template.

I also browsed my play.log, but nothing jumped in my eyes.

I could use some troubleshooting tips. Where should I look for tips and which tricks should i try to figure out what goes wrong.
 
Any links, pointers, troubleshooting tips would be appreciated :)

/Jesper Rønn-Jensen

Jesper Rønn-Jensen

unread,
Jun 12, 2012, 7:08:49 PM6/12/12
to play-fr...@googlegroups.com
I had a little progess>


in case I forget to write 'src:' in front of the filename, then the compressed file will be empty:

This will not work:
#{press.script 'file.js'}
This works (sort of):
#{press.script src: 'file.js'}


So, first troubleshooting tip is to remember syntax #{press.script src: ...}



The reason I write "sort of works" above is this: I still only get included my js files in special occations.

This file, for instance, only gets included if i set "compress: false":

#{script src:'thirdparty/jquery/jquery-1.4.2.min.js', compress:false /}

..and it will not be included if i omit the part saying "compress:false"



Strangely enough, I have other js files which will not be included -- not even with compress:false.


Occasionally I see this trace in the log



@6ak6ob3hj
Internal Server Error (500) for request GET /press/js/XBYMYYEAsgTpgAmYDPhCfgJJ.js

Execution exception (In {module:press-1.0.26}/app/press/JSCompressor.java around line 46)
NoSuchFieldError occured : org/mozilla/javascript/DefaultErrorReporter.instanceLorg/mozilla/javascript/DefaultErrorReporter;

play.exceptions.JavaExecutionException: org/mozilla/javascript/DefaultErrorReporter.instanceLorg/mozilla/javascript/DefaultErrorReporter;
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:231)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NoSuchFieldError: org/mozilla/javascript/DefaultErrorReporter.instanceLorg/mozilla/javascript/DefaultErrorReporter;
at org.mozilla.javascript.CompilerEnvirons.<init>(CompilerEnvirons.java:48)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:310)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at press.JSCompressor$1.compress(JSCompressor.java:46)
at press.Compressor.compress(Compressor.java:412)
at press.Compressor.writeCompressedFile(Compressor.java:345)
at press.Compressor.getCompressedFile(Compressor.java:323)
at press.Compressor.getCompressedFile(Compressor.java:291)
at press.JSCompressor.getCompressedFile(JSCompressor.java:32)
at controllers.press.Press.getCompressedJS(Press.java:26)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:548)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
... 1 more



Any other troubleshooting tips for this problem?

/Jesper

Dirk

unread,
Jun 15, 2012, 4:22:47 AM6/15/12
to play-fr...@googlegroups.com
Thanks for the bug report. Could you please create an issue at
and I'll take a look
Thanks
Dirk

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/wa8ql47ArhoJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Jesper Rønn-Jensen

unread,
Jun 15, 2012, 5:02:14 AM6/15/12
to play-fr...@googlegroups.com
Dirk,

Thanks for the heads up.

I am not sure if I can describe my situation in more details yet.... Do you know if there is a way I can provide you with some more debug info? 

How can I make Press output more debug messages? My logs do not contain any "smoking gun" as to what goes wrong?

/Jesper
--

Jesper Rønn-Jensen
NineConsult

jesp...@gmail.com (Private e-mail and Google Talk IM)


Dirk

unread,
Jun 19, 2012, 2:58:47 PM6/19/12
to play-fr...@googlegroups.com
Hey Jesper,
I've updated press after some bug reports from other people, please give the newest version a try and let me know if it works better for you. If you are using the less module you might have some trouble, in that case try removing that module and using press to process less files instead.
Cheers,
Dirk

Jesper Rønn-Jensen

unread,
Jun 20, 2012, 10:00:08 AM6/20/12
to play-fr...@googlegroups.com
Dirk, thanks for your heads up. I will give the new version a try in next week when I am back from conference.

I am not using Less, so that can not have helped me. Press would benefit from better error statements in case something blows up (like it did in my case).  Do you have any ideas on how to improve error messages?

/Jesper

Jesper Rønn-Jensen

unread,
Jun 26, 2012, 3:53:08 PM6/26/12
to play-fr...@googlegroups.com
Dirk,

Both Press 1.0.32 and 1.0.31 fails in my setup. The application fails to start at all. I am not using Less and have no Less dependencies.

Could there be a dependency missing to be declared?

Did you try it or test it without Less?

/Jesper


On Tuesday, June 19, 2012 8:58:47 PM UTC+2, Dirk wrote:
Hey Jesper,
I've updated press after some bug reports from other people, please give the newest version a try and let me know if it works better for you. If you are using the less module you might have some trouble, in that case try removing that module and using press to process less files instead.
Cheers,
Dirk

On Fri, Jun 15, 2012 at 11:02 AM, Jesper Rønn-Jensen  wrote:
Dirk,

Thanks for the heads up.

I am not sure if I can describe my situation in more details yet.... Do you know if there is a way I can provide you with some more debug info? 

How can I make Press output more debug messages? My logs do not contain any "smoking gun" as to what goes wrong?

/Jesper




Dirk  wrote:
Thanks for the bug report. Could you please create an issue at
and I'll take a look
Thanks
Dirk


--

Reply all
Reply to author
Forward
0 new messages