[SOLVED] jaspersrver 4.2.1 source code w/ mysql (not working)

I just happen to notice that a new release was posted. Is the source code, and maven repository also going to be posted for source code buidls?

 

Thanks!

jgh



Post Edited by jgh at 10/22/2011 05:28



Post Edited by jgh at 10/28/2011 21:18
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

24 Answers:

thanks!

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

Yes, all packages including the src.zip and the maven-repository.zip have been posted ;-)

tkavanagh's picture
15016
Joined: Jul 7 2006 - 8:54am
Last seen: 8 years 8 months ago

tkavanagh
Wrote:

Yes, all packages including the src.zip and the maven-repository.zip have been posted ;-)

Everything works for tomcat5,6 and 7 with posgresql as expected, but the build fails everytime if I choose to use mysql with this error:

 

 

Code:
BUILD FAILED
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:148: The following error occurred while executing this line:
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:92: Java returned: 1
 
Total time: 2 seconds
*** Error code 1
 
Stop in /home/jhelfman/ports/databases/jasperserver.
*** Error code 1
</td></tr></tbody></table>
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

I'm thinking this might be because we no longer ship the mysql jdbc driver in the source package.

In the folder:

buildomatic/conf_source/db/mysql/jdbc (you can read the readme.txt in this folder).

Anyway, the procedure for building with mysql as the target is to first download the mysql jdbc driver and put it in this folder.

Let me know how this goes...

tkavanagh's picture
15016
Joined: Jul 7 2006 - 8:54am
Last seen: 8 years 8 months ago

tkavanagh
Wrote:

I'm thinking this might be because we no longer ship the mysql jdbc driver in the source package.

In the folder:

buildomatic/conf_source/db/mysql/jdbc (you can read the readme.txt in this folder).

Anyway, the procedure for building with mysql as the target is to first download the mysql jdbc driver and put it in this folder.

Let me know how this goes...

I updated the port to copy it into this location pre-build, and still get the error. It came from this package: mysql-connector-java-5.1.17

 

[jhelfman@eggman ~/ports/databases/jasperserver]$ ls /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/conf_source/db/mysql/jdbc
mysql-connector-java.jar readme.txt
Code:
BUILD FAILED
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:148: The following error occurred while executing this line:
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:92: Java returned: 1
 
Total time: 3 seconds
*** Error code 1
 
Stop in /home/jhelfman/ports/databases/jasperserver.
*** Error code 1
 
Stop in /home/jhelfman/ports/databases/jasperserver.


Post Edited by jgh at 10/20/2011 17:41
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

I ran a verbosity switch on js-ant, and attached is the log.

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

Even if I download the jar from the website in the readme.txt and unzip it. I place that jar in the same directory, and remove the one I had placed there earlier, and get the same error.

mysql-connector-java-5.1.18-bin.jar

BUILD FAILED
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:148: The following error occurred while executing this line:
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:92: Java returned: 1

Total time: 7 seconds

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

any ideas why this isn't working?

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

I have followed the guide, and readme in the source code, and nothing seems to be working. I am curious if this procedure was tested? I'm sure it was, but I don't see how it isn't working for me.

 

thanks.

jgh

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

 Any clues on this? Please. I would not like to submit this to FreeBSD with mysql being broken, but it looks like that may have to happen.

 

Thanks,

Jason

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

Sorry to keep you waiting for help. Attached is an updated Source Build Guide for 4.2.1. Please check your maven settings against the three maven settings in section 3.4.1.2 on the bottom of p. 13 and top of p. 14. In fact, check all the settings in your default_master.properties against those in the table. Tony hasn't had a chance to study your log yet.



Post Edited by khahn at 10/25/2011 18:36
khahn's picture
1764
Joined: Apr 4 2011 - 3:29pm
Last seen: 12 years 1 month ago

khahn
Wrote:

Sorry to keep you waiting for help. Attached is an updated Source Build Guide for 4.2.1. Please check your maven settings against the three maven settings in section 3.4.1.2 on the bottom of p. 13 and top of p. 14. In fact, check all the settings in your default_master.properties against those in the table. Tony hasn't had a chance to study your log yet.



Post Edited by khahn at 10/25/2011 18:36

 

Thanks for the update, however it still is failing. I will attach the verbose build log. Below is my properties file for the build.

Code:
appServerType = tomcat5
appServerDir = /usr/local/tomcat5.5
dbType = mysql
dbUsername = root
dbPassword =
dbHost = localhost
js.dbName = jasperserver
maven.jdbc.version = 5.1.18-bin
maven.jdbc.artifactId = mysql-connector-java
maven = /usr/local/share/java/maven2/bin/mvn
js-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-pro-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo
repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo</td></tr></tbody></table>
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

Please try following these instructions from the troubleshooting appendix. The instructions worked for me when I had problems installing the 4.2 source code using mysql 5.1:

Clear JasperReports Server Artifacts in Maven Local Repository

If you have an existing source build environment and you add new code, such as a bug fix source patch update, you can clear the JasperReports Server artifacts in your Maven local repository to ensure all the newly built artifacts contain all the necessary new content. Maven updates the artifacts automatically, but if you are having trouble building or pulling in the modified code, you can try deleting these artifact trees.

