Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » Problem with ContainerFactory.createContainer(java.lang.String) method
Problem with ContainerFactory.createContainer(java.lang.String) method [message #988576] Fri, 30 November 2012 15:01 Go to next message
Nadeem Abbas is currently offline Nadeem AbbasFriend
Messages: 2
Registered: November 2012
Junior Member
Hi,

I am new to ECF, and when I try to create a container using following code:

IContainerFactory factory = ContainerFactory.getDefault();
IContainer container=factory.createContainer("ecf.xmpp.smack");

I get following error on second line at factory.createContainer("ecf.xmpp.smack)" :
"The type org.eclipse.ecf.core.identity.ID cannot be resolved. It is indirectly referenced from required .class files"

I don't know why. I have checked the target platform and the ECF sdk is added there.
Can you please help to fix this issue?

I am using Ecliple Juno Release 1, with ECF 3.5.6.
Re: Problem with ContainerFactory.createContainer(java.lang.String) method [message #988591 is a reply to message #988576] Fri, 30 November 2012 15:50 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

Hi Nadeem,

The call also involves that ID class. You need to add the bundle or package that exports this ID class. Add it to "require bundle" or "import package".

Regards,

Wim
Re: Problem with ContainerFactory.createContainer(java.lang.String) method [message #988592 is a reply to message #988576] Fri, 30 November 2012 15:51 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Nadeem,

Nadeem Abbas wrote on Fri, 30 November 2012 10:01
Hi,

I am new to ECF, and when I try to create a container using following code:

IContainerFactory factory = ContainerFactory.getDefault();
IContainer container=factory.createContainer("ecf.xmpp.smack");

I get following error on second line at factory.createContainer("ecf.xmpp.smack)" :
"The type org.eclipse.ecf.core.identity.ID cannot be resolved. It is indirectly referenced from required .class files"

I don't know why. I have checked the target platform and the ECF sdk is added there.
Can you please help to fix this issue?

I am using Ecliple Juno Release 1, with ECF 3.5.6.


Hmmm...this is very strange, as org.eclipse.ecf.core.identity.ID class is declared in org.eclipse.ecf.identity and is used throughout nearly all of ECF.

I can't currently reproduce it...using a very similar piece of example code in this class

http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/examples/bundles/org.eclipse.ecf.example.clients/src/org/eclipse/ecf/example/clients/XMPPChatClient.java

One thing that might be going on with your code...is that perhaps it's running as a java application rather than a plugin? i.e. How are you invoking this code? Is it in a main method? Or is it part of an Eclipse/OSGi Application? Because of OSGi's classloading model, it's necessary to run your code as an Eclipse/OSGi Application...because then the appropriate class namespace is setup (including the org.eclipse.ecf.identity.ID class and others).

Please let us know and I'll help diagnose further.


Re: Problem with ContainerFactory.createContainer(java.lang.String) method [message #988635 is a reply to message #988592] Fri, 30 November 2012 19:15 Go to previous message
Nadeem Abbas is currently offline Nadeem AbbasFriend
Messages: 2
Registered: November 2012
Junior Member
Dear Wim and Scott,

Thank you very much for your kind support.

I have fixed the problem by following Wim's instructions to add the package (org.eclipse.ecf.core.identity) that exports ID class to the "imported packages" list. I was considering ID class to be a part of org.eclipse.ecf.core package.

@Scott it was a plug-in project and I was getting compile time error. Thanks a lot for your kind consideration and reply.

Best regards
Previous Topic:Client-server architecture with possibility of multiple distinct servers
Next Topic:[ECF/R-OSGi] java.lang.IllegalAccessError after 16 remote service calls
Goto Forum:
  


Current Time: Fri Apr 19 20:42:51 GMT 2024

Powered by FUDForum. Page generated in 0.05947 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top