Questions tagged [janino]

Janino is a super-small, super-fast Java™ compiler.

Official page: http://docs.codehaus.org/display/JANINO/Home#Home-what

Documentation: http://docs.codehaus.org/display/JANINO/Documentation

54 questions
19
votes
1 answer

Logback: "Could not find Janino library on the class path"

I'm getting error message Could not find Janino library on the class path. Skipping conditional processing. What should I incude in classpath to fix this (lib and version)?
fedor.belov
  • 19,444
  • 25
  • 79
  • 121
14
votes
5 answers

Overriding line number in generated Java source

Is there any way to override the line numbers in Java (e.g., by using some kind of preprocessor directive)? I am "compiling" a high-level language, down to Java byte code using Janino. I need compiler errors to report the line from the original…
Ryan Emerle
  • 14,410
  • 8
  • 47
  • 67
13
votes
4 answers

Apache Spark Codegen Stage grows beyond 64 KB

I'm getting an error when I'm feature engineering on 30+ columns to create about 200+ columns. It is not failing the job, but the ERROR shows. I want to know how can I avoid this. Spark - 2.3.1 Python - 3.6 Cluster Config - 1 Master - 32 GB RAM, 16…
Aakash Basu
  • 1,137
  • 2
  • 15
  • 39
5
votes
3 answers

Options for dynamic compilation in Java 5

Are there any options other than Janino for on-the-fly compiliation and execution of Java code in v5? I know v6 has the Compiler API, but I need to work with the v5 VM. I essentially need to take a string containing a complete Java class, compile…
Ryan Emerle
  • 14,410
  • 8
  • 47
  • 67
4
votes
0 answers

Compiling java with Janino (broken Classpath)

I Am trying to compile very simple class with Janino: import org.codehaus.commons.compiler.CompileException; import org.codehaus.janino.ClassBodyEvaluator; import java.io.IOException; import java.io.StringReader; public class JaninoTest{ …
Purple
  • 663
  • 1
  • 10
  • 18
4
votes
1 answer

How does the condtion functionality work in Logback?

I use this logback configuration file: %d{HH:mm:ss.SSS} [%-10.-10thread] %-5level %-30logger{1} - %msg%n
theomega
  • 29,902
  • 21
  • 83
  • 125
4
votes
2 answers

Different logfile for integration testing

I am using SL4j and Logback for a web application hosted in Tomcat. I use Spring and Maven (no profiles). Integration testing is done with the Surefire plugin: org.apache.maven.plugins
ChrLipp
  • 15,033
  • 9
  • 70
  • 105
3
votes
1 answer

Closing single quote missing while comparing strings in XML for Logback with Janino

Using Logback's conditional processing to compare two Strings in a Logback XML configuration file as follows ... ... results in the…
Kumar
  • 41
  • 5
3
votes
0 answers

Janino ExpressionEvaluator not guessing all parameters?

Consider a simple use case for the ExpressionEvaluator class of the Janino library, i.e. when using it to guess the parameters of an expression, as follows: public static String[] getParameters(String expression) { // Suppress exceptions try { …
PNS
  • 17,431
  • 26
  • 86
  • 131
2
votes
0 answers

Logback - Custom log file empty, how to configure logger?

I have three classes with loggers in different packages: com.asd.def.Class1; com.some.package.Class2; com.foo.bar.Class3; In each class I create a new logger the same way, note that each logger ends with the same "some_logger" name: private static…
attom93
  • 21
  • 2
2
votes
0 answers

janino compile Java code throws "class could not be found exception"

Backgroud I use squirrel state machine and want to generate its relate class(state,event,context,etc.) dynamicly(state might change) I tried to generate and compile Java code after Springboot application started. There are four files A,B,C,D. A,B,C…
zhng2ae
  • 21
  • 2
2
votes
2 answers

"else if" in janino logback configuration

I am trying to use janino conditional statements in logback configuration and it is working fine with "if" and "else". But I want to ask if there is it possible to write "else if" in it? My case -
N..
  • 1,406
  • 3
  • 21
  • 37
2
votes
3 answers

adding maven dependency causing java.lang.ClassNotFoundException

I have an application which is working fine until I have introduced the following maven dependencies. joda-time joda-time 2.3
2
votes
1 answer

Janino compile several classes

I have tried Janino and I'm able to execute a dynamic class, by passing a String to janino compiler. Now, I should create several classed dynamically, and then import them into another dynamic class. An example: Compile class A from String Compile…
GiacomoLicari
  • 423
  • 1
  • 7
  • 18
2
votes
1 answer

conditions in logback configuration

I'm trying to remove redundant logback config files by using janino's conditional processing. Below is the conditional logic which I had added