Jump to content
We've recently updated our Privacy Statement, available here ×

Compilation failure following Source-Build-Guide


tammy_m

Recommended Posts

Hi

I get this error on "mvn  clean install" step in following the JasperServer-Source-Build-Guide.pdf.

Can anyone help me get past this?!

[iNFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[iNFO] ------------------------------------------------------------------------
[iNFO] Compilation failure
/jasperserver-src/jasperserver/jasperserver-api-impl/engine/src/main/java/com/jaspersoft/jasperserver/api/engine/scheduling/quartz/ReportExecutionJob.java:[1043,29] cannot access javax.activation.DataSource
file javax/activation/DataSource.class not found
        messageHelper.addAttachment(attachmentName, new DataContainerResource(attachmentData));

/jasperserver-src/jasperserver/jasperserver-api-impl/engine/src/main/java/com/jaspersoft/jasperserver/api/engine/scheduling/quartz/ReportExecutionJob.java:[1043,29] cannot access javax.activation.DataSource
file javax/activation/DataSource.class not found
        messageHelper.addAttachment(attachmentName, new DataContainerResource(attachmentData));
 

thanks.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Are you using the source code pulled down (ie checked out) from the svn repostory? (or are you using the 3.0.0 source code zip).

I am looking at the most current copy of ReportExecutionJob.java (jasperserver/trunk HEAD code) and I don't see that there is an import of javax.activation.DataSource.

Also, in the most current code, there is a simpler way to build and run the source code (less configuration). It is using the "buildomatic" set of scripts. The steps to build are documented in the doc Buildomatic-Auto-Build-Steps.txt. This text doc is located in the files downloads area for JasperServer 3.0.

Let me know if this works for you.

-Tony

Link to comment
Share on other sites

Hi

I am using the 3.0.0 source code zip.

There is an activation.jar in my mvn repo.

I tried the buildomatic version from the trunk of the svn repo and I got the same error:

 

    [exec] [iNFO] Compilation failure
     [exec] /JasperServer/jasperserver/jasperserver-api-impl/engine/src/main/java/com/jaspersoft/jasperserver/api/engine/scheduling/quartz/ReportExecutionJob.java:[1049,29] cannot access javax.activation.DataSource
     [exec] file javax/activation/DataSource.class not found
     [exec]         messageHelper.addAttachment(attachmentName, new DataContainerResource(attachmentData));
     [exec]
     [exec]
     [exec]
     [exec] /jasperserver/jasperserver-api-impl/engine/src/main/java/com/jaspersoft/jasperserver/api/engine/scheduling/quartz/ReportExecutionJob.java:[1049,29] cannot access javax.activation.DataSource
     [exec] file javax/activation/DataSource.class not found
     [exec]         messageHelper.addAttachment(attachmentName, new DataContainerResource(attachmentData));
     [exec]
     [exec]
     [exec] [iNFO] ------------------------------------------------------------------------
     [exec] [iNFO] For more information, run Maven with the -e switch
     [exec] [iNFO] ------------------------------------------------------------------------
     [exec] [iNFO] Total time: 15 seconds
     [exec] [iNFO] Finished at: Tue Sep 16 12:12:41 PDT 2008
     [exec] [iNFO] Final Memory: 20M/59M
     [exec] [iNFO] ------------------------------------------------------------------------

BUILD FAILED
/jasperserver/buildomatic/dev.xml:152: The following error occurred while executing this line:
/jasperserver/buildomatic/dev.xml:14: exec returned: 1

 

Thanks.

Link to comment
Share on other sites

I was looking at this message and scratching my head, because as Tony mentions, there's no explicit reference to javax.activation.DataSource. I googled around for some instances of that error, and I think that message shows up because there's a subclass of DataSource referenced, and the subclass is accessible but DataSource itself isn't.

You may have an activation.jar in your Maven repo, but the kicker is that Maven won't put it on the classpath unless you call it out as a dependency!

This could be a subtle Maven issue--the jasperserver lib (or something it depends on) might not be calling out a dependency, but there is something else that depends on activation.jar and things "just work". If the dependency chain changes for some reason, then all of a sudden activation.jar stops being included, and things start blowing up.

To add an explicit callout for activation.jar, add the following to the <dependencies> of jasperserver-api-impl/engine/pom.xml:

 <dependency>
  <groupId>javax.activation</groupId>
  <artifactId>activation</artifactId>
  <version>1.1</version>
</dependency>

 

Hopefully, things will start working. I'll check this fix in to SVN, because it shouldn't really hurt anything.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...