Picon

Re: Extending Application Admin implementation


    Problem solved.

    I can obtain the state of the locked variable through the getProperties() method, which overwrites the value of APPLICATION_LOCKED property with the value I need.

    Sorry for the noise.
    Miguel

Miguel García Longarón wrote:
Hi again: I have realize that I really don't need the isLocked method as it is. I would recommend rename the isLocked method to isPersistentlyLocked (and maintain it private), and create a new isLocked method which return the current value of locked[0]; Now I'm using a local variable in the ApplicationDescriptor extension class, with the same purpose that locked[0] has. I'd prefer to know the state of locked[0] to avoid having the same state in two places. Best regards, Miguel Miguel García Longarón wrote:
Hi all: I'm extending the Equinox Application Admin implementation to build my own application model. I'm wondering why the ApplicationDescriptor.isLocked() method is declared "private" instead of "protected". It'd would very useful to access this method from my extension of ApplicationDescriptor. Is there some reason to maintain this method private? Best regards, Miguel

-- Miguel García Longarón Ingeniero I+D División de Automóvil Conectado Telefónica Investigación y Desarrollo Emilio Vargas, 6 28043 Madrid España Tel: (+34) 91 337 99 91 Fax: (+34) 91 337 44 91 Correo-e: mgl-tvGg3WeTtng@public.gmane.org Internet: www.tid.es
Thomas Watson | 2 Mar 17:39
Picon
Favicon

Re: Extending Application Admin implementation

Hi Miguel,

I'm glad you found a solution. I also found it a bit awkward how the locking stuff is done in the base API provided by the OSGi Alliance. Unfortunately we cannot add anything to the public(protected) API for classes in the org.osgi namespace. I updated the private method to be isPersitentlyLocked like you suggested. Thanks.

Tom



Miguel García Longarón ---03/02/2009 03:09:46 AM---Problem solved.


From:

Miguel García Longarón <mgl-tvGg3WeTtng@public.gmane.org>

To:

Equinox development mailing list <equinox-dev <at> eclipse.org>

Date:

03/02/2009 03:09 AM

Subject:

Re: [equinox-dev] Extending Application Admin implementation




Problem solved.

I can obtain the state of the locked variable through the getProperties() method, which overwrites the value of APPLICATION_LOCKED property with the value I need.

Sorry for the noise.
Miguel

Miguel García Longarón wrote:
          Hi again:

         I have realize that I really don't need the isLocked method as it
      is. I would recommend rename the isLocked method to isPersistentlyLocked
      (and maintain it private), and create a new isLocked method which return
      the current value of locked[0];

         Now I'm using a local variable in the ApplicationDescriptor
      extension class, with the same purpose that locked[0] has. I'd prefer to
      know the state of locked[0] to avoid having the same state in two places.

         Best regards,
         Miguel

      Miguel García Longarón wrote:
       
              Hi all:

             I'm extending the Equinox Application Admin implementation to build
          my own application model. I'm wondering why the
          ApplicationDescriptor.isLocked() method is declared "private" instead
          of  "protected". It'd would very useful to access this method from my
          extension of ApplicationDescriptor. Is there some reason to maintain
          this method private?

             Best regards,

             Miguel

           
             

       

--
Miguel García Longarón
Ingeniero I+D
División de Automóvil Conectado

Telefónica Investigación y Desarrollo
Emilio Vargas, 6
28043 Madrid
España
Tel: (+34) 91 337 99 91
Fax: (+34) 91 337 44 91
Correo-e: mgl-tvGg3WeTtng@public.gmane.org
Internet: www.tid.es _______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Thomas Watson | 2 Mar 23:47
Picon
Favicon

Equinox tagged for Galileo integration build

