Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Birt Deployment error - is it a bug?
Birt Deployment error - is it a bug? [message #542968] Mon, 28 June 2010 03:45 Go to next message
s_^_s Missing name is currently offline s_^_s Missing nameFriend
Messages: 3
Registered: June 2010
Junior Member
Hi Experts,

I had developed some reports (using connection profile) on my windows machine and had then copied them into the Birt WebViewerExample tomcat application running on windows machine - it worked.
Then I moved the same WebViewerExample app onto a linux machine.
In the connectionProfileStore, I changed the path of jarlist to be correct on the linux environment. (It goes into WebViewerExample\WEB-INF\platform\plugins\.... )
On the linux machine, 'tomcat' user is the owner of this file and (its parent directories) still I am getting this error:

WARNING: handle type: org.eclipse.birt.report.model.api.OdaDataSetHandle
Jun 28, 2010 8:06:36 AM org.eclipse.birt.report.data.adapter.impl.ModelAdapter adaptDataSet
WARNING: handle type: org.eclipse.birt.report.model.api.OdaDataSetHandle
Jun 28, 2010 8:06:37 AM org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection open(Properties)
WARNING: Unable to open a connection with the database connection profile.
org.eclipse.datatools.connectivity.oda.OdaException: Unable to find the connection profile referenced by the data source connection properties.
        at org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection.open(Connection.java:104)
        at org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection.open(Connection.java:57)



Is it a known bug / limitation of some sort?

Please guide..

Thanks in advance
-Sebastian

[Updated on: Mon, 28 June 2010 13:01]

Report message to a moderator

Re: Birt Deployment error - is it a bug? [message #543563 is a reply to message #542968] Tue, 29 June 2010 19:28 Go to previous messageGo to next message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
The error message indicates that it could not find the profile store file itself. So it hasn't even got to the part of finding the jars in the jarlist.
Check the file path of your profile store file specified in the report design. It looks like you need to use "/" (forward-slash) for the Linux environment.

Linda
Re: Birt Deployment error - is it a bug? [message #545964 is a reply to message #543563] Fri, 09 July 2010 18:07 Go to previous messageGo to next message
s_^_s Missing name is currently offline s_^_s Missing nameFriend
Messages: 3
Registered: June 2010
Junior Member
Hi Linda,
It moved a little when changed the \ to / (that was a bit dim-wit originally)

Now it says : class not found com.mysql.jdbc.Driver
I had put fully qualified path as jarlist in the connection profile, but that didn't work.. I also tried many different relative paths but to no avail..
Kindly guide..

Below is the stack trace, then my connection profile

WARNING: Unable to open a connection with the database connection profile.
org.eclipse.datatools.connectivity.oda.OdaException ;
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        at org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection.open(Connection.java:113)


Here's the connection profile
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<DataTools.ServerProfiles version = "1.0">
    <profile autoconnect = "No" desc = "" id = "964e2101-81c4-11df-9fae-fa968b4ddc53" name = "cpdefault" providerID = "org.eclipse.datatools.enablement.mysql.connectionProfile">
        <baseproperties>
            <property name = "org.eclipse.datatools.connectivity.db.connectionProperties" value = ""/>
            <property name = "org.eclipse.datatools.connectivity.db.savePWD" value = "true"/>
            <property name = "org.eclipse.datatools.connectivity.drivers.defnType" value = "org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"/>
            <property name = "jarList" value = "/var/lib/tomcat5/webapps/WebViewerExample/mysql-connector-java-5.1.12-bin.jar"/>
            <property name = "org.eclipse.datatools.connectivity.db.username" value = "dbuser"/>
            <property name = "org.eclipse.datatools.connectivity.db.driverClass" value = "com.mysql.jdbc.Driver"/>
            <property name = "org.eclipse.datatools.connectivity.db.databaseName" value = "mydbname"/>
            <property name = "org.eclipse.datatools.connectivity.driverDefinitionID" value = "DriverDefn.org.eclipse.datatools.enablement.mysql.5_1.driverTemplate.MySQL JDBC Driver"/>
            <property name = "org.eclipse.datatools.connectivity.db.password" value = "dbpwd"/>
            <property name = "org.eclipse.datatools.connectivity.db.version" value = "5.1"/>
            <property name = "org.eclipse.datatools.connectivity.db.URL" value = "jdbc:mysql://localhost:3306/mydbname"/>
            <property name = "org.eclipse.datatools.connectivity.db.vendor" value = "MySql"/>
        </baseproperties>
        <org.eclipse.datatools.connectivity.versionInfo>
            <property name = "server.version" value = "5.0.0"/>
            <property name = "technology.name.jdbc" value = "JDBC"/>
            <property name = "server.name" value = "MySQL"/>
            <property name = "technology.version.jdbc" value = "3.0.0"/>
        </org.eclipse.datatools.connectivity.versionInfo>
        <driverreference>
            <property name = "driverName" value = "MySQL JDBC Driver"/>
            <property name = "driverTypeID" value = "org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"/>
        </driverreference>
    </profile>
</DataTools.ServerProfiles>


Thanks
Sebastian
Re: Birt Deployment error - is it a bug? [message #545976 is a reply to message #543563] Fri, 09 July 2010 18:27 Go to previous messageGo to next message
s_^_s Missing name is currently offline s_^_s Missing nameFriend
Messages: 3
Registered: June 2010
Junior Member
Hi Linda,

It moved a little when changed the \ to / (that was a bit dim-wit originally), atleast getting the connection profile but now unable to get the driver class..

Now it says: class not found com.mysql.jdbc.Driver

I had put fully qualified path as jarlist in the connection profile, but that didn't work.. I also tried many different relative paths but to no avail..
Kindly guide..

Below is the stack trace, then my connection profile

WARNING: Unable to open a connection with the database connection profile.
org.eclipse.datatools.connectivity.oda.OdaException ;
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        at org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection.open(Connection.java:113)



Here's the connection profile

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<DataTools.ServerProfiles version = "1.0">
    <profile autoconnect = "No" desc = "" id = "964e2101-81c4-11df-9fae-fa968b4ddc53" name = "cpdefault" providerID = "org.eclipse.datatools.enablement.mysql.connectionProfile">
        <baseproperties>
            <property name = "org.eclipse.datatools.connectivity.db.connectionProperties" value = ""/>
            <property name = "org.eclipse.datatools.connectivity.db.savePWD" value = "true"/>
            <property name = "org.eclipse.datatools.connectivity.drivers.defnType" value = "org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"/>
            <property name = "jarList" value = "/var/lib/tomcat5/webapps/WebViewerExample/mysql-connector-java-5.1.12-bin.jar"/>
            <property name = "org.eclipse.datatools.connectivity.db.username" value = "dbuser"/>
            <property name = "org.eclipse.datatools.connectivity.db.driverClass" value = "com.mysql.jdbc.Driver"/>
            <property name = "org.eclipse.datatools.connectivity.db.databaseName" value = "mydbname"/>
            <property name = "org.eclipse.datatools.connectivity.driverDefinitionID" value = "DriverDefn.org.eclipse.datatools.enablement.mysql.5_1.driverTemplate.MySQL JDBC Driver"/>
            <property name = "org.eclipse.datatools.connectivity.db.password" value = "dbpwd"/>
            <property name = "org.eclipse.datatools.connectivity.db.version" value = "5.1"/>
            <property name = "org.eclipse.datatools.connectivity.db.URL" value = "jdbc:mysql://localhost:3306/mydbname"/>
            <property name = "org.eclipse.datatools.connectivity.db.vendor" value = "MySql"/>
        </baseproperties>
        <org.eclipse.datatools.connectivity.versionInfo>
            <property name = "server.version" value = "5.0.0"/>
            <property name = "technology.name.jdbc" value = "JDBC"/>
            <property name = "server.name" value = "MySQL"/>
            <property name = "technology.version.jdbc" value = "3.0.0"/>
        </org.eclipse.datatools.connectivity.versionInfo>
        <driverreference>
            <property name = "driverName" value = "MySQL JDBC Driver"/>
            <property name = "driverTypeID" value = "org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"/>
        </driverreference>
    </profile>
</DataTools.ServerProfiles>



Thanks
Sebastian
Re: Birt Deployment error - is it a bug? [message #547384 is a reply to message #545976] Fri, 16 July 2010 14:25 Go to previous messageGo to next message
Jonathan B Morgan is currently offline Jonathan B MorganFriend
Messages: 1
Registered: July 2010
Junior Member
I ran into the same issue recently and resolved it by removing the
org.eclipse.datatools.connectivity.driverDefinitionID property. Apparently Birt ignores the driver identified in the jarList property when the driverDefinitionID property is present.

Once I removed the driverDefinitionID property I was able to run my reports successfully using the db connection configured in the Birt connection profile.

hope this helps


Re: Birt Deployment error - is it a bug? [message #547452 is a reply to message #547384] Fri, 16 July 2010 22:50 Go to previous messageGo to next message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
The original problem could be due to the driver definition being referenced has defined an incorrect jarList property value.
Look for the driver definition file under the Eclipse workspace in your deployment j2ee container:
<Eclipse_workspace> /.metadata/.plugins/org.eclipse.datatools.connectivity/drive rStorage.xml
In the file, look for the driver definition entry that your profile has referenced:
" DriverDefn.org.eclipse.datatools.enablement.mysql.5_1.driver Template.MySQL JDBC Driver"
and update its jarList property value as appropriate.

Basically, if the driver definition referenced by a connection profile is found, its jarList property value gets used. Otherwise, the jarList property specified directly in the profile got used instead. The idea is to be able to share a common driver definition among multiple profile instances. So updates only need to be made directly on the shared driver definition, vs. in each and every profile.

Linda
Re: Birt Deployment error - is it a bug? [message #642071 is a reply to message #547452] Mon, 29 November 2010 18:08 Go to previous messageGo to next message
Chems  is currently offline Chems Friend
Messages: 1
Registered: November 2010
Junior Member
Hi;

in relation with this topic I want to know if i can use a relative path in the jarlist proprety( case of data source created with query builder )???. because now i've problem to deploy my repports into a server.

thank's

[Updated on: Mon, 29 November 2010 18:19]

Report message to a moderator

Re: Birt Deployment error - is it a bug? [message #642256 is a reply to message #642071] Tue, 30 November 2010 15:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Have you tried in the beforeOpen of the dataset something like:

rp =
reportContext.getHttpServletRequest().getSession().getServle tContext().getRealPath( "/myjarlist");
this.setExtensionProperty("jarList",rp);

Jason

On 11/29/2010 1:08 PM, Chems wrote:
> Hi;
> in relation with this topic I want to know if i can use a relative path
> in the jarlist proprety( case of query builder repports)???
> thank's
Re: Birt Deployment error - is it a bug? [message #642353 is a reply to message #642071] Tue, 30 November 2010 23:02 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Umm, it depends on which jarlist property is used.
The jarList property of a driver definition (defined in the workspace as described in my earlier post) does *not* accept relative path, nor any variable.
Since a workspace and thus its driver definition is local to each deployment environment, it is not intended to be portable across systems. So an absolute path specific to a local system should be sufficient.

Whereas, the jarList property defined in a connection profile instance can be portable across deployment systems. It can thus be scripted with variable(s) to specify the root path, as appropriate.

Linda
Previous Topic:Exception in a Lib with a Table using group & aggregation
Next Topic:Disabling viewer options for birt reports J2EE (Eclispe)
Goto Forum:
  


Current Time: Thu Dec 18 11:31:09 GMT 2014

Powered by FUDForum. Page generated in 0.02057 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software