Opened 8 years ago
Closed 8 years ago
#2026 closed defect (fixed)
Exuting a plug-in via an unsaved job results in stacktrace
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | trivial | Milestone: | BASE 3.9.1 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
The plug-in API allows for a plug-in to be executed programmatically by calling:
DbControl dc = ... PluginDefinition plugin = ... Job job = Job.getNew(dc, plugin , null, null); PluginExecutionRequest exec = job.execute(null, null); exec.setParameterValue(...); dc.close(); PluginResponse response = exec.invoke();
Normally, the job is saved to the database and the plug-in is invoked via the job queue manager. In this case the job is not saved and the plug-in is invoked for immediate execution. If it completes successfully a stacktrace is written to the server log:
Can't change job status to DONE: Job[new; name=New job] net.sf.basedb.core.ConnectionClosedException: The connection has been closed. at net.sf.basedb.core.BasicItem.getDbControl(BasicItem.java:400) at net.sf.basedb.core.Job.getPluginDefinition(Job.java:426) at net.sf.basedb.core.Job$ProgressReporterImpl.setEnded(Job.java:1899) at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:131) ...
Note:
See TracTickets
for help on using tickets.
(In [7185]) Fixes #2026: Exuting a plug-in via an unsaved job results in stacktrace