orctom / was-maven-plugin

Deploy artifact to one or more, local or remote WebSphere Application Server
Apache License 2.0
47 stars 29 forks source link

Error while deploying to WAS 8.0 #15

Closed nbastian closed 8 years ago

nbastian commented 8 years ago

Hey,

I'm trying to deploy my JSF 2.0/PrimeFaces 6.0 application to my WAS 8.0 with this plugin but I'm always getting the following error:

[RESTARTING SERVER] localhost

2016-Aug-15 14:22:29 CEST

FAILED to restart cluster/server:

Traceback (most recent call last): File "", line 45, in restartServer

com.ibm.ws.scripting.ScriptingException: com.ibm.ws.scripting.ScriptingException: WASX7025E: Es wurde ein Fehler in der Zeichenfolge "" gefunden. Das Objekt kann nicht erstellt werden.

try to startApplication directly...

[STARTING APPLICATION] localhost test

2016-Aug-15 14:22:29 CEST

FAILED to start application:

Traceback (most recent call last): File "", line 67, in startApplication

com.ibm.ws.scripting.ScriptingException: com.ibm.ws.scripting.ScriptingException: WASX7025E: Es wurde ein Fehler in der Zeichenfolge "" gefunden. Das Objekt kann nicht erstellt werden.

WASX7017E: Beim Ausf�hren der Datei "C:\Entwicklung\Ford_HTS\hts2\de.ford.hts.jsf2client\target\was-maven-plugin\py\deploy-localhost-test-20160815-142159-685.py" ist eine Ausnahme eingetreten. Informationen zur Ausnahme: com.ibm.ws.scripting.ScriptingException: WASX7025E: Es wurde ein Fehler in der Zeichenfolge "" gefunden. Das Objekt kann nicht erstellt werden.

Here's my plugin config:

<plugin>
                <groupId>com.orctom.mojo</groupId>
                <artifactId>was-maven-plugin</artifactId>
                <version>${was-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>deploy</id>
                        <phase>install</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                        <configuration>
                            <wasHome>${was.home}</wasHome>
                            <user>admin</user>
                            <password>admin</password>
                            <host>localhost</host>
                            <server>server1</server>
                            <node>vWLWGM158Node03</node>
                            <virtualHost>default_host</virtualHost>
                            <applicationName>${project.build.finalName}</applicationName>
                            <contextRoot>hts</contextRoot>
                            <parentLast>true</parentLast>
                            <verbose>true</verbose>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Does anyone know why I always get this error? I've found some similar errors but no solution for my problem.

Thanks for your help, Nico

orctom commented 8 years ago

I assume you understand how this plugin works (if not you could take a look at the how it works section in README.md), in short it deploys your packages by executing jython script. Here the exception is thrown on line 45, which indicates the appManager is pointing to nothing.

This could be the node name or server name is miss configured, but I think you had already double checked it to make sure they are not.

Another possibility is you are working on a portal server or liberty profile, the behavior on portal server is not tweaked, as I never worked on a portal server, while liberty profile is not supported at all. (The log says you are not working on the liberty profile).

If you are not working on a portal server, then it could be about the version, I tested it on 7.5, 8.0 in the early stage of this plugin, but later I only worked on 8.5.

Different version of WAS might differ on how to acquire a appManager handler. You can debug this by running the wsadmin.sh(bat) -lang jython [-host -user -password ] then run the content of the script to debug, and create a script of your own, and then use your own script in the plugin to do the deployment.

BTW, try to use it on a Linux server, I see some issues with WAS on Windows, which I can't explain. Cluster better than standalone, Linux better than Windows.