Deploy datasource to 7.1...
gboro54 Feb 17, 2012 10:57 AMI am trying to do the following to deploy a datasource to a managed instance of jboss 7.1...However i get the following exception :
{code}
java.lang.NullPointerException
at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDep
oyment.java:214)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
Manager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ltLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
ecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
tLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
leFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
s(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
ecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
ava:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
orImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
{code}
here is a clip from my pom.xml
{code:xml}
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${version.jbossas_7}</version>
<executions>
<execution>
<id>deploy-driver</id>
<phase>pre-integration-test</phase>
<configuration>
<groupId>com</groupId>
<artifactId>microsoft</artifactId>
<name>sqlserver.jar</name>
</configuration>
<goals>
<goal>deploy-artifact</goal>
</goals>
</execution>
<execution>
<id>add-datasource</id>
<phase>pre-integration-test</phase>
<configuration>
<address>subsystem=datasources</address>
<enableResource>true</enableResource>
<properties>
<connection-url>jdbc:sqlserver://test:1433;databaseName=test</connection-url>
<jndi-name>testDb</jndi-name>
<enabled>true</enabled>
<pool-name>testPool</pool-name>
<user-name>test</user-name>
<password>test</password>
<driver-name>sqlserver.jar</driver-name>
</properties>
</configuration>
<goals>
<goal>add-resource</goal>
</goals>
</execution>
</executions>
</plugin>
{code}