Classloader (?) problem in Birt [message #254318] |
Tue, 04 September 2007 07:00 |
Eclipse User |
|
|
|
Originally posted by: R.Schuster.dzbw.de
Hi,
I use Eclipse 3.3.0 and Birt 2.2.0 together with Java 1.6. I developed a
custom Datasource / Dataset extension which consists of 3 plugins: The 1st
one is simply a wrapper plugin which contains own and 3rd party libraries
(JBoss Client API and others). The 2nd contains the implementations of
IDriver, IConnection and so on. The last one creates a custom wizard page.
My Connection implementation reads in an external config file which
contains
birt {
// jBoss LoginModule
org.jboss.security.ClientLoginModule required
;
};
to load the JBoss login code.
My Java code also uses reflection implicitly to load some more "classes"
like in env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
I can now create a Datasource and a Dataset. By double-clicking the new
Dataset and selecting "Preview Results" my plugin logs in to JBoss and
loads and displays data. Anything is good at this point.
But if I put the fields of my Dataset in a report page (a table for
example) and press the "Preview" tab of the designer an error occurs: "The
login module class cannot be found: org.jboss.security.ClientLoginModule".
This sounds like a problem with Eclipses class loading mechanism. I
googled the famous web page
http://www.eclipsezone.com/articles/eclipse-vms/ and gave the buddy class
loading a try. But no success.
Can somebody explain why it works in the Datasource property dialog but
not with in the Preview tab? What to do to solve the issue? Hard-coding
the call to ClientLoginModule is no solution because reflection is used at
other places, too.
Regards,
Roger
|
|
|
|
|
Re: Classloader (?) problem in Birt [message #254370 is a reply to message #254318] |
Tue, 04 September 2007 10:47 |
Eclipse User |
|
|
|
Originally posted by: R.Schuster.dzbw.de
Hi again,
after some debugging I discovered that if I make
org.eclipse.birt.report.data.adapter depend from my wrapper plugin it will
work! But I can't believe that a custom ODA will need the modification of
Birt sources or configuration. Any idea, please?
Roger
|
|
|
|
Re: Classloader (?) problem in Birt [message #254511 is a reply to message #254381] |
Wed, 05 September 2007 06:48 |
Eclipse User |
|
|
|
Originally posted by: firstname.lastname.napa.fi
On Tue, 04 Sep 2007 15:56:33 +0300, Snjezana Peco <snjeza.peco@gmail.com>
wrote:
> I had a similar problem that I solved using buddy classloading.
> You can take a look at this thread:
> http://dev.eclipse.org/newslists/news.eclipse.birt/msg20903. html
I have a similar problem: javascript in the RCP designer preview fails
to find the classes exported by my ODA runtime plugin, so I tried adding
the following lines to that plugin's manifest.mf:
Eclipse-RegisterBuddy: org.eclipse.birt.report.data.adapter,
org.eclipse.tomcat,
org.mozilla.rhino,
org.eclipse.birt.report.viewer
It didn't help, did I choose the wrong buddies?
-Antti-
|
|
|
Re: Classloader (?) problem in Birt [message #254523 is a reply to message #254511] |
Wed, 05 September 2007 07:48 |
Eclipse User |
|
|
|
Originally posted by: firstname.lastname.napa.fi
On Wed, 05 Sep 2007 09:48:16 +0300, Antti Karanta
<firstname.lastname@napa.fi> wrote:
> On Tue, 04 Sep 2007 15:56:33 +0300, Snjezana Peco
> <snjeza.peco@gmail.com> wrote:
>
>> I had a similar problem that I solved using buddy classloading.
>> You can take a look at this thread:
>> http://dev.eclipse.org/newslists/news.eclipse.birt/msg20903. html
>
> I have a similar problem: javascript in the RCP designer preview
> fails to find the classes exported by my ODA runtime plugin, so I tried
> adding the following lines to that plugin's manifest.mf:
To clarify: into my ODA runtime plugin's manifest.mf.
> Eclipse-RegisterBuddy: org.eclipse.birt.report.data.adapter,
> org.eclipse.tomcat,
> org.mozilla.rhino,
> org.eclipse.birt.report.viewer
I also threw in org.eclipse.birt.report.engine, but to no avail. I guess
I'm still being a buddy with the wrong plugins?
-Antti-
|
|
|
Re: Classloader (?) problem in Birt [message #254535 is a reply to message #254523] |
Wed, 05 September 2007 11:37 |
Eclipse User |
|
|
|
Originally posted by: R.Schuster.dzbw.de
Antti Karanta wrote:
Hi,
> To clarify: into my ODA runtime plugin's manifest.mf.
>> Eclipse-RegisterBuddy: org.eclipse.birt.report.data.adapter,
>> org.eclipse.tomcat,
>> org.mozilla.rhino,
>> org.eclipse.birt.report.viewer
> I also threw in org.eclipse.birt.report.engine, but to no avail. I guess
> I'm still being a buddy with the wrong plugins?
AFAIK this can't work because at least
org.eclipse.birt.report.data.adapter doesn't offer a BuddyPolicy.
Regards,
Roger
|
|
|
|
Re: Classloader (?) problem in Birt [message #254594 is a reply to message #254561] |
Thu, 06 September 2007 07:41 |
Eclipse User |
|
|
|
Originally posted by: firstname.lastname.napa.fi
On Thu, 06 Sep 2007 02:22:08 +0300, Snjezana Peco <snjeza.peco@gmail.com>
wrote:
> Every plugin supports buddy classloading.
I suppose he meant it's not enabled.
> In order to solve that issue, you have to patch some BIRT's plugins.
>
> I have done the following:
> - added Eclipse-BuddyPolicy: registered to the org.mozilla.rhino plugin
> - added Eclipse-RegisterBuddy: org.mozilla.rhino to my viewer plugin (I
> have a specific viewer plugin, but you can try to use the BIRT viewer
> plugin)
> - fixed classloading problem in the org.eclipse.birt.report.engine as it
> is described in
> http://dev.eclipse.org/newslists/news.eclipse.birt/msg20833. html
>
> After these changes Preview Results in the scripted datasource as well
> as Preview in the viewer work correctly.
Thanks a lot for your help. I was able to get the preview working by
enabling buddying in org.eclipse.birt.report.viewer plugin's manifest.mf
like this:
Eclipse-BuddyPolicy: registered
and then registering my ODA runtime plugin as its buddy:
Eclipse-RegisterBuddy: org.eclipse.birt.report.viewer
-Antti-
|
|
|
Powered by
FUDForum. Page generated in 0.03857 seconds