I'm trying to migrate from JIRA 4.2.4 to JIRA 6.2.7
Among other problems that I encountered, now it came out another
I have many post function with jython script
I also use JIRA rpc in those scripts
In JIRA 6 rpc plugin is bundled (as difference from 4.2.4 where i had to put it in /lib)
Now my jython script gives me error on import:
/secure/CreateIssueDetails.jspa [jira.plugin.workflow.JythonValidator] Unrecognized exception while executing Jyphon script: null
Traceback (most recent call last):
File "<string>", line 2, in <module>
ImportError: No module named rpc
at line : "from com.atlassian.jira.rpc.soap import JiraSoapService"
The plugin shows that is enabled in JIRA
Please Help me to resolve that import so that my scripts continue to work
As I said, this is an OSGi issue. This is not a JSS bug and thus can not be fixed.
To get a Class a class (e.g. DB driver) from a system classloader:
from com.atlassian.jira.component import ComponentAccessor drv = ComponentAccessor.getClassLoader().loadClass("org.postgresql.Driver").newInstance() print drv
To get a class from another OSGi plugin - actually any v2 JIRA plugin - you need to have an access to that plugin classloader. As I said, I do not have a solution for that out of hand.
Hi again.. one more little thing.. It now gives me java.sql.SQLException: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@xxx:1540:xxx the code is: from com.atlassian.jira.component import ComponentAccessor from java.sql import DriverManager drv = ComponentAccessor.getClassLoader().loadClass("oracle.jdbc.OracleDriver").newInstance() url = "jdbc:oracle:thin:@xxx:1540:xxx" db_user = "user" password = "pass" dbconn = DriverManager.getConnection(url, db_user, password) please help thanks MCTibi
In additional to the problem above I have also a: Error creating issue: root cause: Traceback (most recent call last): File "<string>", line 91, in <module> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772) at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver Can you tell me how can I make it work? In there any possibility to acces these external classes from Jython? I use jss-2.3.0 in jira 6.2.7 Please help.. we're stuck with Jira migration because of that Thank you MCTibi
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG