11 Replies Latest reply on May 6, 2010 10:06 AM by Ben Utzer

    Exception when log level is DEBUG

    Ben Utzer Newbie

      Hi,


      I encountered the following exception, whenever the log level was set to DEBUG:



      DEBUG org.jboss.weld.jsf.JsfHelper - getConversationId: WELD-000504 Resuming conversation with id 3
      27.04.2010 17:03:33 org.apache.catalina.core.StandardWrapperValve invoke
      SCHWERWIEGEND: Servlet.service() for servlet Faces Servlet threw exception
      org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type @ConversationScoped
           at org.jboss.weld.conversation.ConversationImpl.checkConversationActive(ConversationImpl.java:79)
           at org.jboss.weld.conversation.ConversationImpl.isTransient(ConversationImpl.java:234)
           at org.jboss.weld.conversation.ConversationImpl.toString(ConversationImpl.java:199)
           at java.text.MessageFormat.subformat(MessageFormat.java:1246)
           at java.text.MessageFormat.format(MessageFormat.java:836)
           at java.text.Format.format(Format.java:140)


      I guess this is caused by the toString-method of ConversationImpl which checks isTransient().


      Cheers,


      Ben

        • 1. Re: Exception when log level is DEBUG
          Nicklas Karlsson Master

          What version? Trunk doesn't do that anymore (and the line numbers do not look like trunk)

          • 2. Re: Exception when log level is DEBUG
            Ben Utzer Newbie

            I think I downloaded 1.0.1 Final, I will check against the latest trunk tomorrow, thank you.

            • 3. Re: Exception when log level is DEBUG
              Ben Utzer Newbie

              Hello again,


              I've tried building Weld from trunk but I get this exception:


              [INFO] Compilation failure

              O:\Weld\SVN\impl\src\main\java\org\jboss\weld\logging\LoggerFactory.java:[24,20] package ch.qos.cal10n does not exist
              ...


              How can I add this dependency? I'm not so fluent in configuring maven...

              • 4. Re: Exception when log level is DEBUG
                Nicklas Karlsson Master

                hmm, just doing a mvn clean install should pull in all dependencies.

                • 5. Re: Exception when log level is DEBUG
                  Ben Utzer Newbie

                  Thats what I did and it's not working. I followed these instructions.

                  • 6. Re: Exception when log level is DEBUG
                    Pete Muir Master

                    You possibly have the java.net repo enabled in Maven which has some (very) bad artifacts in it which cause our transitive resolution to fail.

                    • 7. Re: Exception when log level is DEBUG
                      Ben Utzer Newbie

                      Thank you for your reply. This is how my maven settings.xml looks like:




                      ...
                      <profile>
                          <id>jboss</id>
                           <pluginRepositories>
                                <pluginRepository>
                                     <releases>
                                          <enabled>true</enabled>
                                     </releases>
                                     <snapshots>
                                          <enabled>false</enabled>
                                          <updatePolicy>never</updatePolicy>
                                     </snapshots>
                                     <id>repository.jboss.com</id>
                                     <name>Jboss Repository for Maven</name>
                                     <url>http://repository.jboss.com/maven2/</url>
                                     <layout>default</layout>
                                </pluginRepository>
                                <pluginRepository>
                                     <releases>
                                          <enabled>false</enabled>
                                     </releases>
                                     <snapshots>
                                          <enabled>true</enabled>
                                      <updatePolicy>always</updatePolicy>
                                     </snapshots>
                                     <id>snapshots.jboss.org</id>
                                     <name>Jboss Snapshots Repository for Maven</name>
                                     <url>http://snapshots.jboss.org/maven2/</url>
                                     <layout>default</layout>
                                </pluginRepository>
                           </pluginRepositories>
                          <repositories>
                              <repository>
                                  <releases>
                                      <enabled>true</enabled>
                                  </releases>
                                  <snapshots>
                                      <enabled>true</enabled>
                                      <updatePolicy>always</updatePolicy>
                                  </snapshots>
                                  <id>snapshots.jboss.org</id>
                                  <name>Snapshot Jboss Repository for Maven</name>
                                  <url>http://snapshots.jboss.org/maven2/</url>
                                  <layout>default</layout>
                              </repository>
                              <repository>
                                  <releases>
                                      <enabled>true</enabled>
                                  </releases>
                                  <snapshots>
                                     <enabled>true</enabled>
                                      <updatePolicy>always</updatePolicy>
                                  </snapshots>
                                  <id>repository.jboss.com</id>
                                  <name>Jboss Repository for Maven</name>
                                  <url>http://repository.jboss.com/maven2/</url>
                                  <layout>default</layout>
                              </repository>
                          </repositories>
                      </profile>
                          <profile>
                          <id>cdk</id>
                         <repositories>
                            <repository>
                               <releases>
                                  <enabled>true</enabled>
                               </releases>
                               <snapshots>
                                  <enabled>false</enabled>
                                  <updatePolicy>never</updatePolicy>
                               </snapshots>
                               <id>repository.jboss.com</id>
                               <name>Jboss Repository for Maven</name>
                               <url>
                                  http://repository.jboss.com/maven2/
                               </url>
                               <layout>default</layout>
                            </repository>
                            <repository>
                               <releases>
                                  <enabled>false</enabled>
                               </releases>
                               <snapshots>
                                  <enabled>true</enabled>
                                  <updatePolicy>always</updatePolicy>
                               </snapshots>
                               <id>maven2-snapshots.jboss.com</id>
                               <name>Jboss Repository for Maven Snapshots</name>
                               <url>http://snapshots.jboss.com/</url>
                               <layout>default</layout>
                            </repository>
                         </repositories>
                       <pluginRepositories>
                         <pluginRepository>
                               <id>maven2-snapshots.jboss.com</id>
                               <name>Jboss Repository for Maven Snapshots</name>
                               <url>http://snapshots.jboss.com/</url>
                           <releases>
                             <enabled>false</enabled>
                           </releases>
                           <snapshots>
                             <enabled>true</enabled>
                             <updatePolicy>always</updatePolicy>
                           </snapshots>
                         </pluginRepository>
                         <pluginRepository>
                               <releases>
                                  <enabled>true</enabled>
                               </releases>
                               <snapshots>
                                  <enabled>false</enabled>
                                  <updatePolicy>never</updatePolicy>
                               </snapshots>
                               <id>repository.jboss.com</id>
                               <name>Jboss Repository for Maven</name>
                               <url>
                                  http://repository.jboss.com/maven2/
                               </url>
                               <layout>default</layout>
                         </pluginRepository>
                       </pluginRepositories>
                       </profile>
                      ...
                      <activeProfiles>
                        <activeProfile>cdk</activeProfile>
                      </activeProfiles>
                      ...



                      Is there anything wrong with it?

                      • 8. Re: Exception when log level is DEBUG
                        Pete Muir Master

                        No, that looks ok. Try removing the artifact manually from your cache and rerun the build.

                        • 9. Re: Exception when log level is DEBUG
                          Ben Utzer Newbie

                          After deleting all ch. and org.jboss.weld. artifacts and trying again I now get the following exception...




                          [INFO] Scanning for projects...
                          [INFO] snapshot org.jboss.weld:weld-api-bom:1.0-SNAPSHOT: checking for updates from maven2-snapshots.jboss.com
                          [WARNING] repository metadata for: 'snapshot org.jboss.weld:weld-api-bom:1.0-SNAPSHOT' could not be retrieved from repository: maven2-snapshots.jboss.com due to an error: snapshots.jboss.com
                          [INFO] Repository 'maven2-snapshots.jboss.com' will be blacklisted
                          Downloading: http://oss.sonatype.org/content/repositories/jboss-snapshots/org/jboss/weld/weld-api-bom/1.0-SNAPSHOT/weld-api-bom-1.0-SNAPSHOT.pom
                          [INFO] Unable to find resource 'org.jboss.weld:weld-api-bom:pom:1.0-SNAPSHOT' in repository oss.sonatype.org/jboss-snapshots (http://oss.sonatype.org/content/repositories/jboss-snapshots)
                          [INFO] ------------------------------------------------------------------------
                          [ERROR] FATAL ERROR
                          [INFO] ------------------------------------------------------------------------
                          [INFO] Error building POM (may not be this project's POM).
                          
                          
                          Project ID: org.jboss.weld:weld-api-bom
                          
                          Reason: POM 'org.jboss.weld:weld-api-bom' not found in repository: Unable to download the artifact from any repository
                          
                            org.jboss.weld:weld-api-bom:pom:1.0-SNAPSHOT
                          
                          from the specified remote repositories:
                            repository.jboss.com (http://repository.jboss.com/maven2/),
                            central (http://repo1.maven.org/maven2),
                            maven2-snapshots.jboss.com (http://snapshots.jboss.com/),
                            oss.sonatype.org/jboss-snapshots (http://oss.sonatype.org/content/repositories/jboss-snapshots)
                          
                           for project org.jboss.weld:weld-api-bom
                          
                          
                          
                          [INFO] Trace
                          org.apache.maven.reactor.MavenExecutionException: POM 'org.jboss.weld:weld-api-bom' not found in repository: Unable to download the artifact from any repository
                          
                            org.jboss.weld:weld-api-bom:pom:1.0-SNAPSHOT
                          
                          from the specified remote repositories:
                            repository.jboss.com (http://repository.jboss.com/maven2/),
                            central (http://repo1.maven.org/maven2),
                            maven2-snapshots.jboss.com (http://snapshots.jboss.com/),
                            oss.sonatype.org/jboss-snapshots (http://oss.sonatype.org/content/repositories/jboss-snapshots)
                          
                           for project org.jboss.weld:weld-api-bom
                               at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:432)
                               at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:300)
                               at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
                               at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
                               at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
                               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.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.project.ProjectBuildingException: POM 'org.jboss.weld:weld-api-bom' not found in repository: Unable to download the artifact from any repository
                          
                            org.jboss.weld:weld-api-bom:pom:1.0-SNAPSHOT
                          
                          from the specified remote repositories:
                            repository.jboss.com (http://repository.jboss.com/maven2/),
                            central (http://repo1.maven.org/maven2),
                            maven2-snapshots.jboss.com (http://snapshots.jboss.com/),
                            oss.sonatype.org/jboss-snapshots (http://oss.sonatype.org/content/repositories/jboss-snapshots)
                          
                           for project org.jboss.weld:weld-api-bom
                               at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
                               at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
                               at org.apache.maven.project.DefaultMavenProjectBuilder.mergeManagedDependencies(DefaultMavenProjectBuilder.java:1456)
                               at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:999)
                               at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
                               at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
                               at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
                               at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:632)
                               at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:515)
                               at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:588)
                               at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:419)
                               ... 12 more
                          Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
                          
                            org.jboss.weld:weld-api-bom:pom:1.0-SNAPSHOT
                          
                          from the specified remote repositories:
                            repository.jboss.com (http://repository.jboss.com/maven2/),
                            central (http://repo1.maven.org/maven2),
                            maven2-snapshots.jboss.com (http://snapshots.jboss.com/),
                            oss.sonatype.org/jboss-snapshots (http://oss.sonatype.org/content/repositories/jboss-snapshots)
                          
                          
                               at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
                               at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
                               at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
                               ... 22 more
                          Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
                               at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:349)
                               at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
                               ... 24 more




                          • 10. Re: Exception when log level is DEBUG
                            Pete Muir Master

                            I did a deploy of the snapshot, try now :-)

                            • 11. Re: Exception when log level is DEBUG
                              Ben Utzer Newbie

                              Sorry, I'm still having the same exception :(