[ 
https://issues.apache.org/jira/browse/FELIX-5571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15887753#comment-15887753
 ] 

David Leangen commented on FELIX-5571:
--------------------------------------

It is in the Activator.

Actually, I did. I added the depdendency as:

{code}
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.utils</artifactId>
            <version>1.9.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
{code}

It pulls in the old osgi core transitively, and causes this exception:

{code}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on 
project org.apache.felix.serializer: Compilation failure: Compilation failure:
[ERROR] 
/Users/dleangen/libs/felix/converter/serializer/src/main/java/org/apache/felix/serializer/impl/Activator.java:[35,16]
 no suitable method found for 
registerService(java.lang.Class<org.osgi.service.serializer.Serializer>,org.apache.felix.serializer.impl.json.JsonSerializerImpl,java.util.Dictionary<java.lang.String,java.lang.Object>)
[ERROR] method 
org.osgi.framework.BundleContext.registerService(java.lang.String[],java.lang.Object,java.util.Dictionary)
 is not applicable
[ERROR] (argument mismatch; 
java.lang.Class<org.osgi.service.serializer.Serializer> cannot be converted to 
java.lang.String[])
{code}

R6 allows a class as a parameter to BundleContext.registerService(), but R4 
does not. I don't think it would be the right call to revert to the older 
version of this method call.

> Replace JSONParser in Serializer with the new one from utils
> ------------------------------------------------------------
>
>                 Key: FELIX-5571
>                 URL: https://issues.apache.org/jira/browse/FELIX-5571
>             Project: Felix
>          Issue Type: Bug
>          Components: Converter
>            Reporter: David Leangen
>            Assignee: David Leangen
>
> I can do this if there are no objections.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to