Stack overflow with features-maven-plugin 2.2.4

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Stack overflow with features-maven-plugin 2.2.4

Bengt Rodehav
I recently updated from Karaf 2.2.3 to Karaf 2.2.4. I ususally use the features-maven-plugin from the current Karaf version. I therefore started to use version 2.2.4 of the features-maven-plugin. However, I get stack overflow using that version which has forced me to revert back to version 2.2.3. I still use version 2.2.4 of Karaf though.

Anyone else seen this?

It is clearly a recursive problem. I get the following stack trace from my build:

Exception in thread "main" java.lang.StackOverflowError
at sun.misc.JarIndex.get(JarIndex.java:154)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:787)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:765)
at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:735)
at sun.misc.URLClassPath.findResource(URLClassPath.java:146)
at java.net.URLClassLoader$2.run(URLClassLoader.java:385)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findResource(URLClassLoader.java:382)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadResourceFromSelf(ClassRealm.java:434)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.getResource(SelfFirstStrategy.java:64)
at org.codehaus.plexus.classworlds.realm.ClassRealm.findResource(ClassRealm.java:268)
at java.lang.ClassLoader.getResource(ClassLoader.java:1002)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192)
at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:96)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:89)
at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
at org.apache.karaf.tooling.features.AddFeaturesToRepoMojo$Repository.loadFeatures(AddFeaturesToRepoMojo.java:422)
at org.apache.karaf.tooling.features.AddFeaturesToRepoMojo$Repository.getFeatures(AddFeaturesToRepoMojo.java:386)
at org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:228)
at org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:233)
at org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:233)
at org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:233)
....

/Bengt
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

jbonofre
Hi Bengt,

could you provide your features XML ?

Regards
JB

On 12/07/2011 02:36 PM, Bengt Rodehav wrote:

> I recently updated from Karaf 2.2.3 to Karaf 2.2.4. I ususally use the
> features-maven-plugin from the current Karaf version. I therefore
> started to use version 2.2.4 of the features-maven-plugin. However, I
> get stack overflow using that version which has forced me to revert back
> to version 2.2.3. I still use version 2.2.4 of Karaf though.
>
> Anyone else seen this?
>
> It is clearly a recursive problem. I get the following stack trace from
> my build:
>
> /Exception in thread "main" java.lang.StackOverflowError/
> /at sun.misc.JarIndex.get(JarIndex.java:154)/
> /at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:787)/
> /at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:765)/
> /at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:735)/
> /at sun.misc.URLClassPath.findResource(URLClassPath.java:146)/
> /at java.net.URLClassLoader$2.run(URLClassLoader.java:385)/
> /at java.security.AccessController.doPrivileged(Native Method)/
> /at java.net.URLClassLoader.findResource(URLClassLoader.java:382)/
> /at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadResourceFromSelf(ClassRealm.java:434)/
> /at
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.getResource(SelfFirstStrategy.java:64)/
> /at
> org.codehaus.plexus.classworlds.realm.ClassRealm.findResource(ClassRealm.java:268)/
> /at java.lang.ClassLoader.getResource(ClassLoader.java:1002)/
> /at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192)/
> /at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:96)/
> /at java.security.AccessController.doPrivileged(Native Method)/
> /at
> javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:89)/
> /at
> javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250)/
> /at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223)/
> /at
> javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)/
> /at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo$Repository.loadFeatures(AddFeaturesToRepoMojo.java:422)/
> /at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo$Repository.getFeatures(AddFeaturesToRepoMojo.java:386)/
> /at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:228)/
> /at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:233)/
> /at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:233)/
> /at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.retrieveDescriptorsRecursively(AddFeaturesToRepoMojo.java:233)/
> /..../
>
> /Bengt

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

Bengt Rodehav
I attach the pom.xml for my assembly project and the corresponding features XML. It relies on other projects and other feature XML's so you won't be able to just build using this. Maybe it can give you a hint though.

Actually I attach two feature XML's since they both fail.

/Bengt

pom.xml (6K) Download Attachment
features.xml (6K) Download Attachment
features.xml (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

jbonofre
Thanks Bengt,

I try to take a look later today.
I keep you posted.

Regards
JB

On 12/07/2011 03:08 PM, Bengt Rodehav wrote:
> I attach the pom.xml for my assembly project and the corresponding
> features XML. It relies on other projects and other feature XML's so you
> won't be able to just build using this. Maybe it can give you a hint though.
>
> Actually I attach two feature XML's since they both fail.
>
> /Bengt

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

Bengt Rodehav
Thanks.

2011/12/7 Jean-Baptiste Onofré <[hidden email]>
Thanks Bengt,

I try to take a look later today.
I keep you posted.

Regards
JB


On 12/07/2011 03:08 PM, Bengt Rodehav wrote:
I attach the pom.xml for my assembly project and the corresponding
features XML. It relies on other projects and other feature XML's so you
won't be able to just build using this. Maybe it can give you a hint though.

Actually I attach two feature XML's since they both fail.

/Bengt


Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

jbonofre
Hi Bengt,

Some comments about your features:

1/ in the skist-feature-repos, you define features for aries-jta, aries-jpa, etc. It's not required as Karaf enterprise features already provide it (you can refer directly to that).
2/ In your POM, in the descriptors set, you define Karaf standard and enterprise descriptors. It's no more required (it's performed implicitly by the features-maven-plugin).

Could you make a try by removing the Karaf standard and enterprise descriptors ?

