I am running Jasper Reports with Apache Ant. When I go to generate a sample report into a pdf I run this:
root#server~$ /home/user/apache-ant-1.8.2/bin/ant pdf
Buildfile: /home/user/jasperreports-4.0.2/demo/samples/table/build.xml
pdf:
pdf:
[java] Exception in thread "main" java.lang.NoClassDefFoundError: TableApp
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 1 second
The problem is, I cannot find where that PDF went to, if the file even converted into a PDF at all, really. I ran the "find" command and no luck. This is a demo report called "Table" in the Jasper Report's demo directory. The build.xml file in the sample reports directory has this:
<target name="pdf" description="Generates a PDF version of the report by converting the .jrprint file.">
<ant dir="../" target="pdf"/>
</target>
That tells me that it should convert this report into PDF and shoot the file to the parent directory. I made a directory called PDF and use absolute path to shoot it there and all that it did was shoot a build.xml file with no data to it...
The PDF is nowhere to be found. What I am missing here?
Thanks for any help, the jasperforge forum isn't responding to my thread. I don't think this is a very complex problem, so hopefully I can get some help... this is my last step with Jasper!
Thanks again.
[java] Exception in thread "main" java.lang.NoClassDefFoundError: TableApp
this error means that you should have a main() method in TableApp.
Related
I'm implementing the Maven CPD PMD plug-in to to spot and (fail the build) if any instances of code duplication are presennt in the project.
This all works fine. However, The output error to the terminal in intellij idea is in the form:
Terminal output:
CPD Failure: Found 31 lines of duplicated code at locations:
[INFO]
C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java
line 330
[INFO]
C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java
line 428
This works fine and how it should do,
although, I recently had experience implementing Maven Check Style plug-in, which output error looks like this :
[INFO]
C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java:428
This is infinitely more useful as I can just click on this "file path" and go directly to the file and line where this error occurs ie. HelloWorld.java at line 428.
so, my question is, is there anyway of getting intellij idea to "recognise" the output in the form:
[INFO]
C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java
line 428
and making this "clickable" ??
Any help or insights will be greatly appreciated as having to manually navigate to the class is really annoying :( (especially as I have hundreds of errors).
Thanks all.. :)
With Intellij can you run your code using a Run Configuration rather than using the terminal? This will give you what you want.
Also, as a comment, Visual Studio Code does exactly what you want out of the box.
I try to use the generic test plugin. I have the unittest.xml file with an absolute path
<file path="/Users/emerson/dev/sonar/project/workspace/components/triage/src/assets/test/unit/tests/controllers/controller.coffee">
the coffee script got compiled into js and unit tests were executed with the unittest.xml as result.
When I add this to my sonar build via the sonar.genericcoverage.unitTestReportPaths, it does recognise the unittest.xml, but does nothing.
The log says
[sonar:sonar] 14:32:55.108 INFO - imported unit test data for 0 files
[sonar:sonar] 14:32:55.109 INFO - unit test data ignored for 1 unknown files, including:
and then the path to the file named in the unittest.xml
The path is valid, why does it not recognise it ? Neither the coffee script nor the compiled js are part of the sonar build, is it therefore ?
As there is no support of coffee script with sonar, my hope was to at least include the unittest results in sonar.
Can someone explain whether it is possible and what should be written into the path field in the unittest.xml ?ยจ
Thanks for any clarification
Indeed the files need to be indexed in SonarQube in order to import test data.
You can set sonar.import_unknown_files to true with SonarQube 5.1+ to have all files indexed by SonarQube.
http://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code#AnalyzingSourceCode-Unrecognizedfiles
I've looking to get an HTML code coverage report working with an XCode 6.1 based project. My solution 'partially works', but I'm getting a lot of skipped files when running lcov:
geninfo: file found unrecognized record format - skipping
Some more detail on my setup:
Created an XCode 'Coverage' configuration via these instructions (Steps 1+2):
https://developer.apple.com/library/ios/qa/qa1514/_index.html
Build and run my standalone testrunner using this configuration via xcodebuild.
This successfully appears to generate GCNO files and GCDA files for each of my source files. So far so good.
Run lcov (v1.11) to generate an HTML report. The command I'm using looks like the following:
lcov --capture --derive-func-data --directory ./build/Coverage/MyCppRunner.build --output-file lcov-testrun.info --ignore-errors graph
This also succeeds, due to the ignore-errors argument. However, I'm getting a lot of skipped gcno files with the following error:
geninfo: WARNING: /Users/myname/build/Coverage/MyCppRunner.build/Objects-normal/x86_64/MyFile.gcno: found unrecognized record format - skipping
When I generate my HTML report via genhtml, these files don't show any coverage.
Is there any way around this issue? A different set of clang flags perhaps, or an alternative to lcov? I briefly tried gcovr, but I couldn't get it working.
I am creating liferay themes using JBoss on my Mac. In the process of creating a theme, when I execute ant deploy on my terminal, I am getting following errors:
Buildfile:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/themes/g2y-b2b-theme/build.xml
[copy] Copying 1 file to /usr/share/ant/lib
BUILD FAILED
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/themes/g2y-b2b-theme/build.xml:5:
The following error occurred while executing this line:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/themes/build-common-theme.xml:7:
The following error occurred while executing this line:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/build-common-plugin.xml:5:
The following error occurred while executing this line:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/build-common.xml:68:
Failed to copy
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/lib/ecj.jar to
/usr/share/ant/lib/ecj.jar due to java.io.FileNotFoundException
/usr/share/ant/lib/ecj.jar (Permission denied)
Total time: 0 seconds
Please help me to get rid of this and proceed further. What are the steps I should take in order to do this on a Mac? Please also tell me how to set up the environment variable of ANT on a Mac.
When ant builds your theme and requires ecj.jar (the eclipse compiler for java) it typically downloads it from some internet repository and places it in $ANT_HOME/lib. It seems your $ANT_HOME is usr/share/ant and you don't have write access to that directory. Either download it manually and place it there or open up the directory write permissions for one build (then close it again).
You'll only need to do this once: When ecj.jar is on the classpath for ant, it will just be used for eternity.
I am trying to build the project and the build is successful. However when I try to deploy the EAR file, it is throwing a class not found exception. I looked into the EAR file and I am seeing that the file which is throwing the error is not compiling and creating a class file. It is a concept file. Any help would be appreciated.
Try manually adding the missing file on the Resources tab of the enterprise archive's Shared Archive object. This should force it to be included in the EAR file.