1

Gradle halts on %88 EXECUTING when I'm try to run my project but it gives me a localhost link. And when I login I get the following error message:

HTTP Status 500 – Internal Server Error Type Exception Report

Message org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException

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

Exception

javax.servlet.ServletException: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
    org.apache.shiro.web.servlet.AdviceFilter.cleanup(AdviceFilter.java:196)
    org.apache.shiro.web.filter.authc.AuthenticatingFilter.cleanup(AuthenticatingFilter.java:155)
    org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:148)
    com.axelor.auth.AuthFilter.doFilterInternal(AuthFilter.java:121)
    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:387)
    org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    com.axelor.app.internal.AppFilter.doFilter(AppFilter.java:93)
    com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:94)
    com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    com.axelor.db.tenants.AbstractTenantFilter.doFilter(AbstractTenantFilter.java:67)
    com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    com.axelor.web.servlet.CorsFilter.doFilter(CorsFilter.java:132)
    com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)
    com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)

Root Cause

org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
    org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:78)
    org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:222)
    org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:171)
    org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:414)
    org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:205)
    org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    com.axelor.db.tenants.AbstractTenantFilter.doFilter(AbstractTenantFilter.java:67)
    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:121)
    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:387)
    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:93)
    com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:94)
    com.axelor.db.tenants.AbstractTenantFilter.doFilter(AbstractTenantFilter.java:67)
    com.axelor.web.servlet.CorsFilter.doFilter(CorsFilter.java:132)
    com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)
    com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)

Root Cause

java.lang.NullPointerException
    com.axelor.web.internal.AppInfo.info(AppInfo.java:68)
    com.axelor.web.service.AboutService.info(AboutService.java:58)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:498)
    org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
    org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:294)
    org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:248)
    org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:235)
    org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:398)
    org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:205)
    org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    com.axelor.db.tenants.AbstractTenantFilter.doFilter(AbstractTenantFilter.java:67)
    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:121)
    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:387)
    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:93)
    com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:94)
    com.axelor.db.tenants.AbstractTenantFilter.doFilter(AbstractTenantFilter.java:67)
    com.axelor.web.servlet.CorsFilter.doFilter(CorsFilter.java:132)
    com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)
    com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)

Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/8.5.24

<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">

    <module name="contract" package="com.axelor.apps.contract.db" />

    <entity name="Contract" repository="abstract">

        <integer name="targetTypeSelect" title="Type" selection="contract.target.type.select" default="1" required="true"/>
        <integer name="periodNumber" title="Number of finished periods" default="0"/>
        <integer name="statusSelect" title="Status" selection="contract.status.select" default="1" required="true"/>
        <integer name="renewalNumber" title="Number of renewal"/>
        <integer name="versionNumber" title="Contract version" default="-1"/>

        <string name="name" title="Name" namecolumn="true" />
        <string name="note" multiline="true" large="true" title="Notes"/>
        <string name="contractId" title="Contract N°" readonly="true"/>

        <boolean name="isInvoicingManagement" title="Manage invoices" />
        <boolean name="isConsumptionManagement" title="Consumption management" />
        <boolean name="isAdditionaBenefitManagement" title="Additional benefit management" />
        <boolean name="toClosed" title="To closed"/>
        <boolean name="terminatedManually" title="Terminated manually" default="false"/>

        <date name="firstPeriodEndDate" title="First period end date"/>
        <date name="startDate" title="Start date"/>
        <date name="endDate" title="End date"/>
        <date name="terminatedDate" title="Terminated date"/>
        <date name="engagementStartDate" title="Engagement start date" />
        <date name="terminationDemandDate" title="Termination demand date" />
        <date name="lastRenewalDate" title="Last renewal date"/>
        <date name="invoicePeriodStartDate" title="Start of next invoicing period" />
        <date name="invoicePeriodEndDate" title="End of next invoicing period" />
        <date name="invoicingDate" title="Invoicing date" />

        <many-to-one name="company" title="Company" ref="com.axelor.apps.base.db.Company" required="true"/>
        <many-to-one name="partner" title="Partner" ref="com.axelor.apps.base.db.Partner" />
        <many-to-one name="terminatedByUser" ref="com.axelor.auth.db.User" title="Terminated By"/>
        <many-to-one name="currentInvoicePeriod" ref="com.axelor.apps.contract.db.InvoicePeriod" title="Current invoice period"/>
        <many-to-one name="currency" ref="com.axelor.apps.base.db.Currency" title="Currency" />

        <one-to-one name="currentContractVersion" ref="com.axelor.apps.contract.db.ContractVersion" required="true" title="Current version"/>
        <one-to-one name="nextVersion" ref="com.axelor.apps.contract.db.ContractVersion" title="Next version"/>

        <one-to-many name="additionalBenefitContractLineList" ref="com.axelor.apps.contract.db.ContractLine" title="Next Invoice Additional Benefit"/>
        <one-to-many name="historyInvoicePeriodList" ref="com.axelor.apps.contract.db.InvoicePeriod" title="Invoice period history"/>
        <one-to-many name="versionHistory" ref="com.axelor.apps.contract.db.ContractVersion" mappedBy="contractHistory" orderBy="-createdOn"/>
        <one-to-many name="consumptionLineList" ref="com.axelor.apps.contract.db.ConsumptionLine" title="Consumption for next invoice"/>

        <many-to-many name="batchSet" ref="com.axelor.apps.base.db.Batch" title="Batches"/>

        <extra-code><![CDATA[
            static final String CUSTOMER_CONTRACT_SEQUENCE = "customerContract";
            static final String SUPPLIER_CONTRACT_SEQUENCE = "supplierContract";

            public static final int DRAFT_CONTRACT = 1;
            public static final int ACTIVE_CONTRACT = 2;
            public static final int CLOSED_CONTRACT = 3;

            public static final int CUSTOMER_CONTRACT = 1;
            public static final int SUPPLIER_CONTRACT = 2;
        ]]></extra-code>

    </entity>

