我正在尝试通过Maven存储库向Janino 2.7.6添加依赖项。当我尝试运行应用程序时,我收到此错误:
--- exec-maven-plugin:1.2.1:exec (unpack-dependencies) @ JanineAttemp2 ---
--- exec-maven-plugin:1.2.1:exec (default-cli) @ JanineAttemp2 ---
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:273)
at java.util.jar.JarVerifier.update(JarVerifier.java:228)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
at java.util.jar.JarFile.getInputStream(JarFile.java:450)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:776)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
...
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 3.972s
Finished at: Sun Aug 24 14:41:26 EST 2014
Final Memory: 15M/37M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project JanineAttemp2: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
我没有直接修改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.hills</groupId>
<artifactId>JanineAttemp2</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>JanineAttemp2</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>com.hills.janineattemp2.MainApp</mainClass>
</properties>
<organization>
<!-- Used as the 'Vendor' for JNLP generation -->
<name>Your Organisation</name>
</organization>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeScope>system</excludeScope>
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/../bin/javafxpackager</executable>
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>${mainClass}</argument>
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
<argument>-outdir</argument>
<argument>${project.build.directory}</argument>
<argument>-outfile</argument>
<argument>${project.build.finalName}.jar</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>default-cli</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<commandlineArgs>${runfx.args}</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${java.home}/lib/jfxrt.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>2.7.6</version>
</dependency>
</dependencies>
</project>
重新创建的步骤很简单:
我之前在另一个包裹中遇到了这个问题,所以我想知道我的设置是否有问题?
注意:我尝试了此处概述的解决方案线程“main”java.lang.SecurityException中的Exception:Manifest主属性的签名文件摘要无效,但尚未生效,并且找不到有关此XML应插入到何处的文档。
这是由签名的 jar 引起的。贾尼诺的罐子里装着假人。嘟嘟SF,您需要在着色时排除这些文件。
这样地
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1/version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
我有一个google cloud app engine应用程序,这个应用程序是用Java11实现的,并且可以编译它。但由于某种原因,当我将I部署到app engine上时,google无法创建此应用程序的实例。
我在google上搜索过,但没有找到有类似问题的人。我在我自己的几个项目以及像这样的eclipse JAR中遇到了这个错误。由于这些问题,我的项目无法编译。 !ENTRYile.java:4064 2 2012-09-04 17:17:18.695!消息从插件调用代码时出现问题:“org.eclipse.pde.internal.core.”。!STACK 0ache.extract安全异常:无效
我见过其他一些这样的人 "无效的签名文件"当试图运行一个. jar 异常在线程"main"java.lang.Security异常:无效的签名文件摘要的清单主属性 JavaFX项目的有效JAR签名 我们将Jetty与Maven Shade插件一起用于开源应用程序: https://github.com/OneBusAway/onebusaway-gtfs-realtime-from-nextbus
我使用并使用相同的安装程序安装了。 java-jar“C:\ProgramFiles(x86)\HP\LeanFT\Tools\TestExportTool\test export tool.jar”“C:\LeanFT\MyTestNGTests.jar”-类路径:“C:\TestNG\TestNG.jar” 清单主属性的签名文件摘要无效 我使用从测试用例生成了工件。
问题内容: 目前,我有一个客户端-服务器应用程序,给定一个PDF文件,使用服务器证书对其进行签名,将签名与原始文件一起附加,然后将输出返回给客户端(所有这些操作均通过PDFBox实现)。 我有一个签名处理程序,这是我的外部签名支持(其中内容为PDF文件) 它工作正常,但我在想-如果PDF文件太大而无法上传怎么办?例如:100mb …这将永远!鉴于此,我想弄清楚,如果不对PDF文件签名,是否可以仅对