Hi
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 org.python.core.Py.ImportError(Py.java:290)
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
Thank you
MCTibi
Hi!
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.
Alex
thanks Alex At least I now know that I have to look in other directions.. you saved me some time thanks again MCTibi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.