[aspectwerkz-dev] [jira] Deleted: (AW-14) Looks for definition file when there is none

"[email protected] (JIRA)" <jira-yCVjj/[email protected]> Fri, 3 Aug 2007 07:10:41 +1000 (EST)
Newsgroups gmane.comp.java.aspectwerkz.devel
Message-ID <[email protected]>
     [ http://jira.codehaus.org/browse/AW-14?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

[email protected] deleted AW-14:
--------------------------------


> Looks for definition file when there is none
> --------------------------------------------
>
>                 Key: AW-14
>                 URL: http://jira.codehaus.org/browse/AW-14
>             Project: AspectWerkz
>          Issue Type: Bug
>            Reporter: Vincent Massol
>            Assignee: Jonas Boner
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> Hi,
> I'm trying to use AspectWerkz by not having to define any definition file. All my aspect/advice definitions are created in code using code like:
> AspectWerkz.createAdvice("TestAdvice", 
>     ReplaceByMockAdvice.class.getName(), "perInstance", null);
> AspectWerkz.getAspect(this.getName()).getMethodPointcut("DataSource getDataSource()").addAdvice("TestAdvice");
> However, I get the following error:
> org.codehaus.aspectwerkz.exception.DefinitionException: no definition file specified or found on classpath (either specify the file by using the -Daspectwerkz.definition.file=.. option or by having a definition file called aspectwerkz.xml somewhere on the classpath)
> 	at org.codehaus.aspectwerkz.definition.AspectWerkzDefinition.getDefinition(AspectWerkzDefinition.java:146)
> 	at org.codehaus.aspectwerkz.definition.metadata.WeaveModel.createModel(WeaveModel.java:168)
> 	at org.codehaus.aspectwerkz.definition.metadata.WeaveModel.loadModel(WeaveModel.java:152)
> 	at org.codehaus.aspectwerkz.definition.DefinitionManager.loadDefinition(DefinitionManager.java:125)
> 	at org.codehaus.aspectwerkz.AspectWerkz.initialize(AspectWerkz.java:538)
> 	at org.codehaus.aspectwerkz.AspectWerkz.getAspect(AspectWerkz.java:265)
> 	at TestJdbcDataAccessManager.setUp(TestJdbcDataAccessManager.java:17)
> [...]
> Why would I need this file?
> Thanks
> -Vincent

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email