Error dependencies JasperReport

1

I use Netbeans. In my Maven I have this dependency for JasperReport:

<dependency>
         <groupId>net.sf.jasperreports</groupId>
         <artifactId>jasperreports</artifactId>
         <version>5.0.1</version>
 </dependency>

But it happens that I build the .jar with the libraries included, then when I run the system it gives this error message:

Error: a JNI error has occurred please check your installation and try again

It only happens when I include the dependencies of JasperReport and only in .jar. Direct in Netbeans does not happen the error ....

----------------------- EDIT -----------------------

My pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.softcom</groupId>
    <artifactId>AtendimentoCliente</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>

    <dependencies>

        <!-- JUnit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>

        <!-- Jaybird -->
        <dependency>
            <groupId>org.firebirdsql.jdbc</groupId>
            <artifactId>jaybird-jdk18</artifactId>
            <version>2.2.9</version>
        </dependency>

        <!-- JasperReport -->
        <dependency>
             <groupId>net.sf.jasperreports</groupId>
             <artifactId>jasperreports</artifactId>
             <version>5.5.2</version>
        </dependency>

    </dependencies>


    <build>
        <finalName>AtendimentoCliente</finalName>
        <plugins>
            <!-- Compiler -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>forms.FormConsultaSac</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>  

        </plugins>
    </build>
</project>

I put this plugin, because if I leave without, Netbeans does not generate the .jar with dependencies, even by right clicking on the project and having it build with dependencies.

I deleted all the .jar from the Maven repository, then it dropped everything again. The dependencies that have been downloaded to my project are these:

Even deleting dependencies and lowering it again continued. And the error happens only in .jar, direct in Netbeans works ...

Can this plugin be? I tried to delete it, but as I said before, if I delete it, Netbeans generates the .jar without the dependencies

    
asked by anonymous 07.03.2016 / 17:53

0 answers