turns out this is a ubuntu server display issue. After adding -Y in ssh command when connecting to ubuntu server it works! In general this commands enables X11 Display in ubuntu server. The link below is helpful: https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely https://uisapp2.iu.edu/confluence-prd/pages/viewpage.action?pageId=280461906
在 2019年6月10日星期一 UTC-4下午3:18:16,Jingjing Lin写道: > > The above error seems to be solved, now the problem I have is: > > Starting sh -c "trap 'kill %1' 0 1 2 ; java -Xms1024m -Xmx2048m -jar > /home/ubuntu/leptonica-1.78.0/tesserac\ > > t/java/ScrollView.jar & wait" > > Socket started on port 8461 > > Created window Convolve of size 1997, 580 > > Client connected > > Created window ConvNL of size 1305, 656 > > Exception in thread "main" java.awt.HeadlessException: > > No X11 DISPLAY variable was set, but this program performed an operation > which requires it. > > at > java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204) > > at java.awt.Window.<init>(Window.java:536) > > at java.awt.Frame.<init>(Frame.java:420) > > at javax.swing.JFrame.<init>(JFrame.java:233) > > at com.google.scrollview.ui.SVWindow.<init>(SVWindow.java:204) > > at > com.google.scrollview.ScrollView.processInput(ScrollView.java:344) > > at com.google.scrollview.ScrollView.IOLoop(ScrollView.java:124) > > at com.google.scrollview.ScrollView.main(ScrollView.java:401) > > sh: 1: kill: No such process > > > Created window Lfys48 of size 530, 2000 > > 在 2019年6月10日星期一 UTC-4下午2:56:38,Jingjing Lin写道: >> >> I was going through the training turotial below >> https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract-4.00 >> >> In part training from scratch, I copied the command in the link above and >> ran: >> >> mkdir -p ~/tesstutorial/engoutput >> lstmtraining --debug_interval 100 \ >> --traineddata ~/tesstutorial/engtrain/eng/eng.traineddata \ >> --net_spec '[1,36,0,1 Ct3,3,16 Mp3,3 Lfys48 Lfx96 Lrx96 Lfx256 O1c111]' \ >> --model_output ~/tesstutorial/engoutput/base --learning_rate 20e-4 \ >> --train_listfile ~/tesstutorial/engtrain/eng.training_files.txt \ >> --eval_listfile ~/tesstutorial/engeval/eng.training_files.txt \ >> --max_iterations 5000 &>~/tesstutorial/engoutput/basetrain.log >> >> but it ends very quickly and in the log file I found something: >> >> Exception in thread "main" java.lang.NoClassDefFoundError: >> org/piccolo2d/PNode >> >> at >> com.google.scrollview.ScrollView.processInput(ScrollView.java:340) >> >> at com.google.scrollview.ScrollView.IOLoop(ScrollView.java:124) >> >> at com.google.scrollview.ScrollView.main(ScrollView.java:401) >> >> Caused by: java.lang.ClassNotFoundException: org.piccolo2d.PNode >> >> at java.net.URLClassLoader.findClass(URLClassLoader.java:382) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >> >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >> >> ... 3 more >> >> sh: 1: kill: No such process >> >> >> Created window ConvNL of size 1305, 656 >> >> Created window Lfys48 of size 530, 2000 >> >> >> >> >> What's the problem here? >> >> My version is >> >> >> tesseract 5.0.0-alpha-152-g17c8a >> >> leptonica-1.78.0 >> >> libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : >> zlib 1.2.8 >> >> Found AVX2 >> >> Found AVX >> >> Found SSE >> >> >> Thanks for the help! >> >> >> Jingjing >> >> >> >> -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/c9cfc032-691b-456e-9033-59d394069eea%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

