Questions tagged [activeweb]

ActiveWeb is a Java web framework inspired by Ruby on Rails. It is optimized to be sustainable, productive, and familiar for Java developers.

49 questions
0
votes
1 answer

Trying to figure out activeweb logging to a separate file

I am trying to use the default active web library to log everything to a separate log file. Right now I'm running everything under IntelliJ (via mvn jetty:run) and all the logging is coming out to the console only. I tried added a log4j.properties…
0
votes
1 answer

Transaction is not rolled back when run time exception programmatically fired

I couldn't understand why the after() function of DBConnectionFilter is called when the runtime exception is thrown. I was expecting onException() function to be called and a rollback of the transaction. But what's really happening is the after()…
0
votes
0 answers

ActiveWeb war undeployable to TomEE

I just started a new ActiveWeb/ActiveJDBC project based on the activeweb-simple example. When I build and run it with Jetty as described in the ReadMe everything works fine but I can't get it to work with TomEE plus (7.0.2/1.7.5) and I would like to…
bytepool
  • 75
  • 1
  • 6
0
votes
1 answer

Checking with blank(param("some_parameter_name"))) fails with NPE

I tried to check if a mandatory request parameter present with if (blank(param("some_parameter_name"))) { // throw SomeException } and it failed with NPE because: in HTTPSupport#blank(String ... names) there is a call to…
belgoros
  • 3,590
  • 7
  • 38
  • 76
0
votes
1 answer

Specify output attributes for generated JSON for polymorphic associations

I linked 2 tables to its common one using polymorphic association: @BelongsToPolymorphic(parents = {Application.class, SiteSection.class}) public class Parameter extends Model { static { validatePresenceOf("parent_id", "parent_type"); …
belgoros
  • 3,590
  • 7
  • 38
  • 76
0
votes
1 answer

Get parents from JSON when using polymorphic associations

Is there an elegant way to work with JSON response when using polymorphic associations in the below example? JSON response: [ { "created_at":"2017-12-13T10:37:36Z", "id":16, "parent_id":21, "parent_type":"app.models.Site", …
belgoros
  • 3,590
  • 7
  • 38
  • 76
0
votes
0 answers

Empty array response when returning a JSON

I tried to return a list of records as JSON from the controller as follows: public class ListsController extends APIController { public void index(){ respond(List.findAll().toJson(true)).contentType("application/json"); …
belgoros
  • 3,590
  • 7
  • 38
  • 76
0
votes
1 answer

com.google.cloud.sql.mysql.SocketFactory ClassNotFoundException

Hi I am new to web development and am trying to get activejdbc to connect to a cloud sql instance... I am getting the following stacktrace: [ERROR] Failed to execute goal org.javalite:db-migrator-maven-plugin:1.4.11:migrate (dev_migrations) on…
0
votes
2 answers

Activeweb java version

does Activeweb really need to be java 1.8? I'd like to be able to use App Engine's standard edition[1], but it only supports java 1.7. I'm quite behind on activeweb development, so would appreciate understanding the need for 1.8 at least. Thanks!
evan.leonard
  • 989
  • 2
  • 8
  • 10
0
votes
1 answer

How to set up links in Activeweb?

An initial application url is http://localhost:8080/activeweb-bootstrap-custom/ A freemarker's template link looks like href="/test" The problem is when I click the link then the application url changes to http://localhost:8080/test. Obviously…
rozerro
  • 5,787
  • 9
  • 46
  • 94
0
votes
1 answer

Model instrumentation for inherited classes - ActiveWeb

I have inherited model classes: public class AbstractUser extends Model and public class User extends AbstractUser I'm attempting to extend from a base project into several children project. The Users in each project will have many similar base…
javastunt
  • 20
  • 6
0
votes
1 answer

Activeweb/ActiveJDBC with C3P0 database connections

I'm attempting to get an ActiveWeb/ActiveJDBC connection configured to use C3P0 for connection pooling. I know the documentation provided by Javalite says each transaction will be a single opened/closed connection, but does also mentions we can…
javastunt
  • 20
  • 6
0
votes
0 answers

active-jdbc: Include multiple database tables

I am building one web application using activeweb. I am trying to export a table named orders which is related to other child table dispatch where the product detail for that orders is stored. When I am trying to join the table using the…
0
votes
1 answer

An activeweb-bootstrap can not find controller

I dowloaded the ActiveWeb Bootstrap project from gtihub and have troubles with it. First, it was imposssible to import it into Eclipse so I executed mvn eclipse:eclipse and then imported the project into eclipse and converted it to maven. Then I…
rozero
  • 149
  • 3
  • 15
0
votes
1 answer

JavaLite ActiveWeb rootPackage

I'm developing a web application with ActiveWeb. I wanted to change the package from app.controller to be.coudron.graphplanner.controller I created a file activewebproperties and placed it in src/main/resources the contents of the file…