[Java] .war - Deploy Failed auf Netbeans Tomcat

Dieses Thema im Forum "Programmierung & Entwicklung" wurde erstellt von Calyx, 23. August 2011 .

Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 23. August 2011
    .war - Deploy Failed auf Netbeans Tomcat

    Hi,

    bin so langsam am verzweifeln und hoffe jemand kann mir helfen.

    Habe auf der Arbeit eine Kombination aus NetBeans,Tomcat und Maven und kriege es partout nicht hin, kompilierte .war-Dateien aus NetBeans heraus zu deployen.

    Fehlermeldung:
    Spoiler
    Code:
    Packaging webapp
    ------------------------------------------------------------------------
    [ERROR]FATAL ERROR
    ------------------------------------------------------------------------
    Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
    ---- Debugging information ----
    message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
    cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
    cause-message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
    class : org.apache.maven.plugin.war.util.WebappStructure
    required-type : org.apache.maven.plugin.war.util.WebappStructure
    path : /webapp-structure
    line number : 1
    -------------------------------
    ------------------------------------------------------------------------
    Trace
    com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
    ---- Debugging information ----
    message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
    cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
    cause-message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
    class : org.apache.maven.plugin.war.util.WebappStructure
    required-type : org.apache.maven.plugin.war.util.WebappStructure
    path : /webapp-structure
    line number : 1
    -------------------------------
     at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
     at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
     at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
     at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
     at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
     at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
     at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
     at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
     at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
     at org.apache.maven.plugin.war.util.WebappStructureSerializer.fromXml(WebappStructureSerializer.java:73)
     at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:423)
     at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:394)
     at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:195)
     at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:157)
     at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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:60)
     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:601)
     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)
    Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
     at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
     at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
     at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
     ... 32 more
    ------------------------------------------------------------------------
    Total time: 3 seconds
    Finished at: Tue Aug 23 15:11:59 CEST 2011
    Final Memory: 18M/172M
    ------------------------------------------------------------------------

    Die Datei landet zwar auf dem Server, kriege aber 404 Errors wenn ich mit dem Browser draufgehe:
    Code:
    root@vg-SanRM-dev:~/Server/apache-tomcat-6.0.26/webapps$ ll
    insgesamt 13384
    drwxr-xr-x 7 root root 4096 2011-08-23 14:47 ./
    drwxr-xr-x 9 root root 4096 2011-08-23 14:29 ../
    drwxr-xr-x 10 root root 4096 2011-08-23 14:29 docs/
    drwxr-xr-x 5 root root 4096 2011-08-23 14:29 examples/
    drwxr-xr-x 5 root root 4096 2011-08-23 14:29 host-manager/
    drwxr-xr-x 5 root root 4096 2011-08-23 14:29 manager/
    drwxr-xr-x 3 root root 4096 2011-08-23 14:29 ROOT/
    [COLOR="Red"]-rwxrwxrwx 1 root root 13676374 2011-08-23 14:47 datei.war*
    [/COLOR]
    Hab schon alles mögliche probiert...mehrmals Netbeans + Plugins neu installiert, chmod 777 auf den Tomcatordner, in der config.xml vom Server "autoDeploy=true" gesetzt, in der maven-war-config den Pfad zu webapps eingetragen, alles ohne Erfolg. Über den Manager im Webinterface die .war manuell hochzuladen funktioniert komischerweise, also sie wird entpackt und ich kann über den Browser drauf zugreifen.

    Wäre nett wenn jemand helfen könnte.

    // Fehler gefunden, waren mehrere absolute Pfadangaben in den Configs und auch noch die falsche Java-Version, nach nem Downgrade auf 1.6 funktionierte es dann endlich.
     
  2. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.