The map file has been updated for the following Bug changes:
+ Bug 265424. Secure Storage Preference Page throws IllegalStateException (FIXED)
+ Bug 265784. Preference service should protect against mis-behaving scope (FIXED)
+ Bug 265998. Using I20090224-0800 build security.ui has compile errors (FIXED)
+ Bug 265999. Using I20090224-0800 build osgi has compile errors (NEW)
+ Bug 266000. [app] Using I20090224-0800 build app has compile errors (ASSIGNED)
+ Bug 266043. [metatype] Latest I-build shows unused code (FIXED)
+ Bug 266116. [resolver] Don't return all exported packages (FIXED)
+ Bug 266349. [rfc 120] clarification isMutable must be called before isSatisified (FIXED)
+ Bug 266406. [registry] Warning for fragment contributions to non-singleton bundle (FIXED)
+ Bug 266511. New conditional admin API (FIXED)
+ Bug 266601. Typo in javadoc of IExtensionRegistry#getConfigurationElementsFor (FIXED)
+ Bug 266673. Compiler warnings in N20090301-2000 (FIXED)

The following projects have changed:
org.eclipse.equinox.security.ui
org.eclipse.equinox.security
org.eclipse.equinox.metatype
org.eclipse.equinox.registry
org.eclipse.equinox.preferences
org.eclipse.equinox.app
org.eclipse.osgi.tests
org.eclipse.osgi

Tom

Alin Dreghiciu | 3 Mar 00:59
Picon
Gravatar

Change log for Equinox versions?

Hi guys,

I was looking for but I could not figure out a change log (what's new)
for Equinox versions in general and Equinox 3.4.2 in particular.
Can you guys point me to such a resource?

--

-- 
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://www.codedragons.com - New Energy for Projects - Great People
working on Great Projects at Great Places
Pascal Rapicault | 3 Mar 02:00
Picon

Re: Change log for Equinox versions?

We don't carry such a log. The easiest would be for you to run a query against all the bugs closed as fix in 3.5 (don't forget to include the milestones).
For the framework, if I'm not wrong, it would be something like:
https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=RT&product=Equinox&component=Framework&target_milestone=3.5&target_milestone=3.5+M1&target_milestone=3.5+M2&target_milestone=3.5+M3&target_milestone=3.5+M4&target_milestone=3.5+M5&target_milestone=3.5+M6&target_milestone=3.5+M7&target_milestone=3.5+RC1&target_milestone=3.5+RC2&target_milestone=3.5+RC3&target_milestone=3.5+RC4&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&resolution=FIXED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=

HTH

