You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2009/10/09 01:50:31 UTC

[jira] Created: (FELIX-1726) SCR Annotations - SLF4J dependency needed in some usecases

SCR Annotations - SLF4J dependency needed in some usecases
----------------------------------------------------------

                 Key: FELIX-1726
                 URL: https://issues.apache.org/jira/browse/FELIX-1726
             Project: Felix
          Issue Type: Bug
          Components: Maven SCR Plugin
    Affects Versions: maven-scr-plugin-1.4.0
            Reporter: Stefan Seifert
            Priority: Minor
             Fix For: maven-scr-plugin-1.4.1


in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.

re-adding the slf4j dependencies again solves the problem.

unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reassigned FELIX-1726:
---------------------------------------

    Assignee: Carsten Ziegeler

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Stefan Seifert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773293#action_12773293 ] 

Stefan Seifert commented on FELIX-1726:
---------------------------------------

example stacktrace:

Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
        at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
        at vwg.wcm.vwd4.base.components.global.AbstractStreamComponent.<clinit>(AbstractStreamComponent.java:37)
        at sun.misc.Unsafe.ensureClassInitialized(Native Method)
        at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
        at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
        at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
        at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
        at java.lang.reflect.Field.get(Field.java:358)
        at org.apache.felix.scrplugin.tags.ClassUtil.getInitializationExpression(ClassUtil.java:41)
        ... 32 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 41 more

it's line 41 in ClassUtil.
and you're right - the CFNE was translated to a NoClassDefFoundError, and thats what i meant.

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - SLF4J dependency needed in some usecases

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763962#action_12763962 ] 

Felix Meschberger commented on FELIX-1726:
------------------------------------------

... and: ClassUtil.getInitializationExpression should probably not swallow this exception like this, right ?

> SCR Annotations - SLF4J dependency needed in some usecases
> ----------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - SLF4J dependency needed in some usecases

Posted by "Stefan Seifert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764048#action_12764048 ] 

Stefan Seifert commented on FELIX-1726:
---------------------------------------

yes, it is possible to solve it with a project-specifc dependency - but the normaler user will never supsect this from the error message "something went wrong".. perhaps we should a a specific error message that points into this direction in the ClassUtil method instead of swallowing the exception.

> SCR Annotations - SLF4J dependency needed in some usecases
> ----------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Stefan Seifert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773340#action_12773340 ] 

Stefan Seifert commented on FELIX-1726:
---------------------------------------

i like it!

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>         Attachments: felix.patch
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Stefan Seifert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773279#action_12773279 ] 

Stefan Seifert commented on FELIX-1726:
---------------------------------------

in my usecase above, yes. the CNFE was thrown because the class was loaded when accessing the property, and the class depended on a slf4j class, which was not found in the classpath.

i think best solution would be to rethrow the error in classutil, perhaps wrapped in a runtimeexception with information about class name and property name.

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Stefan Seifert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert closed FELIX-1726.
---------------------------------


thanks

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>         Attachments: felix.patch
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - SLF4J dependency needed in some usecases

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763961#action_12763961 ] 

Felix Meschberger commented on FELIX-1726:
------------------------------------------

Can this not be solved by adding a compile dependency on the project ?

After all it is project code which has the dependency and not the annotations library or the maven plugin.

> SCR Annotations - SLF4J dependency needed in some usecases
> ----------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773307#action_12773307 ] 

Carsten Ziegeler commented on FELIX-1726:
-----------------------------------------

Ok :) I've just attached a potential patch - what do you think about it?

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>         Attachments: felix.patch
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773284#action_12773284 ] 

Carsten Ziegeler commented on FELIX-1726:
-----------------------------------------

The reason why I'm asking is that a CNFE is a checked exception and I don't see a method in the code which declares them to be thrown.

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated FELIX-1726:
------------------------------------

    Attachment: felix.patch

Proposed patch

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>         Attachments: felix.patch
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773261#action_12773261 ] 

Carsten Ziegeler commented on FELIX-1726:
-----------------------------------------

Does ClassUtil really fail with a CNFE?

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved FELIX-1726.
-------------------------------------

    Resolution: Fixed

I've applied the patch in Revision 880725

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>         Attachments: felix.patch
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated FELIX-1726:
-------------------------------------

    Summary: SCR Annotations - Enhance error messages in case of missing project dependencies  (was: SCR Annotations - SLF4J dependency needed in some usecases)

Changing issue summary to indicate that error message must be improved to hint the user at potential missing dependencies.

> SCR Annotations - Enhance error messages in case of missing project dependencies
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-1726
>                 URL: https://issues.apache.org/jira/browse/FELIX-1726
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.4.0
>            Reporter: Stefan Seifert
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.4.1
>
>
> in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
> there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
> e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.
> re-adding the slf4j dependencies again solves the problem.
> unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.