This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 247035

Summary: NullPointerException at org.netbeans.modules.javaee.wildfly.config.WildflyDatasource.<init>
Product: serverplugins Reporter: phil38
Component: WildFlyAssignee: ehsavoie <ehsavoie>
Status: RESOLVED DUPLICATE    
Severity: normal CC: miibx5, phil38, pjiricka
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 211519
Attachments: stacktrace

Description phil38 2014-09-11 14:56:22 UTC
Build: NetBeans IDE 8.0.1 (Build 201408251540)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.20-b23, Java(TM) SE Runtime Environment, 1.8.0_20-b26
OS: Windows 7

User Comments:
phil38: This error appens when netbeans try to load datasource ("java:/PmdmDatasource") define in JBoss server. 

The problem seems to be localized in my jboss sql module (because where I remove this section it works)

                <datasource jta="false" jndi-name="java:/PmdmDatasource" pool-name="PmdmDatasource" enabled="true" use-ccm="false">
                    <connection-url>jdbc:mysql://127.0.0.1:3306/pmdm</connection-url>
                    <driver-class>com.mysql.jdbc.Driver</driver-class>
                    <driver>mysql</driver>
                    <security>
                        <user-name>pmdm</user-name>
                        <password>pmdm</password>
                    </security>
                    <validation>
                        <validate-on-match>false</validate-on-match>
                        <background-validation>false</background-validation>
                    </validation>
                    <statement>
                        <share-prepared-statem

GUEST: Creating a JPA entity from database. Using a postgresql database




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javaee.wildfly.config.WildflyDatasource.<init>(WildflyDatasource.java:83)
   at org.netbeans.modules.javaee.wildfly.config.xml.ds.WildflyDatasourcesHandler.endElement(WildflyDatasourcesHandler.java:110)
   at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
   at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
Comment 1 phil38 2014-09-11 14:56:25 UTC
Created attachment 149145 [details]
stacktrace
Comment 2 ehsavoie 2014-09-17 12:40:55 UTC
Which version are you using as line 83 is just a test for null or empty String.
Comment 3 ehsavoie 2014-09-17 13:34:44 UTC
Sorry this fix is only in DEV. The nightly build shouldn't have it
Comment 4 ehsavoie 2014-09-18 09:35:21 UTC

*** This bug has been marked as a duplicate of bug 246675 ***
Comment 5 ehsavoie 2014-09-18 09:36:18 UTC
If you define the driver-class in the driver part it should be ok.
Comment 6 Quality Engineering 2014-09-19 00:32:13 UTC
Integrated into 'releases/release801', will be available in build *201409182200* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/f986013cc6cf
User: PGebauer <pgebauer@netbeans.org>
Log: #247035 - NullPointerException at org.netbeans.modules.javaee.wildfly.config.WildflyDatasource.<init>