Search:

Type: Posts; User: Enrico Pizzi; Keyword(s):

Page 1 of 20 1 2 3 4

Search: Search took 0.09 seconds.

  1. this exception usually means you have a malformed...

    this exception usually means you have a malformed AspectJ pointcut definition somewhere (xml or annotation) in the Spring configuration you are trying to load.
  2. Replies
    5
    Views
    600

    What Marten is saying is that Spring AOP only...

    What Marten is saying is that Spring AOP only works if you use ApplicationContext. You are using BeanFactory. Change this:


    BeanFactory beanFactory = new XmlBeanFactory(new...
  3. Well...if I understood your question correctly,...

    Well...if I understood your question correctly, the answer is simple...Spring is a FRAMEWORK, not a standalone or web application, so you cant' 'run' anything. You should create your own application...
  4. Replies
    2
    Views
    314

    Which persistence strategy are you using for your...

    Which persistence strategy are you using for your backend? Is it JPA, JDO, Hibernate, MyBatis, Spring JDBC or what? Also, could you post the code for at least one of your dao methods? Just to check...
  5. The exception I see in the stack trace is not the...

    The exception I see in the stack trace is not the one stated in the thread title. It is a NullPointerException which is common when you try to convert a String in an URI but the string does not...
  6. Yes, just create a bean that implements...

    Yes, just create a bean that implements ApplicationListener<ContextStartedEvent> and place your ws calling code inside the onApplicationEvent method. Refer to chapter 3.13 of the official...
  7. You're not using Spring AOP, you're using AspectJ...

    You're not using Spring AOP, you're using AspectJ configured through Spring. It's not the same thing, its worlds apart actually. Spring AOP would not require any code weaving (either by load time...
  8. No, you can't use Spring AOP without using Spring...

    No, you can't use Spring AOP without using Spring DI because Spring AOP only works on beans defined in Spring, which Spring knows of and manages. However you can use AOP without Spring, just use...
  9. Replies
    4
    Views
    1,377

    Use full-blown AspectJ, either ctw or ltw, to...

    Use full-blown AspectJ, either ctw or ltw, to advise non-Spring beans. Just read the framework reference guide it's all clearly specified.
  10. I suggest doing that BEFORE because this is...

    I suggest doing that BEFORE because this is actually the cause of the issue! Basically, you are calling the creation of a Spring context, from the code of a bean which is defined inside that...
  11. As Jeff pointed out, Spring beans are singletons...

    As Jeff pointed out, Spring beans are singletons by default, so what is displayed is normal behaviour. If you want a different instance every time you call getBean(), you need to specify prototype...
  12. Replies
    1
    Views
    1,233

    prefer-web-inf-classes usually works, but you...

    prefer-web-inf-classes usually works, but you have to be sure that you are including in your WEB-INF/lib folder at least all the Spring modules that are on Weblogic's lib folder. My guess is that you...
  13. I would also check that you have the correct...

    I would also check that you have the correct -nodep version of CGLIB under your classpath...what happens if you provide an interface for the beans that are advised by your pointcut? Have you tried?
  14. Replies
    2
    Views
    307

    My guess is that Weblogic is instructed to use...

    My guess is that Weblogic is instructed to use its own JAX-WS implementation which is loaded by the weblogic classloader. You can add the prefer-web-inf-classes tag in your weblogic.xml and add the...
  15. Correct, but you can further improve your code by...

    Correct, but you can further improve your code by getting rid of the 'if' statement:


    public void accessDenied(JoinPoint joinPoint, AccessDeniedException ex) {
    //log it
    }
  16. Wrong. The files you specify in the...

    Wrong. The files you specify in the contextConfigLocation parameter are all picked up by the ContextConfigListener, and they all contribute to create a single 'main' application context for your...
  17. Replies
    3
    Views
    344

    Ok...then set log4j level to debug for AspectJ...

    Ok...then set log4j level to debug for AspectJ and Spring packages, and read the produced log when the woven classes are loaded.
  18. and how are you importing this file? my guess is...

    and how are you importing this file? my guess is that you are importing using a import-resource tag that points to the file, and this is included in your 'services' config file...
  19. Replies
    1
    Views
    343

    spring-aop-.jar,...

    spring-aop-<version>.jar, spring-aspects-<version>.jar, aopalliance-<version>.jar... plus, if you use annotated @Aspect Spring AOP style, the AspectJ jars (aspectjrt-<version>.jar etc.)...or just use...
  20. Replies
    3
    Views
    344

    a System.out.println inside the aspect code...

    a System.out.println inside the aspect code perhaps?
  21. Perhaps you have 2 application contexts one for...

    Perhaps you have 2 application contexts one for controllers and one for services, daos, etc...and maybe you defined aop only in the second one...if so, remember that Spring aop is only applied to...
  22. Since the dom4j is already inside Tomcat's common...

    Since the dom4j is already inside Tomcat's common libs, you shouldn't add it to your web-inf/lib folder. Alien01 probably solved by excluding the jar from the ant build copy command.
  23. Replies
    1
    Views
    240

    Well about languages...all you really need to...

    Well about languages...all you really need to master to use Spring is Java version 5 or later...nothing more, nothing less!
    Other than that...Groovy would be a nice bonus...and so would AspectJ if...
  24. Replies
    3
    Views
    512

    I already answered to this question: You...

    I already answered to this question:



    You probably never used a mocking framework, what they do is you give them an interface and they instantiate for you a default implementation of that...
  25. Replies
    3
    Views
    512

    Well...just as you would do for any other method...

    Well...just as you would do for any other method of any other class...after all, an aspect class IS a java class and an aspect method IS a Java method!

    The boring part will be mocking the pjp...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4