TomEE 7.0.2 and Shiro 1.4.0 - commons-beanutils error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

TomEE 7.0.2 and Shiro 1.4.0 - commons-beanutils error

gilbertoca
Hello everyone. I hope you're having a good day.

Recently we tried to update Apache Shiro to 1.4.0 (we are in 1.4.0-RC2 and TomEE 7.0.2)
The official release of Shiro has changed some internal about BeanUtilsBean class[1] and thus breaking this "love":
12-Jun-2017 15:13:27.994 INFORMAÇÕES [localhost-startStop-1] org.omnifaces.ApplicationInitializer.logOmniFacesVersion Using OmniFaces version 2.2
12-Jun-2017 15:13:28.218 INFORMAÇÕES [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
15:13 [localhost-startStop-1] INFO   o.a.shiro.web.env.EnvironmentLoader.initEnvironment 133  - Starting Shiro environment initialization.
15:13 [localhost-startStop-1] ERROR  o.a.shiro.web.env.EnvironmentLoader.initEnvironment 156  - Shiro environment initialization failed
java.lang.NoSuchMethodError: org.apache.commons.beanutils.PropertyUtilsBean.addBeanIntrospector(Lorg/apache/commons/beanutils/BeanIntrospector;)V
        at org.apache.shiro.config.ReflectionBuilder.<init>(ReflectionBuilder.java:127)
        at org.apache.shiro.config.ReflectionBuilder.<init>(ReflectionBuilder.java:120)
        at org.apache.shiro.config.IniSecurityManagerFactory.<init>(IniSecurityManagerFactory.java:64)
        at org.apache.shiro.web.config.WebIniSecurityManagerFactory.<init>(WebIniSecurityManagerFactory.java:45)
        at org.apache.shiro.web.env.IniWebEnvironment.<init>(IniWebEnvironment.java:60)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:181)
        at org.apache.shiro.web.env.EnvironmentLoader.determineWebEnvironment(EnvironmentLoader.java:265)
        at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:287)
        at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:139)
        at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
12-Jun-2017 15:13:28.686 INFORMAÇÕES [localhost-startStop-1] com.sun.faces.config.ConfigureListener.contextInitialized Inicializando Mojarra 2.2.13 ( 20160203-1910 unable to get svn info) para o contexto '/gace'

./.distribution/apache-tomee/lib/commons-beanutils-core-1.8.3.jar
./.distribution/apache-tomee/webapps/gace/WEB-INF/lib/commons-beanutils-1.9.3.jar

Is it possible, to TomEE team, to update the commons-beanutils?

Regards,

Gilberto

[1] http://shiro-user.582556.n2.nabble.com/From-1-4-0-RC2-to-1-4-0-java-lang-NoClassDefFoundError-org-apache-commons-beanutils-BeanIntrospector-tp7581637p7581647.html


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TomEE 7.0.2 and Shiro 1.4.0 - commons-beanutils error

