Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

The type TransactionCallback is not generic; it cannot be parameterized with arguments [Ao entity].

dhaval soni
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2013

In below stuff, shows me errror as "The type TransactionCallback is not generic; it cannot be parameterized with arguments <EntityIssues>" in eclipse editor.

import com.atlassian.sal.api.transaction.TransactionCallback;

ao.executeInTransaction(new TransactionCallback&lt;EntityIssues&gt;() // (1)      
{
   @Override
   public Todo doInTransaction()
   {
      //storing stuff
   }    
});

here is the dependency:

&lt;dependency&gt;
 &lt;groupId&gt;com.atlassian.sal&lt;/groupId&gt;
 &lt;artifactId&gt;sal-api&lt;/artifactId&gt;
 &lt;version&gt;2.0.17&lt;/version&gt;
 &lt;scope&gt;provided&lt;/scope&gt;
&lt;/dependency&gt;

any idea why it does not taking generic object ?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
dhaval soni
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2013

Thanks for your comments.

By removing the generic parameterizationm it works. (not sure why it did not work with generic even though updated with latest version 2.7.0.

newTransactionCallback()

0 votes
Samuel Le Berrigaud
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2013

I don't know enough about Eclipse to tell you what's wrong with it but the error seems to be coming from it.

The TransactionCallback from SAL is definitely genericisable (if that's even a word). One thing I note in your code above is that the generic type and the return type of the method 'doInTransaction' are not the same when they should be... Maybe Eclipse is getting confused here...

What happens when you try to compile this code with maven?

dhaval soni
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2013

It was mistake in pasted stuff.. in actual, EntityIssues same at both side.

I have compiled direclty through - atlas-cli by keeping TransactionCallback<EntityIssues> but still, it did not work.

i have just removed generic term and keep TransactionCallback then it works..

0 votes
dhaval soni
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2013

i have also tried by updating version to "<version>2.7.0/1</version>". no works still.

TAGS
AUG Leaders

Atlassian Community Events