You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Steve Lopez <st...@stacksports.com> on 2023/01/13 23:12:32 UTC

WebUtils in 1.11 still appears to reference javax

We're looking to migrate to Spring 6.x, which requires Tomcat 10 and thus
Jakarta EE.

The blogpost at
https://shiro.apache.org/blog/2023/01/13/apache-shiro-1110-released.html
appearsrs to suggest 1.11 now supports jakarta.   however, i'm still seeing
references to javax in WebUtils.

Re: WebUtils in 1.11 still appears to reference javax

Posted by Lenny Primak <le...@flowlogix.com>.
Classifiers are a maven construct and beyond the scope for Shiro.

If you google how to use maven classifiers you will find what you are looking
for.

You need to use Jakarta classified for all Shiro artifacts. That probably
means some exclusions.

Mvn dependency:tree is your friend here.

  

> On Jan 13, 2023, at 5:52 PM, Steve Lopez <st...@stacksports.com>
> wrote:  
>  
>

> 
>
> Thanks for the quick response!  Apologies for my ignorance here but I i'm
> just using standard maven pom reference and haven't seen any documentation
> on Shiro website for jakarta classifier.  is this a type of annotation?  
>  
> here's a snippet of the pom  
>  
> <properties>  
>      <java.version>17</java.version>  
>       <maven.compiler.source>11</maven.compiler.source>  
>       <maven.compiler.target>11</maven.compiler.target>  
>       <servlet.api.version>6.0.0</servlet.api.version>  
>       <org.springframework.version>6.0.4</org.springframework.version>  
>       **< shiro.version>1.11.0</shiro.version>**  
>  </properties>  
>  
> <dependencies>
>

>>   <!--Tomcat 10.x-->

>>

>> <dependency>

>>

>>>      <groupId>jakarta.servlet</groupId>

>>

>>>    <artifactId>jakarta.servlet-api</artifactId>

>>

>>>    <version>${servlet.api.version}</version>

>>

>>>    <scope>provided</scope>

>>

>>  </dependency>

>>

>>   <!-- Authentication/Authorization -->

>>

>> <dependency>

>>

>>> <groupId>org.apache.shiro</groupId>

>>

>>> <artifactId>shiro-core</artifactId>

>>

>>> <version>${shiro.version}</version>

>>

>>> <exclusions>

>>

>>> <exclusion>

>>

>>> <groupId>commons-beanutils</groupId>

>>

>>> <artifactId>commons-beanutils</artifactId>

>>

>>> </exclusion>

>>

>>> </exclusions>

>>

>> </dependency>

>>

>> <dependency>

>>

>>>  ** <groupId>org.apache.shiro</groupId>**

>>

>>>  ** <artifactId>shiro-web</artifactId>**

>>

>>>  ** <version>${shiro.version}</version>**

>>

>> </dependency>

>>

>> <dependency>

>>

>>> <groupId>org.apache.shiro</groupId>

>>

>>> <artifactId>shiro-ehcache</artifactId>

>>

>>> <version>${shiro.version}</version>

>>

>>> <exclusions>

>

>> > > <exclusion>

>>

>>> > <groupId>net.sf.ehcache</groupId>

>>

>>> > <artifactId>ehcache-core</artifactId>

>>

>>> > </exclusion>

>

>> > </exclusions>

>

>> </dependency>  
>
>
> </dependencies>  
>  
>  
>
>
>  
>
>
> On Fri, Jan 13, 2023 at 6:24 PM Lenny Primak
> <[lenny@flowlogix.com](mailto:lenny@flowlogix.com)> wrote:  
>
>

>> Are you sure you are using Jakarta classifiers for both Shiro-core and
Shiro-web?

>>

>> Do you have an exact error you are getting?

>>

>>  
>
>>

>>> On Jan 13, 2023, at 5:13 PM, Steve Lopez
<[steve.lopez@stacksports.com](mailto:steve.lopez@stacksports.com)> wrote:  
>  
>
>>

>>> 

>>>

>>>  
>
>>>

>>> We're looking to migrate to Spring 6.x, which requires Tomcat 10 and thus
Jakarta EE.  
>
>>>

>>>  
>
>>>

>>> The blogpost at <https://shiro.apache.org/blog/2023/01/13/apache-
shiro-1110-released.html>  appearsrs to suggest 1.11 now supports jakarta.
however, i'm still seeing references to javax in WebUtils.

>>>

>>>  
>
>>>

>>>  
>


Re: WebUtils in 1.11 still appears to reference javax

Posted by Steve Lopez <st...@stacksports.com>.
Thanks for the quick response!  Apologies for my ignorance here but I i'm
just using standard maven pom reference and haven't seen any documentation
on Shiro website for jakarta classifier.  is this a type of annotation?

