[jboss-jira] [JBoss JIRA] Commented: (AS7-1015) Deployment fails with NullPointerException when installing JDBC Driver as a deployment

Stefano Maestri (JIRA) jira-events at lists.jboss.org
Wed Jun 15 07:28:29 EDT 2011


    [ https://issues.jboss.org/browse/AS7-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608795#comment-12608795 ] 

Stefano Maestri commented on AS7-1015:
--------------------------------------

The problem is in standalone.xml the <driver> should refer to the driver name. Driver name is the symbolic name given in standalone.xml for module's deployed driver ("h2" for example) or the jar name for deployed ones. To be sure to use the correct name you should use the cli and invoke installed-driver-list command on datasources subsystem. This is the invocation and answer for a configuration very similar to yours (h2 as module and mysql as deployed):



[standalone at localhost:9999 /] /subsystem=datasources:installed-drivers-list
{
    "outcome" => "success",
    "result" => [
        {
            "driver-name" => "h2",
            "deployment-name" => undefined,
            "driver-module-name" => "com.h2database.h2",
            "module-slot" => "main",
            "driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource",
            "driver-class-name" => "org.h2.Driver",
            "driver-major-version" => 1,
            "driver-minor-version" => 2,
            "jdbc-compliant" => true
        },
        {
            "driver-name" => "mysql-connector-java-5.1.15.jar",
            "deployment-name" => "mysql-connector-java-5.1.15.jar",
            "driver-module-name" => undefined,
            "module-slot" => undefined,
            "driver-xa-datasource-class-name" => undefined,
            "driver-class-name" => "com.mysql.jdbc.Driver",
            "driver-major-version" => 5,
            "driver-minor-version" => 1,
            "jdbc-compliant" => false
        }
    ],
    "compensating-operation" => undefined
}


> Deployment fails with NullPointerException when installing JDBC Driver as a deployment
> --------------------------------------------------------------------------------------
>
>                 Key: AS7-1015
>                 URL: https://issues.jboss.org/browse/AS7-1015
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: JCA
>         Environment: Fedora 14. JBoss AS7 build from June 8, Using MySQL JDBC driver downloaded as an example from http://community.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a_JDBC_driver_as_a_deployment
>            Reporter: Sande Gilda
>            Assignee: Stefano Maestri
>         Attachments: standalone.xml
>
>
> I am working on the DataSource configuration changes for the EAP5 -> EAP6 migration guide and am following the steps here: http://community.jboss.org/wiki/DataSourceConfigurationinAS7.
> I have been able to successfully install the MySQL JDBC driver as a module, however, I am not having much luck installing the driver as a deployment, which this document says is the recommended way to install it. 
> I've done the following:
>  - I copied the JDBC-compliant mysql-connector-java-5.1.15.jar (downloaded from the above web site) into my <jboss7>/standalone/deployments directory.
>  - I still have the <datasource> and <driver> elements defined in my standalone.xml file from when I successfully installed the driver as a module.
> When I start the server, I see the following error in the log:
> 11:53:42,348 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."TopicIndex.war".CONFIGURE_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."TopicIndex.war".CONFIGURE_MODULE: Failed to process phase CONFIGURE_MODULE of deployment "TopicIndex.war"
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675) [jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
> 	at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
> Caused by: java.lang.NullPointerException
> 	at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188) [jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]
> 	at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2165) [jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]
> 	at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188) [jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]
> 	at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2165) [jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]
> 	at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:325) [jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]
> 	at org.jboss.as.server.deployment.module.ModuleSpecProcessor.createModuleService(ModuleSpecProcessor.java:193) [jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
> 	at org.jboss.as.server.deployment.module.ModuleSpecProcessor.deploy(ModuleSpecProcessor.java:99) [jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
> 	... 4 more
> 11:53:42,350 ERROR [org.jboss.as] (MSC service thread 1-1) JBoss AS 7.0.0.Beta4-SNAPSHOT "(TBD)" started (with errors) in 6159ms - Started 136 of 196 services (5 services failed or missing dependencies, 55 services are passive or on-demand)
> Later I see the message that deployment of my WAR failed due to the missing dependency:
> 11:53:42,394 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "TopicIndex.war"
> 11:53:42,394 INFO  [org.jboss.as.server] (MSC service thread 1-6) Service status report
>    New missing/unsatisfied dependencies:
>       service jboss.jdbc-driver._________________________ (missing) required by [service jboss.data-source.java:/TopicIndexDatasource]
> Is there something else I need to be doing here?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list