[jboss-jira] [JBoss JIRA] (AS7-6104) jboss-cli failed to remove PostgreSQL datasource module NullPointerException OperationContextImpl.doRemove()

Raymond Naseef (JIRA) jira-events at lists.jboss.org
Sat Dec 8 00:07:17 EST 2012


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

Raymond Naseef commented on AS7-6104:
-------------------------------------

Below are steps to fix the problem (this is workaround), and was able to add and remove the module after that.

I still think there is a bug, and hope this will help you to find it.  Let me know if you need any more information on this (I still have the broken version zipped, and have confirmed it is still broken when extracted).

*** Steps Leading to Problem ***

Before I added PostgreSQL module I did:

1. Added postgresql-9.1-901-1.jdbc4.jar to standalone/deployments
2. Created DataSource for this via JBoss Administration Console
3. Did the following two, not sure which one I did first:
    - removed postgresql-9.1-901-1.jdbc4.jar from standalone/deployments
    - Added main.xml & postgresql-9.1-901-1.jdbc4.jar to modules/org/postgresql/main
4. Added module using jboss-cli
5. Attempted and failed to remove the module (as explained in this issue)

***  Work Around  ***
1. Removed PostgreSQL module from standalone.xml (done using Notepad++):
                    <driver name="postgresql-driver" module="org.postgresql">
                        <driver-class>org.postgresql.Driver</driver-class>
                    </driver>
! Adding and removing the module worked fine after this

                
> jboss-cli failed to remove PostgreSQL datasource module NullPointerException OperationContextImpl.doRemove()
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: AS7-6104
>                 URL: https://issues.jboss.org/browse/AS7-6104
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 7.1.1.Final
>         Environment: Windows 7 Professional SP1
>            Reporter: Raymond Naseef
>            Assignee: Jason Greene
>              Labels: jboss-as7, modules, postgresql
>
> NullPointerException during jboss-cli remove with commands:
> jboss-cli --connect command="/subsystem=datasources/jdbc-driver=postgresql-driver:add(driver-name=postgresql-driver, driver-class-name=org.postgresql.Driver, driver-module-name=org.postgresql"
> * this works
> jboss-cli --connect command="/subsystem=datasources/jdbc-driver=postgresql-driver:remove"
> MS-DOS Console:
> {
>     "outcome" => "failed",
>     "failure-description" => "JBAS014749: Operation handler failed: null",
>     "rolled-back" => true
> }
> Server Log:
> 23:17:42,627 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 19) JBAS014612: Operation ("remove") failed - address: ([
>     ("subsystem" => "datasources"),
>     ("jdbc-driver" => "postgresql-driver")
> ]): java.lang.NullPointerException
> 	at org.jboss.as.controller.OperationContextImpl.doRemove(OperationContextImpl.java:298) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.OperationContextImpl.removeService(OperationContextImpl.java:293) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.connector.subsystems.datasources.JdbcDriverRemove.performRuntime(JdbcDriverRemove.java:66)
> 	at org.jboss.as.controller.AbstractRemoveStepHandler$1.execute(AbstractRemoveStepHandler.java:50) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:466) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:139) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:108) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
> 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:487) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
> 	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list