Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Workflow console problems

Avatar

Level 5

I'm facing significant problems with workflows in our test environments! I've developed a new workflow and launcher in my local dev environment which works fine however on the test environment I am facing some problems, on the workflow console I can't see any models/launched/archived/failures instead I get exceptions like this:

13.01.2016 08:20:41.970 *ERROR* [172.24.103.19 [1452673241964] GET /libs/cq/workflow/content/console/archive.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException org.apache.sling.api.SlingException: An exception occurred processing JSP page /libs/cq/workflow/components/console/archive/json.jsp at line 49 at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInternal(JspServletWrapper.java:683) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:608) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:533) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:241) ...Removed lines due to word limit stack trace continues below at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:340) at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:383) at com.day.j2ee.servletengine.ServletHandlerImpl.process(ServletHandlerImpl.java:360) at com.day.j2ee.servletengine.HttpListener$Worker.run(HttpListener.java:644) at java.lang.Thread.run(Thread.java:736) Caused by: java.lang.NullPointerException at org.apache.jsp.libs.cq.workflow.components.console.archive.json_jsp._jspService(json_jsp.java:129) at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502) ... 89 more 13.01.2016 08:20:42.014 *ERROR* [172.24.103.19 [1452673242010] GET /libs/cq/workflow/content/console/failures.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 14 in the generated java file Only a type can be imported. com.day.cq.workflow.util.WorkflowUtil resolves to a package at org.apache.sling.scripting.jsp.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) at org.apache.sling.scripting.jsp.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) at org.apache.sling.scripting.jsp.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:421) at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:312) at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:290) at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:277) at org.apache.sling.scripting.jsp.jasper.JspCompilationContext.compile(JspCompilationContext.java:501) ...removed extra lines due to word limit
1 Accepted Solution

Avatar

Correct answer by
Level 5

Yeah...our helpful operations team that looks after the server got their restart scripts muddled up... Worked fine after the correct server had been restarted!!

View solution in original post

6 Replies

Avatar

Level 5

I'm also seeing this error:

13.01.2016 08:37:31.430 *ERROR* [172.24.103.19 [1452674251408] GET /libs/cq/workflow/content/console/instances.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 13 in the generated java file Only a type can be imported. com.day.cq.workflow.util.WorkflowUtil resolves to a package An error occurred at line: 61 in the jsp file: /libs/cq/workflow/components/console/instances/json.jsp WorkflowUtil cannot be resolved 58: Workflow[] instances = result.getItems(); 59: 60: Collection<Event> jobs = (wfSession.isSuperuser()) ? 61: WorkflowUtil.getEvents(jobStatusProvider, wfSession) : Collections.EMPTY_LIST; 62: 63: JSONWriter w = new JSONWriter(response.getWriter()); 64: w.object(); An error occurred at line: 91 in the jsp file: /libs/cq/workflow/components/console/instances/json.jsp WorkflowUtil cannot be resolved 88: } 89: } 90: // enable check only for superuser 91: boolean isStale = (wfSession.isSuperuser()) ? WorkflowUtil.isStale(instance, jobs) : false; 92: String state = isStale ? "STALE" : instance.getState(); 93: 94: String title = data.getMetaDataMap().get("workflowTitle", "");

Avatar

Level 9

@Sutty100,

Quick verification :

  1. Is your instance, stable/install correctly?.
  2. Do you have all required bundles in OSGI console in active state?
  3. Is there any customization/configuration done on this?.

Jitendra

Avatar

Level 5

Jitendra S.Tomar wrote...

@Sutty100,

Quick verification :

  1. Is your instance, stable/install correctly?.
  2. Do you have all required bundles in OSGI console in active state?
  3. Is there any customization/configuration done on this?.

Jitendra

 

1. Yes we have been using it for some time although not really using the workflows

2. I have the same workflow bundles as my local and they are all active.

3. No nothing on the low level workflow code.

Avatar

Level 9

Strange!!.

When I hit the same URL (/libs/cq/workflow/content/console/archive.json) from the browser, it works fine in local machine. I am using AEM 6.1

Jitendra

Avatar

Correct answer by
Level 5

Yeah...our helpful operations team that looks after the server got their restart scripts muddled up... Worked fine after the correct server had been restarted!!