Announcement Announcement Module
Collapse
No announcement yet.
WSAD 5 ContextLoaderListener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WSAD 5 ContextLoaderListener

    Hi,

    I am using WSAD 5 (IBM's IDE based on eclipse) + spring 1.2RC2 and i am just experiencing problems when loading tha application config file.

    I've followed the instructions very close adding the listener to web.xml and putting the config file into web-inf folder.

    It's quite simple:
    Code:
    <beans>
    	<bean id="myBean" class="test.BeanTest">
    		<property name="field"><value>testFieldValue</value></property>										
    	</bean>
    </beans>
    The class is deployed into the war file so it should be accessible from anywhere in the web application.
    When the server starts it calls the listener to load the configuration and then it throws this error:

    Error registering bean with name 'myBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Bean class [test.BeanTest] not found; nested exception is java.lang.ClassNotFoundException: test.BeanTest java.lang.ClassNotFoundException: test.BeanTest

    I've made some tests replacing test.Bean test with a String and it works fine so it might be some kind of classloader problem. But then i tested adding to test.BeanTest the implementation of a Listener an invoked it before Spring's loader, so it would be there before any configuration process, it fails misserably with same console messages...

    I've also dealt with test environment configuration parameters to change classloader preferences per module/application but it didn't change anything.

    I really don't know how to get it work or if wsad is not supported but its getting hard.

    Anyone experienced this? What am i missing? Help... :cry:

    Thanks

  • #2
    Because of the loading order, you have to use the ContextLoaderServlet with WAS 5, rather than the ContextLoaderListener.

    Comment


    • #3
      It worked...

      I've noticed that WSAD 5.1.2 works fine with the listener but it does not happen in 5.0.

      Thanks a lot!

      Comment

      Working...
      X