Bug 1062466 (TEIIDDSHB-5)

Summary: Starting bean org.jboss.dashboard.database.hibernate.HibernateInitializer throws an error during boot up process when JDV is not coneected to Internet
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Hisao Furuichi <hfuruich>
Component: Dashboard BuilderAssignee: jolee
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: atangrin, dsteigne, felias, rlucente, rwagner, vhalbert
Target Milestone: ---   
Target Release: One-off release   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1113109 (view as bug list) Environment:
Last Closed: 2014-09-18 13:37:40 UTC Type: Support Patch
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1061920    
Attachments:
Description Flags
Log with the exception none

Description Hisao Furuichi 2014-02-07 00:49:16 UTC
Description of problem:
Starting bean org.jboss.dashboard.database.hibernate.HibernateInitializer throws an error during boot up process when JDV is not coneected to Internet. If JDV is connected to Internet, error is not appeared.

Steps to Reproduce:
1. disconnect a machine from internet
2. start JDV

Actual results:
Following error message is appeared in a log file.

~~~
20:52:48,530 ERROR [org.jboss.dashboard.annotation.StartableProcessor] (ServerService Thread Pool -- 56) Error starting bean org.jboss.dashboard.database.hibernate.HibernateInitializer$Proxy$_$$_WeldClientProxy: org.hibernate.HibernateException: Could not parse configuration: /home/hfuruich/product/enterprise/jdv-600/jboss-eap-6.1/standalone/deployments/teiid-dashboard-builder.war/./WEB-INF/etc/hibernate.cfg.xml
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2035) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
	at org.hibernate.cfg.Configuration.configure(Configuration.java:2005) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
	at org.jboss.dashboard.database.hibernate.HibernateInitializer.start(HibernateInitializer.java:113) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.database.hibernate.HibernateInitializer$Proxy$_$$_WeldClientProxy.start(HibernateInitializer$Proxy$_$$_WeldClientProxy.java) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.annotation.StartableProcessor.wakeUpStartableBeans(StartableProcessor.java:48) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.Application.start(Application.java:104) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.Application$Proxy$_$$_WeldClientProxy.start(Application$Proxy$_$$_WeldClientProxy.java) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.ui.controller.ControllerServlet$1.doWork(ControllerServlet.java:73) [dashboard-ui-core-6.0.0-redhat-8.jar:]
~~~

Expected results:
Boot up without ERROR

Additional info:
If we fix system-id in $JBOSS_HOME/standalone/deployments/teiid-dashboard-builder.war/WEB-INF/etc/hibernate.cfg.xml, it works correctly.

[Before]
 <!DOCTYPE hibernate-configuration
        PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
        "http://www.jboss.org/dtd/hibernate/hibernate-configuration-3.0.dtd">

[After]
<!DOCTYPE hibernate-configuration
        PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

Comment 2 Van Halbert 2014-02-09 21:47:24 UTC
*** Bug 1061920 has been marked as a duplicate of this bug. ***

Comment 3 jolee 2014-02-19 19:42:28 UTC
https://github.com/teiid/teiid-dashboard/tree/1.0.x

commit a07e1064fbcd92f8fb8731013c7280e6d0c1c315
Author: vhalbert <vhalbert>
Date:   Mon Feb 10 16:26:58 2014 -0600

    TEIIDDSHB-5 update hibernate DTD location that will fix being able to run when server isn't connected to internet