here's a snippet of the pom

<properties>
     <java.version>17</java.version>
      <maven.compiler.source>11</maven.compiler.source>
      <maven.compiler.target>11</maven.compiler.target>
      <servlet.api.version>6.0.0</servlet.api.version>
      <org.springframework.version>6.0.4</org.springframework.version>
      *<shiro.version>1.11.0</shiro.version>*
</properties>

<dependencies>

  <!--Tomcat 10.x-->
<dependency>

     <groupId>jakarta.servlet</groupId>

   <artifactId>jakarta.servlet-api</artifactId>

   <version>${servlet.api.version}</version>

   <scope>provided</scope>

 </dependency>
  <!-- Authentication/Authorization -->
<dependency>

<groupId>org.apache.shiro</groupId>

<artifactId>shiro-core</artifactId>

<version>${shiro.version}</version>

<exclusions>

<exclusion>

<groupId>commons-beanutils</groupId>

<artifactId>commons-beanutils</artifactId>

</exclusion>

</exclusions>

</dependency>
<dependency>

* <groupId>org.apache.shiro</groupId>*

* <artifactId>shiro-web</artifactId>*

* <version>${shiro.version}</version>*

</dependency>
<dependency>

<groupId>org.apache.shiro</groupId>

<artifactId>shiro-ehcache</artifactId>

<version>${shiro.version}</version>

<exclusions>

<exclusion>

<groupId>net.sf.ehcache</groupId>

<artifactId>ehcache-core</artifactId>

</exclusion>

</exclusions>

</dependency>

</dependencies>



On Fri, Jan 13, 2023 at 6:24 PM Lenny Primak <le...@flowlogix.com> wrote:

> Are you sure you are using Jakarta classifiers for both Shiro-core and
> Shiro-web?
> Do you have an exact error you are getting?
>
> On Jan 13, 2023, at 5:13 PM, Steve Lopez <st...@stacksports.com>
> wrote:
>
> 
>
> We're looking to migrate to Spring 6.x, which requires Tomcat 10 and thus
> Jakarta EE.
>
> The blogpost at
> https://shiro.apache.org/blog/2023/01/13/apache-shiro-1110-released.html
> appearsrs to suggest 1.11 now supports jakarta.   however, i'm still seeing
> references to javax in WebUtils.
>
>
>

Re: WebUtils in 1.11 still appears to reference javax

Posted by Lenny Primak <le...@flowlogix.com>.
You’re welcome. Glad it worked out

  

> On Jan 13, 2023, at 6:09 PM, Steve Lopez <st...@stacksports.com>
> wrote:  
>  
>

