Warning: Declaration of LJXP_Walker_Category_Checklist::start_lvl(&$output, $depth, $args) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Declaration of LJXP_Walker_Category_Checklist::end_lvl(&$output, $depth, $args) should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Declaration of LJXP_Walker_Category_Checklist::start_el(&$output, $category, $depth, $args) should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Declaration of LJXP_Walker_Category_Checklist::end_el(&$output, $category, $depth, $args) should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Cannot modify header information - headers already sent by (output started at /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php:796) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 60
code name / Getting Glassfish stdout logging under control
Skip to content

Getting Glassfish stdout logging under control

21-Nov-12

By default, Glassfish does an ugly thing: takes an application’s stdout/stderr and wraps it into its own log with INFO level for stdout and WARN level for stderr. Other logging facility normally log to stdout. In the end, a log entry looks pretty stupidly (and it’s damn multiline!): [#|2012-11-21T11:25:07.225+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=100;_ThreadName=Thread-2;|11:25:07.225 [http-thread-pool-8080(2)] DEBUG c.mycompany.packages.SomeClass – Finally, some […]

Hibernate join bug

03-Sep-09

Hibernate bug 1895 seems to be still there since 2006. If, for instance, in Grails, such a syntax won’t work for you (it won’t): def books = Book.findAll(“FROM Book AS b JOIN Chapter AS c WHERE c.active = :isActive”) with a NullPointerException in “HqlSqlWalker.createFromJoinElement” — just use alternative join syntax, via WHERE: def books = […]

Grails: mocking domain objects in unit tests

13-Jul-09

We’re trying Grails, Rails-like web application framework for Java. It’s fine, just that Groovy debugger support is, er, imperfect, even in the best Gruoovy IDE – IDEA. And, if you want to unit test, you won’t have fancy domain class methods addTo* – like Customer.addToOrders(). They’re generated by Grails on startup. In order to have […]

Closures in mainstream languages

29-Aug-07

C# has closures, you know? A sample of how to use one.

Broken HTML parsing in Java

16-Aug-07

Given: HTML code, non-valid and non-well-formed. Make it a well-formed XHTML, in Java. We considered JTidy, but it’s source looked too messy and hacky. I looked for a parser that could correct XML – not in sense of schema, but correct any mistakes, and pass out a well-formed XML and error list. I was able […]