To clear existing JasperReports Server artifacts:

1. Go to the repository directory:

cd <home-dir-path>/.m2/repository

2. Remove the old versions by deleting the following directories and all their contents:

com/jaspersoft: Community Edition artifact tree

Clear Whole Local Repository

If you want to build everything completely “from scratch” you can remove all of the cached jars in your Maven local repository. To do this you can delete (or rename) the entire local repository.

Then when you build JasperServer, all dependencies will be re-downloaded.

cd <home-dir-path>/.m2

remove folder: repository

 



Post Edited by khahn at 10/25/2011 21:50



Post Edited by khahn at 10/25/2011 21:58
khahn's picture
1764
Joined: Apr 4 2011 - 3:29pm
Last seen: 12 years 1 month ago

khahn
Wrote:

Please try following these instructions from the troubleshooting appendix. The instructions worked for me when I had problems installing the 4.2 source code using mysql 5.1:

Clear JasperReports Server Artifacts in Maven Local Repository

If you have an existing source build environment and you add new code, such as a bug fix source patch update, you can clear the JasperReports Server artifacts in your Maven local repository to ensure all the newly built artifacts contain all the necessary new content. Maven updates the artifacts automatically, but if you are having trouble building or pulling in the modified code, you can try deleting these artifact trees.

To clear existing JasperReports Server artifacts:

1. Go to the repository directory:

cd <home-dir-path>/.m2/repository

2. Remove the old versions by deleting the following directories and all their contents:

com/jaspersoft: Community Edition artifact tree

Clear Whole Local Repository

If you want to build everything completely “from scratch” you can remove all of the cached jars in your Maven local repository. To do this you can delete (or rename) the entire local repository.

Then when you build JasperServer, all dependencies will be re-downloaded.

cd <home-dir-path>/.m2

remove folder: repository

 

 

 

The path for getting this to FreeBSD is to build it from source by removing the requirement to downloading during the build, however I tried what you have mentioned, and it still fails. The name does match the name of the jar. I mentioned both, because I tried both, and neither have worked. Also the download site mentioned in the readme, doesn't supply a 17 version. There is only an 18 version available.

Attached is the build log.

 

Code:
appServerType = tomcat5
appServerDir = /usr/local/tomcat5.5
dbType = mysql
dbUsername = root
dbPassword =
dbHost = localhost
js.dbName = jasperserver
maven = /usr/local/share/java/maven2/bin/mvn
maven.jdbc.version = 5.1.18-bin
maven.jdbc.artifactId = mysql-connector-java
js-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-pro-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo
repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo


Post Edited by jgh at 10/25/2011 21:54
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

Talking to the person who does QA on the installation suggests that you compare the name of the jar that you have in buildomatic/conf_source/db/mysql/jdbc with the mavin.jdbc.artifactId and maven.jdbc.version number in the properties file. If you concatenate the artifactId and maven.jdbc.version number, does it match the name of your jar file? If not, rename you jar to match these properties.

Also, are you using 5.1.17 or 5.1.18? Your posts mentioned both.

10/20 post: I updated the port to copy it into this location pre-build, and still get the error. It came from this package: mysql-connector-java-5.1.17

10/25 post: the code says 5.1.18

Thanks for the log in your last post. Sending it to QA to take a look . . .

khahn's picture
1764
Joined: Apr 4 2011 - 3:29pm
Last seen: 12 years 1 month ago

khahn
Wrote:

Talking to the person who does QA on the installation suggests that you compare the name of the jar that you have in buildomatic/conf_source/db/mysql/jdbc with the mavin.jdbc.artifactId and maven.jdbc.version number in the properties file. If you concatenate the artifactId and maven.jdbc.version number, does it match the name of your jar file? If not, rename you jar to match these properties.

Also, are you using 5.1.17 or 5.1.18? Your posts mentioned both.

10/20 post: I updated the port to copy it into this location pre-build, and still get the error. It came from this package: mysql-connector-java-5.1.17

10/25 post: the code says 5.1.18

Thanks for the log in your last post. Sending it to QA to take a look . . .

 

It does match the jar name. I have tried both, and neither work. Attached is the new log build from the maven repo zip file, with debugging turned up. I am using 5.1.17 now.

Code:
ls -al /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/conf_source/db/mysql/jdbc/mysql-connector-java-5.1.17-bin.jar
lrwxr-xr-x  1 root  wheel  54 Oct 25 15:19 /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/conf_source/db/mysql/jdbc/mysql-connector-java-5.1.17-bin.jar -> /usr/local/share/java/classes/mysql-connector-java.jar

[jhelfman@eggman ~/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic]$ ls -al /usr/local/share/java/classes/mysql-connector-java.jar

-r--r--r-- 1 root wheel 787920 Oct 20 10:11 /usr/local/share/java/classes/mysql-connector-java.jar



Post Edited by jgh at 10/25/2011 22:27
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

 here is my updated properites file to use 5.1.17

