# Fehler beim deployen von jsp und servlet



## freez (4. Okt 2006)

Hallo, ich bekomme beim deployen von meinem Modul mit einer JSP, einem Servlet namens controller und einer Java Klasse zur generieren von den dynamischen Inhalten in der JSP folgende Fehler:



15:22:11,578 INFO  [MainDeployer] Undeploying file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/deploy/files.war
15:22:11,578 INFO  [EmbeddedCatalinaService41] undeploy, ctxPath=/files, warUrl=file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/tmp/deploy/server/all/deploy/files.war/41.files.war
15:22:11,578 INFO  [Engine] StandardHost[localhost]: Removing web application at context path /files
15:22:11,578 ERROR [Engine] StandardHost[localhost]: ContainerBase.removeChild: stop: 
LifecycleException:  Container StandardContext[/files] has not been started
	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3643)
	at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1036)
	at org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.java:470)
	at org.apache.catalina.core.StandardHost.remove(StandardHost.java:852)
	at org.jboss.web.catalina.EmbeddedCatalinaService41.performUndeploy(EmbeddedCatalinaService41.java:290)
	at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:405)
	at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:497)
	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:480)
	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:475)
	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:448)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
	at $Proxy7.undeploy(Unknown Source)
	at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:332)
	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:452)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
15:22:11,593 ERROR [MainDeployer] Undeployment failed: file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/deploy/files.war
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (java.lang.NullPointerException)
	at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:418)
	at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:497)
	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:480)
	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:475)
	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:448)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
	at $Proxy7.undeploy(Unknown Source)
	at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:332)
	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:452)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
Caused by: java.lang.NullPointerException
	at org.jboss.util.file.Files.delete(Files.java:41)
	at org.jboss.web.catalina.EmbeddedCatalinaService41.performUndeploy(EmbeddedCatalinaService41.java:294)
	at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:405)
	... 17 more
15:22:11,593 WARN  [DeploymentInfo] Could not delete directory file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/tmp/deploy/server/all/deploy/files.war/41.files.war restart will delete it
15:22:11,593 INFO  [MainDeployer] Undeployed file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/deploy/files.war
15:22:11,593 INFO  [MainDeployer] Starting deployment of package: file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/deploy/files.war
15:22:11,609 INFO  [EmbeddedCatalinaService41] deploy, ctxPath=/files, warUrl=file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/tmp/deploy/server/all/deploy/files.war/53.files.war
15:22:11,609 INFO  [Engine] WebappLoader[/files]: Deploying class repositories to work directory C:\Programme\open_workbench_j2ee_3_1_0\jboss\server\all\tmp\deploy\server\all\deploy\work\MainEngine\localhost\files
15:22:11,609 INFO  [Engine] WebappLoader[/files]: Deploy class files /WEB-INF/classes to C:\Programme\open_workbench_j2ee_3_1_0\jboss\server\all\tmp\deploy\server\all\deploy\work\MainEngine\localhost\files\WEB-INF\classes
15:22:11,875 ERROR [Digester] End event threw exception
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
	at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:499)
	at org.apache.commons.digester.Rule.end(Rule.java:276)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1064)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1720)
	at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
	at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
	at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
	at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
	at org.apache.commons.digester.Digester.parse(Digester.java:1543)
	at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
	at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:417)
	at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:266)
	at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
	at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
	at $Proxy7.deploy(Unknown Source)
	at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> controller in servlet mapping
	at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:1690)
	... 40 more
15:22:11,875 ERROR [Engine] ContextConfig[/files] Parse error in application web.xml
java.lang.IllegalArgumentException: Invalid <url-pattern> controller in servlet mapping
	at org.apache.commons.digester.Digester.createSAXException(Digester.java:2383)
	at org.apache.commons.digester.Digester.createSAXException(Digester.java:2409)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1067)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1720)
	at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
	at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
	at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
	at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
	at org.apache.commons.digester.Digester.parse(Digester.java:1543)
	at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
	at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:417)
	at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:266)
	at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
	at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
	at $Proxy7.deploy(Unknown Source)
	at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
15:22:11,875 INFO  [Engine] ContextConfig[/files]: Occurred at line 32 column -1
15:22:11,875 INFO  [Engine] ContextConfig[/files]: Marking this application unavailable due to previous error(s)
15:22:11,906 INFO  [EmbeddedCatalinaService41] Using Java2 parent classloader delegation: true
15:22:11,906 INFO  [Engine] StandardManager[/files]: Seeding random number generator class java.security.SecureRandom
15:22:11,906 INFO  [Engine] StandardManager[/files]: Seeding of random number generator has been completed
15:22:11,906 INFO  [Engine] StandardContext[/files]: Context startup failed due to previous errors
15:22:11,906 INFO  [MainDeployer] Deployed package: file:/C:/Programme/open_workbench_j2ee_3_1_0/jboss/server/all/deploy/files.war
15:23:00,500 INFO  [Engine] StandardHost[localhost]: MAPPING configuration error for request URI /controller

Das EJB Modul, was noch zusätzlich benutzt wird, konnte ich problemlos deployen. Ich muß noch dazu sagen, daß es mein erstes kleines Projekt ist, was ich selbst entwickle, nachdem ich mich mit einem Buch schlau gemacht habe.

Ich finde leider keinen eindeutigen Fehler, der auf eine meiner Dateien zurückzuführen wäre. Was läuft da verkehrt? Der Test mit dem Browser ergab genau das, was ich befürchtet hatte: das Modul wurde nicht angenommen, obwohl es  im richtigen Verzeichniss vom JBoss liegt .

Zur Info:
ich benutze die open.Workbench mit einem JBoss 3.2.1 ApplicationServer
die Meldungen treten alle beim deployen auf (es fehlt nix, und es ist auch nix zu viel)
der Kopiervorgang lief sauber durch (ohne besondere Fehlermeldungen)


----------



## SlaterB (4. Okt 2006)

was ist denn mit diesen kleinen Fundstücken?


15:22:11,875 ERROR [Engine] ContextConfig[/files] Parse error in application web.xml 
java.lang.IllegalArgumentException: Invalid <url-pattern> controller in servlet mapping 
[..]
15:22:11,875 INFO [Engine] ContextConfig[/files]: Occurred at line 32 column -1 
15:22:11,875 INFO [Engine] ContextConfig[/files]: Marking this application unavailable due to previous error(s)


----------



## freez (4. Okt 2006)

Aha, danke erst einmal. Hm, mit der web.xml habe ich gar nix zu tun gehabt. Ich schaue es mir mal genauer an


----------



## EOB (4. Okt 2006)

hi, adde mal ein / vor das controller beim url-pattern?

gruesse


----------



## freez (4. Okt 2006)

danke ... das wars auch


----------



## EOB (4. Okt 2006)

das hat eclipse vergessen? tststs...

gruesse


----------



## freez (4. Okt 2006)

Nein ... eher nicht ... das war wohl ich beim Ausfüllen des entsprechenden Formulars  ... Naja, wenn man nur Formulare ausfüllen muss, weiß man nicht zwangsläufig, welche Dateien da mit dran hängen  

Aber wie heist es so schön: aus Fehlern lernt man


----------



## EOB (4. Okt 2006)

genau!


----------

