Bug 1044486 - ModeShape - Inconsistent or invalid Node Types followed by NullPointerException during server start-up (MS-SQL)
Summary: ModeShape - Inconsistent or invalid Node Types followed by NullPointerExcept...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Configuration
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: CR1
: 6.0.0
Assignee: Steve Johnson
QA Contact: Stefan Bunciak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 12:19 UTC by Steve Johnson
Modified: 2014-02-06 15:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
server start-up log (174.26 KB, text/x-log)
2013-12-18 12:19 UTC, Steve Johnson
no flags Details
installation log (205.62 KB, text/plain)
2013-12-18 12:20 UTC, Steve Johnson
no flags Details
standalone config (SQL Server 2008) (29.74 KB, text/xml)
2013-12-18 12:21 UTC, Steve Johnson
no flags Details

Description Steve Johnson 2013-12-18 12:19:21 UTC
Created attachment 838314 [details]
server start-up log

Description of problem:
Getting a NullPointerException stack trace during server startup. See attached server.log

^[[0m^[[31m11:39:52,277 ERROR [org.modeshape.jcr.RepositoryNodeTypeManager] (http-localhost/127.0.0.1:8080-2) Node types were read from the system content, and appear to be inconsistent or invalid: sramp: java.lang.NullPointerException


Version-Release number of selected component (if applicable):
modeshape-jcr-3.3.6.GA-redhat-2.jar:3.3.6.GA-redhat-2

How reproducible:
Consistently fails with same issue.

Steps to Reproduce:
1. Install jboss-fsw-installer-6.0.0.ER7-redhat-2.jar
2. Accept default components
3. Configure JDBC for SQL Server 2008 Database
4. After installation.  Start server with jboss-eap-6.1/bin/standalone.sh

Actual results:

See attached logs

Expected results:


Additional info:

Comment 1 Steve Johnson 2013-12-18 12:20:31 UTC
Created attachment 838315 [details]
installation log

Comment 3 Steve Johnson 2013-12-18 12:21:18 UTC
Created attachment 838316 [details]
standalone config (SQL Server 2008)

Comment 5 Steve Johnson 2013-12-18 16:16:57 UTC
To create a SQL Server 2008 rdbms test account:

Browse to url:
http://dballocator.mw.lab.eng.bos.redhat.com:8080/Allocator/AllocatorServlet?operation=alloc&label=mssql2008R2&requestee=modeshape-test&expiry=150

The returned page gives database connection credentials.

This will create test account.  To view the status of your test account and to Erase content see:

http://dballocator.mw.lab.eng.bos.redhat.com:8080/Allocator/AllocatorServlet?operation=report

Note: The database accounts tend not to be clear of tables when they get reallocated.  So before an install, be sure to "Erase" the account before installation.

Comment 6 Horia Chiorean 2013-12-19 09:28:10 UTC
I tried looking at this locally, but I cannot reproduce the issue.

I'm have several other issues:

a) the installer does not install a MS-SQL-2008 driver. I had to manually install /modules/system/layers/base/com/microsoft/sqlserver/main/sqljdbc4.jar. This may or may not be the driver you're testing with; that may have relevance 

b) after installing the above, using the configuration file that is attached to this issue on the dballo00 account, when starting up the server I always get:

11:23:52,948 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 54) MSC000001: Failed to start service jboss.persistenceunit."gadget-web.war#gadget-core": org.jboss.msc.service.StartException in service jboss.persistenceunit."gadget-web.war#gadget-core": javax.persistence.PersistenceException: [PersistenceUnit: gadget-core] Unable to build EntityManagerFactory
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: gadget-core] Unable to build EntityManagerFactory
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:930)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:92)
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)
        ... 4 more
Caused by: org.hibernate.HibernateException: Missing table: GS_APP_DATA
        at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1275)
        at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:508)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1762)
        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:920)

And I cannot move past this point.

Comment 7 Horia Chiorean 2013-12-19 09:33:54 UTC
Also, with the exception of the above errors the server does start up and I'm able for example to log into http://localhost:8080/s-ramp-ui/

Comment 8 Horia Chiorean 2013-12-19 12:21:18 UTC
@stejohns: I was able to reproduce the issue locally using the MS Driver version 3.0.1301.101 and when installing selecting only S-RAMP (the rest of the components are just clutter for this scenario).

The server started up fine the 1st time & I was able to upload an artifact into S-RAMP (via http://localhost:8080/s-ramp-ui). However, upon restart - on a non-clean DB - I was able to reproduce the exception.

As far as I can tell this is caused by the fact that ISPN is configured to use VARCHAR via 

<id-column name="id" type="VARCHAR(500)"/>. 

However, afaik on Ms-SQL Server 2008 this means that the server expects the UCS-2 encoding. However, ModeShape & ISPN use UTF, so changing the column to:

<id-column name="id" type="NVARCHAR(500)"/> 

fixed the issue for me locally.

Can you please validate this fix on your machine (make sure you start with a fresh DB) and if it is correct, this bug needs to be moved to "installer" as it is a configuration issue.

Comment 9 Steve Johnson 2013-12-19 14:57:01 UTC
Fix confirmed.  I have a clean server startup.  The CLI configuration for sramp will be updated to reflect this change in fsw.

Comment 11 Pavol Srna 2014-01-23 17:50:21 UTC
Verified in CR1.


Note You need to log in before you can comment on or make changes to this bug.