Code:
appServerType = tomcat5
appServerDir = /usr/local/tomcat5.5
dbType = mysql
dbUsername = root
dbPassword =
dbHost = localhost
js.dbName = jasperserver
maven = /usr/local/share/java/maven2/bin/mvn
maven.jdbc.version = 5.1.17-bin
maven.jdbc.artifactId = mysql-connector-java
js-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-pro-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo
repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo</td></tr></tbody></table>
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

This is the problem:

js-pro-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo
 

1. In your default_master.properties, set js-pro-path blank: js-pro-path=

2. Change the name of js-repo-path to repo-path.

Sorry this has caused you such problems. For the next release, the Engineer will fix buildomatic to accept js-repo-path or repo-path. For this release, only repo-path works.

Thanks for telling us about it!

 

khahn's picture
1764
Joined: Apr 4 2011 - 3:29pm
Last seen: 12 years 1 month ago

khahn
Wrote:

This is the problem:

js-pro-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
js-repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo
 

1. In your default_master.properties, set js-pro-path blank: js-pro-path=

2. Change the name of js-repo-path to repo-path.

Sorry this has caused you such problems. For the next release, the Engineer will fix buildomatic to accept js-repo-path or repo-path. For this release, only repo-path works.

Thanks for telling us about it!

 

 

I was hoping that was it, but same error.

Here is my new properties file:

appServerType = tomcat5

appServerDir = /usr/local/tomcat5.5

dbType = mysql

dbUsername = root

dbPassword =

dbHost = localhost

js.dbName = jasperserver

maven = /usr/local/share/java/maven2/bin/mvn

maven.jdbc.version = 5.1.17-bin

maven.jdbc.artifactId = mysql-connector-java

js-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver

js-pro-path =

repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo

Code:
init-source-paths:
     [echo]  
     [echo] Property values (in dev.xml: init-source-paths): 
     [echo]   js-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver
     [echo]   js-pro-path = 
     [echo]   repo-path = /home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver-repo
     [echo]  
 
add-jdbc-driver:
     [echo] maven.home = /usr/local/share/java/maven2
     [java] [INFO] 
     [java] NOTE: Maven is executing in offline mode. Any artifacts not already in your local
     [java] repository will be inaccessible.
     [java] 
     [java] [INFO] Scanning for projects...
     [java] [INFO] Searching repository for plugin with prefix: 'install'.
     [java] [INFO] ------------------------------------------------------------------------
     [java] [INFO] Building Maven Default Project
     [java] [INFO]    task-segment: [install:install-file] (aggregator-style)
     [java] [INFO] ------------------------------------------------------------------------
     [java] [INFO] [install:install-file {execution: default-cli}]
     [java] [INFO] ------------------------------------------------------------------------
     [java] [ERROR] BUILD ERROR
     [java] [INFO] ------------------------------------------------------------------------
     [java] [INFO] Missing group, artifact, version, or packaging information
     [java] [INFO] ------------------------------------------------------------------------
     [java] [INFO] For more information, run Maven with the -e switch
     [java] [INFO] ------------------------------------------------------------------------
     [java] [INFO] Total time: < 1 second
     [java] [INFO] Finished at: Tue Oct 25 17:38:43 PDT 2011
     [java] [INFO] Final Memory: 4M/158M
     [java] [INFO] ------------------------------------------------------------------------
 
BUILD FAILED
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:148: The following error occurred while executing this line:
/home/jhelfman/ports/databases/jasperserver/work/jasperreports-server-cp-4.2.1-src/jasperserver/buildomatic/bin/dev.xml:92: Java returned: 1
 
Total time: 2 seconds
*** Error code 1
 
Stop in /home/jhelfman/ports/databases/jasperserver.
*** Error code 1
</td></tr></tbody></table>
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

 here is the buildlog

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

If you built after running js-ant clean-config and js-ant gen-config, we need to talk to the Engineer in the morning.

khahn's picture
1764
Joined: Apr 4 2011 - 3:29pm
Last seen: 12 years 1 month ago
i did. i do a clean build everytime.
jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago

Hi Jason,

We should probably step back and see about doing a regular JasperServer src build using just the jasperreports-server-cp-4.2.1-src.zip and the buildomatic tool setup. That will help isolate the current issue.

Once this is working then we can look at getting it integrated into your FreeBSD setup.

Sorry you are hitting so many issues here with the mysql setup.

I'll ping you directly...

Thanks,

-Tony

tkavanagh's picture
15016
Joined: Jul 7 2006 - 8:54am
Last seen: 8 years 8 months ago

tkavanagh
Wrote:

Hi Jason,

We should probably step back and see about doing a regular JasperServer src build using just the jasperreports-server-cp-4.2.1-src.zip and the buildomatic tool setup. That will help isolate the current issue.

Once this is working then we can look at getting it integrated into your FreeBSD setup.

Sorry you are hitting so many issues here with the mysql setup.

I'll ping you directly...

Thanks,

-Tony

 

This is now solved. there was a property value that was missing in my properties file that I build as part of the FreeBSD port.

maven.jdbc.groupId = mysql

 

Here is a link to the updated FreeBSD port, if anyone is intersted.

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/162111

 

Thanks, Tony!

jgh's picture
jgh
2031
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 2 months ago
Feedback