7 Replies Latest reply on Dec 10, 2008 5:25 PM by benoit heinrich

    Seam 2.1.1.CR2 is out

    Norman Richards Expert

      Seam 2.1.1.CR2 is up.  There really isn't much left for the GA, so I think we can expect to have it out before too long.  That means if you have any problems with CR2, you should report it quickly.

        • 1. Re: Seam 2.1.1.CR2 is out
          Vladimir Kovalyuk Apprentice

          Since DeploymentHandler has been re-factored Chapter 29.10 should be updated.

          • 2. Re: Seam 2.1.1.CR2 is out
            Jay Balunas Novice

            Thanks Vladimir I just created JBSEAM-3824 to cover it.


            -Jay


            • 3. Re: Seam 2.1.1.CR2 is out
              benoit heinrich Newbie

              Hi,


              I've just updated seam from 2.0.3.CR1 to 2.1.1.CR2 and I'm using jboss embedded to run the tests.
              It uses to work perfectly but since I've updated I'm getting the following error:



              java.lang.RuntimeException: error while reading jar:file:/path/to/my/jar/META-INF/components.xml
                      at org.jboss.seam.init.Initialization.initComponentsFromXmlDocuments(Initialization.java:210)
                      at org.jboss.seam.init.Initialization.create(Initialization.java:136)
                      at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:919)
                      at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
                      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:585)
                      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
                      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
                      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
                      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
                      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:261)
                      at org.testng.SuiteRunner.run(SuiteRunner.java:190)
                      at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
                      at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
                      at org.testng.TestNG.run(TestNG.java:699)
                      at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
                      at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
                      at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
                      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:585)
                      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
                      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
              Caused by: java.lang.RuntimeException: Error loading element RemotingConfig with component name null and component class null
                      at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:352)
                      at org.jboss.seam.init.Initialization.initComponentsFromXmlDocuments(Initialization.java:205)
                      ... 25 more
              



              Any idea if something has changed in the components xml?


              Here is the content of the components.xml


              <?xml version="1.0" encoding="UTF-8"?>
              <components xmlns="http://jboss.com/products/seam/components"
                   xmlns:core="http://jboss.com/products/seam/core" xmlns:remoting="http://jboss.com/products/seam/remoting"
                   xmlns:security="http://jboss.com/products/seam/security"
                   xmlns:transaction="http://jboss.com/products/seam/transaction"
                   xmlns:theme="http://jboss.com/products/seam/theme" xmlns:navigation="http://jboss.com/products/seam/navigation"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                               http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd
                               http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                               http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd
                               http://jboss.com/products/seam/remoting http://jboss.com/products/seam/remoting-2.1.xsd
                               http://jboss.com/products/seam/theme http://jboss.com/products/seam/theme-2.1.xsd
                               http://jboss.com/products/seam/navigation http://jboss.com/products/seam/navigation-2.1.xsd 
                               ">
                   <factory name="contextPath" auto-create="true"
                        value="#{facesContext.externalContext.requestContextPath}" />
                   <core:init jndi-pattern="${seam.jndiPattern}" debug="${seam.debug}"
                        transaction-management-enabled="false" />
                   <core:manager conversation-timeout="${seam.timeout.conversation}"
                        concurrent-request-timeout="${seam.timeout.request}"
                        conversation-id-parameter="cid" />
                   <security:identity authenticate-method="#{authenticator.authenticate}" />
                   <remoting:remoting-config debug="${seam.debug}" />
                   <core:resource-loader>
                        <core:bundle-names>
                             <value>messages</value>
                             <value>error_messages</value>
                        </core:bundle-names>
                   </core:resource-loader>
                        
                   <!-- some adjustable properties -->
                   <component name="componentProperties">
                        <property name="supportedFileTypes">bmp, gif, jpg, jpeg, png, tiff, doc, docx, rtf, wps, wpd, pdf, ps, xls, xlsx, txt, pages, odt, ods, odp, pub, ppt, csv, xml</property>
                        <property name="fileStore">/store</property>
                   </component>
                   <navigation:pages resources="/WEB-INF/pages.xml" />
              </components>
              



              I'm running the tests using:



              • jboss embedded beta3.SP4

              • maven 2.0.9

              • surefire plugin 2.4.2

              • testng 5.6.jdk15

              • junit  3.8.1




              Again, everything was working well with seam 2.0.3.CR1.



              Thanks all.


              /Benoit

              • 4. Re: Seam 2.1.1.CR2 is out
                Norman Richards Expert

                Try changing remoting:remoting-config to remoting:remoting.

                • 5. Re: Seam 2.1.1.CR2 is out
                  benoit heinrich Newbie

                  Same problem, I'll try running with the debugger to see where it fails and why.

                  • 6. Re: Seam 2.1.1.CR2 is out
                    benoit heinrich Newbie

                    So, after investigation it seems that the remoting package is not resolved correctly.


                    During the initialization of the application, the components.xml is parsed, and when it finds the

                    <remoting;remoting />

                    element, it resolves the namespace from the
                    xmlns:transaction="http://jboss.com/products/seam/transaction"

                    attribute.


                    For this, it calls Initialization.resolveNamespace(String) and here it searches into the namespaceMap.  In the map there is no entry concerning remoting yet.


                    Here is the content of the map:


                    http://jboss.com/products/seam/async=NamespaceDescriptor(http://jboss.com/products/seam/async), 
                    http://jboss.com/products/seam/drools=NamespaceDescriptor(http://jboss.com/products/seam/drools), 
                    http://jboss.com/products/seam/web=NamespaceDescriptor(http://jboss.com/products/seam/web), 
                    http://jboss.com/products/seam/security=NamespaceDescriptor(http://jboss.com/products/seam/security), 
                    http://jboss.com/products/seam/cache=NamespaceDescriptor(http://jboss.com/products/seam/cache), 
                    http://jboss.com/products/seam/international=NamespaceDescriptor(http://jboss.com/products/seam/international), 
                    http://jboss.com/products/seam/persistence=NamespaceDescriptor(http://jboss.com/products/seam/persistence), 
                    http://jboss.com/products/seam/theme=NamespaceDescriptor(http://jboss.com/products/seam/theme), 
                    http://jboss.com/products/seam/mail=NamespaceDescriptor(http://jboss.com/products/seam/mail), 
                    http://jboss.com/products/seam/transaction=NamespaceDescriptor(http://jboss.com/products/seam/transaction), 
                    http://jboss.com/products/seam/bpm=NamespaceDescriptor(http://jboss.com/products/seam/bpm), 
                    http://jboss.com/products/seam/document=NamespaceDescriptor(http://jboss.com/products/seam/document), 
                    http://jboss.com/products/seam/captcha=NamespaceDescriptor(http://jboss.com/products/seam/captcha), 
                    http://jboss.com/products/seam/core=NamespaceDescriptor(http://jboss.com/products/seam/core), 
                    http://jboss.com/products/seam/jms=NamespaceDescriptor(http://jboss.com/products/seam/jms), 
                    http://jboss.com/products/seam/framework=NamespaceDescriptor(http://jboss.com/products/seam/framework), 
                    http://jboss.com/products/seam/navigation=NamespaceDescriptor(http://jboss.com/products/seam/navigation)
                    



                    And so it calls the NamespacePackageResolver.resolve(String) and that method returns

                    com.jboss.products.seam.remoting

                    as the resolved package name instead of
                    org.jboss.seam.remoting



                    Here the real problem I think is due to the fact that the deployment scanner has not scanned correctly the package for seam remoting.  Why? is jboss remoting still packaged in the seam.jar?  I've scanned quickly the jar and it seems to be no remoting there ;)


                    So, is that normal that remoting is no more packaged in the main seam jar?


                    (seam jar downloaded by maven)



                    Cheers,


                    /Benoit

                    • 7. Re: Seam 2.1.1.CR2 is out
                      benoit heinrich Newbie

                      So, now I've added the dependency for seam remoting, the components.xml is parsed correctly.


                      The next problem I'm getting is :


                      org.jboss.seam.InstantiationException: Could not instantiate Seam component: indexRebuilder
                              at org.jboss.seam.Component.newInstance(Component.java:2106)
                              at org.jboss.seam.Component.getInstance(Component.java:1988)
                              at org.jboss.seam.Component.getInstance(Component.java:1950)
                              at org.jboss.seam.Component.getInstance(Component.java:1944)
                              at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2311)
                              at org.jboss.seam.Component.getValueToInject(Component.java:2263)
                              at org.jboss.seam.Component.injectAttributes(Component.java:1703)
                              at org.jboss.seam.Component.inject(Component.java:1521)
                              at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
                              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
                              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
                              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
                      ...
                      Caused by: java.lang.RuntimeException: PROVIDER_URL not provided in jndi.properties.  Automatic discovery not implemented yet.
                              at org.jboss.naming.JBossRemotingContextFactory.getInitialContext(JBossRemotingContextFactory.java:158)
                              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
                              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
                              at javax.naming.InitialContext.init(InitialContext.java:223)
                              at javax.naming.InitialContext.&lt;init&gt;(InitialContext.java:197)
                              at org.jboss.seam.util.Naming.getInitialContext(Naming.java:37)
                              at org.jboss.seam.util.Naming.initInitialContext(Naming.java:59)
                              at org.jboss.seam.util.Naming.getInitialContext(Naming.java:50)
                              at org.jboss.seam.Component.instantiateSessionBean(Component.java:1367)
                              at org.jboss.seam.Component.instantiate(Component.java:1331)
                              at org.jboss.seam.Component.newInstance(Component.java:2084)
                      



                      Is there another setting who changed meanwhile?



                      Cheers,


                      /Benoit