i have backed to trying to reconfigure JBoss's UniversalClassLoader

<jboss-web>
    <class-loading java2ClassLoadingCompliance="false">

<loader-repository>com.example.loaderrepository:loader=somename-webapp.war

<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
    </loader-repository>
    </class-loading>
</jboss-web>

i have solved NoClassDefFound when i have excluded xml-apis

        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>${commons.dbcp.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>xercesImpl</artifactId>
                    <groupId>xerces</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>xml-apis</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
            </exclusions>
        </dependency>

At this moment, apfuse2 works in jboss and jetty, except two things:

1) Interceptor isn´t loaded if it can put in WEB-INF/lib like a jar. In
WEB-INF/classes isn´t loaded

does anybody know how can i configure it to load interceptor?

 2) i have sent other mail to list about taglib because tags doesn´t work in
jboss.

thanks!

On Mon, Aug 17, 2009 at 10:38 AM, Miguel Romero <individu...@gmail.com>wrote:

> hi,
>
> First, As always, my greetings to you
>
> Second, questions. :)
>
> UserRoleAuthorizationIntercept is a class that is compiled in
> WEB-INF\classes not in WEB-INF\lib
>
> If i create a jar for this class and place in WEB-INF\lib, application
> works ok, without exceptions.
>
> jboss 4.2.2GA first load WEB-INF\classes and then WEB-INF\lib because the
> exception only is in the interceptor not in other classes like
> StartupListener, etc..
>
> i´m thinking that error is related with the moment when is loaded
> aplication, applicationContext-struts.xml
>
> what do you think?
>
> Also, i have tried configure jboss-web.xml -- UniversalClassLoader but i
> don´t get a solution.
>
> Thanks!!!*
> *
>
> On Fri, Aug 7, 2009 at 3:10 PM, Matt Raible <m...@raibledesigns.com>wrote:
>
>> ClassNotFoundException is a lot different from NoClassDefFound - the
>> latter usually implies you have multiple instances of the same class in your
>> classpath. If you "jar tvf" your JAR in WEB-INF/lib, is this class in there?
>> If so, you might look at trying to reconfigure JBoss's UniversalClassLoader
>> to load your classes before it's classes. I don't know if they still use
>> this classloader, but they used to.
>>
>> Matt
>>
>>
>> On Fri, Aug 7, 2009 at 8:49 AM, Miguel Romero <
>> miguel.romero.remi...@gmail.com> wrote:
>>
>>> hi again,
>>>
>>> i don´t know why jboss throws a ClassNotFoundException due to
>>> UserRoleAuthorizationIntercept, but that is the problem, because i have
>>> commented:
>>>
>>> in applicationContext-struts.xml:
>>>
>>>     <bean id="adminInterceptor"
>>> class="es.sacyl.psd.awd.webapp.interceptor.UserRoleAuthorizationInterceptor">
>>>         <property name="authorizedRoles" value="ROLE_ADMIN"/>
>>>     </bean>
>>>
>>> in struts.xml
>>>
>>>                 <interceptor-ref name="adminOnly"/>
>>>
>>>             <interceptor name="adminOnly" class="adminInterceptor"/>
>>>
>>>
>>> And application works fine!
>>>
>>> why jboss throws a ClassNotFoundException with
>>> UserRoleAuthorizationIntercept??
>>>
>>> any idea?
>>>
>>>
>>>
>>> On Fri, Aug 7, 2009 at 2:22 PM, Miguel Romero <
>>> miguel.romero.remi...@gmail.com> wrote:
>>>
>>>> hi people,
>>>>
>>>> my appfuse fails in jboss-4.2.2.GA server not in jetty and tomcat that
>>>> works fine! any idea?
>>>>
>>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>>> bean with name '_filterChainProxy': Initialization of bean failed; nested
>>>> exception is org.springframework.beans.factory.BeanCreationException: Error
>>>> creating bean with name '_filterChainList': Cannot resolve reference to 
>>>> bean
>>>> '_basicAuthenticationFilter' while setting bean property 'filters' with key
>>>> [8]; nested exception is
>>>> org.springframework.beans.factory.BeanCreationException: Error creating 
>>>> bean
>>>> with name '_basicAuthenticationFilter': Initialization of bean failed;
>>>> nested exception is
>>>> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
>>>> class [es.sac.psac.webapp.interceptor.UserRoleAuthorizationInterceptor] for
>>>> bean with name 'adminInterceptor' defined in ServletContext resource
>>>> [/WEB-INF/applicationContext-struts.xml]; nested exception is
>>>> java.lang.ClassNotFoundException:
>>>> es.sac.psac.webapp.interceptor.UserRoleAuthorizationInterceptor
>>>>
>>>> thanks!!!
>>>>
>>>
>>>
>>
>

Reply via email to