You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Koka Kiknadze <22...@gmail.com> on 2008/11/13 12:36:57 UTC

Re: login page error (T5&Acegi)

Hi,
I have the same problem with 5.0.15 when trying to inject spring bean. Did
you find solution? I get the following message

java.lang.ClassNotFoundException: caught an exception while obtaining a
class file for...

displayed in my browser (no errors in log file)

If I remove @Inject all works fine. With the @Inject my log states:

INFO: Initializing Spring root WebApplicationContext
INFO: ContextListener: contextInitialized()
INFO: SessionListener: contextInitialized().

So spring context gets initializated OK.

TYA

Re: login page error (T5&Acegi)

Posted by Koka Kiknadze <22...@gmail.com>.
>
> java.lang.ClassNotFoundException: caught an exception while obtaining a
> class file for...
>

>for what?

It states (the first line in red ;) ):

An unexpected application exception has occurred.

java.lang.ClassNotFoundException: caught an exception while obtaining a
class file for mypackgename.pages.start


That very start page works fine without @Inject annotation. I was trying to
inject some Spring-iBatis SqlMapClientFactoryBean:

    <bean id="sqlMapClient"
        class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
        <property name="configLocation">
            <value>
                /WEB-INF/sqlmap-config.xml
            </value>
        </property>
        <property name="dataSource">
            <ref bean="dataSource"/>
        </property>
    </bean>


But that's irrelevant, I see the same error if I inject just (all other
beans removed from applicatioContext):

    <bean id="TestBean"
        class="java.lang.String">
        <constructor-arg value="RTFM"/>
    </bean>

and in Start.java

    @Inject
    @Service("TestBean")
    private String str;

Btw spring version is 2.5.5

Re: login page error (T5&Acegi)

Posted by Koka Kiknadze <22...@gmail.com>.
Problem resolved. Thanks.

I had duplicate

    <filter>
        <filter-name>app</filter-name>
        <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
    </filter>

in my web.xml.

+1 for eclipse IDE. It did complain about duplicate in web.xml and so helped
to pinpoint the problem, while Netbeans (which I am usually using) remained
silent

Re: login page error (T5&Acegi)

Posted by Andy Pahne <an...@googlemail.com>.
And what kind of class is it, where you use @Inject in? Is it a page? A 
component? A mixin? A base class? Whatever?


Koka Kiknadze schrieb:
> Hi,
> I have the same problem with 5.0.15 when trying to inject spring bean. Did
> you find solution? I get the following message
>
> java.lang.ClassNotFoundException: caught an exception while obtaining a
> class file for...
>
> displayed in my browser (no errors in log file)
>
> If I remove @Inject all works fine. With the @Inject my log states:
>
> INFO: Initializing Spring root WebApplicationContext
> INFO: ContextListener: contextInitialized()
> INFO: SessionListener: contextInitialized().
>
> So spring context gets initializated OK.
>
> TYA
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: login page error (T5&Acegi)

Posted by Andy Pahne <an...@googlemail.com>.
>java.lang.ClassNotFoundException: caught an exception while obtaining a
>class file for...

for what?




Koka Kiknadze schrieb:
> Hi,
> I have the same problem with 5.0.15 when trying to inject spring bean. Did
> you find solution? I get the following message
>
> java.lang.ClassNotFoundException: caught an exception while obtaining a
> class file for...
>
> displayed in my browser (no errors in log file)
>
> If I remove @Inject all works fine. With the @Inject my log states:
>
> INFO: Initializing Spring root WebApplicationContext
> INFO: ContextListener: contextInitialized()
> INFO: SessionListener: contextInitialized().
>
> So spring context gets initializated OK.
>
> TYA
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org