Free Support Forum - aspose.com

Problems running the demo

Hello,

I downloaded Aspose.Cells for Java version 1.4.2.0. But when I try to run the Northwind Demo in Tomcat 5.0.28, I get the following error:

javax.servlet.ServletException: Error allocating a servlet instance
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	java.lang.Thread.run(Thread.java:534)

root cause

java.lang.UnsupportedClassVersionError: NorthwindServlet (Unsupported major.minor version 49.0)
	java.lang.ClassLoader.defineClass0(Native Method)
	java.lang.ClassLoader.defineClass(ClassLoader.java:539)
	java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	java.lang.Thread.run(Thread.java:534)
Please explain what the error is about and the resolution for it. 
We need to evaluate Aspose for a project which we have on hand. 
Please note we already bought .Net version of Cells from Aspose and need to evaluate the Java version now.
Thanks.
Vikas

Just a follow-up. I am using Java 1.4. I tried wiritng a custom application using Aspose to read one of our custom files and I am getting the following error when I try to run the program:

java.lang.UnsupportedClassVersionError: com/paragon/excel/ExcelReader (Unsupported major.minor version 48.0)

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:703)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:133)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:320)

at java.net.URLClassLoader.access$400(URLClassLoader.java:93)

at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:678)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:239)

at java.lang.ClassLoader.loadClass(ClassLoader.java:516)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:460)

at java.lang.ClassLoader.loadClass(ClassLoader.java:448)

Exception in thread "main"

I am attaching the Source code also for your reference.

More info for you. I tried to compile the java file from the command prompt, this is what I get:

C:\Work\Roche\Aspose_Test\Aspose_Excel\JavaSource\com\paragon\excel>java -versio
n
java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)

C:\Work\Roche\Aspose_Test\Aspose_Excel\JavaSource\com\paragon\excel>javac ExcelR
eader.java
ExcelReader.java:17: cannot access com.aspose.cells.Excel
bad class file: C:\Aspose\1.4.1.0\lib\Aspose.Cells.jar(com/aspose/cells/Excel.cl
ass)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
Excel excel = new Excel();
^
1 error

Aspose.Cells for Java needs Java 5.0 or higher. We can provide a version for Java 1.4.x in a short time.

Please try this version for Java 1.4

Thanks. It works now. Just curious! Which version of Aspose.Cells is this?

We are going to develop the application in Java 1.4 So do we have to use this version of Cells or you guys are working on a newer one?

Thanks.

Vikas

Hi,

We will release new version recently, which includes for java1.4 and for java1.5 together .