You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Pham Tran Quoc Viet <ph...@yahoo.com> on 2011/10/26 16:02:52 UTC

Class not found error

Hi,
I am newbie to Shiro and Java. I have simple GXT web application. When used
the shiro.ini that comes with quick start sample, it works fine. However, I
got the following error when replacing the content of shiro.ini with my
custom realm:

Caused by: org.apache.shiro.util.UnknownClassException: Unable to load
class named [com.iip.iip.server.models.acl.IipRealm.java] from the
thread context, current, or system/application ClassLoaders.  All
heuristics have been exhausted.  Class could not be found.


Here is the content of my shiro.ini, which has only one line.
iipRealm = com.iip.iip.server.models.acl.IipRealm.java

This path and IipRealm.java do exist. Any help is greatly appreciated.

[image: image.png]

Re: Class not found error

Posted by Pham Tran Quoc Viet <ph...@yahoo.com>.
That did it. Thank you so very much.

On Wed, Oct 26, 2011 at 11:02 AM, Manoj Khangaonkar
<kh...@gmail.com>wrote:

> Hi ,
>
> Your config needs to be
>
> iipRealm = com.iip.iip.server.models.acl.lipReam
>
> and NOT
>
> com.iip.iip.server.models.acl.lipRealm.java
>
> It should be a class name -- not a filename
>
> Manoj
>
> On Wed, Oct 26, 2011 at 7:02 AM, Pham Tran Quoc Viet <
> phamtranquocviet@yahoo.com> wrote:
>
>> Hi,
>> I am newbie to Shiro and Java. I have simple GXT web application. When
>> used the shiro.ini that comes with quick start sample, it works fine.
>> However, I got the following error when replacing the content of shiro.ini
>> with my custom realm:
>>
>> Caused by: org.apache.shiro.util.UnknownClassException: Unable to load class named [com.iip.iip.server.models.acl.IipRealm.java] from the thread context, current, or system/application ClassLoaders.  All heuristics have been exhausted.  Class could not be found.
>>
>>
>> Here is the content of my shiro.ini, which has only one line.
>> iipRealm = com.iip.iip.server.models.acl.IipRealm.java
>>
>> This path and IipRealm.java do exist. Any help is greatly appreciated.
>>
>> [image: image.png]
>>
>
>
>
> --
> http://khangaonkar.blogspot.com/
>

Re: Class not found error

Posted by Manoj Khangaonkar <kh...@gmail.com>.
Hi ,

Your config needs to be

iipRealm = com.iip.iip.server.models.acl.lipReam

and NOT

com.iip.iip.server.models.acl.lipRealm.java

It should be a class name -- not a filename

Manoj

On Wed, Oct 26, 2011 at 7:02 AM, Pham Tran Quoc Viet <
phamtranquocviet@yahoo.com> wrote:

> Hi,
> I am newbie to Shiro and Java. I have simple GXT web application. When used
> the shiro.ini that comes with quick start sample, it works fine. However, I
> got the following error when replacing the content of shiro.ini with my
> custom realm:
>
> Caused by: org.apache.shiro.util.UnknownClassException: Unable to load class named [com.iip.iip.server.models.acl.IipRealm.java] from the thread context, current, or system/application ClassLoaders.  All heuristics have been exhausted.  Class could not be found.
>
>
> Here is the content of my shiro.ini, which has only one line.
> iipRealm = com.iip.iip.server.models.acl.IipRealm.java
>
> This path and IipRealm.java do exist. Any help is greatly appreciated.
>
> [image: image.png]
>



-- 
http://khangaonkar.blogspot.com/

Re: Class not found error

Posted by Jared Bunting <ja...@peachjean.com>.
shiro.ini is looking for a class name.  The class name is
"com.iip.iip.server.models.acl.IipRealm" - no ".java" suffix.  That's
just the file extension.

On 10/26/2011 09:02 AM, Pham Tran Quoc Viet wrote:
> Hi,
> I am newbie to Shiro and Java. I have simple GXT web application. When
> used the shiro.ini that comes with quick start sample, it works fine.
> However, I got the following error when replacing the content of
> shiro.ini with my custom realm:
> Caused by: org.apache.shiro.util.UnknownClassException: Unable to load class named [com.iip.iip.server.models.acl.IipRealm.java] from the thread context, current, or system/application ClassLoaders.  All heuristics have been exhausted.  Class could not be found.
>
> Here is the content of my shiro.ini, which has only one line.
> iipRealm = com.iip.iip.server.models.acl.IipRealm.java
>
> This path and IipRealm.java do exist. Any help is greatly appreciated.
>
> image.png