You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Indrajit57 <in...@comcast.net> on 2020/11/20 19:43:17 UTC

EnvironmentLoaderListener Error for shiro 1.2.2 on Weblogic 12c

We have a java application which is using Shiro 1.2.2 and was working fine on
JDK1.6 and WebLogic 11g. Now we are
<http://shiro-user.582556.n2.nabble.com/file/t396677/Shiro_Error.png> 
trying to deploy the same application using JDK1.8 and Weblogic12c. We see
the following error on deployment.  Also please find the attached image for
complete stack trace. 

java.lang.ClassNotFoundException:
org.apache.shiro.web.env.EnvironmentLoaderListener
        at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
        at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
        at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
        at
weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
        at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)


Here is the web.xml entry for Shiro

<listener>
               
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>


Appreciate your help.





--
Sent from: http://shiro-user.582556.n2.nabble.com/

Re: EnvironmentLoaderListener Error for shiro 1.2.2 on Weblogic 12c

Posted by Benjamin Marwell <bm...@apache.org>.
Loading from an external classpath environment variable might be the
problem and not supported anymore. Have you tried putting the shiro jars
into the .war (which is inside the ear file) instead?

I have little knowledge about weblogic, but I know from other application
servers they will encapsulate classloaders from each other for security
reasons.

If you do not want to have the jars in your ear/war file, Weblogic possibly
provides other means to load shared libraries.

Best regards,
Ben




On Fri, 20 Nov 2020, 21:36 Indrajit57, <in...@comcast.net> wrote:

> Thanks Brian for your quick response. Here are the answers to your
> questions:
>
>
> What how are you deploying your application? -  deploying as EAR
>
> Was the WAR/EAR changed between deployments if so what has changed? Have
> you
> diffed the contents?  – No Changes are made
>
> Is the `shiro-web` jar on your classpath? If not how was it getting loaded
> in with your previous deployment? Was it on some shared classpath?    -
> Yes
> , shiro-web is in classpath
>
>
> CLASSPATH=
>
> C:\beaUtil\util\shiro-aspectj-1.2.2.jar;C:\beaUtil\util\shiro-cas-1.2.2.jar;C:\beaUtil\util\shiro-core-1.2.2.jar;C:\beaUtil\util\shiro-ehcache-1.2.2.jar;C:\beaUtil\util\shiro-spring-1.2.2.jar;C:\beaUtil\util\shiro-web-1.2.2.jar;
> C:\beaUtil\util\slf4j-api-1.6.1.jar;
>
>
>
>
> --
> Sent from: http://shiro-user.582556.n2.nabble.com/
>

Re: EnvironmentLoaderListener Error for shiro 1.2.2 on Weblogic 12c

Posted by Indrajit57 <in...@comcast.net>.
Thanks Brian for your quick response. Here are the answers to your questions:


What how are you deploying your application? -  deploying as EAR

Was the WAR/EAR changed between deployments if so what has changed? Have you
diffed the contents?  – No Changes are made

Is the `shiro-web` jar on your classpath? If not how was it getting loaded
in with your previous deployment? Was it on some shared classpath?    -  Yes
, shiro-web is in classpath


CLASSPATH=
C:\beaUtil\util\shiro-aspectj-1.2.2.jar;C:\beaUtil\util\shiro-cas-1.2.2.jar;C:\beaUtil\util\shiro-core-1.2.2.jar;C:\beaUtil\util\shiro-ehcache-1.2.2.jar;C:\beaUtil\util\shiro-spring-1.2.2.jar;C:\beaUtil\util\shiro-web-1.2.2.jar;
C:\beaUtil\util\slf4j-api-1.6.1.jar;




--
Sent from: http://shiro-user.582556.n2.nabble.com/

Re: EnvironmentLoaderListener Error for shiro 1.2.2 on Weblogic 12c

Posted by Brian Demers <br...@gmail.com>.
I think we are going to need a little more info.  What how are you
deploying your application? as the WAR/EAR changed between deployments, if
so what has changed? Have you diffed the contents?
Is the `shiro-web` jar on your classpath? If not how was it getting loaded
in with your previous deployment?  Was it on some shared classpath?

On Fri, Nov 20, 2020 at 2:43 PM Indrajit57 <in...@comcast.net>
wrote:

> We have a java application which is using Shiro 1.2.2 and was working fine
> on
> JDK1.6 and WebLogic 11g. Now we are
> <http://shiro-user.582556.n2.nabble.com/file/t396677/Shiro_Error.png>
> trying to deploy the same application using JDK1.8 and Weblogic12c. We see
> the following error on deployment.  Also please find the attached image for
> complete stack trace.
>
> java.lang.ClassNotFoundException:
> org.apache.shiro.web.env.EnvironmentLoaderListener
>         at
>
> weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
>         at
>
> weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
>         at
>
> weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
>         at
>
> weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
>         at
>
> weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
>
>
> Here is the web.xml entry for Shiro
>
> <listener>
>
>
> <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
> </listener>
>
>
> Appreciate your help.
>
>
>
>
>
> --
> Sent from: http://shiro-user.582556.n2.nabble.com/
>