</domain-models>

Any ideas as to why the problem occurs?

sertkayali
  • 11
  • 3
  • What is the Axelor version you are using? – Boris Feb 26 '20 at 14:37
  • @Boris axelor-open-suite-master 5.2.4 – sertkayali Feb 26 '20 at 14:54
  • This is the [line](https://github.com/axelor/axelor-open-platform/blob/f4dc5fbbcea9fcfa13467309e3e8dcccca8ae422/axelor-web/src/main/java/com/axelor/web/internal/AppInfo.java#L68) throwing the NullPointerException. – Boris Feb 26 '20 at 15:03
  • @Boris So how can I solve it? – sertkayali Feb 26 '20 at 15:05
  • Please add to the question entity classes representing domain [models](https://docs.axelor.com/adk/5.2/dev-guide/models/models.html) (XML files). – Boris Feb 26 '20 at 18:03
  • `Gradle halts on %88 EXECUTING` - what does this mean? On which part does it stop? – Andrey Feb 27 '20 at 06:18
  • @Andrey it gives the localhost domain and program runs (with this error) but it is never 100% i'm thinking it has something to do with this error – sertkayali Feb 27 '20 at 08:08
  • @Boris My project doesn't exist this xml files. When I add this files to my project, i'm getting :compileJava error – sertkayali Feb 27 '20 at 08:31
  • So you're saying there are no domain objects? These are normally defined using XML in the `src/main/resources/domains` folder. – Boris Feb 27 '20 at 14:33
  • 1
    @Boris i dont have these domain object. Even if i did insert them from the axelor demo files i get a compilejava error. I really need help for this its been 2 weeks and there is no solution... – sertkayali Feb 28 '20 at 17:08
  • Can you share the exceptions please? Also are you following this [guide](https://docs.axelor.com/adk/latest/getting-started/idea.html)? – Boris Feb 28 '20 at 17:14
  • @Boris Yes, I made everything at tihs site. And I added the whole modules domain xml files but still same error... – sertkayali Mar 02 '20 at 07:33
  • Do the models contain a name field annotated with `@NameColumn` or a field with name `name`? Can you add one of the domain objects to the question? – Boris Mar 04 '20 at 10:52
  • Can you run `$ ./gradlew generateCode`, what's the output? As per [Define a domain entity](https://docs.axelor.com/adk/5.2/tutorial/step3.html#define-a-domain-entity). – Boris Mar 04 '20 at 11:01
  • @Boris When I run generateCode the output is "Build Successful" so there is no problem. And I added an example xml file to question (domains>Contract.xml) – sertkayali Mar 04 '20 at 11:36
  • @Boris When i open the localhost i get half completed project. I'm adding any object to axelor (e.g any document) the error says "the name cannot be empty" even though I wrote the name... – sertkayali Mar 04 '20 at 11:44
  • Please add the stack trace with the new error, or the screenshot if it's in the UI. – Boris Mar 04 '20 at 11:56
  • @Boris The stack trace is still same as in question – sertkayali Mar 04 '20 at 13:52
  • You mentioned the "the name cannot be empty" error. It's not present in the current stack. – Boris Mar 04 '20 at 13:53
  • @Boris `2020-03-04 17:02:30.076 ERROR 5108 --- [nio-8080-exec-3] com.axelor.rpc.ResponseInterceptor : Constraint Error: Validation failed for classes [com.axelor.dms.db.DMSFile] during per sist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage=' cannot be null', propertyPath=fileName, rootBeanClass=class com.axelor.dms.db.DMSFile, messageTemplate='{javax.validation.constra ints.NotNull.message}'}` – sertkayali Mar 04 '20 at 14:04
  • @Boris [The error on axelor](https://i.hizliresim.com/DG8bG6.png) "boş değer olamaz" means "cannot be null" on Turkish – sertkayali Mar 04 '20 at 14:10
  • This is a new issue then, are you trying to perform an operation using [Document Services](https://docs.axelor.com/adk/5.2/dev-guide/web-services/dms.html#file-listing) now? – Boris Mar 04 '20 at 15:00

0 Answers0