Exception while applying LessCssProcessor processor

232 views
Skip to first unread message

Alex Black

unread,
Feb 28, 2012, 4:09:53 PM2/28/12
to wro4j
I'm just getting started with wro4j, trying to get LESS css processing
working, I'm requesting http://localhost:8080/wro/all.css, and getting
this exception:

(I get CSS returned to me, but it hasn't been processed yet by LESS)

WARN [2012-02-28 21:07:45,588] [229532758@qtp0-0]
ro.isdc.wro.extensions.processor.css.LessCssProcessor: null -
Exception while applying LessCssProcessor processor on the
[classpath:toserve/css/core.css] resource, no processing applied...
! ro.isdc.wro.WroRuntimeException: Processing error
! at
ro.isdc.wro.extensions.processor.support.less.LessCss.initScriptBuilder(LessCss.java:
59)
! at
ro.isdc.wro.extensions.processor.support.less.LessCss.less(LessCss.java:
78)
! at
ro.isdc.wro.extensions.processor.css.LessCssProcessor.process(LessCssProcessor.java:
131)
! at ro.isdc.wro.model.group.processor.PreProcessorExecutor
$3.process(PreProcessorExecutor.java:235)
! at ro.isdc.wro.model.group.processor.PreProcessorExecutor
$2.process(PreProcessorExecutor.java:215)
! at
ro.isdc.wro.model.group.processor.PreProcessorExecutor.applyPreProcessors(PreProcessorExecutor.java:
174)
! at
ro.isdc.wro.model.group.processor.PreProcessorExecutor.processAndMerge(PreProcessorExecutor.java:
82)
! at ro.isdc.wro.model.group.processor.GroupsProcessor
$1.processAndMerge(GroupsProcessor.java:78)
! at
ro.isdc.wro.model.group.processor.GroupsProcessor.process(GroupsProcessor.java:
59)
! at
ro.isdc.wro.manager.WroManager.getContentHashEntry(WroManager.java:
287)
! at
ro.isdc.wro.manager.WroManager.serveProcessedBundle(WroManager.java:
176)
! at ro.isdc.wro.manager.WroManager.process(WroManager.java:129)
! at ro.isdc.wro.http.WroFilter.processRequest(WroFilter.java:364)
! at ro.isdc.wro.http.WroFilter.doFilter(WroFilter.java:314)
! at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1115)
! at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
361)
! at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
! at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
! at
org.mortbay.jetty.handler.ContextHandler.__handle(ContextHandler.java:
766)
! at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java)
! at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
! at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
! at org.mortbay.jetty.Server.handle(Server.java:324)
! at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
! at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:864)
! at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
! at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
! at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
! at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
! at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:522)
! Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call
property getLogger in object [JavaPackage org.slf4j.LoggerFactory]. It
is not a function, it is "object". (common.js#5)
! at
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:
3654)
! at
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:
3632)
! at
org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:
3660)
! at
org.mozilla.javascript.ScriptRuntime.typeError3(ScriptRuntime.java:
3686)
! at
org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:
3746)
! at
org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:
2247)
! at
org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:
2214)
! at
org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:
3143)
! at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:
2487)
! at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:
164)
! at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:
398)
! at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
3065)
! at
org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:
175)
! at org.mozilla.javascript.Context.evaluateReader(Context.java:1135)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.evaluateChain(RhinoScriptBuilder.java:
117)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.addClientSideEnvironment(RhinoScriptBuilder.java:
84)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.newClientSideAwareChain(RhinoScriptBuilder.java:
215)
! at
ro.isdc.wro.extensions.processor.support.less.LessCss.initScriptBuilder(LessCss.java:
48)
! ... 29 more

Alex Objelean

unread,
Feb 28, 2012, 4:17:08 PM2/28/12
to wr...@googlegroups.com
Can you show me the content of less file causing the problem?

The LessCssProcessor works this way: if the processing fails, it assumes that it is not a valid less file and leaves the output unchanged for next processor in chain.

Alex

Alex Black

unread,
Feb 28, 2012, 4:21:58 PM2/28/12
to wr...@googlegroups.com
Sure.. but, if it was a problem with the file, wouldn't it say so?  Or, are you thinking its trying to say so, but encountering an exception while logging the error?

Its this css file:


with an attempt at using less syntax added at the top:

@color: #4D926F;

#header {
  color: @color;

Alex Black

unread,
Feb 28, 2012, 4:24:53 PM2/28/12
to wro4j
I get the same problem with a new foo.css with just these contents:

@color: #4D926F;

#header {
color: @color;
}

On Feb 28, 4:21 pm, Alex Black <a...@alexblack.ca> wrote:
> Sure.. but, if it was a problem with the file, wouldn't it say so?  Or, are
> you thinking its trying to say so, but encountering an exception while
> logging the error?
>
> Its this css file:
>
> http://sortable.com/cacheable/css/core.css?h=6e4e8b907c7772c10aff9a62...

Alex Objelean

unread,
Feb 28, 2012, 4:28:43 PM2/28/12
to wr...@googlegroups.com
I created a test locally for processor and it works ok. I get the following result:

#header {
  color: #4d926f;
}

The exception is saying that it cannot process the classpath:toserve/css/core.css resource. Are you sure that core.css is a valid less file?

Alex

Alex Black

unread,
Feb 28, 2012, 4:31:44 PM2/28/12
to wro4j
I'm trying with my new foo.css, and I get the same error:

WARN [2012-02-28 21:26:47,915] [388704749@qtp0-0]
ro.isdc.wro.extensions.processor.css.LessCssProcessor: null -
Exception while applying LessCssProcessor processor on the
[classpath:toserve/css/foo.css] resource, no processing applied...

Foo.css is:

@color: #4D926F;