Alin Dreghiciu ---03/02/2009 06:59:29 PM---Hi guys, I was looking for but I could not figure out a change log (what's new)


From:

Alin Dreghiciu <adreghiciu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

To:

Equinox - General <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>

Date:

03/02/2009 06:59 PM

Subject:

[equinox-dev] Change log for Equinox versions?



Hi guys,

I was looking for but I could not figure out a change log (what's new)
for Equinox versions in general and Equinox 3.4.2 in particular.
Can you guys point me to such a resource?

--
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://www.codedragons.com - New Energy for Projects - Great People
working on Great Projects at Great Places
_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Thomas Watson | 3 Mar 15:27
Picon
Favicon

Re: Change log for Equinox versions?

Pascal gave you the link for all bugs fixed in the 3.5 release. If you want only the bugs fixed from 3.4.0 to 3.4.2 the the following link would help

https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=RT&product=Equinox&component=Framework&target_milestone=3.4.1&target_milestone=3.4.2&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&resolution=FIXED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=

Tom



Pascal Rapicault ---03/02/2009 07:00:52 PM---We don't carry such a log. The easiest would be for you to run a query against all the bugs closed as fix in 3.5 (don't forget


From:

Pascal Rapicault <Pascal_Rapicault-G1DYhSM1WHTQT0dZR+AlfA@public.gmane.org>

To:

Equinox development mailing list <equinox-dev <at> eclipse.org>

Cc:

Equinox - General <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>, equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

Date:

03/02/2009 07:00 PM

Subject:

Re: [equinox-dev] Change log for Equinox versions?



We don't carry such a log. The easiest would be for you to run a query against all the bugs closed as fix in 3.5 (don't forget to include the milestones).
For the framework, if I'm not wrong, it would be something like:
https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=RT&product=Equinox&component=Framework&target_milestone=3.5&target_milestone=3.5+M1&target_milestone=3.5+M2&target_milestone=3.5+M3&target_milestone=3.5+M4&target_milestone=3.5+M5&target_milestone=3.5+M6&target_milestone=3.5+M7&target_milestone=3.5+RC1&target_milestone=3.5+RC2&target_milestone=3.5+RC3&target_milestone=3.5+RC4&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&resolution=FIXED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=

HTH

Alin Dreghiciu ---03/02/2009 06:59:29 PM---Hi guys, I was looking for but I could not figure out a change log (what's new)

From:

Alin Dreghiciu <adreghiciu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

To:

Equinox - General <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>

Date:

03/02/2009 06:59 PM

Subject:

[equinox-dev] Change log for Equinox versions?



Hi guys,

I was looking for but I could not figure out a change log (what's new)
for Equinox versions in general and Equinox 3.4.2 in particular.
Can you guys point me to such a resource?

--
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://www.codedragons.com - New Energy for Projects - Great People
working on Great Projects at Great Places
_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


steven reinisch | 5 Mar 00:13
Picon

[org.eclipse.equinox.weaving.hook] info removing supplementer


hello folks,

I am trying to hook into an eclipse plugin. I am using the HelloAspect.aj from the Hello World! Demo.
My config.ini:

osgi.bundles=org.eclipse.equinox.weaving.aspectj <at> 1\:start
osgi.bundles.defaultStartLevel=4
osgi.framework=org.eclipse.osgi
osgi.configuration.cascaded=false
osgi.splashPath=platform:/base/plugins/org.eclipse.platform
org.eclipse.update.reconcile=false

# AOSGi
osgi.framework.extensions=org.eclipse.equinox.weaving.hook
org.aspectj.weaver.showWeaveInfo=true
org.aspectj.osgi.verbose=true

The plugin that I am trying to hook into, is an eclipse ui sample plugin.
As in the hello world demo, HelloAspect.aj hooks into the execution of the Activator's start() method.
when starting a runtime workbench I get the following output:

[org.eclipse.equinox.weaving.hook] info adding AspectJ hooks ...
[org.eclipse.equinox.weaving.hook] info removing supplementer org.eclipse.equinox.weaving.demo.hello.aspects
[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...
[org.eclipse.equinox.weaving.aspectj] info weaving bundle 'org.eclipse.jdt.ui'
[org.eclipse.equinox.weaving.aspectj] info weaving bundle 'org.eclipse.jdt.core'
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.core.WorkingCopyOwner' (WorkingCopyOwner.java:140) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.core.WorkingCopyOwner' (WorkingCopyOwner.java:187) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.JavaModelManager' (JavaModelManager.java:2140) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'method-execution(void org.eclipse.jdt.internal.core.Openable.codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit, org.eclipse.jdt.internal.compiler.env.ICompilationUnit, int, org.eclipse.jdt.core.CompletionRequestor, org.eclipse.jdt.core.WorkingCopyOwner, org.eclipse.jdt.core.ITypeRoot))' in Type 'org.eclipse.jdt.internal.core.Openable' (Openable.java:105) advised by around advice from 'org.eclipse.contribution.jdt.itdawareness.ITDAwarenessAspect' (ITDAwarenessAspect.aj:255)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.CompilationUnit' (CompilationUnit.java:574) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.CompilationUnit' (CompilationUnit.java:873) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.CompilationUnit' (CompilationUnit.java:964) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.CompilationUnit' (CompilationUnit.java:1120) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.CopyResourceElementsOperation' (CopyResourceElementsOperation.java:245) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.ui] weaveinfo Join point 'method-execution(org.eclipse.jface.resource.ImageDescriptor org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.computeDescriptor(java.lang.Object, int))' in Type 'org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider' (JavaElementImageProvider.java:115) advised by around advice from 'org.eclipse.contribution.jdt.imagedescriptor.ImageDescriptorSelectorAspect' (ImageDescriptorSelectorAspect.aj:78)
[org.eclipse.jdt.ui] weaveinfo Join point 'method-execution(org.eclipse.jface.resource.ImageDescriptor org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.getTypeImageDescriptor(boolean, boolean, int, boolean))' in Type 'org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider' (JavaElementImageProvider.java:456) advised by around advice from 'org.eclipse.contribution.jdt.imagedescriptor.ImageDescriptorSelectorAspect' (ImageDescriptorSelectorAspect.aj:43) [with runtime test]
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.PackageFragment' (PackageFragment.java:87) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.PackageFragment' (PackageFragment.java:146) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.PackageFragment' (PackageFragment.java:216) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.CompilationUnit.<init>(org.eclipse.jdt.internal.core.PackageFragment, java.lang.String, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.PackageFragment' (PackageFragment.java:275) advised by around advice from 'org.eclipse.contribution.jdt.cuprovider.CompilationUnitProviderAspect' (CompilationUnitProviderAspect.aj:38)
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(org.eclipse.jdt.internal.core.JavaProject, org.eclipse.jdt.core.ICompilationUnit[]))' in Type 'org.eclipse.jdt.internal.core.JavaProject' (JavaProject.java:2214) advised by around advice from 'org.eclipse.contribution.jdt.itdawareness.ITDAwarenessAspect' (ITDAwarenessAspect.aj:94) [with runtime test]
[org.eclipse.jdt.core] weaveinfo Join point 'constructor-call(void org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(org.eclipse.jdt.internal.core.JavaProject, org.eclipse.jdt.core.WorkingCopyOwner))' in Type 'org.eclipse.jdt.internal.core.JavaProject' (JavaProject.java:2222) advised by around advice from 'org.eclipse.contribution.jdt.itdawareness.ITDAwarenessAspect' (ITDAwarenessAspect.aj:153) [with runtime test]


why is the supplementer removed?


regards,

steven
Thomas Watson | 5 Mar 19:01
Picon
Favicon

OSGi API change to rename method ConditionalPermissionInfo.getGrantDecision to getAccessDecision

This message is intended for users of the org.osgi.service.condpermadmin package. Please let me know if you are a user because I am unaware of any users in the Eclipse community at this point.

The method getGrantDecision() on the ConditionalPermissionInfo class has been renamed to getAccessDecision(). The getGrantDecision was a new method added during the Galileo release. Renaming the method does not pose a breaking change from the Ganymede release. But it will break any early adopters that may have been using the new getGrantDecision() method. Clients must change to use the renamed getAccessDecision() method.

I found no such client in the Eclipse SDK and I am not aware of any other clients in the greater Eclipse Community. I released the changes today and they will be included in the nightly build of the Eclipse SDK. Please let me know ASAP if you have any issues or concerns.

Thanks.

Tom

Tom Hsu | 6 Mar 01:29
Picon
Favicon

2 versions of log4j-core.jar

Hi experts,

In the midst of the integrating a osgi/eclipse based program to an 
existing Java program, I am running into a problem with the double 
loading of log4j-core.jar. The original java program already has a 
log4j-core.jar loaded as part of the CLASSPATH when it is started. The 
said program in turns will launch the new osgi/eclipse based program 
through EclipseStarter:
***
EclipseStarter.setInitialProperties(buildDefaultProps());
EclipseStarter.startup(launcherArgs, null);
EclipseStarter.run(launcherArgs);
***

The osgi/eclipse program has another version of the log4-core.jar in the 
org.apache.jakarta_log4j_0.0.0. bundle. This bundle is a required 
bundle. As you can see, that the same classes will be loaded twice when 
my original Java program attempts to load the osgi/eclipse program. 
Hence I am getting a class cast error:
***
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be 
cast to org.apache.log4j.Appender
  at 
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165) 

  at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140) 

  at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) 

  at