sgjava
Why not exclude? Here's What I do for slf4j to use logback:

        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>tomee-embedded</artifactId>
            <version>${tomee.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-jdk14</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

In the stand alone version just replace in the lib folder.


On Mon, Jun 12, 2017 at 1:58 PM, gilbertoca <[hidden email]> wrote:

> Hello everyone. I hope you're having a good day.
>
> Recently we tried to update Apache Shiro to 1.4.0 (we are in 1.4.0-RC2 and
> TomEE 7.0.2)
> The official release of Shiro has changed some internal about BeanUtilsBean
> class[1] and thus breaking this "love":
>
>
> Is it possible, to TomEE team, to update the commons-beanutils?
>
> Regards,
>
> Gilberto
>
> [1]
> http://shiro-user.582556.n2.nabble.com/From-1-4-0-RC2-to-1-4-0-java-lang-
> NoClassDefFoundError-org-apache-commons-beanutils-BeanIntrospector-
> tp7581637p7581647.html
>
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/TomEE-7-0-2-and-Shiro-1-4-0-commons-beanutils-
> error-tp4681858.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>



--
Steven P. Goldsmith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TomEE 7.0.2 and Shiro 1.4.0 - commons-beanutils error

Romain Manni-Bucau
sure: https://issues.apache.org/jira/browse/TOMEE-2061


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-12 20:18 GMT+02:00 Steve Goldsmith <[hidden email]>:

> Why not exclude? Here's What I do for slf4j to use logback:
>
>         <dependency>
>             <groupId>org.apache.tomee</groupId>
>             <artifactId>tomee-embedded</artifactId>
>             <version>${tomee.version}</version>
>             <scope>test</scope>
>             <exclusions>
>                 <exclusion>
>                     <groupId>org.slf4j</groupId>
>                     <artifactId>slf4j-jdk14</artifactId>
>                 </exclusion>
>             </exclusions>
>         </dependency>
>
> In the stand alone version just replace in the lib folder.
>
>
> On Mon, Jun 12, 2017 at 1:58 PM, gilbertoca <[hidden email]> wrote:
>
> > Hello everyone. I hope you're having a good day.
> >
> > Recently we tried to update Apache Shiro to 1.4.0 (we are in 1.4.0-RC2
> and
> > TomEE 7.0.2)
> > The official release of Shiro has changed some internal about
> BeanUtilsBean
> > class[1] and thus breaking this "love":
> >
> >
> > Is it possible, to TomEE team, to update the commons-beanutils?
> >
> > Regards,
> >
> > Gilberto
> >
> > [1]
> > http://shiro-user.582556.n2.nabble.com/From-1-4-0-RC2-to-
> 1-4-0-java-lang-
> > NoClassDefFoundError-org-apache-commons-beanutils-BeanIntrospector-
> > tp7581637p7581647.html
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://tomee-openejb.979440.
> > n4.nabble.com/TomEE-7-0-2-and-Shiro-1-4-0-commons-beanutils-
> > error-tp4681858.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> Steven P. Goldsmith
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TomEE 7.0.2 and Shiro 1.4.0 - commons-beanutils error

gilbertoca
Thanks folks

For those of you that is in same boat - using tomee-embedded for developing:

                <groupId>org.apache.tomee.maven</groupId>
                <artifactId>tomee-embedded-maven-plugin</artifactId>
                <version>${tomee-embedded-maven-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.tomee</groupId>
                        <artifactId>tomee-embedded</artifactId>
                        <version>${tomee-embedded-maven-plugin.version}</version>
                        <exclusions>
                            <exclusion>
                                <groupId>commons-beanutils</groupId>
                                <artifactId>commons-beanutils-core</artifactId>
                            </exclusion>                        
                        </exclusions>                        
                    </dependency>                    
                    <dependency>
                        <groupId>commons-beanutils</groupId>
                        <artifactId>commons-beanutils</artifactId>
                        <version>1.9.3</version>
                    </dependency>
                 </dependencies>

There is now only one jar for the BeanUtils library.
 

Romain Manni-Bucau wrote
sure: https://issues.apache.org/jira/browse/TOMEE-2061

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-12 20:18 GMT+02:00 Steve Goldsmith <[hidden email]>:

> Why not exclude? Here's What I do for slf4j to use logback:
>
>         <dependency>
>             <groupId>org.apache.tomee</groupId>
>             <artifactId>tomee-embedded</artifactId>
>             <version>${tomee.version}</version>
>             <scope>test</scope>
>             <exclusions>
>                 <exclusion>
>                     <groupId>org.slf4j</groupId>
>                     <artifactId>slf4j-jdk14</artifactId>
>                 </exclusion>
>             </exclusions>
>         </dependency>
>
> In the stand alone version just replace in the lib folder.
>
>
> On Mon, Jun 12, 2017 at 1:58 PM, gilbertoca <[hidden email]> wrote:
>
> > Hello everyone. I hope you're having a good day.
> >
> > Recently we tried to update Apache Shiro to 1.4.0 (we are in 1.4.0-RC2
> and
> > TomEE 7.0.2)
> > The official release of Shiro has changed some internal about
> BeanUtilsBean
> > class[1] and thus breaking this "love":
> >
> >
> > Is it possible, to TomEE team, to update the commons-beanutils?
> >
> > Regards,
> >
> > Gilberto
> >
> > [1]
> > http://shiro-user.582556.n2.nabble.com/From-1-4-0-RC2-to-
> 1-4-0-java-lang-
> > NoClassDefFoundError-org-apache-commons-beanutils-BeanIntrospector-
> > tp7581637p7581647.html
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://tomee-openejb.979440.
> > n4.nabble.com/TomEE-7-0-2-and-Shiro-1-4-0-commons-beanutils-
> > error-tp4681858.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> Steven P. Goldsmith
>
Loading...