#header {
color: @color;
}



On Feb 28, 4:28 pm, Alex Objelean <alex.objel...@gmail.com> wrote:
> I created a test locally for processor and it works ok. I get the following
> result:
>
> #header {
>   color: #4d926f;
>
> }
>
> The exception is saying that it cannot process the *classpath:
> toserve/css/core.**css* resource. Are you sure that core.css is a valid
> less file?
>
> Alex

Alex Black

unread,
Feb 28, 2012, 4:34:03 PM2/28/12
to wro4j
Any thoughts on the exception?

Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call
property getLogger in object [JavaPackage org.slf4j.LoggerFactory]. It
is not a function, it is "object". (common.js#5)

It seems like some code (perhaps in Javascript?) is trying to use
slf4j?

Alex Black

unread,
Feb 28, 2012, 4:38:50 PM2/28/12
to wr...@googlegroups.com
Based on the exception it doesn't look like its failing on processing the CSS, rather its failing to setup rhino with less.js?

Alex Objelean

unread,
Feb 28, 2012, 4:38:52 PM2/28/12
to wr...@googlegroups.com
Yes :). 
The slf4j dependency is mandatory. The print javascript method is redefined and its implementation looks like this:
function print(message) {
org.slf4j.LoggerFactory.getLogger("Rhino").debug(message);
}

As a second thought, I think this can be disabled somehow. Probably will open an issue for that.
Is it a problem for you to add the slf4j dependency to classpath?

Alex

Alex Black

unread,
Feb 28, 2012, 4:41:28 PM2/28/12
to wro4j
I do have a slf4j dependency already as it happens, but maybe its not
the same as what is required by wro4j?

I have this:

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.8</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.8</version>
<scope>runtime</scope>
</dependency>

Alex Objelean

unread,
Feb 28, 2012, 4:42:35 PM2/28/12
to wr...@googlegroups.com
The main code-base is on github. The source form google code is a little bit outdated (have to sync it).

Alex

Alex Objelean

unread,
Feb 28, 2012, 4:45:30 PM2/28/12
to wr...@googlegroups.com
Hmmm.. strange.

I'm using slf4j-api-1.6.2. But this shouldn't make any difference. 
Can you debug the problem and let me know about the real cause of exception? 

Thanks,
Alex

Alex Black

unread,
Feb 28, 2012, 4:48:50 PM2/28/12
to wr...@googlegroups.com
I can try to debug, can you give me some pointers on what to do?  e.g. the exception is coming from ScriptRuntime.java:3654, in Rhino, it seems unlikely to me I'm going to learn more debugging it.

Is it possible this is the real exception?  

Alex Black

unread,
Feb 28, 2012, 4:53:06 PM2/28/12
to wro4j
ok, I'm debugging it, I've got a breakpoint in ScriptRuntime.java line
3647. here are the local variables:

error "TypeError" (id=69)
message "Cannot call property getLogger in object [JavaPackage
org.slf4j.LoggerFactory]. It is not a function, it is
"object"." (id=74)
sourceName "common.js" (id=75)
lineNumber 5
lineSource null
columnNumber 0

Alex Objelean

unread,
Feb 28, 2012, 4:58:20 PM2/28/12
to wr...@googlegroups.com
Ok, now the problem is located. Still don't understand why you get the error. 
Something has to be different on your environment... maybe try to update the slf4j version to 1.6.2 or latest?

Could you checkout the wro4j-demo and reproduce there the problem? 
I just created a branch called lessProblem on github. Checkout the wro4j-demo project (located under wro4j-examples folder) and request the following uri: /wro/less.css

Let me know if you get the problem with the demo application.

Thanks,
Alex

Alex Black

unread,
Feb 28, 2012, 4:59:40 PM2/28/12
to wr...@googlegroups.com
I updated to 1.6.2 (and also tried 1.6.4 used in the source), no difference.

sure, I'll try out wro4j-demo

Alex Black

unread,
Feb 28, 2012, 5:08:11 PM2/28/12
to wr...@googlegroups.com
What steps should I be following?  I tried:

1. git clone https://github.com/alexo/wro4j
2. git checkout lessProblem
3. cd wro4j-examples/wro4j-demo
4. mvn install

I get an exception:

Cannot find parent: ro.isdc.wro4j:wro4j-parent for project: null:wro4j-examples:pom:null for project null:wro4j-examples:pom:null

so then I tried "mvn install" in the root, and got test failures:

...

Results :

Failed tests: 
  shouldGetJarFileFromFile(ro.isdc.wro.model.resource.locator.wildcard.TestJarWildcardStreamLocator)
  shouldCreateContextWithNotNullArguments(ro.isdc.wro.model.resource.locator.wildcard.TestWildcardContext)

Tests run: 321, Failures: 2, Errors: 0, Skipped: 0

29523 DEBUG PreProcessorExecutor - StopWatch '': running time (millis) = 240
-----------------------------------------
ms     %     Task name
-----------------------------------------
00000  000%  Processor: CssUrlRewritingProcessor
00240  100%  Processor: CssImportPreProcessor

29530 DEBUG GroupsProcessor      - postProcessors: [ro.isdc.wro.model.resource.processor.impl.css.CssVariablesProcessor@da2da17]
29530 DEBUG Injector             - processInjectAnnotation for: CssVariablesProcessor
29530 DEBUG GroupsProcessor      - StopWatch '': running time (millis) = 0
-----------------------------------------
ms     %     Task name
-----------------------------------------
00000  �  Using CssVariablesProcessor