org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415) 

  at 
org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
  at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
  at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
  at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
  at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:584)
  at org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:815)
  at 
org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:80) 

  at org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:49)
  at org.apache.log4j.xml.XMLWatchdog.<init>(DOMConfigurator.java:807)
  at 
org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurator.java:574) 

  at 
org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurator.java:557) 

   ...
***

Can someone advise me on how to solve this issue? I am thinking about 
ways like:
1. Make the OSGI know that log4j-core.jar is already present so don't 
load it again. Not sure how to do this or if this is even feasible.
2. Modify the bundle requirement of the various bundles in the plugins 
directory so the org.jakarta bundle will not be needed? I'd like to 
avoid this since this means I have to change someone else's nicely 
packaged bundles.

Regards,
Tom
Simon Kaegi | 6 Mar 06:27
Picon

Re: 2 versions of log4j-core.jar

Hi Tom,

Resources from you classpath should not be leaking into your OSGi environment unless the "osgi.parentClassLoader" is set to either app or framework and you're doing something like setting 'org.osgi.framework.bootdelegation=*'.
Can you look at these settings and tell us a bit about the environment you're running.
Also, this is really the dev list. Could we continue this thread in the user newsgroup -- eclipse.technology.equinox.

Thanks.
-Simon

equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org wrote on 03/05/2009 07:29:45 PM:

