You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Peter Kriens <Pe...@aQute.biz> on 2007/10/29 10:27:30 UTC
Re[2]: Better error message needed...
Fixed it in 0.0.209 ...
Kind regards,
Peter Kriens
SM> On 26/10/2007, Stuart McCulloch <st...@jayway.net>
SM> wrote: On 26/10/2007, Niclas Hedhman <ni...@hedhman.org> wrote:
SM>
SM> The "unknown error occurred" message is very vague, and it turned out to be
SM> that I had a
SM> Export-Package: org.hedhman.niclas; version=
SM> without the actual value following "version".
SM>
SM> IMHO, this could be captured a bit better...
SM> "unknown error occurred" is the default Maven message when a runtime exception occurs
SM> without an attached message... in this case an exception from Bnd percolated up through
SM> the bundle-plugin.
SM> at the moment we report any errors detected by Bnd, but in this case without knowing what
SM> caused the exception (ie. without duplicating the various checks made by Bnd) we can't point
SM> to a line in the instructions and say this is the problem line...
SM> the best we can do here is catch these runtime exceptions and log a general error message
SM> - anything extra really has to be done inside the Bnd tool itself (in this case a header check).
SM> in this case in the Bnd file "OSGiHeader.java", line 73:
SM> clause.put(adname.trim(), advalue.trim());
SM> it should check advalue is not null before trimming it
SM>
SM> Cheers
SM> Niclas
SM> [INFO]
SM> ------------------------------------------------------------------------
SM> [ERROR] BUILD ERROR
SM> [INFO]
SM> ------------------------------------------------------------------------
SM> [INFO] Unknown error occurred
SM> [INFO]
SM> ------------------------------------------------------------------------
SM> [DEBUG] Trace
SM> org.apache.maven.lifecycle.LifecycleExecutionException: Unknown error occurred
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java :459)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
SM> (DefaultLifecycleExecutor.java:278)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
SM> at
SM> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
SM> at
SM> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
SM> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
SM> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
SM> at
SM> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
SM> at
SM> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
SM> at java.lang.reflect.Method.invoke (Method.java:585)
SM> at
SM> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
SM> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
SM> at
SM> org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)
SM> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
SM> Caused by: org.apache.maven.plugin.MojoExecutionException: Unknown error
SM> occurred
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute (BundlePlugin.java:289)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:162)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:154)
SM> at
SM>
SM> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
SM> ... 16 more
SM> Caused by: java.lang.NullPointerException
SM> at
SM> aQute.lib.osgi.header.OSGiHeader.parseHeader(OSGiHeader.java:73)
SM> at aQute.lib.osgi.Processor.parseHeader(Processor.java:60)
SM> at aQute.lib.osgi.Processor.parseHeader (Processor.java:50)
SM> at aQute.lib.osgi.Builder.getHeader(Builder.java:356)
SM> at aQute.lib.osgi.Builder.doExpand(Builder.java:218)
SM> at aQute.lib.osgi.Builder.build(Builder.java:46)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:252)
SM> ... 20 more
SM> --
SM> Niclas Hedhman, Software Developer
SM> I live here; http://tinyurl.com/2qq9er
SM> I work here; http://tinyurl.com/2ymelc
SM> I relax here; http://tinyurl.com/2cgsug
SM> --
SM> Cheers, Stuart
--
Peter Kriens Tel +33467542167
9C, Avenue St. Drézéry AOL,Yahoo: pkriens
34160 Beaulieu, France ICQ 255570717
Skype pkriens Fax +1 8153772599