Hi,
In plugin project under eclipse environment below imported namespace shows me error and looks like unable to find libraries.
"import com.opensymphony.user.User", "com.atlassian.jira.web.bean.I18nBean"
i have added opensymphony jar into project libraries and refresh the project. Though it shows same.
Please share your comment to resolve it.
thanks
Community moderators have prevented the ability to post new answers.
Copying this from the comments so it shows up as an answer. Instead of:
I18nHelper i18nBean = new I18nBean(remoteUser);
use:
I18nHelper i18nBean = ComponentAccessor.getJiraAuthenticationContext().getI18nHelper();
And instead of:
import com.opensymphony.user.User
use:
import com.atlassian.crowd.embedded.api.User;
Additionally, please be sure to file feedback on the tutorial page so it can get updated.
Which version of JIRA is it? Have you updated the JIRA version in pom.xml before rebuilding Eclipse project? Also there is a change in using i18nBean. See https://confluence.atlassian.com/display/JIRA/Plugin+Developer+Notes+for+JIRA+4.3#PluginDeveloperNotesforJIRA4.3-I18nBeannolongerinthePICOcontainer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jobin,
my jira version is 5.1.2 and atlas-version out put as below:
C:\>atlas-version
ATLAS Version: 4.1.2
ATLAS Home: C:\atlassian-plugin-sdk
ATLAS Scripts: C:\atlassian-plugin-sdk\bin
ATLAS Maven Home: C:\atlassian-plugin-sdk\apache-maven
--------
Executing: "C:\atlassian-plugin-sdk\apache-maven\bin\mvn.bat" --version
Apache Maven 2.1.0 (r755702; 2009-03-19 00:40:27+0530)
Java version: 1.6.0_33
Java home: C:\Program Files\Java\jdk1.6.0_33\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
I have gone through the your given link and used factory method to create instance of I18nHelper.
But, unable to create instance of "I18nBean" becuase, it shows me type resolve error for "import com.atlassian.jira.web.bean.I18nBean;"
have also added dependency block for - "jira-core" and reexecuted atlas-run but still same issue.
can you please share me your comments to resolve it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
facing an error at below statement due to import unable to resolve for ..web.bean.I18nBean.
"I18nHelper i18nBean = new I18nBean(remoteUser);"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>my jira version is 5.1.2 and
That is NOT what your pom.xml says. You need to update the pom.xml to point to the right version of Jira. Look at the product and data numbers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I18nHelper.BeanFactory fac = null; // what object i have to assign at this factory to create instance ?
I18nHelper i18nBean = fac.getInstance(remoteUser);
otherwise,
I18nHelper i18nBean = new I18nBean(remoteUser); would work but raise an error for "I18nBean"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
pom.xml says as below:
<properties>
<jira.version>5.1.8</jira.version>
<amps.version>4.1.2</amps.version>
<plugin.testrunner.version>1.1</plugin.testrunner.version>
</properties>
when i execute jira then it shows "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using:
I18nHelper i18nBean = ComponentAccessor.getJiraAuthenticationContext().getI18nHelper();
instead of the code in the tutorial. I'm not sure if it is correct. I suggest leaving feedback on the tutorial so it can be updated to correct the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, this is fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are you trying to achieve? You dont need to use the deprecated api com.opensymphony.user.User, instead try using com.atlassian.embedded.api.User
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Creating report by follow,
https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Creating+a+JIRA+Report
but, in createreport class shows error for this two namespace and relatedobjects.
I will check by your given namespace. Can you also share me , why "com.atlassian.jira.web.bean.I18nBean" not working ??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys for your comments.
In pom.xml, it shows me below jira version.
<properties>
<jira.version>4.0.1</jira.version>
<jira.data.version>4.0</jira.data.version>
</properties>
I have changed it to 6.0 as below as need to develop a plugin for current live instance which is in 6.0-OD-05v:
<properties>
<jira.version>6.0</jira.version>
<jira.data.version>4.0</jira.data.version>
</properties>
I was just implemtning report tutorial by follow below link as planning to create a plugin for creating a custom report:
https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Creating+a+JIRA+Report
But it looks like, these two namespaces are not found.
- For l18Helper, i think, it would resolve through "I18nHelper.BeanFactory.getInstance(user)" as posted by Jobin.
"com.atlassian.embedded.api.User" shows "import can not resolve" error.
Please share me if any other good tutorial for report creation or any resolution for above errors.
Basically, i just want to acheive one custom report template creation which will access jira work logs details and i am new with this so, wanted to go with some related tutorial.
Thank You.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also get this error. After following the plugin development tutorial and adding a Issue tab panel to a new empty project.
atlas-create-jira-plugin-module -> 8: Issue Tab Panel
Changing from
1
|
import com.opensymphony.user.User |
to
1
|
import com.atlassian.crowd.embedded.api.User; |
..did solve the issue. But to avoid other newbies to get confused maybe you can update the sdk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Even I have a problem related to VersionAssociations
The below shown is the error:
:[127,25] cannot access com.opensymphony.user.User class file for com.opensymphony.user.User not found
BoardContext context = new DefaultBoardContext(project,Component
Manager.getInstance().getJiraAuthenticationContext().getLoggedInUser());
I am not using the com.opensymphony.user.User any where.I dont know why it is getting error like can not access com.openSymphony.user.User.
can somebody answer this???
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It could be anything stopping the i18nBean from working, you haven't told us what is actually wrong with it.
Concentrate on the first error though - why are you trying to import Opensymphony when it's deprecated? Is your report for a version of Jira below 4.3?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.