Aspose.Cells for Java : Workbook.save() doesn't work on a server

Hi,

I'm using Aspose.Cells for Java in an application that has two parts, a client side and a server side.

Before, i was creating Excel files on the client side without any problems, but now that I'm doing this on the server, I have several problems.

First, the Workbook.save method doesn't work and I have this error :

java.lang.InternalError: Can’t connect to X11 window server using ‘:0.0’ as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.motif.MToolkit.(MToolkit.java:93)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.Toolkit$2.run(Toolkit.java:821)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
at com.aspose.cells.b.a.b.i.d(Unknown Source)
at com.aspose.cells.b.a.b.i.c(Unknown Source)
at com.aspose.cells.b.a.b.i.(Unknown Source)
at com.aspose.cells.qJ.a(Unknown Source)
at com.aspose.cells.qJ.a(Unknown Source)
at com.aspose.cells.Worksheet.autoFitRow(Unknown Source)
at com.aspose.cells.lG.a(Unknown Source)
at com.aspose.cells.gh.a(Unknown Source)
at com.aspose.cells.gh.v(Unknown Source)
at com.aspose.cells.gh.a(Unknown Source)
at com.aspose.cells.gg.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at prime.communication.actions.AsposeExecuteExport.doAction(AsposeExecuteExport.java:237)
at prime.communication.PrimeServlet.doPost(PrimeServlet.java:286)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)

Second, the method Worksheet.autoFitColumns doesn't work and I have no error on the log, the server send a general error to the client.

I am using Aspose.Cells for Java 7.1.0 JDK 1.4.

The JRE on the server : 1.4

The server configuration :

Operating System

Solaris
10 8/11 SPARC 64-bit
SunOS 5.10
Memory
16384 MBytes
Do you have a solution for this problems?
Best Regards,
Hasan.

Hi,


Can you please download and try this latest fix of Aspose.Cells for Java: Aspose.Cells for Java v7.2.2.1 and let us know your feedback? This will help us make sure that the issue also exists with the latest fix of Aspose.Cells.

Also, please check if you have enough Rights for doing a write process on your server.

Ok I’m trying it.

It didn't solve the probleme but I found a solution,

I'm using Tomcat 5.5 on the server and in the catalina.sh file of Tomcat, I added this :

-Djava.awt.headless=true

and both problems (workbook.save and worksheet.autofitcolumns) are not problems any more.

I found this solution on this post :

http://forum.fusioncharts.com/topic/5420-jsp-export-problem-in-solarisunixlinux/

It explains well the problem.

Best Regards.

Hasan.

Hi,

Since, you are using JDK 1.4, please download all the required JDK 1.4 libraries from the latest major release:

Aspose.Cells for Java 7.2.2


And then update the aspose.cells jar with the latest JDK 1.4 related jar from the latest minor release:
Aspose.Cells
for Java v7.2.2.1


Let’s us know your feedback after testing.

If the issue re-occurs, please provide us your source code and source files too.

So I think it’s not an Aspose issue but a server issue.

BekciHasan:

It didn't solve the probleme but I found a solution.

So I think it's not an Aspose issue but a server issue.

								</p><p></p><p>I'm using Tomcat 5.5 on the server and in the catalina.sh file of Tomcat, I 

added this :

-Djava.awt.headless=true

and both problems (workbook.save and worksheet.autofitcolumns) are not problems any more.

I found this solution on this post :

http://forum.fusioncharts.com/topic/5420-jsp-export-problem-in-solarisunixlinux/

Hi,

It's great to know that you were able to find out the solution of this problem.

If you encounter any problem, please feel free to post, we will help you asap.