Error Cannot Find M Parent Aspect
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cannot find parent aspect for concrete aspect up vote 0 down vote favorite I have trying to test load time weaving in simple hello world normal Servlet based example in wildfly8.2 I have below Aspect code package com.test.aspects; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import com.test.helloworld.HelloService; @Aspect public abstract class FieldAspect { @Pointcut public abstract void getField(); @Pointcut public abstract void setField(); @Around("getField()") public HelloService getFieldValue() { System.out.println("In FieldAspect.getFieldValue() - Applying around advice - getting the value (Andy) for field annotated variable"); return new HelloService(); } @Around("setField()") public void setFieldValue() { System.out .println("In FieldAspect.setFieldValue() - Applying around advice - throw RuntimeException if field annotated variable is set"); throw new RuntimeException(); } } The below run time field annotation package com.test.aspects; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Field { } Test Servlet: package com.test.helloworld; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.test.aspects.Field; @SuppressWarnings("serial") @WebServlet("/HelloWorld") public class HelloWorldServlet extends HttpServlet { static String PAGE_HEADER = "
Thu, 13 Aug 2015 08:37:37 -0700 Delivered-to: aspectj-dev@eclipse.org Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=q2goiMlyAtcm4avf/2R3+HEZ0Q+U369Gci9m1R+fIuA=; b=vd7g2InzZzFcfvuqSRX8kbGGQHesziTdIXFew0XyjdiUAZt5o023b+cx8XQeqlxmGe L4Xx9Wu4a9OC4c4h9yTTwCYvVjfPUljTxS6wBLWg9Lzj0Yn7f+nRXWcXiFLoaQoKv4xf 9061cxSRHiT72XAyDbhYwkP9/H0lIczQWeeh3a76Bx3p6+zvnh0/MNOVbusp+mEGwgbP iEyCKCm/Hq4R9OeP+8tLnxp/K0lTvT2z/zkzvJ3HvH3tTeGCSt2QPK9Dwc/Zzhf1tPG8 KWXB/Hj+CEgxYZ1EfRaD8xSK+jld9Obxouo876ayUGllYnVh9D+xjlxur0aHSWb2stWn l21Q== If you are finding that-Dorg.aspectj.weaver.loadtime.configuration=META-INF/aop.xml is not working, that suggests classloader delegation/lookup isnât behaving the same for you on linux as on Windows (or that your packaging process for your http://stackoverflow.com/questions/28474605/cannot-find-parent-aspect-for-concrete-aspect apps isnât the sameâ). This all kind of points to the same thing if your aspects canât be found either.Are you packing your aspect jar into your application jars or trying to reuse them as some common library? https://dev.eclipse.org/mhonarc/lists/aspectj-dev/msg03163.html If class loader delegation is trying to be too clever then I can only imagine you can solve it by packaging the aspects alongside the app. There is nothing especially âcleverâ about aspects, do you find you have the same problem with general references from application code to shared library code? The model for packaging aspect jars could/should follow the same model as shared libraries on JBoss.cheers,AndyOn Aug 13, 2015, at 3:40 AM, sridhar thiyagarajan
Sign in Pricing Blog Support Search GitHub This repository Watch 83 Star https://github.com/goaop/framework/issues/212 861 Fork 87 goaop/framework Code Issues 8 Pull requests 1 Projects 0 Pulse Graphs New issue sf2 integration issue #212 Closed AlexKovalevych opened this Issue Apr 3, 2015 · 20 comments Projects None yet Labels Compatibility Known Issue Support Milestone No milestone Assignees No one error cannot assigned 5 participants AlexKovalevych commented Apr 3, 2015 AppAspectKernel.php: registerAspect(new SecurityAspect()); } } loading kernel in the web/app.php: ... require_once __DIR__.'/../app/AppAspectKernel.php'; $applicationAspectKernel = AppAspectKernel::getInstance(); $applicationAspectKernel->init([ 'debug' => true, 'cacheDir' => __DIR__ . '/../app/cache/aspect/', 'appDir' => __DIR__ . '/../', 'includePaths' => [__DIR__ . '/../src/'], ]); ... the aspect itself: getThis(); $user = $controller->getUser(); $role = $invocation->getMethod()->getAnnotation('Demo\Aspect\Annotation\Securable')->role; if (!$user->hasAccessToPage($role)) { throw new AccessDeniedException(); } } } getting error: 2015/04/03 15:07:59 [error] 11226#0: *6454 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'TokenReflection\Exception\RuntimeException' not found in /var/www/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionNamespace.php on line 156 PHP message: PHP Stack trace: PHP message: PHP 1. {main}() /var/www/web/app.php:0 PHP message: PHP 2. Symfony\Component\HttpKernel\Kernel->handl