Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB18110B4D for ; Sat, 8 Mar 2014 11:14:20 +0000 (UTC) Received: (qmail 32820 invoked by uid 500); 8 Mar 2014 11:14:19 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 32243 invoked by uid 500); 8 Mar 2014 11:14:09 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 32235 invoked by uid 99); 8 Mar 2014 11:14:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Mar 2014 11:14:08 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.170.15.221] (HELO mail2.kustar.ac.ae) (194.170.15.221) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Mar 2014 11:14:00 +0000 X-ASG-Debug-ID: 1394277161-05d22165f3b7f7d0001-8bGJ6W Received: from mail.kustar.ac.ae (mail.kustar.ac.ae [194.170.15.94]) by mail2.kustar.ac.ae with ESMTP id w1GMfXjOruemrFn9 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO) for ; Sat, 08 Mar 2014 15:12:41 +0400 (GST) X-Barracuda-Envelope-From: zaid.almahmoud@kustar.ac.ae X-Barracuda-Apparent-Source-IP: 194.170.15.94 Received: from KU-SH-MBX02.kustar.ac.ae ([fe80::f5f7:69af:912c:60e2]) by KU-SH-HCAS02.kustar.ac.ae ([2002:6f6f:6f05::6f6f:6f05]) with mapi id 14.02.0342.003; Sat, 8 Mar 2014 15:11:53 +0400 From: Zaid Jamal Saeed Al Mahmoud To: "users@felix.apache.org" Subject: Creating PrimitiveComponentType without importing iPOJO required Packages Thread-Topic: Creating PrimitiveComponentType without importing iPOJO required Packages X-ASG-Orig-Subj: Creating PrimitiveComponentType without importing iPOJO required Packages Thread-Index: Ac86vPdzTVStT5/8RZOBNlBln9KH0A== Date: Sat, 8 Mar 2014 11:11:52 +0000 Message-ID: <29C820C3F0D9864CBDAE1AFA0557E241266860@KU-SH-MBX02.kustar.ac.ae> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [92.99.126.68] Content-Type: multipart/related; boundary="_004_29C820C3F0D9864CBDAE1AFA0557E241266860KUSHMBX02kustarac_"; type="multipart/alternative" MIME-Version: 1.0 X-Barracuda-Connect: mail.kustar.ac.ae[194.170.15.94] X-Barracuda-Start-Time: 1394277161 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://194.170.15.221:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at kustar.ac.ae X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=EXTRA_MPART_TYPE, HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.3703 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 EXTRA_MPART_TYPE Header has extraneous Content-type:...type= entry 0.00 HTML_MESSAGE BODY: HTML included in message X-Virus-Checked: Checked by ClamAV on apache.org --_004_29C820C3F0D9864CBDAE1AFA0557E241266860KUSHMBX02kustarac_ Content-Type: multipart/alternative; boundary="_000_29C820C3F0D9864CBDAE1AFA0557E241266860KUSHMBX02kustarac_" --_000_29C820C3F0D9864CBDAE1AFA0557E241266860KUSHMBX02kustarac_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey, I have the following issue: In my OSGI bundle, I create a Component Type using iPOJO API as the followi= ng: public void start(BundleContext context) throws Exception { type =3D new PrimitiveComponentType().setBundleContext(context) .setComponentTypeName("someType") .setClassName("my.class.Name") .setImmediate(true); type.start(); instance =3D type.createInstance(); } Now, according to this source, http://mail-archives.apache.org/mod_mbox/fel= ix-users/201204.mbox/%3C1FCCF246-DB56-4E86-A0EE-7E57EC96DDB7@gmail.com%3E iPOJO manipulation rely on some classes of org.apache.felix.ipojo, and so I= need to import this package. All bundles intended to have iPOJO component,= need to import: org.apache.felix.ipojo and org.apache.felix.ipojo.architec= ture. For some reason, I don't like to import these packages from my bundle. I wa= nt my bundle to have iPOJO component without importing any iPOJO-related pa= ckages. Although the answer in the link continues saying: To avoid this manual import you can: - use the iPOJO url handler and so install the bundle with: ipojo://file:/t= he.path.to.my.bundle.jar I tried the above solution, by adding "ipojo://" part to my bundle installa= tion file path as the following, bundleContext.installBundle("ipojo://file:C:\Users\zaid.almahmoud\Desktop\p= lugins\MyComponent.jar"); but when I run my program, I get the following error: org.osgi.framework.BundleException: Unable to cache bundle: ipojo://file:C:= \Users\zaid.almahmoud\Desktop\plugins\MyComponent.jar Caused by: java.net.MalformedURLException: Unknown protocol: ipojo What am I missing here? Thanks. Kind Regards, Zaid Almahmoud Research Assistant [cid:image001.png@01CE4FB8.E6C8A910] Khalifa University of Science, Technology, and Research Abu Dhabi - United Arab Emirates TEL: 00971-2-401-8178 MOB: 00971-50-9619601 --_000_29C820C3F0D9864CBDAE1AFA0557E241266860KUSHMBX02kustarac_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hey, I have the following issue:

 

