How to implement Axelor for Production

When installing the Axelor, it prompted that the package should be installed for only preview and not for production.
Is there any package for the production environment? Or how do I implement it for Production?

Hi,
The “package” is simply a war file available here https://github.com/axelor/abs-webapp/releases you just have to unzip it, modify application.properties to suit your needs and launch ./gradlew war
Resulting war will be in build/libs, it can be deployed on a tomcat8 instance with a PostgreSQL backend
Regards

Thanks. I run into an error?
AXELOR_HOME is not set properly

Build Failed.
Any assistance?

Have been able to complete with the build.

little stuck here, any idea how to fix this error message?

org.apache.jasper.JasperException: An exception occurred processing JSP page [/login.jsp] at line [26]

23: <%@ page import=“com.axelor.i18n.I18n” %>
24: <%@ page contentType=“text/html; charset=UTF-8” %>
25: <%
26: String loginTitle = I18n.get(“Please sign in”);
27: String loginRemember = I18n.get(“Remember me”);
28: String loginSubmit = I18n.get(“Log in”);
29:

Without the stack trace of the exception, you won’t get any help :slight_smile:

@beuss am able to build the app now. Only issue is with the error below:

Type Exception Report

Message javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

Type Exception Report

Message An exception occurred processing JSP page [/login.jsp] at line [26]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing JSP page [/login.jsp] at line [26]

23: <%@ page import=“com.axelor.i18n.I18n” %>
24: <%@ page contentType=“text/html; charset=UTF-8” %>
25: <%
26: String loginTitle = I18n.get(“Please sign in”);
27: String loginRemember = I18n.get(“Remember me”);
28: String loginSubmit = I18n.get(“Log in”);
29:

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:44)
org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
com.axelor.auth.AuthFilter.doFilterInternal(AuthFilter.java:81)
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:41)
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
com.axelor.app.internal.AppFilter.doFilter(AppFilter.java:94)
com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:91)
com.axelor.web.servlet.CorsFilter.doFilter(CorsFilter.java:136)
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)

What is the server log? is there an connection with the database?

16-Jan-2018 06:07:52.635 INFO [http-nio-8080-exec-3] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/ecb-webapp.war] has finished in [155,043] ms
2018-01-16 06:08:48,916 [http-nio-8080-exec-7] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Connections could not be acquired from the underlying database!

that’s from the server logs. the credentials i provided was correct, so i don’tknow what am missing here. Any assistance?

@admin any help with this?

Hee Myankey,

U need to set the properties of the database. U can find it in: /WEB-INF/classes/application.properties

db.default.dialect = org.hibernate.dialect.PostgreSQLDialect
db.default.driver = org.postgresql.Driver
db.default.ddl = update
#db.default.url = jdbc:postgresql://localhost:5432/axelor-business-suite
db.default.url = jdbc:postgresql://postgres:5432/erp
db.default.user = “username”
db.default.password = “password”

that’s how i set it, kindly check if i missed anything

So your sql server is named postgres ? the database is erp, user is username and password is password ?

check all is right with psql -h postgres erp username

just to clear some doubt, I have ubuntu installed with the postgres installed on it.
so the sql server name mentioned will be the localhost?
i changed localhost to postgres when as a way to troubleshoot the connection issue.

Yes and try it first what buess also says.

psql -h myhost -d mydb -U myuser -W
In your case: psql -h localhost -d erp -U username -W
:wink:

Then hostname is localhost

Did you issue createdb & createuser to create your database and user?

@itvix i tried the localhost configuration and i still had the same error.

@beuss i did issue the same command createdb and createuser . the DB and the user were different names. could that be the issue? will purge the postgres sql and start the configure all over.

Did you try the psql command line example we gave you ? You’ll have a more meaningful error message and could test quickly (instead of modifying & restarting)

@beuss i tried the "psql -h localhost -d erp -U username -W " and it worked.
reconfigured the application.properties, run ./gradlew war, deployed on the tomcat webserver and i got same error.