Bug 1246153
| Summary: | MongoDB metadata import fails with NPE | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Data Virtualization 6 | Reporter: | Andrej Smigala <asmigala> |
| Component: | Teiid, Documentation | Assignee: | David Le Sage <dlesage> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Filip Elias <felias> |
| Severity: | high | Docs Contact: | David Le Sage <dlesage> |
| Priority: | high | ||
| Version: | 6.2.0 | CC: | asmigala, atangrin, dlesage, felias, jstastny, lfabriko, vhalbert |
| Target Milestone: | ER1 | Keywords: | Documentation |
| Target Release: | 6.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Release Note | |
| Doc Text: |
If a mongodb user has insufficient permissions to import metadata, the importation process will fail. The user needs adequate permissions to access the mongodb database. If there is a collection which cannot be accessed by the user, metadata import will fail. Currently, there is no way to exclude those tables from import.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-08-11 05:04:59 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Ramesh Reddy <rareddy> updated the status of jira TEIID-3589 to Resolved This issue is not fixed in DV 6.2 ER4. Any details as to what you are seeing, maybe any exceptions in the server log? The exception is in the first comment. Van Halbert <vhalbert> updated the status of jira TEIID-3589 to Reopened Ramesh Reddy <rareddy> updated the status of jira TEIID-3589 to Resolved The vdb deployment now fails with the following errror:
14:26:08,810 WARN [org.teiid.RUNTIME] (teiid-async-threads - 3) TEIID50036 VDB mongo.1 model "importVDBSrcModel" metadata failed to load. Reason:not authorized for query on bqt.system.users: com.mongodb.MongoEx
ception: not authorized for query on bqt.system.users
at com.mongodb.MongoException.parse(MongoException.java:82)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:292)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)
at com.mongodb.DBCursor._check(DBCursor.java:368)
at com.mongodb.DBCursor._hasNext(DBCursor.java:459)
at com.mongodb.DBCursor.hasNext(DBCursor.java:484)
at org.teiid.translator.mongodb.MongoDBMetadataProcessor.process(MongoDBMetadataProcessor.java:58)
at org.teiid.translator.mongodb.MongoDBMetadataProcessor.process(MongoDBMetadataProcessor.java:39)
at org.teiid.translator.ExecutionFactory.getMetadata(ExecutionFactory.java:935) [teiid-api-8.7.1.6_2-redhat-5.jar:8.7.1.6_2-redhat-5]
at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:73) [teiid-engine-8.7.1.6_2-redhat-5.jar:8.7.1.6_2-redhat-5]
at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.7.1.6_2-redhat-5.jar:8.7.1.6_2-redhat-5]
at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.7.1.6_2-redhat-5.jar:8.7.1.6_2-redhat-5]
at org.teiid.jboss.VDBService$7.run(VDBService.java:442) [teiid-jboss-integration-8.7.1.6_2-redhat-5.jar:8.7.1.6_2-redhat-5]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
The user dv does not have access to the system tables, but there is no way to exclude those tables from the import (like with the JDBC importer).
Van Halbert <vhalbert> updated the status of jira TEIID-3589 to Reopened Ramesh Reddy <rareddy> updated the status of jira TEIID-3589 to Resolved As indicated by the engineers, this needs to be tested on DV 6.3 to determine the status of this BZ. Steven Hawkins <shawkins> updated the status of jira TEIID-3589 to Closed Ramesh Reddy <rareddy> updated the status of jira TEIID-3715 to Resolved The NullpointerException issue is resolved. The issue described in https://bugzilla.redhat.com/show_bug.cgi?id=1246153#c8 is observable in DV 6.3.0 ER3 too. The root cause of the issue is in insufficient permissions assigned to the mongodb user used to access the mongodb database. If there's a collection which cannot be accessed by the user, metadata import would fail with mentioned message. The resolution of this issue would require more development done, new enhancement JIRA will be created. We need to document the fact for the time being. Steven Hawkins <shawkins> updated the status of jira TEIID-3715 to Closed The release note does not contain info about mongodb metadata import. Added to known issues in release notes. URL: https://access.qa.redhat.com/documentation/en/red-hat-jboss-data-virtualization/6.3/single/release-notes |
Deploying the following dynamic vdb fails with a NullPointerException: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vdb name="mongo" version="1"> <description>Importer VDB</description> <property name="UseConnectorMetadata" value="true" /> <property name="deployment-name" value="mongo-vdb.xml" /> <model name="importVDBSrcModel"> <source name="importVDBSrcModel" translator-name="mongodb" connection-jndi-name="java:/mongoDS" /> </model> </vdb> The resource adapter is defined as: <resource-adapter id="mongoDS"> <module slot="main" id="org.jboss.teiid.resource-adapter.mongodb"/> <transaction-support>NoTransaction</transaction-support> <connection-definitions> <connection-definition class-name="org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory" jndi-name="java:/mongoDS" enabled="true" use-java-context="true" pool-name="mongoDS"> <config-property name="Database"> bqt </config-property> <config-property name="RemoteServerList"> vmgdb01.mw.lab.eng.bos.redhat.com:27017 </config-property> <config-property name="Username"> dv </config-property> <config-property name="Password"> dv </config-property> </connection-definition> </connection-definitions> </resource-adapter> Server log: 16:46:49,793 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "mongo-vdb.xml" (runtime-name: "mongo-vdb.xml") 16:46:49,809 DEBUG [org.teiid.RUNTIME] (MSC service thread 1-5) VDB mongo-vdb.xml has been parsed. 16:46:49,835 INFO [org.teiid.RUNTIME] (MSC service thread 1-1) TEIID50029 VDB mongo.1 model "importVDBSrcModel" metadata is currently being loaded. Start Time: 7/23/15 4:46 PM 16:46:49,869 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015859: Deployed "mongo-vdb.xml" (runtime-name : "mongo-vdb.xml") 16:46:50,626 WARN [org.teiid.RUNTIME] (teiid-async-threads - 3) TEIID50036 VDB mongo.1 model "importVDBSrcModel" metadata failed to load. Reason:java.lang.NullPointerException: java.lang.NullPointerException at org.teiid.translator.mongodb.MongoDBMetadataProcessor.addTable(MongoDBMetadataProcessor.java:92) at org.teiid.translator.mongodb.MongoDBMetadataProcessor.process(MongoDBMetadataProcessor.java:57) at org.teiid.translator.mongodb.MongoDBMetadataProcessor.process(MongoDBMetadataProcessor.java:38) at org.teiid.translator.ExecutionFactory.getMetadata(ExecutionFactory.java:935) [teiid-api-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3] at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:73) [teiid-engine-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3] at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3] at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3] at org.teiid.jboss.VDBService$7.run(VDBService.java:442) [teiid-jboss-integration-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79] at org.jboss.threads.JBossThread.run(JBossThread.java:122)