> 
>
> apologies and disregard - see the issue now (another dependent project
> didn't have the classifier yet)
>
>  
>
>
> Thanks Lenny!
>
>  
>
>
> On Fri, Jan 13, 2023 at 7:01 PM Steve Lopez
> <[steve.lopez@stacksports.com](mailto:steve.lopez@stacksports.com)> wrote:  
>
>

>> p.s.  i updated the pom to read as follows but still get compile errors
such as:  
>  
>  _The method getRequiredWebEnvironment(javax.servlet.ServletContext) in the
> type WebUtils is not applicable for the arguments
> (jakarta.servlet.ServletContext)_  
>  
>    <dependency>  
>
>>

>>> <groupId>org.apache.shiro</groupId>  
>  <artifactId>shiro-core</artifactId>  
>  <version>${shiro.version}</version>  
>  <exclusions>  
>
>>

>>> > <exclusion>

>>>

>>>> <groupId>commons-beanutils</groupId>

>>>

>>>> <artifactId>commons-beanutils</artifactId>

>>>

>>>> </exclusion>

>>

>>> </exclusions>  
>  ** <classifier>jakarta</classifier>**
>>

>> </dependency>  
>  <dependency>  
>
>>

>>> <groupId>org.apache.shiro</groupId>  
>  <artifactId>shiro-web</artifactId>  
>  <version>${shiro.version}</version>  
>  ** <classifier>jakarta</classifier>**
>>

>> </dependency>  
>
>>

>>  
>
>>

>> On Fri, Jan 13, 2023 at 6:24 PM Lenny Primak
<[lenny@flowlogix.com](mailto:lenny@flowlogix.com)> wrote:  
>
>>

>>> Are you sure you are using Jakarta classifiers for both Shiro-core and
Shiro-web?

>>>

>>> Do you have an exact error you are getting?

>>>

>>>  
>
>>>

>>>> On Jan 13, 2023, at 5:13 PM, Steve Lopez
<[steve.lopez@stacksports.com](mailto:steve.lopez@stacksports.com)> wrote:  
>  
>
>>>

>>>> 

>>>>

>>>>  
>
>>>>

>>>> We're looking to migrate to Spring 6.x, which requires Tomcat 10 and thus
Jakarta EE.  
>
>>>>

>>>>  
>
>>>>

>>>> The blogpost at <https://shiro.apache.org/blog/2023/01/13/apache-
shiro-1110-released.html>  appearsrs to suggest 1.11 now supports jakarta.
however, i'm still seeing references to javax in WebUtils.

>>>>

>>>>  
>
>>>>

>>>>  
>


Re: WebUtils in 1.11 still appears to reference javax

Posted by Steve Lopez <st...@stacksports.com>.
apologies and disregard - see the issue now (another dependent project
didn't have the classifier yet)

Thanks Lenny!

On Fri, Jan 13, 2023 at 7:01 PM Steve Lopez <st...@stacksports.com>
wrote:

> p.s.  i updated the pom to read as follows but still get compile errors
> such as:
>
> *The method getRequiredWebEnvironment(javax.servlet.ServletContext) in the
> type WebUtils is not applicable for the arguments
> (jakarta.servlet.ServletContext)*
>
>   <dependency>
>
> <groupId>org.apache.shiro</groupId>
> <artifactId>shiro-core</artifactId>
> <version>${shiro.version}</version>
> <exclusions>
>
> <exclusion>
>
> <groupId>commons-beanutils</groupId>
>
> <artifactId>commons-beanutils</artifactId>
>
> </exclusion>
>
> </exclusions>
> * <classifier>jakarta</classifier>*
>
> </dependency>
> <dependency>
>
> <groupId>org.apache.shiro</groupId>
> <artifactId>shiro-web</artifactId>
> <version>${shiro.version}</version>
> * <classifier>jakarta</classifier>*
>
> </dependency>
>
> On Fri, Jan 13, 2023 at 6:24 PM Lenny Primak <le...@flowlogix.com> wrote:
>
>> Are you sure you are using Jakarta classifiers for both Shiro-core and
>> Shiro-web?
>> Do you have an exact error you are getting?
>>
>> On Jan 13, 2023, at 5:13 PM, Steve Lopez <st...@stacksports.com>
>> wrote:
>>
>> 
>>
>> We're looking to migrate to Spring 6.x, which requires Tomcat 10 and thus
>> Jakarta EE.
>>
>> The blogpost at
>> https://shiro.apache.org/blog/2023/01/13/apache-shiro-1110-released.html
>> appearsrs to suggest 1.11 now supports jakarta.   however, i'm still seeing
>> references to javax in WebUtils.
>>
>>
>>

Re: WebUtils in 1.11 still appears to reference javax

Posted by Steve Lopez <st...@stacksports.com>.
p.s.  i updated the pom to read as follows but still get compile errors
such as:

*The method getRequiredWebEnvironment(javax.servlet.ServletContext) in the
type WebUtils is not applicable for the arguments
(jakarta.servlet.ServletContext)*

  <dependency>

<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
<exclusions>

<exclusion>

<groupId>commons-beanutils</groupId>

<artifactId>commons-beanutils</artifactId>

</exclusion>

</exclusions>
* <classifier>jakarta</classifier>*

</dependency>
<dependency>

<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>${shiro.version}</version>
* <classifier>jakarta</classifier>*

</dependency>

On Fri, Jan 13, 2023 at 6:24 PM Lenny Primak <le...@flowlogix.com> wrote:

> Are you sure you are using Jakarta classifiers for both Shiro-core and
> Shiro-web?
> Do you have an exact error you are getting?
>
> On Jan 13, 2023, at 5:13 PM, Steve Lopez <st...@stacksports.com>
> wrote:
>
> 
>
> We're looking to migrate to Spring 6.x, which requires Tomcat 10 and thus
> Jakarta EE.
>
> The blogpost at
> https://shiro.apache.org/blog/2023/01/13/apache-shiro-1110-released.html
> appearsrs to suggest 1.11 now supports jakarta.   however, i'm still seeing
> references to javax in WebUtils.
>
>
>

Re: WebUtils in 1.11 still appears to reference javax

Posted by Lenny Primak <le...@flowlogix.com>.
Are you sure you are using Jakarta classifiers for both Shiro-core and Shiro-web?
Do you have an exact error you are getting?

> On Jan 13, 2023, at 5:13 PM, Steve Lopez <st...@stacksports.com> wrote:
> 
> 
> 
> We're looking to migrate to Spring 6.x, which requires Tomcat 10 and thus Jakarta EE.
> 
> The blogpost at https://shiro.apache.org/blog/2023/01/13/apache-shiro-1110-released.html  appearsrs to suggest 1.11 now supports jakarta.   however, i'm still seeing references to javax in WebUtils.
> 
>