instancing a java class [message #100026] |
Fri, 16 December 2005 13:14 |
Eclipse User |
|
|
|
Originally posted by: mateusnovaes.infonet.com.br
IŽm trying to instance a java object in the data set open method, but the
BIRT canŽt access my class.
I put my jar file in the path that are in help.
<ECLIPSE_INSTALL>\plugins\org.eclipse.birt.report.viewer\birt\WEB-INF\lib.
but is still not working.
I try all this commands in the data set open method:
1. var dados = new Packages.br.com.teste.Dados();
2. var dados = new br.com.teste.Dados();
3. importPackage(Packages.br.com.teste);
iŽm guess that Birt canŽt see my classes.
Anyone can help me?
Mateus
|
|
|
Re: instancing a java class [message #100119 is a reply to message #100026] |
Fri, 16 December 2005 17:08 |
Eclipse User |
|
|
|
Originally posted by: m.n.com
Mateus wrote:
> IŽm trying to instance a java object in the data set open method, but
> the BIRT canŽt access my class.
> I put my jar file in the path that are in help.
> <ECLIPSE_INSTALL>\plugins\org.eclipse.birt.report.viewer\birt\WEB-INF\lib.
> but is still not working.
> I try all this commands in the data set open method:
> 1. var dados = new Packages.br.com.teste.Dados();
> 2. var dados = new br.com.teste.Dados();
> 3. importPackage(Packages.br.com.teste);
>
> iŽm guess that Birt canŽt see my classes. Anyone can help me?
>
> Mateus
>
Did you restart Eclipse after copying the file?
|
|
|
Re: instancing a java class [message #100160 is a reply to message #100119] |
Fri, 16 December 2005 17:34 |
Eclipse User |
|
|
|
Originally posted by: mateusnovaes.infonet.com.br
Yes, but the error donŽt stop.
I have a jar file dados.jar and inside him 2 files dados.class and
clientes.class, that belong to the package com.teste,
When i instance the class, like this:
var dados = new Packages.com.teste.Dados();
i get this error:
A Birt exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:1.0.1
Error Code:data.engine.JSScriptInvalid
Error Message:Invalid Javascript expression. Source: DataSet:Data
Set.open, line: 0, Expression:
function_prefix_1134753623511();function
function_prefix_1134753623511(){var dados = new Packages.com.teste.Dados();
var i = dados.getIterator();}
Script engine error: TypeError: [JavaPackage com.teste.Dados] is not a
function.
Do you have any ideia?
Thsnks,
Mateus
|
|
|
Re: instancing a java class [message #100174 is a reply to message #100160] |
Fri, 16 December 2005 21:05 |
Eclipse User |
|
|
|
Originally posted by: m.n.com
I don't see anything wrong. Sounds and looks right.
Do you see package paths in the jar? In other words, if you open the
jar as a zip do you see com/teste in the path column?
Mateus wrote:
> Yes, but the error donŽt stop. I have a jar file dados.jar and inside
> him 2 files dados.class and clientes.class, that belong to the package
> com.teste,
> When i instance the class, like this:
> var dados = new Packages.com.teste.Dados();
> i get this error:
>
> A Birt exception occurred.
> Plug-in Provider:Eclipse.org
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:1.0.1
> Error Code:data.engine.JSScriptInvalid
> Error Message:Invalid Javascript expression. Source: DataSet:Data
> Set.open, line: 0, Expression:
> function_prefix_1134753623511();function
> function_prefix_1134753623511(){var dados = new Packages.com.teste.Dados();
> var i = dados.getIterator();}
> Script engine error: TypeError: [JavaPackage com.teste.Dados] is not a
> function.
>
> Do you have any ideia?
> Thsnks,
> Mateus
>
|
|
|
Re: instancing a java class [message #100284 is a reply to message #100160] |
Mon, 19 December 2005 00:17 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Does your class access any other Jars that may not be in the classpath?
Drop the var if you use this class in the fetch method.
Jason Weathersby
BIRT PMC
|
|
|
Re: instancing a java class [message #100461 is a reply to message #100174] |
Mon, 19 December 2005 07:04 |
Eclipse User |
|
|
|
Originally posted by: mateaju.yahoo.com.br
Yes, the class in jar file has the path com/teste. My class donŽt have
imports.
Can anyone send me a example that work?
The commands that i should put in script and the jar file if possible.
Send me to this e-mail: mateaju@ig.com.br
Instancing a java class in birt is extreme important to me.
Thanks,
Mateus
|
|
|
|
Powered by
FUDForum. Page generated in 0.04183 seconds