mercredi 25 février 2015

Unable to run server (weblogic) from maven



I trying to run weblocig server with maven (wls-maven-plugin). But, i recieve NullPointerException:



[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web_application Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- wls-maven-plugin:12.1.2.0:start-server (default-cli) @ web_application ---
[INFO] ++====================================================================++
[INFO] ++ wls-maven-plugin: start-server ++
[INFO] ++====================================================================++
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.236 s
[INFO] Finished at: 2015-02-25T10:42:19+02:00
[INFO] Final Memory: 7M/103M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.2.0:start-server (default-cli) on project web_application: Error starting server: NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://ift.tt/1aCDfYM

Process finished with exit code 1


My pom.xml:



<project xmlns:xsi="http://ift.tt/ra1lAU" xmlns="http://ift.tt/IH78KX"
xsi:schemaLocation="http://ift.tt/IH78KX http://ift.tt/HBk9RF">
<modelVersion>4.0.0</modelVersion>
<groupId>Lab3.web_application</groupId>
<artifactId>web_application</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>web_application Maven Webapp</name>
<url>http://ift.tt/19pvvEY;
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>web_application</finalName>
<plugins>

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-site</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>wls-maven-plugin</artifactId>
<version>12.1.2.0</version>

<configuration>
<middlewareHome>c:/Oracle/Middleware/Oracle_Home</middlewareHome>
<adminurl>http://localhost:7001</adminurl>
<domainHome>c:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain</domainHome>
<user>weblogic</user>
<password>password123</password>
<upload>true</upload>
<remote>false</remote>
<verbose>true</verbose>
<source>./target/web_application.war</source>
<name>${project.build.finalName}</name>
<noexit>true</noexit>

</configuration>
<executions>
<execution>
<id>wls-start-domain</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
</execution>
<!--<execution>
<phase>post-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>-->
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>localSnapshot</id>
<name>local snapshot repository</name>
<url>file:///c:/Users/Admin/.m2/repository</url>
</snapshotRepository>
</distributionManagement>
</project>


running with -e flag:



"C:\Program Files\Java\jdk1.7.0_75\bin\java" "-Dmaven.home=C:\Program Files\Apache Software Foundation\apache-maven-3.2.5" "-Dclassworlds.conf=C:\Program Files\Apache Software Foundation\apache-maven-3.2.5\bin\m2.conf" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Apache Software Foundation\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=14.0.3 deploy -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web_application Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ web_application ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ web_application ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ web_application ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Dropbox\NetCracker\Lab3\web_application\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ web_application ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ web_application ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ web_application ---
[INFO] Packaging webapp
[INFO] Assembling webapp [web_application] in [D:\Dropbox\NetCracker\Lab3\web_application\target\web_application]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\Dropbox\NetCracker\Lab3\web_application\src\main\webapp]
[INFO] Webapp assembled in [78 msecs]
[INFO] Building war: D:\Dropbox\NetCracker\Lab3\web_application\target\web_application.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] --- wls-maven-plugin:12.1.2.0:start-server (wls-start-domain) @ web_application ---
[INFO] ++====================================================================++
[INFO] ++ wls-maven-plugin: start-server ++
[INFO] ++====================================================================++
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.155 s
[INFO] Finished at: 2015-02-25T22:14:52+02:00
[INFO] Final Memory: 12M/103M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.2.0:start-server (wls-start-domain) on project web_application: Error starting server: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.2.0:start-server (wls-start-domain) on project web_application: Error starting server
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.apache.maven.plugin.MojoFailureException: Error starting server
at weblogic.tools.maven.plugins.control.StartServerMojo.execute(StartServerMojo.java:112)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 25 more
Caused by: java.lang.NullPointerException
at weblogic.tools.maven.plugins.configure.RunScriptMojo.transformString(RunScriptMojo.java:186)
at weblogic.tools.maven.plugins.control.StartServerMojo.defaultArgs(StartServerMojo.java:127)
at weblogic.tools.maven.plugins.control.StartServerMojo.execute(StartServerMojo.java:57)
... 27 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://ift.tt/1aCDfYM

Process finished with exit code 1


I run it in Intellij IDEA > execute maven goal > wls:start-server.


P.S. Running manualy by call: c:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\startWebLogic.cmd was sucessful.




Aucun commentaire:

Enregistrer un commentaire