All work
- Groovy source unable to resolve class PrimaryTypePRIS-127Resolved issue: PRIS-127Markus Neumann
- Rethink source/mapper/script relationsPRIS-121Markus Neumann
- Script-Source output should not be restricted to RequisitionPRIS-120Resolved issue: PRIS-120fooker
- replace outdated script source examplePRIS-118Resolved issue: PRIS-118Markus Neumann
4 of 4
Groovy source unable to resolve class PrimaryType
Fixed
Description
Lucidchart Diagrams
Details
Assignee
Markus NeumannMarkus NeumannReporter
Ronny TrommerRonny TrommerComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Markus Neumann
Markus NeumannReporter
Ronny Trommer
Ronny TrommerComponents
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created March 30, 2015 at 4:58 AM
Updated September 30, 2015 at 6:33 AM
Resolved September 30, 2015 at 6:33 AM
Activity
Markus NeumannSeptember 30, 2015 at 6:30 AM
PRIS code uses model classes generated from the model-importer xsd.
The PrimaryType import to use ins now:
org.opennms.pris.model.PrimaryType
The myGroovySource.groovy script has a org.opennms.pris.model.* import that covers the PrimaryType import already.
Ronny TrommerMarch 30, 2015 at 5:07 AM
I tried to extend the class path to include opennms/lib and ran in the following error:
09:06:43.403 [qtp330287752-15] WARN o.e.j.util.thread.QueuedThreadPool -
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at groovy.lang.Binding.<init>(Binding.java:37) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl$1.<init>(GroovyScriptEngineImpl.java:262) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:262) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:145) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:122) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:212) ~[na:1.7.0_75]
at org.opennms.opennms.pris.plugins.script.util.ScriptManager.execute(ScriptManager.java:83) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at org.opennms.opennms.pris.plugins.script.source.ScriptSource.dump(ScriptSource.java:57) ~[opennms-pris-plugins-script-1.1.2-shaded.jar:na]
at org.opennms.pris.RequisitionGenerator.generate(RequisitionGenerator.java:151) ~[opennms-pris.jar:na]
at org.opennms.pris.driver.RequisitionProviderHandler.handle(RequisitionProviderHandler.java:68) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1113) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1049) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.Server.handle(Server.java:461) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284) ~[opennms-pris.jar:na]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244) ~[opennms-pris.jar:na]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) ~[opennms-pris.jar:na]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) ~[opennms-pris.jar:na]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) ~[opennms-pris.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
If you try to run the Groovy Script source example, it fails with a missing source parameter in the requisition.properties. If you set the source to script, the myGroovySource.groovy file fails with the following error message:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 1: unable to resolve class org.opennms.netmgt.model.PrimaryType @ line 1, column 1. import org.opennms.netmgt.model.PrimaryType