Questions tagged [ninjaframework]

Ninja is a full stack web framework for Java

47 questions
6
votes
2 answers

Tracking down how to fix CORS issue

I have had a CORS issue in an application I'm working on. It's setup in Kubernetes, with a third party Java framework: http://www.ninjaframework.org/ I am getting the following error: Preflight response is not successful XMLHttpRequest cannot load…
Steven Matthews
  • 9,705
  • 45
  • 126
  • 232
3
votes
4 answers

Ninja framework endpoint throws 500 error when trying to map JSON to custom object

So I've got a Ninja endpoint here: public Result processRecurring(Context context, RecurOrderJSON recurOrderJSON) { String id = recurOrderJSON.id; String event_type = recurOrderJSON.event_type; String request_id =…
Steven Matthews
  • 9,705
  • 45
  • 126
  • 232
3
votes
2 answers

Creating a table in ebean with two lists connecting to another table

I'm using Ninja framework and I'm trying to create a table that has two lists of other tables of the same kind. The problem is that all the content from the other list is also inside of the other list. Main: test(); List foos =…
Konkko
  • 662
  • 4
  • 15
3
votes
1 answer

Getting rendering html from angular controller

I am developing a web with Angular, Ninja, HTML5 and Javascript. My problem is the following: I have a Ninja controller (ProjectController) where I render a list of projects to the HTML. I would like to show this list with the names of the projects…
IrApp
  • 1,823
  • 5
  • 24
  • 42
2
votes
2 answers

Is it possible to create a Freemarker macro programmatically?

Freemarker is used as the default template engine in the ninja web framework. The framework assigns some default values to a template which are globaly available when using the ninja web framework. I have created an extension for the template which…
svenkubiak
  • 645
  • 1
  • 7
  • 19
2
votes
1 answer

javax.mail.SendFailedException Why I receive the above mentioned expcetion when i try to send email through my java code?

I want to write a java program to send email to any email address from my email address but i am getting this javax.mail.SendFailedException when i run my code. My code have 2 classes Main.java and EmailManagement.java. Errors i am recieving are:…
1
vote
0 answers

When I use jpql like `:label in elements(labels)` in hibernate, there is an exception

The framework I am using is ninjaframework 6.9.0 and hibernate 5.6.7,and Guice used by this framework. It is java17, The database is postgresql 14.2. I have a model like this: @Entity @Table(name = "data") public class Data { @Id …
WoFVi
  • 21
  • 1
1
vote
1 answer

Ninja Framework: Can we really use Mustache template engine instead of FreeMarker?

The official page(https://www.ninjaframework.org/documentation/modules.html) mentions Mustache template engine and its referenced page(https://github.com/kpacha/ninja-mustache) seems to say that Mustache template engine can be used. Is it true? We…
msnr-nks
  • 15
  • 5
1
vote
3 answers

InfluxDBIOException: java.net.SocketTimeoutException: timeout

I'm using Influx Db java wrapper and adding data in influx db for every 5 seconds with a retention policy of 30 days. When I'm trying to query the data by sending multiple requests, the timeout exception is seen. Once I clear the db data , the…
Nirmal
  • 549
  • 1
  • 9
  • 24
1
vote
1 answer

java.lang.IllegalArgumentException: Unsupported element: rss

I am trying to 'GET' a rss feed. public RssFeed(String url) { _url = url; String res = this.api.get(url); ByteArrayInputStream bis = new ByteArrayInputStream(res.getBytes()); try { bis.close(); } catch (IOException e)…
Yoann Picquenot
  • 640
  • 10
  • 26
1
vote
1 answer

javax.persistence.EntityNotFoundException' exception. Cannot evaluate models.Anagrafica_$$_jvst834_0.toString()

I'm using the ninja framework, which utilizes JPA to access a database. I have this problem:enter image description here My code: public class UtenteDao extends AbstractDao { @Inject Provider
SoloWing
  • 11
  • 1
  • 3
1
vote
2 answers

Redirect HTTP to HTTPS with Ninja framework on Heroku

How to configure a Ninja web application running on Heroku to force the use of SSL, that is, redirect all requests to HTTPS?
Patrick
  • 3,578
  • 5
  • 31
  • 53
1
vote
1 answer

How to use Dependency Injection in a ConstraintValidator in Ninjaframework?

I'm having problems to validate a POST request with ninja framework (6.0.0-rc1) and a custom ConstraintValidator. Here is my current implementation: @Singleton public class GameController { public Result postGame(@JSR303Validation…
msmith
  • 43
  • 5
1
vote
1 answer

Ninjaframework MVC Controller inheritance and routing

In my Ninja Web Application,I've a generic controller for CRUD operation. Generic Interface: interface GenericController { Result read(PK id); } Abstract Controller: abstract class AbstractController
x01saa
  • 460
  • 1
  • 8
  • 18
1
vote
2 answers

Inject java.sql.Connection into controller for Ninja Framework

I want to use JOOQ to access my database from the Ninja Framework. How can I get a JDBC connection from a controller? Here's resources I found that didn't quite work. How to retrieve the datasource used by a persistence unit programmatically -…
Joe
  • 3,370
  • 4
  • 33
  • 56
1
2 3 4