Thanks
Regards
JB
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

Bengt Rodehav
Thanks JB - will try ASAP.


/Bengt

2011/12/21 jbonofre <[hidden email]>
Hi Bengt,

Some comments about your features:

1/ in the skist-feature-repos, you define features for aries-jta, aries-jpa,
etc. It's not required as Karaf enterprise features already provide it (you
can refer directly to that).
2/ In your POM, in the descriptors set, you define Karaf standard and
enterprise descriptors. It's no more required (it's performed implicitly by
the features-maven-plugin).

Could you make a try by removing the Karaf standard and enterprise
descriptors ?

Thanks
Regards
JB

--
View this message in context: http://karaf.922171.n3.nabble.com/Stack-overflow-with-features-maven-plugin-2-2-4-tp3567383p3604330.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

Bengt Rodehav
JB,

I removed the standard and enterprise descriptors - didn't help. But then I also removed the following line from my features.xml:
  <repository>mvn:se.digia.seco/karaf/${project.version}/xml/features</repository>

Then it worked. Maybe I've misunderstood the meaning of this tag. What is it for? It does seem to cause an endless loop. Maybe a JIRA should still be created for that problem even though it now works for me?

/Bengt

2011/12/21 Bengt Rodehav <[hidden email]>
Thanks JB - will try ASAP.


/Bengt


2011/12/21 jbonofre <[hidden email]>
Hi Bengt,

Some comments about your features:

1/ in the skist-feature-repos, you define features for aries-jta, aries-jpa,
etc. It's not required as Karaf enterprise features already provide it (you
can refer directly to that).
2/ In your POM, in the descriptors set, you define Karaf standard and
enterprise descriptors. It's no more required (it's performed implicitly by
the features-maven-plugin).

Could you make a try by removing the Karaf standard and enterprise
descriptors ?

Thanks
Regards
JB

--
View this message in context: http://karaf.922171.n3.nabble.com/Stack-overflow-with-features-maven-plugin-2-2-4-tp3567383p3604330.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

jbonofre
I think you introduced a cycle as each features XML depends of the others.

It's an expected behavior.

Regards
JB

On 12/22/2011 02:04 PM, Bengt Rodehav wrote:

> JB,
>
> I removed the standard and enterprise descriptors - didn't help. But
> then I also removed the following line from my features.xml:
> /<repository>mvn:se.digia.seco/karaf/${project.version}/xml/features</repository>/
>
> Then it worked. Maybe I've misunderstood the meaning of this tag. What
> is it for? It does seem to cause an endless loop. Maybe a JIRA should
> still be created for that problem even though it now works for me?
>
> /Bengt
>
> 2011/12/21 Bengt Rodehav <[hidden email] <mailto:[hidden email]>>
>
>     Thanks JB - will try ASAP.
>
>
>     /Bengt
>
>
>     2011/12/21 jbonofre <[hidden email] <mailto:[hidden email]>>
>
>         Hi Bengt,
>
>         Some comments about your features:
>
>         1/ in the skist-feature-repos, you define features for
>         aries-jta, aries-jpa,
>         etc. It's not required as Karaf enterprise features already
>         provide it (you
>         can refer directly to that).
>         2/ In your POM, in the descriptors set, you define Karaf
>         standard and
>         enterprise descriptors. It's no more required (it's performed
>         implicitly by
>         the features-maven-plugin).
>
>         Could you make a try by removing the Karaf standard and enterprise
>         descriptors ?
>
>         Thanks
>         Regards
>         JB
>
>         --
>         View this message in context:
>         http://karaf.922171.n3.nabble.com/Stack-overflow-with-features-maven-plugin-2-2-4-tp3567383p3604330.html
>         Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow with features-maven-plugin 2.2.4

Bengt Rodehav
OK - thanks for your help,

/Bengt

2011/12/22 Jean-Baptiste Onofré <[hidden email]>
I think you introduced a cycle as each features XML depends of the others.

It's an expected behavior.

Regards
JB


On 12/22/2011 02:04 PM, Bengt Rodehav wrote:
JB,

I removed the standard and enterprise descriptors - didn't help. But
then I also removed the following line from my features.xml:
/<repository>mvn:se.digia.seco/karaf/${project.version}/xml/features</repository>/


Then it worked. Maybe I've misunderstood the meaning of this tag. What
is it for? It does seem to cause an endless loop. Maybe a JIRA should
still be created for that problem even though it now works for me?

/Bengt

2011/12/21 Bengt Rodehav <[hidden email] <mailto:[hidden email]>>


   Thanks JB - will try ASAP.


   /Bengt


   2011/12/21 jbonofre <[hidden email] <mailto:[hidden email]>>


       Hi Bengt,

       Some comments about your features:

       1/ in the skist-feature-repos, you define features for
       aries-jta, aries-jpa,
       etc. It's not required as Karaf enterprise features already
       provide it (you
       can refer directly to that).
       2/ In your POM, in the descriptors set, you define Karaf
       standard and
       enterprise descriptors. It's no more required (it's performed
       implicitly by
       the features-maven-plugin).

       Could you make a try by removing the Karaf standard and enterprise
       descriptors ?

       Thanks
       Regards
       JB

       --
       View this message in context:
       http://karaf.922171.n3.nabble.com/Stack-overflow-with-features-maven-plugin-2-2-4-tp3567383p3604330.html
       Sent from the Karaf - User mailing list archive at Nabble.com.