Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not read customize property from webapp #27

Open
user20161119 opened this issue Aug 20, 2015 · 4 comments
Open

Can not read customize property from webapp #27

user20161119 opened this issue Aug 20, 2015 · 4 comments

Comments

@user20161119
Copy link

java.lang.IllegalArgumentException: Attribute 'higo-build-time' not found in MANIFEST.MF file(s) among 87 other attribute(s): ["Ant-Version", "Archiver-Version", "Bnd-LastModified", "Boot-Class-Path", "Build-Id", "Build-Jdk", "Build-Number", "Build-Time", "Build-Timestamp", "Build-Version", "BuildInfo-Revision", "BuildInfo-Timestamp", "BuildInfo-URL", "Built-By", "Bundle-Activator", "Bundle-ClassPath", "Bundle-Classpath", "Bundle-Description", "Bundle-DocURL", "Bundle-License", "Bundle-ManifestVersion", "Bundle-Name", "Bundle-RequiredExecutionEnvironment", "Bundle-SymbolicName", "Bundle-Vendor", "Bundle-Version", "Can-Redefine-Classes", "Can-Retransform-Classes", "Can-Set-Native-Method-Prefix", "Class-Path", "Created-By", "DSTAMP", "DynamicImport-Package", "Embed-Dependency", "Export-Package", "Extension-Name", "Extension-name", "Fragment-Host", "Hibernate-Version", "Ignore-Package", "Implementation-Build", "Implementation-Build-Date", "Implementation-Title", "Implementation-URL", "Implementation-Vendor", "Implementation-Vendor-Id", "Implementation-Version", "Import-Package", "Include-Resource", "JCabi-Build", "JCabi-Date", "JCabi-Version", "JRebel-Implementation", "Java-Vendor", "Java-Version", "License", "Main-Class", "Major-Version", "Manifest-Version", "Maven-Version", "Name", "Originally-Created-By", "Os-Arch", "Os-Name", "Os-Version", "Package", "Premain-Class", "Private-Package", "Product", "Require-Capability", "Scm-Connection", "Scm-Revision", "Scm-Url", "Specification-Title", "Specification-Vendor", "Specification-Version", "TODAY", "TSTAMP", "Terracotta-Description", "Terracotta-Name", "Terracotta-ProjectStatus", "Time-Zone-Database-Version", "Tool", "Version", "X-Compile-Source-JDK", "X-Compile-Target-JDK", "url"]
    at com.jcabi.manifests.Manifests.read(Manifests.java:274)
    at com.higo.interceptor.UserSessionInterceptor.readBuildtimeStamp(UserSessionInterceptor.java:59)
    at com.baojian.base.interceptor.ClassStart.intercept(ClassStart.java:25)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
    at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInv
@user20161119
Copy link
Author

my customize property:higo-build-time
and the property is in MANIFEST.MF file:

 Manifest-Version: 1.0
higo-build-time: 20150820064447
Build-Jdk: 1.7.0_79
Built-By: janwen
Created-By: Maven Integration for Eclipse

@dmarkov
Copy link

dmarkov commented Aug 24, 2015

@yegor256 please pay attention to this issue

@yegor256
Copy link
Member

@JanWen you need to give more information about your configuration, etc. Also, you may turn on logging for com.jcabi.manifests.* and you will see which MANIFEST.MF files are read.

@tblackwe
Copy link

I believe that a MANIFEST.MF that is not in a jar file is not read. So if you don't archive your classes in a webapp the war files MANIFEST.MF is not processed.

I was unable to read web-app MANIFEST.MF until I added the following to my pom

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
               <archiveClasses>true</archiveClasses>
            </configuration>
         </plugin>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants