<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<pre><i>On Tue Mar 5 </i>Lionel Elie Mamane wrote:
>> On Tue, Mar 05, 2013 at 04:20:32PM +0200, Noel Grandin wrote:</pre>
<pre>>><i> Normally when that happens it indicates that you have multiple
</i>>><i> copies of the same code in your CLASSPATH, and the two copies are
</i>>><i> from different versions of the code.
</i>
>Concretely, how do I find out which this is?
>I tried looking for duplicates in workdir/, but didn't get anywhere.</pre>
You have to know what are you looking for.<br>
For that just put some diagnsostic in your java code and produce<br>
Exception stack trace to find out the abusing class.<br>
<br>
In your case it is the Interface ReportEngine.java,<br>
because the exception is thrown while trying to load this class:<br>
public class PentahoReportEngine implements ReportEngine<br>
<br>
Then with this one liner figure out where is the second class is
coming from:<br>
<br>
for file in `find /home/david/projects/libo/install/ -name "*.jar"`;
do echo $file; jar -tf $file | grep ReportEngine; done<br>
<br>
first one:<br>
/home/david/projects/libo/install/program/classes/unoil.jar<br>
com/sun/star/report/ReportEngine.class<br>
<br>
second one:<br>
/home/david/projects/libo/install/share/extensions/report-builder/sun-report-builder.jar<br>
com/sun/star/report/ReportEngine.class<br>
<br>
let's look inside it and see the difference:<br>
<br>
ReportEngine in unoil.jar:<br>
javap -classpath
/home/david/projects/libo/install/program/classes/unoil.jar<br>
public final class com.sun.star.report.ReportEngine extends
java.lang.Object{<br>
public static com.sun.star.report.XReportEngine
create(com.sun.star.uno.XComponentContext);<br>
}<br>
<br>
and ReportEngine in sun-report-builder.jar<br>
<br>
public interface com.sun.star.report.ReportEngine{<br>
public abstract com.sun.star.report.ReportJobDefinition
createJobDefinition();<br>
public abstract com.sun.star.report.ReportEngineMetaData
getMetaData();<br>
public abstract com.sun.star.report.ReportJob
createJob(com.sun.star.report.ReportJobDefinition) throws
com.sun.star.report.JobDefinitionException;<br>
}<br>
<br>
So why it is so? Well apparently a new empty IDL was defined (since
4.1):<br>
<br>
offapi/com/sun/star/report/ReportEngine.idl<br>
<br>
that collide with our own ReportEngine.java.<br>
<br>
to rectify that i renamed our class to be ReportEngine2.java<br>
and you test report from fdo#61726 works like a charm ;-)<br>
<br>
David<br>
<br>
</body>
</html>