| birt 2.2 fails to locate java classes in importPackage script statements [message #253057] | 
Mon, 20 August 2007 17:22   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
We use the BIRT Runtime API, and after we upgraded from BIRT 2.1.1 to 2.2  
the scripting engine now fails to locate java classes referenced in the  
importPackage of a report script.  The classes that we use in the script are  
part of the same java application that uses the BIRT Runtime API. 
 
The exact error message is: 
 
Aug 20, 2007 11:27:55 AM  
 org.eclipse.birt.report.engine.script.internal.DtEScriptExec utor handleJS 
WARNING: A BIRT exception occurred: Error evaluating Javascript expression.  
Script engine error: ReferenceError: "IeBirtFilter" is not defined.  
(DataSource[DSS].__bm_beforeOpen#9) 
 Script source: DataSource[DSS].__bm_beforeOpen, line: 1, text: 
__bm_beforeOpen(). 
 
Everything worked fine under Birt 2.1.1  We were getting the errors under  
Eclipse 3.2.  I switched to Eclipse 3.3 but still received the same errors. 
Any ideas what can be causing this error?  I've tried everything I can think  
of.  Thank you.
 |  
 |  
  | 
 | 
 | 
 | 
 | 
| birt 2.2 fails to locate java classes in the ODA driver when in RCP Designer [message #254072 is a reply to message #253821] | 
Fri, 31 August 2007 06:49   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: firstname.lastname.napa.fi 
 
On Wed, 29 Aug 2007 10:48:42 +0300, Antti Karanta  = 
 
<firstname.lastname@napa.fi> wrote: 
 
>> clf - You were right.  I had to add code to set the appclassloader of= 
  = 
 
>> the report engine via  EngineConstants.APPCONTEXT_CLASSLOADER_KEY.  I= 
n  = 
 
>> my case, the exact code was: 
>> 
>>  contextMap.put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,Re portEngin= 
e.class.getClassLoader()); 
 
 
   I have now confirmed that the javascript snippets are able to access = 
the  = 
 
classes in the driver ok when APPCONTEXT_CLASSLOADER_KEY is set as above= 
.. 
   However, this only works when embedding BIRT. I haven't found a way t= 
o  = 
 
make it work with BIRT runtime's genReport.bat nor in BIRT RCP Report  = 
 
Designer's preview. I'd need to have at least the latter one working as = 
it  = 
 
will be very inconvenient to design reports and only be able to preview = 
 = 
 
them correctly from the embedding app. 
 
   BTW, I need to access the classes via the same classloader that the  = 
 
driver uses. This is because I am accessing a native library and having = 
 = 
 
multiple versions of the classes by separate classloaders within the sam= 
e  = 
 
process would lead into problems. To put it another way, I need to acces= 
s  = 
 
the same objects (the one I need is available as a singleton) that the  = 
 
driver is accessing. 
 
   Should I reopen https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D18627= 
2 ?  = 
 
Or is there a way to make this work? Is there something I can do in the = 
 = 
 
plugin code? 
 
 
 
      -Antti-
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.07990 seconds