29530 DEBUG WroManager           - Content to fingerprint: [1.css2.css]
29530 DEBUG AbstractDigesterHashBuilder - creating hash using SHA1 algorithm
29530 DEBUG AbstractDigesterHashBuilder - SHA1HashBuilder hash: 178dd5f2324b9aef9bcfd84c3fc1a1dbc19c9959
29530 DEBUG WroManager           - computed entry: hash: 178dd5f2324b9aef9bcfd84c3fc1a1dbc19c9959
29531 DEBUG PreProcessorExecutor - merging resource: ro.isdc.wro.model.resource.Resource@66e8c7db[CSS,classpath:2.css,true]
29531 DEBUG PreProcessorExecutor - applying preProcessors: [ro.isdc.wro.model.resource.processor.impl.css.CssUrlRewritingProcessor@357c7988, ro.isdc.wro.model.resource.processor.impl.css.CssImportPreProcessor@7f0eeb26, ro.isdc.wro.model.resource.processor.impl.css.JawrCssMinifierProcessor@2c704cf5]
29531 DEBUG AbstractUriLocatorFactory - [OK] locating classpath:2.css using locator: ClasspathUriLocator
29531 DEBUG Injector             - processInjectAnnotation for: CssUrlRewritingProcessor
29531 DEBUG Injector             - [OK] Injected ro.isdc.wro.model.resource.processor.impl.css.CssUrlRewritingProcessor -> Context
29531 DEBUG PreProcessorExecutor - Using Processor: CssUrlRewritingProcessor
29531 DEBUG AbstractCssUrlRewritingProcessor - cssUri: classpath:2.css
29531 DEBUG CssUrlRewritingProcessor - allowed urls: [classpath:ro/isdc/wro/manager/PATH/TO/INVALID.css]
29531 DEBUG Injector             - processInjectAnnotation for: CssImportPreProcessor
29531 DEBUG Injector             - [OK] Injected ro.isdc.wro.model.resource.processor.impl.css.CssImportPreProcessor -> UriLocatorFactory
29531 DEBUG Injector             - [OK] Injected ro.isdc.wro.model.resource.processor.impl.css.CssImportPreProcessor -> PreProcessorExecutor
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Alex Objelean

