Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8417375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:01:32+00:00 2026-06-10T02:01:32+00:00

On bundle compiling with code package ihtika2.mainform; import com.google.code.ihtika.Vars.Ini; import ihtika2.mainform.service.MainFormInterface; import java.util.HashSet; import

  • 0

On bundle compiling with code

    package ihtika2.mainform;

import com.google.code.ihtika.Vars.Ini;
import ihtika2.mainform.service.MainFormInterface;
import java.util.HashSet;
import java.util.Hashtable;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.wiring.FrameworkWiring;

public class Activator implements BundleActivator {

    @Override
    public void start(BundleContext context) throws Exception {
        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put("Funct", "MainForm");
        context.registerService(MainFormInterface.class.getName(), new MainForm(), props);

        ServiceReference[] refs = context.getServiceReferences(
                MainFormInterface.class.getName(), "(Funct=MainForm)");
        if (refs == null) {
            System.out.println("Not Found MainForm on start");
        } else {
            MainFormInterface MainForm = (MainFormInterface) context.getService(refs[0]);
            MainForm.sendContext(context);
            MainForm.showWindow();
        }

        int x = 0;
        for (Bundle qqq : context.getBundles()) {
            if (x < 1) {
                HashSet<Bundle> bundles;
                bundles = new HashSet<Bundle>();
                bundles.add(qqq);
                HashSet<Bundle> depends = (HashSet<Bundle>) context.getBundle(0).adapt(FrameworkWiring.class).getDependencyClosure(bundles);
                System.out.println("---");
                System.out.println(qqq.getSymbolicName());
                System.out.println("+++");
                for (Bundle depends1 : depends) {
                    System.out.println(depends1.getSymbolicName());
                }
            }
                x++;
        }

I get error

cd C:\Art\Dropbox\OpenSource\MyGIT\ihtika\Sources\Bundles\I_MainForm; JAVA_HOME=C:\\Java\\jdk1.7.0_06 "\"C:\\Program Files\\NetBeans Dev 201208160001\\java\\maven\\bin\\mvn.bat\"" clean install
Scanning for projects...

------------------------------------------------------------------------
Building I_MainForm OSGi Bundle 1.0-SNAPSHOT
------------------------------------------------------------------------

[clean:clean]
Deleting C:\Art\Dropbox\OpenSource\MyGIT\ihtika\Sources\Bundles\I_MainForm\target

[resources:resources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 1 resource

[compiler:compile]
Compiling 5 source files to C:\Art\Dropbox\OpenSource\MyGIT\ihtika\Sources\Bundles\I_MainForm\target\classes
-------------------------------------------------------------
COMPILATION ERROR : 
-------------------------------------------------------------
ihtika2/mainform/Activator.java:[38,109] error: cannot find symbol
1 error
-------------------------------------------------------------
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.886s
Finished at: Tue Aug 21 12:21:25 MSK 2012
Final Memory: 10M/25M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project I_MainForm: Compilation failure
\Art\Dropbox\OpenSource\MyGIT\ihtika\Sources\Bundles\I_MainForm\src\main\java\ihtika2\mainform\Activator.java:[38,109] error: cannot find symbol
-> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Please advice me, how to compile this code?
I use apache-maven-2.2.1, jdk1.7.0_06, compiling for the 1.6 code (setting in NetBeans project ).
What interesting – NetBeans doesn’t show error on this string (Activator.java:[38,109]) and consider this code correct.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:01:34+00:00Added an answer on June 10, 2026 at 2:01 am

    Problem is in the Felix 4.0.3 and org.osgi.core (4.3.0) jars bundles from Central Maven repo.

    I guess they are outdated.

    As far as I understand it, except Osgi version (4.3) has also revision.

    Probably the library at the central Maven repository outdated.

    The solution – download and compile the source from

    https://svn.apache.org/repos/asf/felix/trunk/ framework.

    Ie – after source download, in the folder with sources:

    cd framework

    mvn install

    It’s command will compile and install Felix to your local Maven repo. After this you can use new Felix’s bundle (SNAPSHOT) instead the bundles from the Central Maven repo.

    Sorry my bad English.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here is my code... package sortarray.com; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.os.Bundle;
Manifest: Manifest-Version: 1.0 Bundle-Name: Mahjong Bundle-Activator: MahjongActivator Bundle-SymbolicName: Mahjong Bundle-Version: 1.0.0 Import-Package: org.osgi.framework Compiling
This is my code @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.email_list_main); emailResults =
My bundle is returning null strings for the contained extras. Not NPEs, actual null
I'm trying to bundle up the rails-dbd-mysql but it tries to install the old
I have created a bundle. However its not working when deployed to production server.
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Init(); backthread tr=new backthread(); tr.execute(0,0,0); } backthread
I removed the settings.bundle from an app I'm working on as it's no longer
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); TextView lattv=(TextView)findViewById(R.id.lat); TextView lngtv=(TextView)findViewById(R.id.lng); JSONParstring jParser =
If I give Bundle install I get Gem::InstallError: factory_girl requires Ruby version >= 1.9.2.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.