In my OSGI bundle, I create a Component Type using i= POJO API as the following:

 

public void start(BundleContext context) throws Exception {

  &nbs= p;        

  &nbs= p;          

   &= nbsp;    type =3D new PrimitiveComponentType().setBundl= eContext(context)

   &= nbsp;            .se= tComponentTypeName("someType")

   &= nbsp;            .se= tClassName("my.class.Name")

   &= nbsp;            .se= tImmediate(true);

   &= nbsp;    type.start();

 

   &= nbsp;    instance =3D type.createInstance();

  &nbs= p;          

  &nbs= p;           =

  &nbs= p;           =

        &nb= sp; }

 

Now, according to this source, http://mail-archives.apache.org/mod_mbox/felix-users/20120=
4.mbox/%3C1FCCF246-DB56-4E86-A0EE-7E57EC96DDB7@gmail.com%3E<=
/span>
iPOJO manipulation rely on some classes of org.apache.felix.ipojo, an=
d so I need to import this package. All bundles intended to have iPOJO comp=
onent, need to import: org.apache.felix.ipojo and org.apache.felix.ipojo.ar=
chitecture.
 
For some reason, I don’t like to import these packages from my =
bundle. I want my bundle to have iPOJO component without importing any iPOJ=
O-related packages. 
 
Although the answer in the link continues saying: <=
/pre>
 
To avoid this manual import you can:
- use the iPOJO url handler and so install the bundle with: ipojo://f=
ile:/the.path.to.my.bundle.jar
 
I tried the above solution, by adding “ipojo://” part to =
my bundle installation file path as the following,
 
 
bundleContext.installBundle(“ipojo://file:C:\Users\zaid.almahmoud\Desktop\plugins\=
MyComponent.jarR=
21;);
 
 
but when I run my program, I get the following error:
 
 

org.osgi.framework.BundleE= xception: Unable to cache bundle: ipojo://file:C:\Users\zaid.almahmoud\Desk= top\plugins\MyComponent.jar

Caused by: java.net.MalformedURLException: Unknown protocol: ipojo
 
 
 

What am I missing here? Thanks.

 

 

Kind Regards,

Zaid Almahmoud

Research Assistant

= 3D"cid:image001.png@01CE4FB8.E6C8A910"

Khalifa University of Sci= ence, Technology, and Research

Abu Dhabi - United Arab Emirates

TEL: 00971-2-401-8178<= /p>

MOB: 00971-50-9619601<= /p>

 

--_000_29C820C3F0D9864CBDAE1AFA0557E241266860KUSHMBX02kustarac_-- --_004_29C820C3F0D9864CBDAE1AFA0557E241266860KUSHMBX02kustarac_--