unread,
Feb 28, 2012, 5:15:25 PM2/28/12
to wr...@googlegroups.com
Don't install, just create a package using mvn clean package.
Before that, get the latest version (I've commited a small update in pom.xml).


Btw, I've noticed that when using an invalid package I get the following error:
org.mozilla.javascript.JavaScriptException: TypeError: Cannot call property getLogger in object [JavaPackage org.slf4j.LoggerFactory1]. It is not a function, it is "object". (common.js#8)

Is it possible that slf4j-api is not part of the classpath at the runtime?

Alex

Alex Objelean

unread,
Feb 28, 2012, 5:28:13 PM2/28/12
to wr...@googlegroups.com
Can  you check the content of the WEB-INF/lib folder inside packaged war? Is the slf4j-api.jar there?

As an alternative solution, you could patch the wro4j version, and update the print method located in wro4j-extensions/src/main/java/ro/isdc/wro/extensions/script/common.js. This would be a dirty solution, but at least it would work.

I'll fix this issue for next release anyway.

Alex

On 29 February 2012 00:18, Alex Black <al...@alexblack.ca> wrote:
> Is it possible that slf4j-api is not part of the classpath at the runtime?

You could be on to something here - any ideas what I can do to test or
confirm this?

--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To post to this group, send email to wr...@googlegroups.com.
To unsubscribe from this group, send email to wro4j+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wro4j?hl=en.


Edgar Espina

unread,
Feb 28, 2012, 5:30:01 PM2/28/12
to wr...@googlegroups.com
can you post the output of: mvn dependency:tree or mvn dependency:analyze?

probably you have more than one implementation and/or different versions of slf4j in your classpath.

Alex Objelean

unread,
Feb 28, 2012, 5:37:55 PM2/28/12
to wr...@googlegroups.com
Sure, here they are:

These are dependencies for wro4j-demo project.

I'm sure there is room for improvement (probably duplicate slf4j implementation dependency are present). But still, it is a mistery for me why it fails on your env.

Alex

--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To view this discussion on the web visit https://groups.google.com/d/msg/wro4j/-/S8slW4MKyt0J.
dependency-tree.txt
dependency-analyze.txt

Alex Black

unread,
Feb 28, 2012, 5:40:43 PM2/28/12
to wro4j
Hi Alex, I was running my project from Eclipse, and it was failing.
However, if I run it from the command line (mvn jetty:run), then wro4j
works fine.

I'm stumped as to why it fails from Eclipse, but it does seem likely
its related to finding slf4j. Here is the command line that Eclipse
used to launch the java process, and it looks to me like slf4j is in
the classpath:

0:16 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -javaagent:/usr/local/
eclipse/eclipse-3.6.2/plugins/
org.zeroturnaround.eclipse.embedder_4.5.4.201201061517/jrebel/
jrebel.jar -Drebel.workspace.path=/home/alex/workspaces-tng/web -
Drebel.metadata.path=/home/alex/workspaces-tng/web/.metadata/.jrebel -
server -Xmx512m -XX:MaxPermSize=512m -XX:+UseCompressedOops -
Dlog4j.configuration=file:./conf/log4j-dev.xml -Dfile.encoding=UTF-8 -
Xbootclasspath/p:/usr/local/eclipse/eclipse-3.6.2/configuration/
org.eclipse.osgi/bundles/397/1/.cp/lib/scala-library.jar:/usr/local/
eclipse/eclipse-3.6.2/configuration/org.eclipse.osgi/bundles/397/1/.cp/
lib/scala-dbc.jar:/usr/local/eclipse/eclipse-3.6.2/configuration/
org.eclipse.osgi/bundles/397/1/.cp/lib/scala-swing.jar -classpath /
home/alex/dev/tng/web/target/classes:/home/alex/dev/tng/web/target/
test-classes:/home/alex/.m2/repository/net/liftweb/lift-util_2.9.1/2.4-
M4/lift-util_2.9.1-2.4-M4.jar:/home/alex/.m2/repository/commons-codec/
commons-codec/1.4/commons-codec-1.4.jar:/home/alex/.m2/repository/nu/
validator/htmlparser/htmlparser/1.2.1/htmlparser-1.2.1.jar:/home/
alex/.m2/repository/javax/mail/mail/1.4.4/mail-1.4.4.jar:/home/
alex/.m2/repository/javax/activation/activation/1.1/
activation-1.1.jar:/home/alex/.m2/repository/net/liftweb/lift-
actor_2.9.1/2.4-M4/lift-actor_2.9.1-2.4-M4.jar:/home/alex/.m2/
repository/net/liftweb/lift-json_2.9.1/2.4-M4/lift-json_2.9.1-2.4-
M4.jar:/home/alex/.m2/repository/com/thoughtworks/paranamer/paranamer/
2.3/paranamer-2.3.jar:/home/alex/.m2/repository/org/scala-lang/scalap/
2.9.1/scalap-2.9.1.jar:/home/alex/.m2/repository/org/scala-lang/scala-
compiler/2.9.1/scala-compiler-2.9.1.jar:/home/alex/.m2/repository/net/
liftweb/lift-webkit_2.9.1/2.4-M4/lift-webkit_2.9.1-2.4-M4.jar:/home/
alex/.m2/repository/commons-fileupload/commons-fileupload/1.2.2/
commons-fileupload-1.2.2.jar:/home/alex/.m2/repository/net/liftweb/
lift-common_2.9.1/2.4-M4/lift-common_2.9.1-2.4-M4.jar:/home/alex/.m2/
repository/org/slf4j/slf4j-api/1.6.2/slf4j-api-1.6.2.jar:/home/
alex/.m2/repository/net/liftweb/lift-openid_2.9.1/2.4-M4/lift-
openid_2.9.1-2.4-M4.jar:/home/alex/.m2/repository/net/liftweb/lift-
mapper_2.9.1/2.4-M4/lift-mapper_2.9.1-2.4-M4.jar:/home/alex/.m2/
repository/com/h2database/h2/1.2.147/h2-1.2.147.jar:/home/alex/.m2/
repository/org/apache/derby/derby/10.7.1.1/derby-10.7.1.1.jar:/home/
alex/.m2/repository/net/liftweb/lift-db_2.9.1/2.4-M4/lift-db_2.9.1-2.4-
M4.jar:/home/alex/.m2/repository/net/liftweb/lift-proto_2.9.1/2.4-M4/
lift-proto_2.9.1-2.4-M4.jar:/home/alex/.m2/repository/org/openid4java/
openid4java-consumer/0.9.5/openid4java-consumer-0.9.5.jar:/home/
alex/.m2/repository/commons-httpclient/commons-httpclient/3.0.1/
commons-httpclient-3.0.1.jar:/home/alex/.m2/repository/org/openid4java/
openid4java-nodeps/0.9.6/openid4java-nodeps-0.9.6.jar:/home/alex/.m2/
repository/commons-logging/commons-logging/1.1.1/commons-
logging-1.1.1.jar:/home/alex/.m2/repository/com/google/code/guice/
guice/2.0/guice-2.0.jar:/home/alex/.m2/repository/net/jcip/jcip-
annotations/1.0/jcip-annotations-1.0.jar:/home/alex/.m2/repository/org/
apache/httpcomponents/httpclient/4.1/httpclient-4.1.jar:/home/alex/.m2/
repository/net/sourceforge/nekohtml/nekohtml/1.9.10/
nekohtml-1.9.10.jar:/home/alex/.m2/repository/xerces/xercesImpl/2.8.1/
xercesImpl-2.8.1.jar:/home/alex/.m2/repository/xml-apis/xml-apis/
1.3.03/xml-apis-1.3.03.jar:/home/alex/.m2/repository/javax/servlet/
servlet-api/2.5/servlet-api-2.5.jar:/home/alex/.m2/repository/junit/
junit/4.7/junit-4.7.jar:/home/alex/.m2/repository/org/mortbay/jetty/
jetty/6.1.14/jetty-6.1.14.jar:/home/alex/.m2/repository/org/mortbay/
jetty/jetty-util/6.1.14/jetty-util-6.1.14.jar:/home/alex/.m2/
repository/org/mortbay/jetty/servlet-api-2.5/6.1.14/servlet-
api-2.5-6.1.14.jar:/home/alex/dev/tng/data/target/test-classes:/home/
alex/dev/tng/data/target/classes:/home/alex/dev/tng/util/target/test-
classes:/home/alex/dev/tng/util/target/classes:/home/alex/.m2/
repository/redis/clients/jedis-scripting/2.0.1-SNAPSHOT/jedis-
scripting-2.0.1-SNAPSHOT.jar:/home/alex/.m2/repository/commons-pool/
commons-pool/1.5.5/commons-pool-1.5.5

On Feb 28, 5:28 pm, Alex Objelean <alex.objel...@gmail.com> wrote:
> Can  you check the content of the WEB-INF/lib folder inside packaged war?
> Is the slf4j-api.jar there?
>
> As an alternative solution, you could patch the wro4j version, and update
> the print method located in
> wro4j-extensions/src/main/java/ro/isdc/wro/extensions/script/common.js.
> This would be a dirty solution, but at least it would work.
>
> I'll fix this issue for next release anyway.
>
> Alex
>

Alex Objelean

unread,
Feb 28, 2012, 5:43:13 PM2/28/12
to wr...@googlegroups.com
I think it may be related to library load order. Since we agree that it is a problem in some environment, I think the safest solution is to patch the commons.js from wro4j-extensions and sorround the offending line with try {} catch clause. 

Is it acceptable solution until next release?

Alex

Alex Objelean

unread,
Feb 28, 2012, 5:45:41 PM2/28/12
to wr...@googlegroups.com
Btw,

I've noticed that your classpath contains only slf4j-api but no slf4j implementation. Can you add one and run it in eclipse?

I'm using run-jetty-run plugin, which is great for running application from IDE (highly recommend it).

Cheers,
Alex

On 29 February 2012 00:40, Alex Black <al...@alexblack.ca> wrote:

Alex Black

unread,
Feb 28, 2012, 5:18:11 PM2/28/12
to wro4j
I managed to get "mvn install -Dmaven.skip.test=true" to succeed in
the root folder.

Then I ran:

alex@alex-pc3:~/dev/tmp/wro4j/wro4j-runner/target$ java -jar wro4j-
runner-1.4.4-jar-with-dependencies.jar --preProcessors lessCss --
contextFolder /home/alex/dev/tng/web --wroFile /home/alex/dev/tng/web/
src/main/webapp/WEB-INF/wro.xml
processing group: all.css
file size: all.css -> 30bytes
/home/alex/dev/tmp/wro4j/wro4j-runner/target/wro/all.css (30bytes) has
been created!
processing group: all.js
file size: all.js -> 0bytes
No content found for group: all.js
Processing took: 1116ms

and it worked ok.

Alex Black

unread,
Feb 28, 2012, 5:18:34 PM2/28/12
to wro4j
> Is it possible that slf4j-api is not part of the classpath at the runtime?

Alex Black

unread,
Feb 28, 2012, 6:00:42 PM2/28/12
to wro4j
sounds good, I will try patching commons.js, thanks very much for all
the help.

On Feb 28, 5:43 pm, Alex Objelean <alex.objel...@gmail.com> wrote:
> I think it may be related to library load order. Since we agree that it is
> a problem in some environment, I think the safest solution is to patch the
> commons.js from wro4j-extensions and sorround the offending line with try
> {} catch clause.
>
> Is it acceptable solution until next release?
>
> Alex
>

Alex Black

unread,
Feb 28, 2012, 6:01:09 PM2/28/12
to wro4j
I'll try adding slf4j to the classpath and retry.

run-jetty-run - cool, I will take a look, thx

On Feb 28, 5:45 pm, Alex Objelean <alex.objel...@gmail.com> wrote:
> Btw,
>
> I've noticed that your classpath contains only slf4j-api but no slf4j
> implementation. Can you add one and run it in eclipse?
>
> I'm using run-jetty-run plugin, which is great for running application from
> IDE (highly recommend it).
>
> Cheers,
> Alex
>

Alex Objelean

unread,
Feb 29, 2012, 12:41:51 PM2/29/12
to wr...@googlegroups.com
The issue was fixed in 1.4.x branch.

Cheers,
Alex

Alex Black

unread,
Mar 1, 2012, 2:17:22 PM3/1/12
to wro4j
Hi Alex, turns out that PS auxwww only shows the first 4096 chars of
the command line, so the classpath I posted was truncated.

Here is the full classpath I'm now using, it has both slf4j-api and
slf4j-log4j12 in it, should that suffice? I still get that exception.
(In the mean time I've been using run-jetty-run, but so far it seems
like a less flexible approach than using my RunWebApp file).

here is the non-truncated classpath:

/home/alex/dev/tng/web/target/classes:/home/alex/dev/tng/web/target/
test-classes:/home/alex/.m2/repository/net/liftweb/lift-util_2.9.1/2.4-
M4/lift-util_2.9.1-2.4-M4.jar:/home/alex/.m2/repository/commons-codec/
commons-codec/1.4/commons-codec-1.4.jar:/home/alex/.m2/repository/nu/
validator/htmlparser/htmlparser/1.2.1/htmlparser-1.2.1.jar:/home/
alex/.m2/repository/javax/mail/mail/1.4.4/mail-1.4.4.jar:/home/
alex/.m2/repository/javax/activation/activation/1.1/
activation-1.1.jar:/home/alex/.m2/repository/net/liftweb/lift-
actor_2.9.1/2.4-M4/lift-actor_2.9.1-2.4-M4.jar:/home/alex/.m2/
repository/net/liftweb/lift-json_2.9.1/2.4-M4/lift-json_2.9.1-2.4-
M4.jar:/home/alex/.m2/repository/com/thoughtworks/paranamer/paranamer/
2.3/paranamer-2.3.jar:/home/alex/.m2/repository/org/scala-lang/scalap/
2.9.1/scalap-2.9.1.jar:/home/alex/.m2/repository/org/scala-lang/scala-
compiler/2.9.1/scala-compiler-2.9.1.jar:/home/alex/.m2/repository/net/
liftweb/lift-webkit_2.9.1/2.4-M4/lift-webkit_2.9.1-2.4-M4.jar:/home/
alex/.m2/repository/commons-fileupload/commons-fileupload/1.2.2/
commons-fileupload-1.2.2.jar:/home/alex/.m2/repository/net/liftweb/
lift-common_2.9.1/2.4-M4/lift-common_2.9.1-2.4-M4.jar:/home/alex/.m2/
repository/net/liftweb/lift-openid_2.9.1/2.4-M4/lift-openid_2.9.1-2.4-
M4.jar:/home/alex/.m2/repository/net/liftweb/lift-mapper_2.9.1/2.4-M4/
lift-mapper_2.9.1-2.4-M4.jar:/home/alex/.m2/repository/com/h2database/
h2/1.2.147/h2-1.2.147.jar:/home/alex/.m2/repository/org/apache/derby/
derby/10.7.1.1/derby-10.7.1.1.jar:/home/alex/.m2/repository/net/
liftweb/lift-db_2.9.1/2.4-M4/lift-db_2.9.1-2.4-M4.jar:/home/alex/.m2/
repository/net/liftweb/lift-proto_2.9.1/2.4-M4/lift-proto_2.9.1-2.4-
M4.jar:/home/alex/.m2/repository/org/openid4java/openid4java-consumer/
0.9.5/openid4java-consumer-0.9.5.jar:/home/alex/.m2/repository/commons-
httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar:/home/
alex/.m2/repository/org/openid4java/openid4java-nodeps/0.9.6/
openid4java-nodeps-0.9.6.jar:/home/alex/.m2/repository/commons-logging/
commons-logging/1.1.1/commons-logging-1.1.1.jar:/home/alex/.m2/
repository/com/google/code/guice/guice/2.0/guice-2.0.jar:/home/
alex/.m2/repository/net/jcip/jcip-annotations/1.0/jcip-
annotations-1.0.jar:/home/alex/.m2/repository/org/apache/
httpcomponents/httpclient/4.1/httpclient-4.1.jar:/home/alex/.m2/
repository/net/sourceforge/nekohtml/nekohtml/1.9.10/
nekohtml-1.9.10.jar:/home/alex/.m2/repository/xerces/xercesImpl/2.8.1/
xercesImpl-2.8.1.jar:/home/alex/.m2/repository/xml-apis/xml-apis/
1.3.03/xml-apis-1.3.03.jar:/home/alex/.m2/repository/javax/servlet/
servlet-api/2.5/servlet-api-2.5.jar:/home/alex/.m2/repository/junit/
junit/4.7/junit-4.7.jar:/home/alex/.m2/repository/org/mortbay/jetty/
jetty/6.1.14/jetty-6.1.14.jar:/home/alex/.m2/repository/org/mortbay/
jetty/jetty-util/6.1.14/jetty-util-6.1.14.jar:/home/alex/.m2/
repository/org/mortbay/jetty/servlet-api-2.5/6.1.14/servlet-
api-2.5-6.1.14.jar:/home/alex/dev/tng/data/target/test-classes:/home/
alex/dev/tng/data/target/classes:/home/alex/dev/tng/util/target/test-
classes:/home/alex/dev/tng/util/target/classes:/home/alex/.m2/
repository/redis/clients/jedis-scripting/2.0.1-SNAPSHOT/jedis-
scripting-2.0.1-SNAPSHOT.jar:/home/alex/.m2/repository/commons-pool/
commons-pool/1.5.5/commons-pool-1.5.5.jar:/home/alex/.m2/repository/
com/snapsort/tng/javautil/1.0-SNAPSHOT/javautil-1.0-SNAPSHOT.jar:/home/
alex/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/home/alex/.m2/
repository/org/slf4j/slf4j-api/1.6.2/slf4j-api-1.6.2.jar:/home/
alex/.m2/repository/org/slf4j/slf4j-log4j12/1.6.2/slf4j-
log4j12-1.6.2.jar:/home/alex/.m2/repository/joda-time/joda-time/1.6/
joda-time-1.6.jar:/home/alex/.m2/repository/org/ccil/cowan/tagsoup/
tagsoup/1.2.1/tagsoup-1.2.1.jar:/home/alex/.m2/repository/org/apache/
httpcomponents/httpcore/4.1/httpcore-4.1.jar:/home/alex/.m2/repository/
commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar:/home/alex/.m2/
repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/home/
alex/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.5/
jackson-core-asl-1.9.5.jar:/home/alex/.m2/repository/org/codehaus/
jackson/jackson-mapper-asl/1.9.5/jackson-mapper-asl-1.9.5.jar:/home/
alex/.m2/repository/com/codahale/jerkson_2.9.1/0.5.1-SNAPSHOT/
jerkson_2.9.1-0.5.1-SNAPSHOT.jar:/home/alex/.m2/repository/com/yammer/
metrics/metrics-scala_2.9.1/2.0.2/metrics-scala_2.9.1-2.0.2.jar:/home/
alex/.m2/repository/com/yammer/metrics/metrics-core/2.0.2/metrics-
core-2.0.2.jar:/home/alex/.m2/repository/com/yammer/metrics/metrics-
graphite/2.0.2/metrics-graphite-2.0.2.jar:/home/alex/.m2/repository/
org/apache/commons/commons-email/1.2/commons-email-1.2.jar:/home/
alex/.m2/repository/javax/mail/mail/1.4.1/mail-1.4.1.jar:/home/
alex/.m2/repository/net/htmlparser/jericho/jericho-html/3.1/jericho-
html-3.1.jar:/home/alex/.m2/repository/com/joestelmach/natty/0.5/
natty-0.5.jar:/home/alex/.m2/repository/org/antlr/antlr-runtime/3.2/
antlr-runtime-3.2.jar:/home/alex/.m2/repository/org/antlr/
stringtemplate/3.2/stringtemplate-3.2.jar:/home/alex/.m2/repository/
antlr/antlr/2.7.7/antlr-2.7.7.jar:/home/alex/.m2/repository/org/mnode/
ical4j/ical4j/1.0.2/ical4j-1.0.2.jar:/home/alex/.m2/repository/commons-
lang/commons-lang/2.6/commons-lang-2.6.jar:/home/alex/.m2/repository/
backport-util-concurrent/backport-util-concurrent/3.1/backport-util-
concurrent-3.1.jar:/home/alex/.m2/repository/postgresql/postgresql/
9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar:/home/alex/.m2/repository/
org/scalaz/scalaz-core_2.9.1/6.0.3/scalaz-core_2.9.1-6.0.3.jar:/home/
alex/.m2/repository/com/google/guava/guava/11.0.1/guava-11.0.1.jar:/
home/alex/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/
jsr305-1.3.9.jar:/home/alex/.m2/repository/log4j/apache-log4j-extras/
1.1/apache-log4j-extras-1.1.jar:/home/alex/.m2/repository/ro/isdc/
wro4j/wro4j-core/1.4.4/wro4j-core-1.4.4.jar:/home/alex/.m2/repository/
org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar:/home/
alex/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar:/home/
alex/.m2/repository/ro/isdc/wro4j/wro4j-extensions/1.4.4/wro4j-
extensions-1.4.4.jar:/home/alex/.m2/repository/com/google/code/gson/
gson/1.6/gson-1.6.jar:/home/alex/.m2/repository/com/google/javascript/
closure-compiler/r1741/closure-compiler-r1741.jar:/home/alex/.m2/
repository/args4j/args4j/2.0.12/args4j-2.0.12.jar:/home/alex/.m2/
repository/com/google/protobuf/protobuf-java/2.4.1/protobuf-
java-2.4.1.jar:/home/alex/.m2/repository/org/json/json/20090211/
json-20090211.jar:/home/alex/.m2/repository/org/apache/ant/ant/1.8.2/
ant-1.8.2.jar:/home/alex/.m2/repository/org/apache/ant/ant-launcher/
1.8.2/ant-launcher-1.8.2.jar:/home/alex/.m2/repository/com/googlecode/
jarjar/jarjar/1.1/jarjar-1.1.jar:/home/alex/.m2/repository/rhino/js/
1.7R2/js-1.7R2.jar:/home/alex/.m2/repository/org/dojotoolkit/dojo-
shrinksafe/1.6.1/dojo-shrinksafe-1.6.1.jar:/home/alex/.m2/repository/
org/codehaus/gmaven/runtime/gmaven-runtime-1.7/1.3/gmaven-
runtime-1.7-1.3.jar:/home/alex/.m2/repository/org/codehaus/gmaven/
feature/gmaven-feature-support/1.3/gmaven-feature-support-1.3.jar:/
home/alex/.m2/repository/org/codehaus/gmaven/feature/gmaven-feature-
api/1.3/gmaven-feature-api-1.3.jar:/home/alex/.m2/repository/org/
codehaus/gmaven/runtime/gmaven-runtime-support/1.3/gmaven-runtime-
support-1.3.jar:/home/alex/.m2/repository/org/codehaus/gmaven/runtime/
gmaven-runtime-api/1.3/gmaven-runtime-api-1.3.jar:/home/alex/.m2/
repository/org/sonatype/gshell/gshell-io/2.0/gshell-io-2.0.jar:/home/
alex/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.1/plexus-
utils-2.0.1.jar:/home/alex/.m2/repository/com/thoughtworks/qdox/qdox/
1.10/qdox-1.10.jar:/home/alex/.m2/repository/org/codehaus/groovy/
groovy-all/1.7.4/groovy-all-1.7.4.jar:/home/alex/.m2/repository/jline/
jline/0.9.94/jline-0.9.94.jar:/usr/local/eclipse/eclipse-3.6.2/plugins/
org.zeroturnaround.eclipse.embedder_4.5.4.201201061517/jrebel/
jrebel.jar

- Alex

On Feb 28, 5:45 pm, Alex Objelean <alex.objel...@gmail.com> wrote:
> Btw,
>
> I've noticed that your classpath contains only slf4j-api but no slf4j
> implementation. Can you add one and run it in eclipse?
>
> I'm using run-jetty-run plugin, which is great for running application from
> IDE (highly recommend it).
>
> Cheers,
> Alex
>

Alex Black

unread,
Mar 1, 2012, 2:43:51 PM3/1/12
to wro4j
I'm trying this out, getting a new exception.

1. I cloned the latest git repo
2. I built using "maven install -Dmaven.skip.tests=true"
3. I updated my pom to refer to version 1.4.5-SNAPSORT
4. I confirmed that wro4j/wro4jextensions/src/main/java/ro/isdc/wro/
extensions/script/commons.js has the change:

/**
* Defines print function. Used for debugging.
*/
function print(message) {
try {
//this call can fail when no slf4j dependency exist in
classpath

org.slf4j.LoggerFactory.getLogger("Rhino").debug(message);
} catch(e) {}
}

ERROR [2012-03-01 19:39:43,951] [928376072@qtp0-3]
ro.isdc.wro.extensions.processor.support.less.LessCss: null -
Processing error:null
! java.lang.NullPointerException
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.createContext(RhinoScriptBuilder.java:
57)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder.java:
40)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder.java:
35)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.newClientSideAwareChain(RhinoScriptBuilder.java:
215)
! at
ro.isdc.wro.extensions.processor.support.less.LessCss.initScriptBuilder(LessCss.java:
48)
Here are the new exceptions:

