WebDAV servlet in WildFly 30?

150 views
Skip to first unread message

Edgar Vonk

unread,
Nov 7, 2023, 9:33:26 AM11/7/23
to WildFly
Hi, we are trying to upgrade an application using WildFly 26 to WildFly 30. One tricky thing is that the application uses WebDAV (it exposes a WebDAV service by implementing a  WebDAV servlet) currently by means of the very old and not maintained https://github.com/ceefour/webdav-servlet project. I was wondering if anyone maybe has any pointers to a more up to date WebDAV servlet implementation? 

ps: we know WebDAV is a very old spec and more modern alternatives exist but we would rather stick with WebDAV if at all possible and minimize migration costs.

Dominik Łeszyk

unread,
Nov 7, 2023, 1:22:47 PM11/7/23
to WildFly
I have no experience with WebDAV but having similar experiences, i.e. usage of some old and abandoned code not supporting Jakarta. Actually webdav-servlet doesn't look complicated and it is depending only on servlet specification. I would try to convert it to Jakarta namespace, build on my own and give it a try on WildFly 30.

Edgar Vonk

unread,
Nov 7, 2023, 1:34:46 PM11/7/23
to WildFly
Thanks Dominik!

This is indeed what we have been trying to do today, so far without luck unfortunately. For reasons yet unknown to us WildFly 30 fails to start while starting up CDI / initialising beans using Weld when we add our own Jakarta EE-compatible version of the webdav-servlet JAR to WildFly. Maybe someone has an idea where to look? The JAR only contains one servlet and a bunch of helper classes. No @Inject's or anything like that. Quite simple really..
16:21:02,647 DEBUG [org.jboss.weld.BootstrapTracker] (MSC service thread 1-2) START bootstrap > validateBeans 16:21:02,675 DEBUG [org.jboss.weld.Reflection] (Weld Thread Pool -- 5) WELD-000620: interface jakarta.enterprise.inject.Intercepted is not declared @Target(METHOD, FIELD, PARAMETER, TYPE). Weld will use this annotation, however this may make the application unportable. 16:21:02,680 DEBUG [org.jboss.weld.Reflection] (Weld Thread Pool -- 5) WELD-000620: interface jakarta.enterprise.inject.Decorated is not declared @Target(METHOD, FIELD, PARAMETER, TYPE). Weld will use this annotation, however this may make the application unportable. 16:21:02,736 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."zaakafhandelcomponent.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."zaakafhandelcomponent.war".WeldStartService: Failed to start service at org.jb...@1.5.2.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1609) at org.jb...@1.5.2.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1438) at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.base/java.lang.Thread.run(Unknown Source) Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 42 exceptions: Exception 0 : org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type IndexeerService with qualifiers @Default at injection point [UnbackedAnnotatedField] @Inject private net.atos.zac.notificaties.NotificatieReceiver.indexeerService at net.atos.zac.notificaties.NotificatieReceiver.indexeerService(NotificatieReceiver.java:0) at org.jboss...@5.1.2.Final//org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:379) at org.jboss...@5.1.2.Final//org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:294) at org.jboss...@5.1.2.Final//org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:141) at org.jboss...@5.1.2.Final//org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163) at org.jboss...@5.1.2.Final//org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:533) at org.jboss...@5.1.2.Final//org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:65) at org.jboss...@5.1.2.Final//org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:63) at org.jboss...@5.1.2.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62) at org.jboss...@5.1.2.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) at org.jbos...@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513) Exception 1 : [..]

Dominik Łeszyk

unread,
Nov 7, 2023, 2:50:58 PM11/7/23
to WildFly
Edgar, there is clearly some injection problem as stacktrace says:

WELD-001408: Unsatisfied dependencies for type IndexeerService with qualifiers @Default at injection point [UnbackedAnnotatedField] @Inject private net.atos.zac.notificaties.NotificatieReceiver.indexeerService at net.atos.zac.notificaties.NotificatieReceiver.indexeerService(NotificatieReceiver.java:0)

I have no idea how it is related to webdav library that you've ported to Jakarta. Would try to deploy the webdav on its own as it seems self-contained. I guess web.xml needs to be updated to Jakarta to run on WildFly: https://github.com/ceefour/webdav-servlet/blob/master/src/main/webapp/WEB-INF/web.xml#L3

Good luck!

Edgar Vonk

unread,
Nov 7, 2023, 2:54:26 PM11/7/23
to WildFly
Hi Dominik, thanks! I'm sorry, I think in hindsight this error has nothing to do with our WebDAC servlet library. Rather indeed in our WildFly 30 implementation there is something not right in our CDI / Weld configuration. We did upgrade our web.xml & beans.xml but I think we are still missing something somewhere. Thanks for the help!

Edgar Vonk

unread,
Nov 9, 2023, 3:07:42 AM11/9/23
to WildFly
PS: in the end this particular issue was solved by setting the attribute:

```
bean-discovery-mode="all"
```

in our beans.xml. Not sure why this is needed over the default 'annotated' in our context but at least we are happy that the CDI system is working again. :-)

Peter Gibbons

unread,
Dec 12, 2023, 12:30:47 PM12/12/23
to WildFly
Yes. Having a proper jakarta 4.0 beans.xml (bean-discovery-mode="all") usually solves the WELD-001408. I had another problem. I did have a proper beans.xml, but the class that couldnt be injected had javax dependencies (instead of jakarta). This class came from a jar on a local nexus repo. So it's important to make sure that all dependencies have been migrated to jakarta as well (not only the java files within the current project).
Reply all
Reply to author
Forward
0 new messages