Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-dev] Unable to connect to Mantis repository as standalone application

 Here are the requirements.

1. Initialize eclipse using eclipse.startup api from my application (it uses
default java class loader provided by oracle)

 2. Eclipse starts ,resolves its dependency using its custom class loader 

3. Now i would like to use the mantis connectors which is loaded using
eclipse class loader from my application .


I am still under thought for  a solution , i would prefer not to use
reflection for it.

Thanks
Prakash


Robert Munteanu wrote:
> 
> On Fri, Jan 6, 2012 at 2:54 PM, prakash tiwary <prakash.tiwary@xxxxxxxxx>
> wrote:
>>
>> Hi Robert ,
>>  It works after starting Eclipse run time , i am able to access the
>> Mantis
>> connectors. Thanks :)
> 
> Great !
> 
>>
>> Now i have one new issue. It seems Eclipse uses different class loader &
>> my
>> application is having different class loader . If i need to access Mantis
>> connector reference from my application , i think i need to use
>> reflection.
> 
> How do you use the plugin? Do you embed it in your own Eclipse plugin?
> 
>>
>> Thanks
>> Prakash
>>
>>
>> Robert Munteanu wrote:
>>>
>>> Just to clarify, are you using without an Eclipse runtime started? It
>>> seems that the cache location for the repository configurations can
>>> not be resolved, and that is based on the plugin's state location.
>>>
>>> Robert
>>>
>>> On Wed, Jan 4, 2012 at 5:45 PM, prakash tiwary
>>> <prakash.tiwary@xxxxxxxxx>
>>> wrote:
>>>>
>>>> Hi Robert ,
>>>>   Thanks for your response . I am attaching the simple java files.
>>>>
>>>>
>>>>
>>>> http://old.nabble.com/file/p33079976/MantisTest.java MantisTest.java
>>>>
>>>>
>>>>
>>>> Here are the lines of code for your quick reference
>>>>
>>>> TaskRepository repository = new
>>>> TaskRepository(MantisCorePlugin.REPOSITORY_KIND, url);
>>>>        AuthenticationCredentials credentials = new
>>>> AuthenticationCredentials("",
>>>> "");
>>>>        repository.setCredentials(AuthenticationType.REPOSITORY,
>>>> credentials,
>>>> false);
>>>>        IMantisClientManager clientManager = new
>>>> InMemoryMantisClientManager();
>>>>        IMantisClient client = clientManager.getRepository(repository);
>>>>
>>>>
>>>>        MantisRepositoryConnector mc = new MantisRepositoryConnector();
>>>>
>>>>
>>>> Thanks
>>>> Prakash
>>>>
>>>> Robert Munteanu wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> The Mantis connector was not designed to run outside of OSGi. However,
>>>>> I'm willing to make any code changes necessary to do that.
>>>>>
>>>>> Can you post the code which leads to this error?
>>>>>
>>>>> Robert
>>>>>
>>>>> On Wed, Jan 4, 2012 at 4:56 PM, prakash tiwary
>>>>> <prakash.tiwary@xxxxxxxxx>
>>>>> wrote:
>>>>>>
>>>>>> I have tried to follow the steps of connecting Bugzilla Repository
>>>>>> using
>>>>>> java
>>>>>> api
>>>>>>
>>>>>> http://wiki.eclipse.org/index.php/Mylyn/Integrator_Reference#Headless_and_standalone_use
>>>>>>
>>>>>> But i could not succeed, it gives following error
>>>>>>
>>>>>> Error in custom provider, java.lang.NullPointerException
>>>>>>  while locating
>>>>>> com.itsolut.mantis.core.RepositoryPersistencePathProvider
>>>>>>  while locating org.eclipse.core.runtime.IPath annotated with
>>>>>> @com.itsolut.mantis.core.RepositoryPersistencePath()
>>>>>>    for parameter 0 at
>>>>>> com.itsolut.mantis.core.MantisClientManager.<init>(MantisClientManager.java:52)
>>>>>>  while locating com.itsolut.mantis.core.MantisClientManager
>>>>>>  while locating com.itsolut.mantis.core.IMantisClientManager
>>>>>>    for field at
>>>>>> com.itsolut.mantis.core.MantisRepositoryConnector.clientManager(MantisRepositoryConnector.ja
>>>>>>
>>>>>>
>>>>>>
>>>>>> It seems , i need to initialize some thing  .  For Bugzilla & Trac it
>>>>>> work
>>>>>> wells.
>>>>>>
>>>>>> Any suggestion will be helpful.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/Unable-to-connect-to-Mantis-repository-as-standalone-application-tp33079632p33079632.html
>>>>>> Sent from the Mylyn Dev mailing list archive at Nabble.com.
>>>>>>
>>>>>> _______________________________________________
>>>>>> mylyn-dev mailing list
>>>>>> mylyn-dev@xxxxxxxxxxx
>>>>>> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from my (old) computer
>>>>> _______________________________________________
>>>>> mylyn-dev mailing list
>>>>> mylyn-dev@xxxxxxxxxxx
>>>>> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Unable-to-connect-to-Mantis-repository-as-standalone-application-tp33079632p33079976.html
>>>> Sent from the Mylyn Dev mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> mylyn-dev mailing list
>>>> mylyn-dev@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
>>>
>>>
>>>
>>> --
>>> Sent from my (old) computer
>>> _______________________________________________
>>> mylyn-dev mailing list
>>> mylyn-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Unable-to-connect-to-Mantis-repository-as-standalone-application-tp33079632p33092605.html
>> Sent from the Mylyn Dev mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mylyn-dev mailing list
>> mylyn-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
> 
> 
> 
> -- 
> Sent from my (old) computer
> _______________________________________________
> mylyn-dev mailing list
> mylyn-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
> 
> 

-- 
View this message in context: http://old.nabble.com/Unable-to-connect-to-Mantis-repository-as-standalone-application-tp33079632p33101588.html
Sent from the Mylyn Dev mailing list archive at Nabble.com.



Back to the top