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 235511 - Driver missing in Create Entity Class From Database using JBoss EAP6 Data Source
Summary: Driver missing in Create Entity Class From Database using JBoss EAP6 Data Source
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: JBoss (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-04 15:08 UTC by renzocherin
Modified: 2013-12-26 12:47 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description renzocherin 2013-09-04 15:08:18 UTC
Product Version = NetBeans IDE Dev (Build 201308202300)
Operating System = Linux version 3.8.0-29-generic running on i386
Java; VM; Vendor = 1.7.0_25
Runtime = OpenJDK Client VM 23.7-b01

In New  Entity Class From Database using JBoss EAP6 Data Source wizard  selecting any JBoss DataSource (DS) you got an error pop up window saying: "The name of the driver class in data source is missing".

The problem is related on parsing (configuration) standalone.xml  file,
 because JBoss format is:
 
            <datasources>
                <datasource jndi-name="java:jboss/datasources/DBName" pool-name="java:jboss/datasources/DBName" enabled="true">
                    <connection-url>jdbc:mysql://localhost:3306/DBName</connection-url>
                    <driver>mysqldrv</driver>
                    <pool>
                        <min-pool-size>5</min-pool-size>
                        <max-pool-size>10</max-pool-size>
                    </pool>
                    <security>
                        <user-name>root</user-name>
                        <password>xxxxx</password>
                    </security>
                </datasource>
                <drivers>
                    <driver name="mysqldrv" module="com.mysql.jdbc">
                        <driver-class>com.mysql.jdbc.Driver</driver-class>
                        <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                    </driver>
                </drivers>
            </datasources>

While Netbeans would like it formated as:

            <datasources>
                <datasource jndi-name="java:jboss/datasources/DBName" pool-name="java:jboss/datasources/DBName" enabled="true">
                    <connection-url>jdbc:mysql://localhost:3306/DBName</connection-url>
                    <driver name="mysqldrv" module="com.mysql.jdbc">
                        <driver-class>com.mysql.jdbc.Driver</driver-class>
                        <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                    </driver>
                    <pool>
                        <min-pool-size>5</min-pool-size>
                        <max-pool-size>10</max-pool-size>
                    </pool>
                    <security>
                        <user-name>root</user-name>
                        <password>xxxxx</password>
                    </security>
                </datasource>
            </datasources>


Note the <driver> section
Comment 1 Sergey Petrov 2013-09-05 10:29:08 UTC
jboss plugin may not provide datasource parsed correctly, as persistence just use ds provided by different server plugins.
Comment 2 Sergey Petrov 2013-09-06 11:33:59 UTC
Is it server side configuration or project side? Can youprovide project sample?
Comment 3 kidvid 2013-12-23 19:18:21 UTC
I'm getting this error as well.

Is there any way to tell Netbeans to use the connections defined on the Services tab instead of the connections defined by the JBoss <datasources> configuration?

Netbeans is having trouble parsing the JBoss <datasources> configuration, so when I try to make a new entity, it fails.

If I could tell netbeans to forget about the JBoss defined datasources and to just use the datasources from the services tab, it wouldn't be an issue.
Comment 4 Sergey Petrov 2013-12-24 10:05:10 UTC
I'll try to recheck, but jpa support may try to match ds connection url with some registered already, but there is not functionality to match ds with some constructed by ide url or defined with "url" property db url to any other registered connections with not matching url and it may be ok, as different urls may mean different db/parameters and it may affect mappings and later runtime issues.
Comment 5 Sergey Petrov 2013-12-26 12:46:05 UTC
after fixing some similar issues with gf, I'm almost sure jboss plugin shoul return proper url in this case. I ca't find responsible classes yet.
but similar gf issues are resolved recently, some related to driver support, some related to presense or url in ds configuration.
Comment 6 Sergey Petrov 2013-12-26 12:47:18 UTC
ok, it's not about url, but about deriver may be also or drive ronly.