4 Replies Latest reply on Jan 31, 2011 7:59 AM by cosmostunes

    JBoss Tools 3.2 CR1 @Inject Warnings

    cosmostunes

      Hello,

       

      I'm using the new Jboss Tools 3.2 CR1 from the nightly repository. I'm getting some warnings:

       

      @Named
      @Startup
      public class BootstrapPersistenceAccess {
      
        @Inject Logger log;
        @Inject UserTransaction utx;
      
        ...
      
      }
      

       

      The first injection is jboss logger with warning: No bean is eligible for injection to the injection point

      The second injection is javax.transaction.UserTransaction with warning: Multiple beans are eligible for injection to the injection point

       

      The strange thing is that I inject the logger on other classes also without this warning.

       

      Anyways the injections for this class works like a charm!

        • 1. JBoss Tools 3.2 CR1 @Inject Warnings
          akazakov

          Is it a Weld 1.1 project?

          Could you show the import declaration too?

          Does this project work when you deploy it?

          CDI validator may show warnings for correct injections. We just need to have more details to reproduce it.

          • 2. Re: JBoss Tools 3.2 CR1 @Inject Warnings
            cosmostunes

            Thanks Alexey.

             

            I have fixed these warnings with upgrading my weld dependency:

             

                  <dependency>
                     <groupId>org.jboss.weld</groupId>
                     <artifactId>weld-core</artifactId>
                     <version>1.0.1-Final</version>
                     <scope>test</scope>
                  </dependency>
            

             

            to

             

                  <dependency>
                     <groupId>org.jboss.weld</groupId>
                     <artifactId>weld-core</artifactId>
                     <version>1.1.0.Final</version>
                     <scope>test</scope>
                  </dependency>
            

             

            But since I switched this depency I'm getting 3 new warnings Currently since my project based on a not updated seam 3 example with much customizings from my side i'm not sure if I need these files any longer...

             

            Description    Resource    Path    Location    Type

            No grammar constraints (DTD or XML schema) detected for the document.    arquillian.xml    /myWebapp/src/test/resources    line 1    XML Problem

            No grammar constraints (DTD or XML schema) detected for the document.    jboss-scanning.xml    /myWebapp/src/main/webapp/WEB-INF    line 1    XML Problem

            No grammar constraints (DTD or XML schema) detected for the document.    webapp-cache.xml    /myWebapp/target/war/work    line 1    XML Problem

             

            Here are the files:

             

            <?xml version="1.0" encoding="UTF-8"?>
            <arquillian xmlns="http://jboss.com/arquillian"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:jbossas-remote="urn:arq:org.jboss.arquillian.container.jbossas.remote_6"
               xmlns:glassfish-remote="urn:arq:org.jboss.arquillian.container.glassfish.remote_3"
               xmlns:glassfish-embedded="urn:arq:org.jboss.arquillian.container.glassfish.embedded_3">
            
               <engine>
                  <deploymentExportPath>/tmp/</deploymentExportPath>
               </engine>
            
               <jbossas-remote:container>
                  <jbossas-remote:remoteServerHttpPort>8080</jbossas-remote:remoteServerHttpPort>
               </jbossas-remote:container>
            
               <glassfish-remote:container>
                  <glassfish-remote:remoteServerHttpPort>7070</glassfish-remote:remoteServerHttpPort>
               </glassfish-remote:container>
            
               <glassfish-embedded:container>
                  <glassfish-embedded:bindHttpPort>7070</glassfish-embedded:bindHttpPort>
                  <glassfish-embedded:sunResourcesXml>src/test/resources-glassfish-embedded/sun-resources.xml</glassfish-embedded:sunResourcesXml>
               </glassfish-embedded:container>  
            
            </arquillian>
            

             

            <scanning xmlns="urn:jboss:scanning:1.0">
            <!--
                For JBoss AS 6 integration there is a conflict with guava, and
                google-collections.  JBAS-8361
            -->
                <path name="WEB-INF/classes"></path>
            
                <path name="WEB-INF/lib/guava-r07.jar">
                    <exclude name="com.google.common.collect" />
                </path>
            </scanning>
            

             

            But one strange thing. It also shows target/war/work/webapp-cache.xml as warning which is generated from maven and contains all files inside the webapp...

            • 3. Re: JBoss Tools 3.2 CR1 @Inject Warnings
              akazakov

              It seems that some Eclipse WTP (Web Tools) plugins are missing. What destribution of Eclipse are you using? Eclipse for EE developers or just plain Eclipse + JBoss Tools + required dependencies installed from update site?

              See https://issues.jboss.org/browse/JBIDE-8225 for details of this issue.

              • 4. Re: JBoss Tools 3.2 CR1 @Inject Warnings
                cosmostunes

                I have started with the Helios Eclipse EE and downloaded some plugins like m2eclipse, jboss tools and some others.

                 

                I have allready installed the WTP & XML Editors and Tools! Every plugin is up-to-date!

                 

                Software:

                 

                  Common tools for jBPM 3 and jBPM 4    4.4.0.v20110121-0343-H66-CR1    org.jboss.tools.jbpm.common.feature.feature.group
                  Context and Dependency Injection Tools    1.1.0.v20110120-1439-H64-CR1    org.jboss.tools.cdi.feature.feature.group
                  Eclipse IDE for Java EE Developers    1.3.1.20100916-1202    epp.package.jee
                  Eclipse Web Developer Tools    3.2.2.v201008100100-7O7CFbKEMf84nUlEJyX7-SPQjhYZ    org.eclipse.wst.web_ui.feature.feature.group
                  Eclipse XML Editors and Tools    3.2.2.v201008170029-7H7AFUQDxumQGOpBqffOY2f1qxDZ    org.eclipse.wst.xml_ui.feature.feature.group
                  FlexyCore Plug-in    1.2.11    FlexycoreCompiler.feature.group
                  FreeMarker IDE    1.1.0.v20110121-0726-H27-CR1    org.jboss.ide.eclipse.freemarker.feature.feature.group
                  Hibernate Tools    3.4.0.v20110121-0725-H45-CR1    org.hibernate.eclipse.feature.feature.group
                  JBoss Archives Tools    3.2.0.v20110121-0238-H31-CR1    org.jboss.ide.eclipse.archives.feature.feature.group
                  JBoss BPEL Editor    1.0.0.v20110121-0324-H38-CR1    org.jboss.tools.bpel.feature.feature.group
                  JBoss Drools Core    5.2.0.v20110121-0640-H204    org.drools.eclipse.feature.feature.group
                  JBoss Drools Guvnor    5.2.0.v20110121-0640-H204    org.guvnor.tools.feature.feature.group
                  JBoss Drools Task    5.2.0.v20110121-0640-H204    org.drools.eclipse.task.feature.feature.group
                  JBoss ESB Tools    1.3.0.v20110121-0450-H58-CR1    org.jboss.tools.esb.feature.feature.group
                  JBoss Portlet    1.1.0.v20110121-0610-H33-CR1    org.jboss.tools.portlet.feature.feature.group
                  JBoss Runtime Detection Core    1.0.0.v20110121-0612-H30-CR1    org.jboss.tools.runtime.core.feature.feature.group
                  JBoss Tools Community Project Examples    1.1.0.v20110121-0430-H33-CR1    org.jboss.tools.community.project.examples.feature.feature.group
                  JBoss Tools RichFaces    3.2.0.v20110121-0816-H66-CR1    org.jboss.tools.richfaces.feature.feature.group
                  JBoss Tools Usage Reporting    1.0.0.v20110121-0418-H41-CR1    org.jboss.tools.usage.feature.feature.group
                  JBoss WebServices Tools    1.1.0.v20110120-2159-H75-CR1    org.jboss.tools.ws.feature.feature.group
                  JBossAS Tools    2.2.0.v20110119-2335-H86-CR1    org.jboss.ide.eclipse.as.feature.feature.group
                  jBPM 3 Tools Runtime    3.2.0.v20110121-0343-H66-CR1    org.jboss.tools.jbpm3.feature.feature.group
                  jBPM 4 Tools Runtime    4.0.0.v20110121-0343-H66-CR1    org.jboss.tools.jbpm4.feature.feature.group
                  jBPM Convert    1.0.0.v20110121-0343-H66-CR1    org.jboss.tools.jbpm.convert.feature.feature.group
                  JMX Console    1.1.0.v20110121-0332-H65-CR1    org.jboss.tools.jmx.feature.feature.group
                  Maven Integration for Eclipse (Required)    0.12.1.20110112-1712    org.maven.ide.eclipse.feature.feature.group
                  ModeShape JCR REST Tools for Eclipse    1.0.0.v20110121-0349-H47-CR1    org.jboss.tools.modeshape.rest.feature.feature.group
                  pi4soa Core    3.1.0.v20110121-0349-H198-CR1    org.pi4soa.core.feature.feature.group
                  Project Examples    1.2.0.v20110121-0430-H33-CR1    org.jboss.tools.project.examples.feature.feature.group
                  Runtime Initialization    1.2.0.v20110121-0612-H30-CR1    org.jboss.tools.runtime.feature.feature.group
                  Seam Tools    3.2.0.v20110121-0714-H64-CR1    org.jboss.tools.seam.feature.feature.group
                  Smooks Tools    1.1.0.v20110121-0624-H35-CR1    org.jboss.tools.smooks.feature.feature.group
                  Struts Tools    3.1.0.v20110119-1839-H35-CR1    org.jboss.tools.struts.feature.feature.group
                  Teiid DataTools Connectivity Feature    7.1.0.v20110121-0344-H74-CR1    org.teiid.datatools.connectivity.feature.feature.group
                  Teiid Designer    7.1.0.v20110121-0344-H74-CR1    org.teiid.designer.feature.feature.group
                  Teiid Designer Runtime    7.1.0.v20110121-0344-H74-CR1    org.teiid.designer.runtime.feature.feature.group
                  XULRunner    1.9.12.v20110120-1257-H48-CR1    org.jboss.tools.xulrunner.feature.feature.group