<html><head><style> body {height: 100%; color:#000000; font-size:12pt; font-family:Times New Roman;}</style></head><body>Seb, <br> So I found the solution, I think that is obvious to you but however, I'll write out my solution so it could be useful later.<br> In CCMake of ParaView, because there is "bad X server connection", so we must disable X<br> - VTK_OPENGL_HAS_OSMESA ON<br> - VTK_USE_OFFSCREEN ON<br> - VTK_USE_X OFF<br> <br> And then bingo.<br> So thank you very much for helping me all these times.<br><br>----- Original Message -----<br>From: Sebastien Jourdain <sebastien.jourdain@kitware.com><br>To: Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr><br>Cc: vtkusers@vtk.org, Frederic Cervenansky <frederic.cervenansky@creatis.insa-lyon.fr><br>Sent: Fri, 20 Apr 2012 14:11:37 +0200 (CEST)<br>Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class vtkJPEGWriter and function SetInput<br><br>Sure I do.<br><br>The PWServer process need to have access to the X server as it is<br>using OpenGL to do the rendering.<br>Basically tomcat need to run on a graphical session, and that session<br>needs to remains open. Otherwise, you will need to build ParaView with<br>OSMesa. OSMesa will use the CPU instead of of the GPU and therefore<br>will be slower but then you will be able to run the server without any<br>graphical session.<br><br>That's the whole purpose of that wiki section which is meant to<br>advanced user that have some constraints on their deployment... (No<br>GPU and want to use system package)<br><br>ParaViewWeb with system tomcat package: This section explain how to<br>use a system tomcat package with ParaViewWeb on headless server.<br>(Offscreen rendering + system security setting)<br><br>Seb<br><br>On Fri, Apr 20, 2012 at 3:57 AM, Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr> wrote:<br>> Hi Seb,<br>> So, in the log file, it "bad X server connections"<br>> with "vtkXOpenGLRenderWindow".<br>> I checked the configuration of pw-config.properties but nothing abnormal.<br>> If you have any idea ...<br>><br>><br>> ----- Original Message -----<br>> From: Sebastien Jourdain <sebastien.jourdain@kitware.com><br>> To: Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr><br>> Cc: vtkusers@vtk.org, Frederic Cervenansky<br>><frederic.cervenansky@creatis.insa-lyon.fr><br>> Sent: Thu, 19 Apr 2012 15:30:40 +0200 (CEST)<br>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class<br>> vtkJPEGWriter and function SetInput<br>><br>> Try to stop all the services (tomcat + activemq). Remove all the logs<br>> of tomcat and the one that are inside WORK_DIR/logs that you setup in<br>> CMake and that is specified inside the pw-config.propertie.<br>><br>> Once done, start again activemq and tomcat. Test again and if it<br>> fails, you will have to look at all those logs to see if you have any<br>> feedback of the reason of the issue...<br>><br>> Seb<br>><br>> On Thu, Apr 19, 2012 at 4:43 AM, Tuan Ha Tran wrote:<br>>> Seb,<br>>> All theses problems are gone, but now, the latest :<br>>> When I tried to create a new session, now nothing appears, and I have, in<br>>> my<br>>> "Apache-activemq" shell "INFO | Transport failed: java.io.EOFException"<br>>> If you can help me ..... thank you very much indeed<br>>><br>>><br>>><br>>><br>>> ----- Original Message -----<br>>> From: Sebastien Jourdain<br>>> To: Tuan Ha Tran<br>>> Cc: vtkusers@vtk.org, Frederic Cervenansky<br>>><br>>> Sent: Wed, 18 Apr 2012 19:01:48 +0200 (CEST)<br>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class<br>>> vtkJPEGWriter and function SetInput<br>>><br>>> What do you mean by "my apache-tomcat-7.0.26" ?<br>>> If it's a tgz file that you download with your user, you DO NOT HAVE<br>>> TO read the documentation<br>>> "http://www.paraview.org/Wiki/ParaViewWeb_with_system_tomcat_package"<br>>><br>>> By system tomcat, I mean: "apt-get install tomcat"<br>>> And with system tomcat, it is trickier to install ParaViewWeb due to<br>>> security reason... (class path, security grant...)<br>>> That's why a custom read me is provided otherwise, you just setup a<br>>> path where you want tomcat to write its data and that's it...<br>>><br>>> Seb<br>>><br>>><br>>> On Wed, Apr 18, 2012 at 12:52 PM, Sebastien Jourdain<br>>> wrote:<br>>>> How did you installed tomcat ?<br>>>><br>>>> Seb<br>>>><br>>>> On Wed, Apr 18, 2012 at 11:59 AM, Tuan Ha Tran<br>>>> wrote:<br>>>>> So the result is "No", always the same error.<br>>>>> Yes, another information : I didn't find any file named<br>>>>> /etc/init.d/tomcat6,<br>>>>> /var/lib/tomcat6/conf/policy.d/03catalina.policy,<br>>>>> /var/lib/tomcat6/conf/policy.d/04webapps.policy<br>>>>> so I went to conf folder in my apache-tomcat-7.0.26 and added all in<br>>>>> "catalina.policy"<br>>>>><br>>>>><br>>>>><br>>>>> ----- Original Message -----<br>>>>> From: Tuan Ha Tran<br>>>>> To: Sebastien Jourdain<br>>>>> Cc: vtkusers@vtk.org, Frederic Cervenansky<br>>>>><br>>>>> Sent: Wed, 18 Apr 2012 17:53:48 +0200 (CEST)<br>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class<br>>>>> vtkJPEGWriter and function SetInput<br>>>>><br>>>>> Thank you for your reponse.<br>>>>> As I said, I followed the tutorial in the<br>>>>> "http://www.paraview.org/Wiki/ParaViewWeb_with_system_tomcat_package"<br>>>>><br>>>>> cd ..<br>>>>> chown -R tomcat6 paraviewweb-work<br>>>>> chgrp -R tomcat6 paraviewweb-work<br>>>>><br>>>>><br>>>>> And, the right is set to tomcat (because there is an error "no user<br>>>>> named<br>>>>> tomcat6") (I don't know if we can use root)<br>>>>> However, I will try with root and we'll see.<br>>>>> Thank again Seb<br>>>>><br>>>>><br>>>>> ----- Original Message -----<br>>>>> From: Sebastien Jourdain<br>>>>> To: Tuan Ha Tran<br>>>>> Cc: vtkusers@vtk.org, Frederic Cervenansky<br>>>>><br>>>>> Sent: Wed, 18 Apr 2012 17:31:51 +0200 (CEST)<br>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class<br>>>>> vtkJPEGWriter and function SetInput<br>>>>><br>>>>> Hi Tuan,<br>>>>><br>>>>> Those your local tomcat that run under your user has the right to<br>>>>> write in that directory ?<br>>>>><br>>>>> /var/lib/tomcat6/paraviewweb-work/ ?<br>>>>><br>>>>> Seb<br>>>>><br>>>>> On Wed, Apr 18, 2012 at 11:10 AM, Tuan Ha Tran<br>>>>> wrote:<br>>>>>> Hi Seb,<br>>>>>> I have another thing to ask you (I'm sorry if this question is<br>>>>>> already<br>>>>>> asked, but I found my problem different)<br>>>>>> I use super build to build ParaViewWeb with all the settings by<br>>>>>> default.<br>>>>>> It's done.<br>>>>>><br>>>>>> Next :<br>>>>>> - I downloaded the apache-tomcat-7.0.26<br>>>>>> - Copied all the *.war generated by the SuperBuild into<br>>>>>> tomcat7.0.26's<br>>>>>> webapps folder<br>>>>>> - Copied pw-config.properties into apache-tomcat-7.0.26/lib<br>>>>>><br>>>>>> To run PWApps,<br>>>>>> - I started JMS broker d4apache Activemq, the latest version is<br>>>>>> 5.5.1<br>>>>>> (./activemq-admin start)<br>>>>>> - I started server Tomcat (./catalina.sh start)<br>>>>>><br>>>>>> Result: when I tried to open a session in PWApps @<br>>>>>> http://localhost:8080/PWApp/<br>>>>>> the error appeared : An error occured during the loading.<br>>>>>> org.hibernate.exception.GenericJDBCException: Cannot open connection<br>>>>>><br>>>>>><br>>>>>> It's absolutely a problem with hibernate, the connection with the<br>>>>>> database. But I don't quite understand how to fix this.<br>>>>>> Do we have to modify pw-config.properties? What do we have to do?<br>>>>>><br>>>>>> About the working directory, I followed the tutorial @<br>>>>>> http://www.paraview.org/Wiki/ParaViewWeb_with_system_tomcat_package.<br>>>>>> Thank you for your help.<br>>>>>><br>>>>>><br>>>>>> ********************************************************************<br>>>>>> ***************** pw-config.properties<br>>>>>> **********************************<br>>>>>> ********************************************************************<br>>>>>><br>>>>>> # Directory used to store application files<br>>>>>> pw.working.directory=/var/lib/tomcat6/paraviewweb-work/<br>>>>>><br>>>>>> # Logging level that should be used [DEBUG, INFO, WARNING, ERROR,<br>>>>>> CRITICAL]<br>>>>>> pw.logging.level=ERROR<br>>>>>><br>>>>>> # Do we enable logging [on, off, yes, no]<br>>>>>> paraview.logging=OFF<br>>>>>> pw.logging=ON<br>>>>>><br>>>>>> # Inactivity timeout for garbage collecting PWServer applications<br>>>>>> # time is given in minute<br>>>>>> pw.garbage.collector.timeout=5<br>>>>>><br>>>>>> # Administration page user credentials<br>>>>>> pw.admin.login=admin<br>>>>>> pw.admin.password=admin<br>>>>>><br>>>>>> # Total number of resources available<br>>>>>> pw.max.resources=5<br>>>>>><br>>>>>> # PWServer executable path settings<br>>>>>><br>>>>>><br>>>>>><br>>>>>> pw.executable.path.default=/var/lib/tomcat6/paraviewweb-work/bin/PWServer.sh<br>>>>>> #<br>>>>>><br>>>>>><br>>>>>><br>>>>>> pw.executable.path.parallel=/home/thtran/projects/ParaViewWeb/install-pw/bin/PWServer<br>>>>>> # pw.executable.path.manta=/home/seb/tmp/ParaWeb-work/exec/manta.sh<br>>>>>><br>>>>>> # pvserver executable path settings<br>>>>>> # pvserver.executable.path.demo=/home/seb/tmp/ParaWeb-work/exec/demo.sh<br>>>>>><br>>>>>> # Plugin directory settings<br>>>>>> pw.plugins.default=/var/lib/tomcat6/paraviewweb-work/plugins<br>>>>>> # pw.plugins.parallel=/usr/local/PVW/PWSer_WD/plugins<br>>>>>> # pw.plugins.manta=/usr/local/PVW/PWSer_WD/plugins<br>>>>>><br>>>>>> # Resource consumption definition<br>>>>>> pw.resource.consumption.default=1<br>>>>>> # pw.resource.consumption.parallel=4<br>>>>>> # pw.resource.consumption.manta=2<br>>>>>><br>>>>>> # Optional thirdpart properties<br>>>>>> pw.gwt-app.data=/var/lib/tomcat6/paraviewweb-work/data<br>>>>>> pw.gwt-app.states=/var/lib/tomcat6/paraviewweb-work/states<br>>>>>> # pw.gwt-app.webgl=/usr/local/PVW/PWSer_WD/webgl<br>>>>>> pw.gwt-app.confs=default<br>>>>>> # Optional PWApp upload properties<br>>>>>> # - size in MegaBytes<br>>>>>> # - timeout in minute<br>>>>>> # - types provides the set of extension allowed<br>>>>>> pw.gwt-app.upload.size=10<br>>>>>> pw.gwt-app.upload.timeout=2<br>>>>>> pw.gwt-app.upload.types=vtp:vtk<br>>>>>><br>>>>>> # Remote server command line<br>>>>>> # * Tomcat will call any script in the following directory and will<br>>>>>> execute<br>>>>>> the<br>>>>>> # following command line where portnumber is an available<br>>>>>> portnumber:<br>>>>>> # > fullScriptPath username password<br>>>>>> # * Documentation on How to start a pvserver<br>>>>>> # - http://www.cmake.org/Wiki/Setting_up_a_ParaView_Server<br>>>>>> # pw.remote.settings=/usr/local/PVW/PWSer_WD/remote-settings<br>>>>>><br>>>>>> pw.remote.log.dir=/var/lib/tomcat6/paraviewweb-work/logs<br>>>>>><br>>>>>> # Optional PWStateApp working directory<br>>>>>><br>>>>>><br>>>>>><br>>>>>> pw.state.working.directory=/var/lib/tomcat6/paraviewweb-work/states-workdir<br>>>>>><br>>>>>> ***********************************************************<br>>>>>> ************ end of pw-config.properties*************************<br>>>>>> ***********************************************************<br>>>>>><br>>>>>><br>>>>>> ----- Original Message -----<br>>>>>> From: Sebastien Jourdain<br>>>>>> To: Tuan Ha Tran<br>>>>>> Cc: vtkusers@vtk.org<br>>>>>> Sent: Fri, 06 Apr 2012 19:33:40 +0200 (CEST)<br>>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class<br>>>>>> vtkJPEGWriter and function SetInput<br>>>>>><br>>>>>> You should use ParaView 3.14.<br>>>>>><br>>>>>> I'm sure you are doing something wrong that I'm not aware of, because<br>>>>>> I'm using ParaViewWeb with ParaView 3.14 myself. So if I managed to<br>>>>>> build it, you should too, unless we are doing something different.<br>>>>>><br>>>>>> What did you do with the SuperBuild ? Did it manage to fetch ParaView<br>>>>>> and ParaViewWeb and start building those as well as their dependency<br>>>>>> like apr ?<br>>>>>><br>>>>>> Seb<br>>>>>><br>>>>>> On Fri, Apr 6, 2012 at 11:04 AM, Tuan Ha Tran wrote:<br>>>>>>> Hi,<br>>>>>>> I tried your solution with SuperBuild but the problem still exist.<br>>>>>>> I wonder if I should reuse ParaView 3.10.1?<br>>>>>>><br>>>>>>> Thank you Seb<br>>>>>>><br>>>>>>> ----- Original Message -----<br>>>>>>> From: "Sebastien Jourdain"<br>>>>>>> To: "Tuan Ha Tran"<br>>>>>>> Cc: vtkusers@vtk.org<br>>>>>>> Sent: Friday, April 6, 2012 4:53:43 PM<br>>>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class<br>>>>>>> vtkJPEGWriter and function SetInput<br>>>>>>><br>>>>>>> Hi Tuan Ha Tran,<br>>>>>>><br>>>>>>> The documentation was written when ParaView 3.10 was out and that<br>>>>>>> version was lacking some fixed that were on git/master at that time<br>>>>>>> but I should definitely update the documentation to recommend to use<br>>>>>>> ParaView 3.14 and not git/master.<br>>>>>>> In fact, two weeks ago the latest changes in VTK that breaks its<br>>>>>>> backward compatibility went into ParaView and for which I didn't get<br>>>>>>> the time to update ParaViewWeb.<br>>>>>>><br>>>>>>> Regarding your ParaView build issue, I'm wondering what you did... But<br>>>>>>> anyway, if you want to ease the build process, you should definitely<br>>>>>>> try to use the SuperBuild package so every third party get<br>>>>>>> automatically compiled for you with the correct arguments and options.<br>>>>>>><br>>>>>>> http://www.paraview.org/Wiki/ParaViewWeb_SuperBuild<br>>>>>>><br>>>>>>> Seb<br>>>>>>><br>>>>>>> On Fri, Apr 6, 2012 at 9:25 AM, Tuan Ha Tran wrote:<br>>>>>>>> Seb,<br>>>>>>>> Thank you for your reply. I just followed the instructions in the<br>>>>>>>> ParaViewWeb site.<br>>>>>>>> - Mkdir ParaViewWeb<br>>>>>>>> - Clone git from it address<br>>>>>>>><br>>>>>>>> I used the Ccmake command (in build-pw) for the source in the<br>>>>>>>> ParaViewWeb<br>>>>>>>> directory (build-pw is a sub-directory of ParaViewWeb). I compiled<br>>>>>>>> and<br>>>>>>>> then<br>>>>>>>> the errors.<br>>>>>>>> I used the latest release (3.14) of ParaView.<br>>>>>>>><br>>>>>>>> there was a problem with ParaView, it is the problem of share<br>>>>>>>> library.<br>>>>>>>> but I resolved this by adding -fPIC in the CFLAGS and CXXFLAGS, I<br>>>>>>>> don't<br>>>>>>>> know<br>>>>>>>> if that is the problem.<br>>>>>>>><br>>>>>>>> so, the vtkJPEGWriter is in the ParaView folder?<br>>>>>>>><br>>>>>>>> Thank you once more.<br>>>>>>>><br>>>>>>>> ----- Original Message -----<br>>>>>>>> From: "Sebastien Jourdain"<br>>>>>>>> To: "Tuan Ha Tran"<br>>>>>>>> Cc: vtkusers@vtk.org<br>>>>>>>> Sent: Friday, April 6, 2012 3:11:17 PM<br>>>>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class<br>>>>>>>> vtkJPEGWriter and function SetInput<br>>>>>>>><br>>>>>>>> Hi Tuan Ha Tran,<br>>>>>>>><br>>>>>>>> how did you build ParaViewWeb ? Did you do from the super build or<br>>>>>>>> from the main repository ?<br>>>>>>>> ParaViewWeb basically rely on ParaView that embed VTK which embed<br>>>>>>>> that<br>>>>>>>> vtkJPEGWriter.cxx<br>>>>>>>> Which version of ParaView did you used ? The latest release (3.14) is<br>>>>>>>> known to work...<br>>>>>>>><br>>>>>>>> Seb<br>>>>>>>><br>>>>>>>><br>>>>>>>> On Fri, Apr 6, 2012 at 5:12 AM, Tuan Ha Tran wrote:<br>>>>>>>>> Hi everybody,<br>>>>>>>>> I have a problem when trying to compile ParaViewWeb<br>>>>>>>>> This is the detail of my problem<br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>> ***********************************************************************<br>>>>>>>>> %] Built target ParaWebPlugin<br>>>>>>>>> Scanning dependencies of target PWServer<br>>>>>>>>> [ 30%] Building CXX object<br>>>>>>>>> ParaViewAdapter/CMakeFiles/PWServer.dir/vtkPWProcessingEngine.cxx.o<br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>> /home/thtran/projects/ParaViewWeb/ParaViewAdapter/vtkPWProcessingEngine.cxx:<br>>>>>>>>> In member function ‘double<br>>>>>>>>> vtkPWProcessingEngine::ProcessAndSendImage(const<br>>>>>>>>> char*, vtkImageData*)’:<br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>> /home/thtran/projects/ParaViewWeb/ParaViewAdapter/vtkPWProcessingEngine.cxx:439:19:<br>>>>>>>>> error: ‘class vtkJPEGWriter’ has no member named ‘SetInput’<br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>> /home/thtran/projects/ParaViewWeb/ParaViewAdapter/vtkPWProcessingEngine.cxx:448:18:<br>>>>>>>>> error: ‘class vtkPNGWriter’ has no member named ‘SetInput’<br>>>>>>>>> make[2]: ***<br>>>>>>>>><br>>>>>>>>> [ParaViewAdapter/CMakeFiles/PWServer.dir/vtkPWProcessingEngine.cxx.o]<br>>>>>>>>> Error<br>>>>>>>>> 1<br>>>>>>>>> make[1]: *** [ParaViewAdapter/CMakeFiles/PWServer.dir/all] Error 2<br>>>>>>>>> make: *** [all] Error 2<br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>> *************************************************************************<br>>>>>>>>><br>>>>>>>>> When I went to the "wtkPWProcesingEngine.cxx", I found out that<br>>>>>>>>> wtkJPEGWriter is included by #include vtkJPEGWriter.h". But I<br>>>>>>>>> couldn't<br>>>>>>>>> find<br>>>>>>>>> wtkJPEGWriter.h neither vtkJPEGWriter.cxx.<br>>>>>>>>><br>>>>>>>>> When I tried to look for vtkJPEGWriter.cxx by Google, I found this<br>>>>>>>>> file<br>>>>>>>>> but I couldn't find any function "SetInput".<br>>>>>>>>><br>>>>>>>>> When I tried to deactivate the line where SetInput is located,<br>>>>>>>>> ParaViewWeb compile, but I think there are some problems with it.<br>>>>>>>>><br>>>>>>>>> I want to know if someone has the same problem? How to fix that?<br>>>>>>>>> Thank you all.<br>>>>>>>>><br>>>>>>>>> Ha<br>>>>>>>>><br>>>>>>>>><br>>>>>>>>><br>>>>>>>>> _______________________________________________<br>>>>>>>>> Powered by www.kitware.com<br>>>>>>>>><br>>>>>>>>> Visit other Kitware open-source projects at<br>>>>>>>>> http://www.kitware.com/opensource/opensource.html<br>>>>>>>>><br>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at:<br>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ<br>>>>>>>>><br>>>>>>>>> Follow this link to subscribe/unsubscribe:<br>>>>>>>>> http://www.vtk.org/mailman/listinfo/vtkusers<br>>>>>><br>>>>><br>>><br>><br><br></frederic.cervenansky@creatis.insa-lyon.fr></tuan-ha.tran@insa-lyon.fr></sebastien.jourdain@kitware.com></tuan-ha.tran@insa-lyon.fr></body></html>