You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Johannes Schneider (JIRA)" <ji...@apache.org> on 2013/02/01 22:50:12 UTC

[jira] [Comment Edited] (FELIX-3886) ClassNotFound for empty *.java-File

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

Johannes Schneider edited comment on FELIX-3886 at 2/1/13 9:49 PM:
-------------------------------------------------------------------

Well, there is no real use case. I am using the scr-plugin in a lot of projects and never found this bug until today.
But sometimes it happens that one is commenting out all code. Don't know exactly why. One should think that today in the ages of VCS, those tools should solve that situations....

I think my main concern is the bad/misleading error message. It took me quite some time to find the problem, since my IDE could't jump to that class.
                
      was (Author: js@cedarsoft.com):
    Well, there is no real use case. I am using the scr-plugin in a lot of projects and never found this bug until today.
But sometimes it happens that one is commenting out all code. Don't know exactly why. One should think that today in the ages of VCS, those tools should solve that situations....
                  
> ClassNotFound for empty *.java-File
> -----------------------------------
>
>                 Key: FELIX-3886
>                 URL: https://issues.apache.org/jira/browse/FELIX-3886
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.9.0
>         Environment: Linux
>            Reporter: Johannes Schneider
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin-1.10.0, scr ant task 1.4.0, scr generator 1.4.0
>
>
> I have an empty file within my sources dir: "TrpRunner.java". This contains no java source code (everything commented out).
> The scp-plugin fails with the following error message:
> Unable to load compiled class: com.cedarsoft.deger.ui.TrpRunner -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-scr-plugin:1.9.0:scr (generate-scr-scrdescriptor) on project DEGERsoft: Unable to load compiled class: com.cedarsoft.deger.ui.TrpRunner
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoFailureException: Unable to load compiled class: com.cedarsoft.deger.ui.TrpRunner
> 	at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:263)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> 	... 19 more
> Caused by: org.apache.felix.scrplugin.SCRDescriptorFailureException: Unable to load compiled class: com.cedarsoft.deger.ui.TrpRunner
> 	at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:154)
> 	at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:149)
> 	at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:248)
> 	... 21 more
> Caused by: java.lang.ClassNotFoundException: com.cedarsoft.deger.ui.TrpRunner
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> 	at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:141)
> 	... 23 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira