Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328005

Summary: Bad Jetty-osgi version?
Product: [RT] Jetty Reporter: Greg Wilkins <gregw>
Component: osgiAssignee: Jesse McConnell <jesse.mcconnell>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: hmalphettes, jetty-inbox
Version: 7.2.0   
Target Milestone: 7.1.x   
Hardware: All   
OS: All   
Whiteboard:

Description Greg Wilkins CLA 2010-10-17 21:06:29 EDT
The build is currently failing with jetty-osgi problems parsing a version string.  It appears a mixed text/number string is being passed where a pure version string is expected.

The two types of exception that result are listed below:



Auto-properties start: org.osgi.framework.BundleException: Could not create bundle object. - java.lang.NumberFormatException: For input string: "jetty-7"
java.lang.NumberFormatException: For input string: "jetty-7"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:449)
	at java.lang.Integer.parseInt(Integer.java:499)
	at org.osgi.framework.Version.<init>(Version.java:125)
	at org.osgi.framework.Version.parseVersion(Version.java:218)
	at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:77)
	at org.apache.felix.framework.ModuleImpl.<init>(ModuleImpl.java:203)
	at org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1115)
	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2372)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2277)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
	at org.apache.felix.main.AutoProcessor.processAutoProperties(AutoProcessor.java:295)
	at org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:75)
	at org.apache.felix.main.Main.main(Main.java:295)




java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at aQute.lib.osgi.Macro.doCommand(Macro.java:185)
	at aQute.lib.osgi.Macro.doCommands(Macro.java:173)
	at aQute.lib.osgi.Macro.replace(Macro.java:120)
	at aQute.lib.osgi.Macro.process(Macro.java:64)
	at aQute.lib.osgi.Macro.process(Macro.java:80)
	at aQute.lib.osgi.Macro.process(Macro.java:50)
	at aQute.lib.osgi.Macro.process(Macro.java:45)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:575)
	at aQute.lib.osgi.Analyzer.getVersionPolicy(Analyzer.java:1800)
	at aQute.lib.osgi.Analyzer.augmentVersion(Analyzer.java:1315)
	at aQute.lib.osgi.Analyzer.augmentImports(Analyzer.java:1224)
	at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:221)
	at aQute.lib.osgi.Builder.analyze(Builder.java:294)
	at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:286)
	at org.apache.felix.bundleplugin.ManifestPlugin.getAnalyzer(ManifestPlugin.java:194)
	at org.apache.felix.bundleplugin.ManifestPlugin.getManifest(ManifestPlugin.java:112)
	at org.apache.felix.bundleplugin.ManifestPlugin.execute(ManifestPlugin.java:66)
	at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:236)
	at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:227)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
	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:314)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
	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:597)
	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: java.lang.IllegalArgumentException: Invalid syntax for version: jetty-7.2.0.RC2-SNAPSHOT
	at aQute.libg.version.Version.<init>(Version.java:45)
	at aQute.lib.osgi.Macro._version(Macro.java:625)
	... 43 more
Comment 1 Greg Wilkins CLA 2010-10-17 23:44:53 EDT
Actually I think this might be a maven plugin issue?

I'm getting these exception even for non osgi modules when I've excluded the jetty-osgi from the build???

java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at aQute.lib.osgi.Macro.doCommand(Macro.java:185)
	at aQute.lib.osgi.Macro.doCommands(Macro.java:173)
	at aQute.lib.osgi.Macro.replace(Macro.java:120)
	at aQute.lib.osgi.Macro.process(Macro.java:64)
	at aQute.lib.osgi.Macro.process(Macro.java:80)
	at aQute.lib.osgi.Macro.process(Macro.java:50)
	at aQute.lib.osgi.Macro.process(Macro.java:45)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:575)
	at aQute.lib.osgi.Analyzer.getVersionPolicy(Analyzer.java:1800)
	at aQute.lib.osgi.Analyzer.augmentVersion(Analyzer.java:1315)
	at aQute.lib.osgi.Analyzer.augmentImports(Analyzer.java:1224)
	at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:221)
	at aQute.lib.osgi.Builder.analyze(Builder.java:294)
	at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:286)
	at org.apache.felix.bundleplugin.ManifestPlugin.getAnalyzer(ManifestPlugin.java:194)
	at org.apache.felix.bundleplugin.ManifestPlugin.getManifest(ManifestPlugin.java:112)
	at org.apache.felix.bundleplugin.ManifestPlugin.execute(ManifestPlugin.java:66)
	at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:236)
	at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:227)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
	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:314)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
	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:597)
	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: java.lang.IllegalArgumentException: Invalid syntax for version: jetty-7.2.0.RC2-SNAPSHOT
	at aQute.libg.version.Version.<init>(Version.java:45)
	at aQute.lib.osgi.Macro._version(Macro.java:625)
	... 43 more
Comment 2 Jesse McConnell CLA 2010-10-18 09:13:03 EDT
ewe..

I forget the details but wasn't there a situation in past releases where once we started the RC process we were breaking the osgi versions and that might be why our snapshots went back to the 7.2.0-SNAPSHOT approach?

the osgi version is 4 sets and adding in the RC# injected a 5th set of versions into osgi which it complains bitterly about.

we might need to just go back to 7.2.0-SNAPSHOT between release candidates again :/
Comment 3 Jesse McConnell CLA 2010-10-18 14:48:59 EDT
I dropped the old release and set the version back to what it was supposed to be

I messed up the new release versioning on this and that was likely the complete cause behind it..

perl pie to the rescue