[jira] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies
[ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
[ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies
[ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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] Commented: (FELIX-1726) SCR Annotations - Enhance error messages in case of missing project dependencies
[ https://issues.apache.org/jira/browse/FELIX-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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.