[jbosstools-issues] [JBoss JIRA] (JBIDE-12087) JDS5 beta 3 crashes when importing JBoss AS 7.1.1.Final Maven project

Fred Bricon (JIRA) jira-events at lists.jboss.org
Tue Jun 5 04:23:19 EDT 2012


    [ https://issues.jboss.org/browse/JBIDE-12087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698716#comment-12698716 ] 

Fred Bricon edited comment on JBIDE-12087 at 6/5/12 4:22 AM:
-------------------------------------------------------------

3 remarks :

* m2e-apt enables AP only when a project dependency contains  META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory, not when using the JDK as a JRE container. Turns out jboss as project have tools.jar as a transitive dependency because of their byteman dependency. So tools.jar is treated as any other dependencies, m2e-apt finds META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory and things go wrong.
* ProjectUtils.containsAptProcessors() is only called on project configuration requests (AbstractProjectConfigurator#configure(request, monitor)), not on any project change, so project builds should not be impacted by these lookups.
* The "javax.xml.parsers.FactoryConfigurationError: Provider _redirected._SAXParserFactory not found exception" exception looks like a severe leakage classes from a  project classpath to the Eclipse platform itself, _redirected._SAXParserFactory  behind one of jboss modules classes, so the problem is more serious than it looks IMO : I haven't tested yet but I have the feeling you could get the same catastrophic results enabling apt on a regular project, putting jboss modules on the factory path.

We could try to ignore tools.jar when analysing APT dependencies before enabling JDT APT (but that'll probably require some ugly tricks)
As for the use of a custom classloader, that might be a good thing, although I'm not sure how it'll help performance-wise here (except avoiding locking jars, an issue I haven't seen so far).


m2e-apt can be disabled in the workspace or project preferences : Maven > Annotation Processing

                
      was (Author: fbricon):
    2 remarks :

* m2e-apt enables AP only when a project dependency contains  META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory, not when using the JDK as a JRE container. Turns out jboss as project have tools.jar as a transitive dependency because of their byteman dependency. So tools.jar is treated as any other dependencies, m2e-apt finds META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory and things go wrong.
* ProjectUtils.containsAptProcessors() is only called on project configuration requests (AbstractProjectConfigurator#configure(request, monitor)), not on any project change, so project builds should not be impacted by these lookups.
* The "javax.xml.parsers.FactoryConfigurationError: Provider _redirected._SAXParserFactory not found exception" exception looks like a severe leakage classes from a  project classpath to the Eclipse platform itself, _redirected._SAXParserFactory  behind one of jboss modules classes, so the problem is more serious than it looks IMO : I haven't tested yet but I have the feeling you could get the same catastrophic results enabling apt on a regular project, putting jboss modules on the factory path.

We could try to ignore tools.jar when analysing APT dependencies before enabling JDT APT (but that'll probably require some ugly tricks)
As for the use of a custom classloader, that might be a good thing, although I'm not sure how it'll help performance-wise here (except avoiding locking jars, an issue I haven't seen so far).


m2e-apt can be disabled in the workspace or project preferences : Maven > Annotation Processing

                  
> JDS5 beta 3 crashes when importing JBoss AS 7.1.1.Final Maven project
> ---------------------------------------------------------------------
>
>                 Key: JBIDE-12087
>                 URL: https://issues.jboss.org/browse/JBIDE-12087
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: maven
>         Environment: $ uname -a
> Linux ichindar.localdomain 3.3.7-1.fc17.x86_64 #1 SMP Mon May 21 22:32:19 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> $ lsb_release -a
> LSB Version:	:core-4.0-amd64:core-4.0-noarch
> Distributor ID:	Fedora
> Description:	Fedora release 17 (Beefy Miracle)
> Release:	17
> Codename:	BeefyMiracle
> $ java -version
> java version "1.7.0_b147-icedtea"
> OpenJDK Runtime Environment (fedora-2.1.fc17.6-x86_64)
> OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
>            Reporter: Craig Ringer
>            Assignee: Fred Bricon
>            Priority: Blocker
>             Fix For: 3.3.0.CR1
>
>         Attachments: import-error-log.log.gz
>
>
> When attempting to import JBoss AS 7.1.1.Final, checked out from git, as a Maven project into JBoss Developer Studio 5.0 beta 3 on an x64 Fedora machine with JDK7, JBoss Developer Studio becomes unresponsive partway through the import. It sometimes then fails with an error message, and sometimes just ends up stuck in what appears to be some kind of infinite loop until killed.
> I haven't installed any add-ons or extras, it's stock JBoss Developer Studio 5.0 Beta 3.
> I've tried increasing the memory parameters from the already generous initial allocations to:
> -Xms512m
> -Xmx1592m
> with no improvement. I have 8GB to play with so I'll be throwing a ridiculous amount of RAM at and trying again, but this should not be necessary in any case, not just to *import* a maven project, even a big one.
> All I'm trying to do is import AS7 so I can add the AS7 project to the source search path when debugging a test case that's triggering a bug in AS7, so I don't have to manually add each and every source jar from as7 to my source search path. This seemed like the easy way to do it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list