voiceip/oreka

Debian problem connect to datebase OrkWeb ContextInitialized(): Error configuring Hibernate: Error accessing stax stream

mrozisty opened this issue · 11 comments

2020-12-22 14:51:16,726 INFO [localhost-startStop-2] orkweb stopping ...
2020-12-22 14:51:16,726 INFO [localhost-startStop-2] ========================================
2020-12-22 14:51:20,155 INFO [localhost-startStop-1] OrkWeb ContextInitialized(): log4jConfigFile is /etc/oreka//logging.xml
2020-12-22 14:51:20,159 INFO [localhost-startStop-1] ========================================
2020-12-22 14:51:20,159 INFO [localhost-startStop-1] OrkWeb starting ...
2020-12-22 14:51:20,159 INFO [localhost-startStop-1] OrkWeb ContextInitialized(): HibernateConfigFile is database.hbm.xml
2020-12-22 14:51:20,178 DEBUG logging [localhost-startStop-1] Logging Provider: org.jboss.logging.Log4j2LoggerProvider
2020-12-22 14:51:20,321 ERROR [localhost-startStop-1] OrkWeb ContextInitialized(): Error configuring Hibernate: Error accessing stax stream
2020-12-22 14:51:20,322 DEBUG [localhost-startStop-1] OrkWeb ContextInitialized(): get Tomcat Home...
2020-12-22 14:51:20,322 INFO [localhost-startStop-1] OrkWeb ContextInitialized(): TomcatHome is set to /var/lib/tomcat8
2020-12-22 14:51:20,323 DEBUG TomcatServerXMLParser [localhost-startStop-1] parseServerXML() - parsing Tomcat server.xml file, path: /var/lib/tomcat8/conf/server.xml
2020-12-22 14:51:20,325 DEBUG TomcatServerXMLParser [localhost-startStop-1] parseServerXML() - Service found=Service
2020-12-22 14:51:20,325 DEBUG TomcatServerXMLParser [localhost-startStop-1] Service attribute index - 0 - name: connectionTimeout - value: 20000
2020-12-22 14:51:20,325 DEBUG TomcatServerXMLParser [localhost-startStop-1] Service attribute index - 1 - name: port - value: 8080
2020-12-22 14:51:20,326 DEBUG TomcatServerXMLParser [localhost-startStop-1] Service attribute index - 2 - name: protocol - value: HTTP/1.1
2020-12-22 14:51:20,326 DEBUG TomcatServerXMLParser [localhost-startStop-1] Service attribute index - 3 - name: redirectPort - value: 8443
2020-12-22 14:51:20,326 DEBUG TomcatServerXMLParser [localhost-startStop-1] parseServerXML() serverTcpPort=8080 scheme=null audioContextPath=
2020-12-22 14:51:20,326 INFO [localhost-startStop-1] OrkWeb started successfully.
2020-12-22 14:51:20,326 INFO [localhost-startStop-1] ----------------------------------------
2020-12-22 14:51:20,817 INFO ApplicationServlet [localhost-startStop-1] Initialized application servlet 'orkweb': 237 millis to create HiveMind Registry, 459 millis overall.

Please help.

Mysql working:
root@oreka:/etc# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.32 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


System Debian 9 64 bit.

Config folder
/etc/oreka/

root@oreka:/etc/oreka# pwd
/etc/oreka
root@oreka:/etc/oreka# ls
database.hbm.xml logging.properties logging.xml
root@oreka:/etc/oreka#

org.hibernate.dialect.MySQL55Dialect 256 com.mysql.cj.jdbc.Driver jdbc:mysql://localhost/oreka?useSSL=false ******** root
<property name="hibernate.hbm2ddl.auto">update</property> <!-- update, create, create-drop -->
<property name="hibernate.show_sql">false</property>

<property name="hibernate.jdbc.use_scrollable_resultset">true</property>
<property name="hibernate.max_fetch_depth">1</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
</session-factory>

Double-check your config file. A quick google search leads to this stackoverflow issue which says that HibernateException: Error accessing stax stream happens when there is issue with the hibernate xml.

Ok install good, orkaudio orktrack and orkweb running.
I have problem, When he tries to play the recording on web:
Click play = debug console chrome:
GET http://10.10.100.20:8080/orkweb/stream/2020/12/23/10/20201223_103522_VYIQ.wav 500
app:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.

Type Exception Report

Message /var/log/orkaudio/audio/2020/12/23/10/20201223_103522_VYIQ.wav (Permission denied)

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

On link:
Exception

java.io.FileNotFoundException: /var/log/orkaudio/audio/2020/12/23/10/20201223_103522_VYIQ.wav (Permission denied)
java.io.FileInputStream.open0(Native Method)
java.io.FileInputStream.open(FileInputStream.java:195)
java.io.FileInputStream.(FileInputStream.java:138)
java.io.FileInputStream.(FileInputStream.java:93)
net.sf.oreka.orkweb.TapeStream.doGet(TapeStream.java:42)
javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

the file is on the server. Please help.

root@oreka:/var/log/orkaudio/audio/2020/12/23/09# ls -la
total 424
drwxr-xr-x 2 tomcat8 tomcat8 4096 Dec 23 09:47 .
drwxr-xr-x 5 tomcat8 tomcat8 4096 Dec 23 11:07 ..
-rw-r--r-- 1 tomcat8 tomcat8 74304 Dec 23 09:35 20201223_093500_QSPX.mcf
-rw-r--r-- 1 tomcat8 tomcat8 74304 Dec 23 09:35 20201223_093500_QSPY.mcf
-rw-r--r-- 1 tomcat8 tomcat8 49916 Dec 23 09:41 20201223_094109_VYGC.wav
-rw-r--r-- 1 tomcat8 tomcat8 50046 Dec 23 09:41 20201223_094109_VYGE.wav
-rw-r--r-- 1 tomcat8 tomcat8 55570 Dec 23 09:43 20201223_094241_VYGF.wav
-rw-r--r-- 1 tomcat8 tomcat8 55570 Dec 23 09:43 20201223_094241_VYGG.wav
-rw-r--r-- 1 tomcat8 tomcat8 23656 Dec 23 09:47 20201223_094656_VYGL.wav
-rw-r--r-- 1 tomcat8 tomcat8 23720 Dec 23 09:47 20201223_094656_VYGN.wav

Hi @mrozisty

I don't see the file 20201223_103522_VYIQ.wav in the directory listing that you shared root@oreka:/var/log/orkaudio/audio/2020/12/23/09# ls -la

By default calls that are under 3 seconds are discarded, which is controlled by config parameter. Please update your orkaudio config based on your need.

Cannot login as admin/admin,How to check?

@linlin2018 Try checking what the error is. Usually, if your database connection fails, login to UI would fail also. Going through the logs will give you a better idea of what the reason is.

@kingster i have same issue but can't find any logs related to it.
I am using mysql 8 server can't find the issue as admin|admin doesn't work.
I am quite new to this so please help

The application logs inside tomcat & /var/log/oreka would have the required details of the error. Please try see what the error is, IMO most probably it would be incorrect password for MySQL.

hey @kingster,

So I saw the logs and the error is regarding HibernateException: Error accessing stax stream but I can't find any reference to that error the StackOverflow link is not helpful at all as even after implementing the solution the same error remains and database.hbm.xml file is same as provided in the source code(with changed username and password).

I don't know much about Java, so I have no idea why this issue arises.

The log file does not have any error regarding MySQL so don't think the error is related to that.

I am using Ubuntu 20.04 tomcat8 with Java 8 and MySQL 5.5