Comment 4 jolee 2014-02-19 20:12:37 UTC
(In reply to jolee from comment #3)
> https://github.com/teiid/teiid-dashboard/tree/1.0.x
> 
commit 398a30461b806006b6005a35ffc6c8f902d54b9a
Author: jolee <jolee>
Date:   Wed Feb 19 14:08:44 2014 -0600

    TEIIDDSHB-5 (import statement corrected) update hibernate DTD location that will fix being able to run when server is not connected to internet

Comment 5 JBoss JIRA Server 2014-02-21 21:34:52 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-5 to Resolved

Comment 6 Rich Lucente 2014-06-16 17:30:45 UTC
After modifying dtd location by hand and restarting server, as described in solutions article https://access.redhat.com/site/solutions/715143, still get error:

13:26:55,038 ERROR [org.jboss.dashboard.annotation.StartableProcessor] (ServerService Thread Pool -- 69) Error starting bean org.jboss.dashboard.database.hibernate.HibernateInitializer$Proxy$_$$_WeldClientProxy: org.hibernate.HibernateException: Could not parse configuration: /home/rlucente/demo/dv-6/jboss-eap-6.1/standalone/deployments/teiid-dashboard-builder.war/./WEB-INF/etc/hibernate.cfg.xml
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2035) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
	at org.hibernate.cfg.Configuration.configure(Configuration.java:2005) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
	at org.jboss.dashboard.database.hibernate.HibernateInitializer.start(HibernateInitializer.java:113) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.database.hibernate.HibernateInitializer$Proxy$_$$_WeldClientProxy.start(HibernateInitializer$Proxy$_$$_WeldClientProxy.java) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.annotation.StartableProcessor.wakeUpStartableBeans(StartableProcessor.java:48) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.Application.start(Application.java:104) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.Application$Proxy$_$$_WeldClientProxy.start(Application$Proxy$_$$_WeldClientProxy.java) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.ui.controller.ControllerServlet$1.doWork(ControllerServlet.java:73) [dashboard-ui-core-6.0.0-redhat-8.jar:]
	at org.jboss.dashboard.factory.Factory.runWork(Factory.java:295) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.factory.Factory.doWork(Factory.java:321) [dashboard-commons-6.0.0-redhat-8.jar:6.0.0-redhat-8]
	at org.jboss.dashboard.ui.controller.ControllerServlet.init(ControllerServlet.java:70) [dashboard-ui-core-6.0.0-redhat-8.jar:]
	at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3591) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3798) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
	at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
	at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
	at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_55]
	at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_55]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.dom4j.DocumentException: http://hibernate.org/dtd/hibernate/hibernate-configuration-3.0.dtd Nested exception: http://hibernate.org/dtd/hibernate/hibernate-configuration-3.0.dtd
	at org.dom4j.io.SAXReader.read(SAXReader.java:484)
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2027) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
	... 24 more

Comment 7 Rich Lucente 2014-06-16 17:33:17 UTC
Please disregard.  Fat fingered the DTD and had an additional /hibernate/ in URL.  Chalk up to stress of being on site with customer ;)

Comment 8 Filip Elias 2014-06-24 14:57:33 UTC
It seems that the bug is not fixed. I can see an exception[1] during startup, but the exception is different from the one above. Whole exception is in the attachment. The exception is thrown only when the server is started offline.


[1] Error stack trace=org.h2.jdbc.JdbcSQLException: NULL not allowed for column "NODE_ADDRESS"; SQL statement:
insert into dashb_cluster_node (node_address, startup_time, node_status, id_node) values (?, ?, ?, ?) [23502-168]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
	at org.h2.message.DbException.get(DbException.java:169)
	at org.h2.message.DbException.get(DbException.java:146)
	at org.h2.table.Column.validateConvertUpdateSequence(Column.java:293)
	at org.h2.table.Table.validateConvertUpdateSequence(Table.java:689)
	at org.h2.command.dml.Insert.insertRows(Insert.java:120)
	at org.h2.command.dml.Insert.update(Insert.java:84)
	at org.h2.command.CommandContainer.update(CommandContainer.java:75)

Comment 9 Filip Elias 2014-06-24 14:58:36 UTC
Created attachment 911781 [details]
Log with the exception

Comment 13 JBoss JIRA Server 2015-04-01 21:53:38 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-5 to Closed

Comment 14 JBoss JIRA Server 2015-09-04 12:40:37 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-5 to Reopened

Comment 15 JBoss JIRA Server 2015-09-04 20:48:11 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-5 to Closed