Home » Archived » BIRT » Newbie problem with BIRT using POJO's
|
Re: Newbie problem with BIRT using POJO's [message #522005 is a reply to message #521908] |
Fri, 19 March 2010 15:33 |
|
Nikita,
This looks like a classpath issue. What does your scripted dataset code
look like?
Jason
Nikita wrote:
> Hi,
>
> I'm new to BIRT and have downloaded the Report Desginer Full Eclipse
> Install. I am trying to create reports using POJO (I'm using a scripted data
> source) by following Lars Vogel's tutorial "Reporting with Eclipse BIRT and
> Java Objects (POJO's)"
> ( http://www.vogella.de/articles/EclipseBIRT/article.html#birt deploying_rcp)
> and it works fine in a demo RCP project that I have created. However, if I
> try to create/move the data-access and model Java files and the .rptdesign
> file to another RCP project that I am working on, I get the following error
> message when I try to preview the results by double clicking on the data
> set-
>
> "A BIRT exception occurred.
> Plug-in Provider:Eclipse.org
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:2.3.2.r232_v20090521
> Error
>
> Code:data.engine.BirtException
> Error Message:A BIRT exception occurred: There are errors evaluating
> script "__bm_open()":
> TypeError: [JavaPackage reportDataPackage.StockDaoMock]
>
> is not a function, it is org.mozilla.javascript.NativeJavaPackage.
> (<inline>#4).. See next exception for more information.
> There are errors evaluating script "__bm_open()":
> TypeError: [JavaPackage reportDataPackage.StockDaoMock] is not a function,
> it is org.mozilla.javascript.NativeJavaPackage. (<inline>#4).
> "
>
> Could someone please help me out with this problem?
>
>
>
>
|
|
|
Re: Newbie problem with BIRT using POJO's [message #522154 is a reply to message #522005] |
Sat, 20 March 2010 15:47 |
Nikita Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi Jason,
I've created 2 packages, reportDataPackage and reportModelPackage, in the
src package and placed the data access class (StockDaoMock.java) and the
model class (StockData.java) in those two packages respectively.
The code in the open script is as follows-
count = 0;
gsh = new Packages.reportDataPackage.StockDaoMock();
stock = gsh.getStockValues("Java");
and the code in the fetch script is-
if(count < stock.size()){
row["columnDate"] = stock.get(count).getDate();
row["columnOpen"] = stock.get(count).getOpen();
row["columnHigh"] = stock.get(count).getHigh();
row["columnLow"] = stock.get(count).getLow();
row["columnClose"] = stock.get(count).getClose();
row["columnVolume"] = stock.get(count).getVolume();
count++;
return true;
}
return false;
This is exactly what I'd done in the sample project I'd created too...But
when I moved these files to the existing project I'm working on, I got this
error.
"Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
news:ho05a3$jnv$1@build.eclipse.org...
> Nikita,
>
> This looks like a classpath issue. What does your scripted dataset code
> look like?
>
> Jason
>
> Nikita wrote:
>> Hi,
>>
>> I'm new to BIRT and have downloaded the Report Desginer Full Eclipse
>> Install. I am trying to create reports using POJO (I'm using a scripted
>> data source) by following Lars Vogel's tutorial "Reporting with Eclipse
>> BIRT and Java Objects (POJO's)"
>> ( http://www.vogella.de/articles/EclipseBIRT/article.html#birt deploying_rcp)
>> and it works fine in a demo RCP project that I have created. However, if
>> I try to create/move the data-access and model Java files and the
>> .rptdesign file to another RCP project that I am working on, I get the
>> following error message when I try to preview the results by double
>> clicking on the data set-
>>
>> "A BIRT exception occurred.
>> Plug-in Provider:Eclipse.org
>> Plug-in Name:BIRT Data Engine
>> Plug-in ID:org.eclipse.birt.data
>> Version:2.3.2.r232_v20090521
>> Error
>>
>> Code:data.engine.BirtException
>> Error Message:A BIRT exception occurred: There are errors evaluating
>> script "__bm_open()":
>> TypeError: [JavaPackage reportDataPackage.StockDaoMock]
>>
>> is not a function, it is org.mozilla.javascript.NativeJavaPackage.
>> (<inline>#4).. See next exception for more information.
>> There are errors evaluating script "__bm_open()":
>> TypeError: [JavaPackage reportDataPackage.StockDaoMock] is not a
>> function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#4).
>> "
>>
>> Could someone please help me out with this problem?
>>
>>
>>
|
|
|
Re: Newbie problem with BIRT using POJO's [message #522381 is a reply to message #522154] |
Mon, 22 March 2010 09:18 |
|
Nikita,
How do you have the reportDataPackage and reportModelPackage jars in the
classpath?
you can also try importPackage( Pacakges.reportDataPackage );
gsh = new StockDaoMock();
Jason
Nikita wrote:
> Hi Jason,
>
> I've created 2 packages, reportDataPackage and reportModelPackage, in the
> src package and placed the data access class (StockDaoMock.java) and the
> model class (StockData.java) in those two packages respectively.
>
> The code in the open script is as follows-
> count = 0;
> gsh = new Packages.reportDataPackage.StockDaoMock();
> stock = gsh.getStockValues("Java");
>
> and the code in the fetch script is-
> if(count < stock.size()){
> row["columnDate"] = stock.get(count).getDate();
> row["columnOpen"] = stock.get(count).getOpen();
> row["columnHigh"] = stock.get(count).getHigh();
> row["columnLow"] = stock.get(count).getLow();
> row["columnClose"] = stock.get(count).getClose();
> row["columnVolume"] = stock.get(count).getVolume();
> count++;
> return true;
> }
> return false;
>
> This is exactly what I'd done in the sample project I'd created too...But
> when I moved these files to the existing project I'm working on, I got this
> error.
>
>
>
>
> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
> news:ho05a3$jnv$1@build.eclipse.org...
>> Nikita,
>>
>> This looks like a classpath issue. What does your scripted dataset code
>> look like?
>>
>> Jason
>>
>> Nikita wrote:
>>> Hi,
>>>
>>> I'm new to BIRT and have downloaded the Report Desginer Full Eclipse
>>> Install. I am trying to create reports using POJO (I'm using a scripted
>>> data source) by following Lars Vogel's tutorial "Reporting with Eclipse
>>> BIRT and Java Objects (POJO's)"
>>> ( http://www.vogella.de/articles/EclipseBIRT/article.html#birt deploying_rcp)
>>> and it works fine in a demo RCP project that I have created. However, if
>>> I try to create/move the data-access and model Java files and the
>>> .rptdesign file to another RCP project that I am working on, I get the
>>> following error message when I try to preview the results by double
>>> clicking on the data set-
>>>
>>> "A BIRT exception occurred.
>>> Plug-in Provider:Eclipse.org
>>> Plug-in Name:BIRT Data Engine
>>> Plug-in ID:org.eclipse.birt.data
>>> Version:2.3.2.r232_v20090521
>>> Error
>>>
>>> Code:data.engine.BirtException
>>> Error Message:A BIRT exception occurred: There are errors evaluating
>>> script "__bm_open()":
>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock]
>>>
>>> is not a function, it is org.mozilla.javascript.NativeJavaPackage.
>>> (<inline>#4).. See next exception for more information.
>>> There are errors evaluating script "__bm_open()":
>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock] is not a
>>> function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#4).
>>> "
>>>
>>> Could someone please help me out with this problem?
>>>
>>>
>>>
>
|
|
|
Re: Newbie problem with BIRT using POJO's [message #522611 is a reply to message #522381] |
Tue, 23 March 2010 10:26 |
Nikita Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi Jason,
The reportDataPackage and reportModelPackage are packages that I've created
in the src package in the same project that contains the .rptdesign file.
These packages contain the source files (data and model) containing the data
for creating the report. In this case why is it necessary to have the jars
in the classpath?
I've tried out this method too-using the importPackage statement..But I'm
still getting an error, this time its as follows-
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.3.2.r232_v20090521
Error Code:data.engine.BirtException
Error Message:A BIRT exception occurred: There are errors evaluating
script "__bm_open()":
ReferenceError: "StockDaoMock" is not defined.
(<inline>#6).. See next exception for more information.
There are errors evaluating script "__bm_open()":
ReferenceError: "StockDaoMock" is not defined. (<inline>#6).
"Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
news:ho7t43$bde$3@build.eclipse.org...
> Nikita,
>
> How do you have the reportDataPackage and reportModelPackage jars in the
> classpath?
>
> you can also try importPackage( Pacakges.reportDataPackage );
> gsh = new StockDaoMock();
>
>
> Jason
>
> Nikita wrote:
>> Hi Jason,
>>
>> I've created 2 packages, reportDataPackage and reportModelPackage, in the
>> src package and placed the data access class (StockDaoMock.java) and the
>> model class (StockData.java) in those two packages respectively.
>>
>> The code in the open script is as follows-
>> count = 0;
>> gsh = new Packages.reportDataPackage.StockDaoMock();
>> stock = gsh.getStockValues("Java");
>>
>> and the code in the fetch script is-
>> if(count < stock.size()){
>> row["columnDate"] = stock.get(count).getDate();
>> row["columnOpen"] = stock.get(count).getOpen();
>> row["columnHigh"] = stock.get(count).getHigh();
>> row["columnLow"] = stock.get(count).getLow();
>> row["columnClose"] = stock.get(count).getClose();
>> row["columnVolume"] = stock.get(count).getVolume();
>> count++;
>> return true;
>> }
>> return false;
>>
>> This is exactly what I'd done in the sample project I'd created too...But
>> when I moved these files to the existing project I'm working on, I got
>> this error.
>>
>>
>>
>>
>> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
>> news:ho05a3$jnv$1@build.eclipse.org...
>>> Nikita,
>>>
>>> This looks like a classpath issue. What does your scripted dataset code
>>> look like?
>>>
>>> Jason
>>>
>>> Nikita wrote:
>>>> Hi,
>>>>
>>>> I'm new to BIRT and have downloaded the Report Desginer Full Eclipse
>>>> Install. I am trying to create reports using POJO (I'm using a scripted
>>>> data source) by following Lars Vogel's tutorial "Reporting with Eclipse
>>>> BIRT and Java Objects (POJO's)"
>>>> ( http://www.vogella.de/articles/EclipseBIRT/article.html#birt deploying_rcp)
>>>> and it works fine in a demo RCP project that I have created. However,
>>>> if I try to create/move the data-access and model Java files and the
>>>> .rptdesign file to another RCP project that I am working on, I get the
>>>> following error message when I try to preview the results by double
>>>> clicking on the data set-
>>>>
>>>> "A BIRT exception occurred.
>>>> Plug-in Provider:Eclipse.org
>>>> Plug-in Name:BIRT Data Engine
>>>> Plug-in ID:org.eclipse.birt.data
>>>> Version:2.3.2.r232_v20090521
>>>> Error
>>>>
>>>> Code:data.engine.BirtException
>>>> Error Message:A BIRT exception occurred: There are errors evaluating
>>>> script "__bm_open()":
>>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock]
>>>>
>>>> is not a function, it is org.mozilla.javascript.NativeJavaPackage.
>>>> (<inline>#4).. See next exception for more information.
>>>> There are errors evaluating script "__bm_open()":
>>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock] is not a
>>>> function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#4).
>>>> "
>>>>
>>>> Could someone please help me out with this problem?
>>>>
>>>>
>>>>
>>
|
|
|
Re: Newbie problem with BIRT using POJO's [message #522955 is a reply to message #522611] |
Wed, 24 March 2010 15:44 |
|
Nikita,
It is because the BIRT runtime uses OSGi. Can you try to create a
report project in the same workspace as the java project. The BIRT
runtime in 2.3.2 should search for java projects in the same workspace.
In BIRT 2.5.2 you have to specify addition projects, but in 2.3.2 it
automatically searches all java projects for classes.
Jason
Nikita wrote:
> Hi Jason,
>
> The reportDataPackage and reportModelPackage are packages that I've created
> in the src package in the same project that contains the .rptdesign file.
> These packages contain the source files (data and model) containing the data
> for creating the report. In this case why is it necessary to have the jars
> in the classpath?
>
>
> I've tried out this method too-using the importPackage statement..But I'm
> still getting an error, this time its as follows-
>
> A BIRT exception occurred.
> Plug-in Provider:Eclipse.org
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:2.3.2.r232_v20090521
> Error Code:data.engine.BirtException
> Error Message:A BIRT exception occurred: There are errors evaluating
> script "__bm_open()":
> ReferenceError: "StockDaoMock" is not defined.
> (<inline>#6).. See next exception for more information.
> There are errors evaluating script "__bm_open()":
> ReferenceError: "StockDaoMock" is not defined. (<inline>#6).
>
>
>
> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
> news:ho7t43$bde$3@build.eclipse.org...
>> Nikita,
>>
>> How do you have the reportDataPackage and reportModelPackage jars in the
>> classpath?
>>
>> you can also try importPackage( Pacakges.reportDataPackage );
>> gsh = new StockDaoMock();
>>
>>
>> Jason
>>
>> Nikita wrote:
>>> Hi Jason,
>>>
>>> I've created 2 packages, reportDataPackage and reportModelPackage, in the
>>> src package and placed the data access class (StockDaoMock.java) and the
>>> model class (StockData.java) in those two packages respectively.
>>>
>>> The code in the open script is as follows-
>>> count = 0;
>>> gsh = new Packages.reportDataPackage.StockDaoMock();
>>> stock = gsh.getStockValues("Java");
>>>
>>> and the code in the fetch script is-
>>> if(count < stock.size()){
>>> row["columnDate"] = stock.get(count).getDate();
>>> row["columnOpen"] = stock.get(count).getOpen();
>>> row["columnHigh"] = stock.get(count).getHigh();
>>> row["columnLow"] = stock.get(count).getLow();
>>> row["columnClose"] = stock.get(count).getClose();
>>> row["columnVolume"] = stock.get(count).getVolume();
>>> count++;
>>> return true;
>>> }
>>> return false;
>>>
>>> This is exactly what I'd done in the sample project I'd created too...But
>>> when I moved these files to the existing project I'm working on, I got
>>> this error.
>>>
>>>
>>>
>>>
>>> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
>>> news:ho05a3$jnv$1@build.eclipse.org...
>>>> Nikita,
>>>>
>>>> This looks like a classpath issue. What does your scripted dataset code
>>>> look like?
>>>>
>>>> Jason
>>>>
>>>> Nikita wrote:
>>>>> Hi,
>>>>>
>>>>> I'm new to BIRT and have downloaded the Report Desginer Full Eclipse
>>>>> Install. I am trying to create reports using POJO (I'm using a scripted
>>>>> data source) by following Lars Vogel's tutorial "Reporting with Eclipse
>>>>> BIRT and Java Objects (POJO's)"
>>>>> ( http://www.vogella.de/articles/EclipseBIRT/article.html#birt deploying_rcp)
>>>>> and it works fine in a demo RCP project that I have created. However,
>>>>> if I try to create/move the data-access and model Java files and the
>>>>> .rptdesign file to another RCP project that I am working on, I get the
>>>>> following error message when I try to preview the results by double
>>>>> clicking on the data set-
>>>>>
>>>>> "A BIRT exception occurred.
>>>>> Plug-in Provider:Eclipse.org
>>>>> Plug-in Name:BIRT Data Engine
>>>>> Plug-in ID:org.eclipse.birt.data
>>>>> Version:2.3.2.r232_v20090521
>>>>> Error
>>>>>
>>>>> Code:data.engine.BirtException
>>>>> Error Message:A BIRT exception occurred: There are errors evaluating
>>>>> script "__bm_open()":
>>>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock]
>>>>>
>>>>> is not a function, it is org.mozilla.javascript.NativeJavaPackage.
>>>>> (<inline>#4).. See next exception for more information.
>>>>> There are errors evaluating script "__bm_open()":
>>>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock] is not a
>>>>> function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#4).
>>>>> "
>>>>>
>>>>> Could someone please help me out with this problem?
>>>>>
>>>>>
>>>>>
>
>
|
|
|
Re: Newbie problem with BIRT using POJO's [message #523963 is a reply to message #522955] |
Tue, 30 March 2010 00:18 |
Nikita Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Thanks Jason... I'll try that out..
"Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
news:hodc03$fsu$3@build.eclipse.org...
> Nikita,
>
> It is because the BIRT runtime uses OSGi. Can you try to create a report
> project in the same workspace as the java project. The BIRT runtime in
> 2.3.2 should search for java projects in the same workspace. In BIRT 2.5.2
> you have to specify addition projects, but in 2.3.2 it automatically
> searches all java projects for classes.
>
> Jason
>
> Nikita wrote:
>> Hi Jason,
>>
>> The reportDataPackage and reportModelPackage are packages that I've
>> created in the src package in the same project that contains the
>> .rptdesign file. These packages contain the source files (data and model)
>> containing the data for creating the report. In this case why is it
>> necessary to have the jars in the classpath?
>>
>>
>> I've tried out this method too-using the importPackage statement..But I'm
>> still getting an error, this time its as follows-
>>
>> A BIRT exception occurred.
>> Plug-in Provider:Eclipse.org
>> Plug-in Name:BIRT Data Engine
>> Plug-in ID:org.eclipse.birt.data
>> Version:2.3.2.r232_v20090521
>> Error Code:data.engine.BirtException
>> Error Message:A BIRT exception occurred: There are errors evaluating
>> script "__bm_open()":
>> ReferenceError: "StockDaoMock" is not defined.
>> (<inline>#6).. See next exception for more information.
>> There are errors evaluating script "__bm_open()":
>> ReferenceError: "StockDaoMock" is not defined. (<inline>#6).
>>
>>
>>
>> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
>> news:ho7t43$bde$3@build.eclipse.org...
>>> Nikita,
>>>
>>> How do you have the reportDataPackage and reportModelPackage jars in the
>>> classpath?
>>>
>>> you can also try importPackage( Pacakges.reportDataPackage );
>>> gsh = new StockDaoMock();
>>>
>>>
>>> Jason
>>>
>>> Nikita wrote:
>>>> Hi Jason,
>>>>
>>>> I've created 2 packages, reportDataPackage and reportModelPackage, in
>>>> the src package and placed the data access class (StockDaoMock.java)
>>>> and the model class (StockData.java) in those two packages
>>>> respectively.
>>>>
>>>> The code in the open script is as follows-
>>>> count = 0;
>>>> gsh = new Packages.reportDataPackage.StockDaoMock();
>>>> stock = gsh.getStockValues("Java");
>>>>
>>>> and the code in the fetch script is-
>>>> if(count < stock.size()){
>>>> row["columnDate"] = stock.get(count).getDate();
>>>> row["columnOpen"] = stock.get(count).getOpen();
>>>> row["columnHigh"] = stock.get(count).getHigh();
>>>> row["columnLow"] = stock.get(count).getLow();
>>>> row["columnClose"] = stock.get(count).getClose();
>>>> row["columnVolume"] = stock.get(count).getVolume();
>>>> count++;
>>>> return true;
>>>> }
>>>> return false;
>>>>
>>>> This is exactly what I'd done in the sample project I'd created
>>>> too...But when I moved these files to the existing project I'm working
>>>> on, I got this error.
>>>>
>>>>
>>>>
>>>>
>>>> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
>>>> news:ho05a3$jnv$1@build.eclipse.org...
>>>>> Nikita,
>>>>>
>>>>> This looks like a classpath issue. What does your scripted dataset
>>>>> code look like?
>>>>>
>>>>> Jason
>>>>>
>>>>> Nikita wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I'm new to BIRT and have downloaded the Report Desginer Full Eclipse
>>>>>> Install. I am trying to create reports using POJO (I'm using a
>>>>>> scripted data source) by following Lars Vogel's tutorial "Reporting
>>>>>> with Eclipse BIRT and Java Objects (POJO's)"
>>>>>> ( http://www.vogella.de/articles/EclipseBIRT/article.html#birt deploying_rcp)
>>>>>> and it works fine in a demo RCP project that I have created. However,
>>>>>> if I try to create/move the data-access and model Java files and the
>>>>>> .rptdesign file to another RCP project that I am working on, I get
>>>>>> the following error message when I try to preview the results by
>>>>>> double clicking on the data set-
>>>>>>
>>>>>> "A BIRT exception occurred.
>>>>>> Plug-in Provider:Eclipse.org
>>>>>> Plug-in Name:BIRT Data Engine
>>>>>> Plug-in ID:org.eclipse.birt.data
>>>>>> Version:2.3.2.r232_v20090521
>>>>>> Error
>>>>>>
>>>>>> Code:data.engine.BirtException
>>>>>> Error Message:A BIRT exception occurred: There are errors
>>>>>> evaluating script "__bm_open()":
>>>>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock]
>>>>>>
>>>>>> is not a function, it is org.mozilla.javascript.NativeJavaPackage.
>>>>>> (<inline>#4).. See next exception for more information.
>>>>>> There are errors evaluating script "__bm_open()":
>>>>>> TypeError: [JavaPackage reportDataPackage.StockDaoMock] is not a
>>>>>> function, it is org.mozilla.javascript.NativeJavaPackage.
>>>>>> (<inline>#4).
>>>>>> "
>>>>>>
>>>>>> Could someone please help me out with this problem?
>>>>>>
>>>>>>
>>>>>>
>>
|
|
|
Goto Forum:
Current Time: Fri Apr 26 01:22:52 GMT 2024
Powered by FUDForum. Page generated in 0.02918 seconds
|