Hi saqib ,
As you said, I wrote a new .java file and some test code. here is my entire test file:
package com.faf.credit.test.action;
import java.io.File;
import java.io.FileInputStream;
public class AsposeTest {
private static final String LICENSE_FILE = "/u02/oracle/icf/AsposeLicense.lic";
public void barcodeLicenseTest() {
try {
com.aspose.barcode.License barcodeLicense = new com.aspose.barcode.License();
barcodeLicense.setLicense(LICENSE_FILE);
System.out.println("barcode license first try success");
} catch (Exception ex) {
System.out.println("barcode license first try failed");
ex.printStackTrace();
}
try {
com.aspose.barcode.License barcodeLicense = new com.aspose.barcode.License();
FileInputStream fi = new FileInputStream(new File(LICENSE_FILE));
barcodeLicense.setLicense(fi);
System.out.println("barcode license second try success");
} catch (Exception ex) {
System.out.println("barcode license second try failed");
ex.printStackTrace();
}
}
public void wordLicenseTest(){
try {
com.aspose.words.License wordLicense = new com.aspose.words.License();
wordLicense.setLicense(LICENSE_FILE);
System.out.println("word license first try success");
} catch (Exception ex) {
System.out.println("word license first try failed");
ex.printStackTrace();
}
try {
com.aspose.words.License wordLicense = new com.aspose.words.License();
FileInputStream fi = new FileInputStream(new File(LICENSE_FILE));
wordLicense.setLicense(fi);
System.out.println("word license second try success");
} catch (Exception ex) {
System.out.println("word license second try failed");
ex.printStackTrace();
}
}
}
I execute these two functions in a jsp page, here is my jsp page source code:
<%@page contentType="text/html; charset=GBK"%>
<%@page import="com.faf.credit.test.action.AsposeTest" %>
<%
AsposeTest asposeTest = new AsposeTest();
asposeTest.barcodeLicenseTest();
asposeTest.wordLicenseTest();
%>
and I got the stack trace like this:
08/09/18 09:01:35 barcode license first try failed
08/09/18 09:01:35 java.lang.RuntimeException: AssemblyProduct attribute is not defined on the assembly. Please report this error to Aspose.
08/09/18 09:01:35 at com.aspose.barcode.bs.a(SourceFile:181)
08/09/18 09:01:35 at com.aspose.barcode.bs.a(SourceFile:137)
08/09/18 09:01:35 at com.aspose.barcode.License.setLicense(SourceFile:102)
08/09/18 09:01:35 at com.faf.credit.test.action.AsposeTest.barcodeLicenseTest(AsposeTest.java:13)
08/09/18 09:01:35 at _test._jspService(_test.java:49)
08/09/18 09:01:35 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:569)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:305)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
08/09/18 09:01:35 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
08/09/18 09:01:35 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
08/09/18 09:01:35 at com.faf.framework.LoginFilter.doFilter(LoginFilter.java:51)
08/09/18 09:01:35 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
08/09/18 09:01:35 at com.faf.framework.EncodeFilter.doFilter(EncodeFilter.java:32)
08/09/18 09:01:35 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
08/09/18 09:01:35 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
08/09/18 09:01:35 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
08/09/18 09:01:35 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
08/09/18 09:01:35 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
08/09/18 09:01:35 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
08/09/18 09:01:35 at java.lang.Thread.run(Thread.java:534)
08/09/18 09:01:35 barcode license second try failed
08/09/18 09:01:35 java.lang.RuntimeException: AssemblyProduct attribute is not defined on the assembly. Please report this error to Aspose.
08/09/18 09:01:35 at com.aspose.barcode.bs.a(SourceFile:181)
08/09/18 09:01:35 at com.aspose.barcode.License.setLicense(SourceFile:123)
08/09/18 09:01:35 at com.faf.credit.test.action.AsposeTest.barcodeLicenseTest(AsposeTest.java:23)
08/09/18 09:01:35 at _test._jspService(_test.java:49)
08/09/18 09:01:35 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:569)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:305)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
08/09/18 09:01:35 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
08/09/18 09:01:35 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
08/09/18 09:01:35 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
08/09/18 09:01:35 at com.faf.framework.LoginFilter.doFilter(LoginFilter.java:51)
08/09/18 09:01:35 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
08/09/18 09:01:35 at com.faf.framework.EncodeFilter.doFilter(EncodeFilter.java:32)
08/09/18 09:01:35 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
08/09/18 09:01:35 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
08/09/18 09:01:35 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
08/09/18 09:01:35 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
08/09/18 09:01:35 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
08/09/18 09:01:35 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
08/09/18 09:01:35 at java.lang.Thread.run(Thread.java:534)
08/09/18 09:01:35 word license first try success
08/09/18 09:01:35 word license second try success
I've also tested it on another computer which runs RedHat Linux AS2 and Oracle AS 10.1.2, and it gives me the same error.
And along I send my license file to you.
thanks and best regards..