proxetta:jodd.proxetta.ProxettaException: Unexpected previous instruction type used for set arg ixd

18 views
Skip to first unread message

moh....@googlemail.com

unread,
Jan 18, 2016, 6:59:44 AM1/18/16
to Jodders
Hi,

i am playing with proxetta -> Advices & Pointcuts.

My problem is:
If i annotate a method with my custom annotation (e.g. Logged.class),
the following exception is thrown while configuring proxetta & petite:

jodd.io.findfile.FindFileException: Scan entry error: EntryData{a.b.c.impl.MyDao'};
<--- jodd.proxetta.ProxettaException: Unexpected previous instruction type used for setting argument index

hierarchy:
- ejb (via interceptor injection of petite beans; PetiteContainer#wireBean())
-- petite bean #1 (service class)
--- petite bean #2 (dao class)

I am using jodd in version 3.6.7 (latest stable).

Any hints to avoid this exception?

I have used given example documentation for proxetta (http://jodd.org/doc/proxetta).


Thank a lot!


Greetz
Sascha

moh....@googlemail.com

unread,
Jan 18, 2016, 7:15:45 AM1/18/16
to Jodders
Hmmm, solution seems to be within java compiler settings...

Due to usage of maven:


<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
   <version>3.3</version>
   <configuration>
      <source>${java.version}</source>
      <target>${java.version}</target>
      <debug>true</debug>
      <debuglevel>lines,vars,source</debuglevel>
   </configuration>
</plugin>


With this configuration , petite configuration has been successfully parsed....

Jodders

unread,
Jan 18, 2016, 9:01:16 AM1/18/16
to Jodders
Interesting!

we do however, use all debug-level setting. In this case it looks like the bytecode reader was not able to read properly the..., bytecode :) I guess if you remove `vars` (or `source`) will reproduce the error?

moh....@googlemail.com

unread,
Jan 18, 2016, 9:43:22 AM1/18/16
to Jodders
my answer was - sadly - wrong.

I will update my answer after work in the evening.
I will try to build up a testcase for reproduce my case.

first explanation:



ProxyPointcut pointcut_logged = new ProxyPointcutSupport() {
   
public boolean apply(MethodInfo methidInfo) {
       
return hasAnnotation(methidInfo, Logged.class);
   
}
};

ProxyPointcut pointcut_performance = new ProxyPointcutSupport() {
   
public boolean apply(MethodInfo methidInfo) {
       
return hasAnnotation(methidInfo, Performance.class);
   
}
};

ProxyAspect aspect_logged = new ProxyAspect(LogProxyAdvice.class, pointcut_logged);
ProxyAspect aspect_performance = new ProxyAspect(PerformanceMeasureProxyAdvice.class, pointcut_performance);

ProxyProxetta proxetta = ProxyProxetta.withAspects(aspect_logged, aspect_performance);


/////


// useless
@PetiteBean (value = "Bla")
public class Bla {

   
@Logged
    public Integer findByStatus(Integer schnittstelle, Long states) {
       
return -1;
   
}

   
@Performance
    public List<Long> coolMethod() {
       
final Date now = new Date();
       
JDateTime now_2 = new JDateTime();

       
final ArrayList<Long> result = new ArrayList<>();
        result
.add(now.getTime());
        result
.add(now_2.getTimeInMillis());
       
return result;
   
}

}

Starting up my web app with this code , initialization of petite container fails.

question:
is is not possible that two different ProxyAdvices work with one petite bean?


Thanks!


Sascha

moh....@googlemail.com

unread,
Jan 18, 2016, 9:45:01 AM1/18/16
to Jodders
// useless

-> useless class ; only for showing my case

Jodders

unread,
Jan 18, 2016, 10:20:25 AM1/18/16
to Jodders
Let me reproduce this, and I will come back to you...
You can specify many advices.

which version of java?

moh....@googlemail.com

unread,
Jan 18, 2016, 11:54:23 AM1/18/16
to Jodders
As far as I know it by heart (at home now...) -> 1.7.80 32bit on windows 7 32bit

moh....@googlemail.com

unread,
Jan 18, 2016, 4:27:15 PM1/18/16
to Jodders
Hi,

i can not reproduce error at home - strange...

I will try to setup mini web app tommorow to reproduce problem.


moh....@googlemail.com

unread,
Jan 19, 2016, 3:18:55 AM1/19/16
to Jodders
steps to reproduce (mini web app as zip file) is sent to you by email (support at jodd.org).
i hope you can reproduce failure at your workstation, too.

Greetz
Sascha



Am Montag, 18. Januar 2016 16:20:25 UTC+1 schrieb Jodders:
Reply all
Reply to author
Forward
0 new messages