> [image removed]
>
> [equinox-dev] 2 versions of log4j-core.jar
>
> Tom Hsu
>
> to:
>
> Equinox development mailing list
>
> 03/05/2009 07:32 PM
>
> Sent by:
>
> equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
>
> Please respond to Equinox development mailing list
>
> Hi experts,
>
> In the midst of the integrating a osgi/eclipse based program to an
> existing Java program, I am running into a problem with the double
> loading of log4j-core.jar. The original java program already has a
> log4j-core.jar loaded as part of the CLASSPATH when it is started. The
> said program in turns will launch the new osgi/eclipse based program
> through EclipseStarter:
> ***
> EclipseStarter.setInitialProperties(buildDefaultProps());
> EclipseStarter.startup(launcherArgs, null);
> EclipseStarter.run(launcherArgs);
> ***
>
> The osgi/eclipse program has another version of the log4-core.jar in the
> org.apache.jakarta_log4j_0.0.0. bundle. This bundle is a required
> bundle. As you can see, that the same classes will be loaded twice when
> my original Java program attempts to load the osgi/eclipse program.
> Hence I am getting a class cast error:
> ***
> log4j:ERROR Could not create an Appender. Reported error follows.
> java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be
> cast to org.apache.log4j.Appender
>   at
> org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
>
>   at
> org.apache.log4j.xml.DOMConfigurator.findAppenderByName
> (DOMConfigurator.java:140)
>
>   at
> org.apache.log4j.xml.DOMConfigurator.findAppenderByReference
> (DOMConfigurator.java:153)
>
>   at
> org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement
> (DOMConfigurator.java:415)
>
>   at
> org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
>   at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
>   at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
>   at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
>   at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:584)
>   at org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:815)
>   at
> org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:80)
>
>   at org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:49)
>   at org.apache.log4j.xml.XMLWatchdog.<init>(DOMConfigurator.java:807)
>   at
> org.apache.log4j.xml.DOMConfigurator.configureAndWatch
> (DOMConfigurator.java:574)
>
>   at
> org.apache.log4j.xml.DOMConfigurator.configureAndWatch
> (DOMConfigurator.java:557)
>
>    ...
> ***
>
> Can someone advise me on how to solve this issue? I am thinking about
> ways like:
> 1. Make the OSGI know that log4j-core.jar is already present so don't
> load it again. Not sure how to do this or if this is even feasible.
> 2. Modify the bundle requirement of the various bundles in the plugins
> directory so the org.jakarta bundle will not be needed? I'd like to
> avoid this since this means I have to change someone else's nicely
> packaged bundles.
>
> Regards,
> Tom
> _______________________________________________
> equinox-dev mailing list
> equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev


Gmane