WARN [2012-03-01 19:39:43,951] [928376072@qtp0-3]
ro.isdc.wro.extensions.processor.css.LessCssProcessor: null -
Exception while applying LessCssProcessor processor on the
[classpath:toserve/css/eric-meyer-reset.css] resource, no processing
! Caused by: java.lang.NullPointerException
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.createContext(RhinoScriptBuilder.java:
57)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder.java:
40)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder.java:
35)
! at
ro.isdc.wro.extensions.script.RhinoScriptBuilder.newClientSideAwareChain(RhinoScriptBuilder.java:
215)
! at
ro.isdc.wro.extensions.processor.support.less.LessCss.initScriptBuilder(LessCss.java:
48)
! ... 29 more


On Feb 28, 5:43 pm, Alex Objelean <alex.objel...@gmail.com> wrote:
> I think it may be related to library load order. Since we agree that it is
> a problem in some environment, I think the safest solution is to patch the
> commons.js from wro4j-extensions and sorround the offending line with try
> {} catch clause.
>
> Is it acceptable solution until next release?
>
> Alex
>

Alex Black

unread,
Mar 1, 2012, 2:47:23 PM3/1/12
to wro4j
In case it helps, here is my RunWebApp.scala file I'm using to launch
jetty etc. (If I launch using RunWebApp.scala then I have this issue,
whereas using run-jetty-run I don't have the same issue)

// Example JVM args for run config in an IDE:
// -server -Xmx512m -XX:MaxPermSize=512m -XX:+UseCompressedOops -
Dlog4j.configuration=file:./conf/log4j-dev.xml
object RunWebApp extends App {
val server = new Server
val scc = new SelectChannelConnector
scc.setPort(8080)
server.setConnectors(Array(scc))

val context = new WebAppContext()
// Disable JSessionIDs! this will break cookie-less sessions, we'll
live!
context.getSessionHandler.getSessionManager.setSessionURL("none")
// Enable large form posts for uploads

context.getServletContext.getContextHandler.setMaxFormContentSize(10000000)
context.setServer(server)
context.setContextPath("/")

// Try to find the right source:
// - src/main/webapp for Eclipse builds
// - web/target/webapp for SBT builds (run prepare-webapp)
val pathToWar: String = List("src/main/webapp", "web/target/webapp",
"web/src/main/webapp")
.map { new java.io.File(_) }
.find { _.exists }
.map { _.getAbsolutePath }
.getOrElse(sys.error("Path to .war does not exist; if using SBT,
be sure to run 'prepare-webapp' (!)"))

context.setWar(pathToWar)

server.addHandler(context)

try {
println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO
STOP")
server.start()
while (System.in.available() == 0)
Thread.sleep(5000)
server.stop()
server.join()
} catch {
case e: Exception => {
e.printStackTrace()
System.exit(100)
> 57)
> !       at
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder. java:
> 40)
> !       at
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder. java:
> 35)
> !       at
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.newClientSideAwareChain(Rh inoScriptBuilder.java:
> 215)
> !       at
> ro.isdc.wro.extensions.processor.support.less.LessCss.initScriptBuilder(Les sCss.java:
> > > compiler/2.9.1/scala-compiler-2.9.1.jar:/home/alex/.m2/repository/net/...
>
> read more »

Alex Black

unread,
Mar 1, 2012, 3:11:20 PM3/1/12
to wro4j
Hi Alex, sorry for all the noise here - got it working. I made a
mistake, when I updated my POM to point to 1.4.5-SNAPSHOT I failed to
update the -extensions dependency, I only updated the core.

Now, its working fine.

thanks!

- Alex
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder. java:
> 35)
> !       at
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.newClientSideAwareChain(Rh inoScriptBuilder.java:
> 215)
> !       at
> ro.isdc.wro.extensions.processor.support.less.LessCss.initScriptBuilder(Les sCss.java:
> 48)
> !       at
> ro.isdc.wro.extensions.processor.support.less.LessCss.less(LessCss.java:
> 78)
> !       at
> ro.isdc.wro.extensions.processor.css.LessCssProcessor.process(LessCssProces sor.java:
> 131)
> !       at ro.isdc.wro.model.group.processor.PreProcessorExecutor
> $3.process(PreProcessorExecutor.java:235)
> !       at ro.isdc.wro.model.group.processor.PreProcessorExecutor
> $2.process(PreProcessorExecutor.java:215)
> !       at
> ro.isdc.wro.model.group.processor.PreProcessorExecutor.applyPreProcessors(P reProcessorExecutor.java:
> 174)
> !       at
> ro.isdc.wro.model.group.processor.PreProcessorExecutor.processAndMerge(PreP rocessorExecutor.java:
> 131)
> !       at ro.isdc.wro.model.group.processor.PreProcessorExecutor
> $3.process(PreProcessorExecutor.java:235)
> !       at ro.isdc.wro.model.group.processor.PreProcessorExecutor
> $2.process(PreProcessorExecutor.java:215)
> !       at
> ro.isdc.wro.model.group.processor.PreProcessorExecutor.applyPreProcessors(P reProcessorExecutor.java:
> 174)
> !       at
> ro.isdc.wro.model.group.processor.PreProcessorExecutor.processAndMerge(PreP rocessorExecutor.java:
> 82)
> !       at ro.isdc.wro.model.group.processor.GroupsProcessor
> $1.processAndMerge(GroupsProcessor.java:78)
> !       at
> ro.isdc.wro.model.group.processor.GroupsProcessor.process(GroupsProcessor.j ava:
> 57)
> !       at
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder. java:
> 40)
> !       at
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.<init>(RhinoScriptBuilder. java:
> 35)
> !       at
> ro.isdc.wro.extensions.script.RhinoScriptBuilder.newClientSideAwareChain(Rh inoScriptBuilder.java:
> 215)
> !       at
> ro.isdc.wro.extensions.processor.support.less.LessCss.initScriptBuilder(Les sCss.java:
> > > compiler/2.9.1/scala-compiler-2.9.1.jar:/home/alex/.m2/repository/net/...
>
> read more »

Alex Objelean

unread,
Mar 1, 2012, 3:48:09 PM3/1/12
to wr...@googlegroups.com
Don't worry, the noise is not a problem at all :). 
Though I'm very curious what exactly is the real cause of the problem, since the issue was fixed easily in latest snapshot, I wouldn't spend to much time to analyze it.
It would be great if somebody who share my curiosity and have time to investigate the problem would find the cause of the problem.

Cheers,
Alex
Reply all
Reply to author
Forward
0 new messages