Skip to content
Advertisement

codename one container with action listener

I am developing my first mobile App with Codename One. I am trying to get a container to react to an normal click action event. I have a container (note this is not a swing container, but a codename one container), which contains list elements in a box Y_axis layout that is scrollable. so far so good. these elements are

Apache FOP embedded remote fonts

I’m using Apache FOP v2.1 embedded in a Java program. I’m trying to retrieve a remote font using a configuration file similar to the following: However, when I run the application to generate a PDF file from XML and XSL files it gives me an error: By checking the source code of FOP I discovered that FOP is trying to

JavaFX WebView in Java Swing Project

i try to use the WebView in my java project, in my code is: but the this thown a exception And yes, this is not a JavaFx application. Answer You can embed JavaFX content into a Swing application using JFXPanel. Note that for this to work correctly, you have to be careful to create and access the Swing content on

Java 8 generic Retry if specific exception

I’m finding myself writing alot of retry loops that look like I want to write a generic function that accepts a Lambda and only retries on a specific error (in the above case thats SocketTimeoutException). I’ve seen some functions that accept a Runnable which is fine, but they don’t seem to allow limiting to specific exceptions. Any advice? Answer Have

Proguard issue with Gson and Volley

Is there a way to skip proguard from obfuscating the Volley and Gson including the class using them ? My build.gradle file: Here the Proguard config: Errors returned for Volley: NB: Application work well without proguard. Signed APK generated with proguard but class using Volley + Gson still not working Answer You have to modify your proguard. For gson use

Exception : org.postgresql.util.PSQLException: ERROR: syntax error at or near “call”

I am working on a application in which hibernate and postgresql and giving the following error org.postgresql.util.PSQLException: ERROR: syntax error at or near “call” Can someone tell me where I am going wrong. I am using Postgres 9.4. EmployeeController Employee.java Class Answer I was using a wrong dailect earlier by using the dailect org.hibernate.dialect.PostgreSQLDialect with postgres 9.4 the application is

Spring Security – 405 Request Method ‘POST’ Not Supported

I have implemented Spring Security to my project, but I am getting status 405 when I try to log in. I have already added csrf token in the form. This is the error I am getting when I send username and password: HTTP Status 405 – Request method ‘POST’ not supported Spring version: 4.0.2.RELEASED Security Configuration: Controller: Almost every topic

“Double” composition with CompletableFuture

I’m trying to avoid nesting CompletableFuture when combining 2 independent ones with a BiFunction that returns a third one. Currently, using thenCombine() does not cut it: I’m basically trying to find a way that looks like haskell if there was a CompletableFuture monad: I read somewhere that join() is the flatMap of Completable future, so I think I could use

What causes “java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name ‘command’ available as request attribute”?

This is meant to be an extensive canonical question & answer post for these types of questions. I’m trying to write a Spring MVC web application where users can add movie names to an in-memory collection. It’s configured like so and There’s a single @Controller class in the com.example package WEB-INF/jsps/index.jsp contains The application is configured with context path /Example.

Advertisement