felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch" <stuart.mccull...@jayway.net>
Subject Re: Better error message needed...
Date Fri, 26 Oct 2007 07:36:00 GMT
On 26/10/2007, Stuart McCulloch <stuart.mcculloch@jayway.net> wrote:
>
> On 26/10/2007, Niclas Hedhman <niclas@hedhman.org> wrote:
> >
> >
> > The "unknown error occurred" message is very vague, and it turned out to
> > be
> > that I had a
> >    Export-Package: org.hedhman.niclas; version=
> >
> > without the actual value following "version".
> >
> > IMHO, this could be captured a bit better...
>
>
> "unknown error occurred" is the default Maven message when a runtime
> exception occurs
> without an attached message... in this case an exception from Bnd
> percolated up through
> the bundle-plugin.
>
> at the moment we report any errors detected by Bnd, but in this case
> without knowing what
> caused the exception (ie. without duplicating the various checks made by
> Bnd) we can't point
> to a line in the instructions and say this is the problem line...
>
> the best we can do here is catch these runtime exceptions and log a
> general error message
> - anything extra really has to be done inside the Bnd tool itself (in this
> case a header check).
>

in this case in the Bnd file "OSGiHeader.java", line 73:

   clause.put(adname.trim(), advalue.trim());

it should check advalue is not null before trimming it

Cheers
> > Niclas
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Unknown error occurred
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [DEBUG] Trace
> > org.apache.maven.lifecycle.LifecycleExecutionException: Unknown error
> > occurred
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:564)
> >         at
> >
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (DefaultLifecycleExecutor.java:480)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java :459)
> >         at
> >
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java:311)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> >
> >         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke (Method.java:585)
> >         at org.codehaus.classworlds.Launcher.launchEnhanced(
> > Launcher.java:315)
> >         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >         at
> > org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)
> >         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > Caused by: org.apache.maven.plugin.MojoExecutionException: Unknown error
> > occurred
> >         at
> > org.apache.felix.bundleplugin.BundlePlugin.execute (BundlePlugin.java
> > :289)
> >         at
> > org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java
> > :162)
> >         at
> > org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java
> > :154)
> >         at
> > org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > DefaultPluginManager.java:443)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:539)
> >         ... 16 more
> > Caused by: java.lang.NullPointerException
> >         at aQute.lib.osgi.header.OSGiHeader.parseHeader(OSGiHeader.java
> > :73)
> >         at aQute.lib.osgi.Processor.parseHeader(Processor.java:60)
> >         at aQute.lib.osgi.Processor.parseHeader (Processor.java:50)
> >         at aQute.lib.osgi.Builder.getHeader(Builder.java:356)
> >         at aQute.lib.osgi.Builder.doExpand(Builder.java:218)
> >         at aQute.lib.osgi.Builder.build(Builder.java:46)
> >         at
> > org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java
> > :252)
> >         ... 20 more
> >
> > --
> > Niclas Hedhman, Software Developer
> >
> > I  live here; http://tinyurl.com/2qq9er
> > I  work here; http://tinyurl.com/2ymelc
> > I relax here; http://tinyurl.com/2cgsug
> >
>
>
>
> --
> Cheers, Stuart




-- 
Cheers, Stuart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message