-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Servlet level configuration, is this required? #71
Comments
You can keep the defaults for the servlet level configuration. The only thing you need to configure in Tomcat is an I don't know what the Maven error is, but that's a screenshot of an IDE which is not something I could detect errors from. If you post the errors from the command line I may be able to help. |
When I ignore the Maven error and start the application, the Tomcat log is as follows: 24-Sep-2020 18:04:18.903 Information [main] org.apache.coyote.AbstractProtocol.init Initialize the protocol processor ["http-nio-8081"] |
Thank you for your reply |
D:\Tomcat\apache-tomcat-10.0.0-M8-windows-x64\apache-tomcat-10.0.0-M8\bin\catalina.bat run |
25-Sep-2020 09:32:50.036 Critical [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.listenerStart Configure application listener [uk.ac.rdg.resc.edal. wms.WmsContextListener] error java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016 ) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2417) at org.apache.catalina.loader.WebappClassLoaderBase. findClass(WebappClassLoaderBase.java:864) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187) at org.apache .catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540) at org.apache.catalina.core.DefaultInstanceManager.loadClas sMaybePrivileged(DefaultInstanceManager.java:521) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4551) at org.apache .catalina.core.StandardContext.startInternal(StandardContext.java:5088) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java :717) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706) at org.apache.catalina.startup. HostConfig.manageApp(HostConfig.java:1727) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java .lang.reflect.Method.invoke(Method.java:566) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:288) at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor .invoke(DefaultMBeanServerInterceptor.java:809) at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456 ) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl .invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566 ) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:288) at java.management/com.sun.jmx.interceptor.DefaultMBean ServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809) at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl. doOperation(RMIConnectionImpl.java:1466) at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307) at java.management.rmi/javax.management.remote.rmi. RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399) at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:827) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0( Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/ java.lang.reflect.Method.invoke(Method.java:566) at java.rmi/sun.rmi.server.UnicastSer verRef.dispatch(UnicastServerRef.java:359) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at java.rmi/sun.rmi.transport.Transport$1.run(Transport. java:197) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.rmi/sun.rmi. transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796) at java.rmi/sun.rmi.transport. tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler. run(TCPTransport.java:676) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 628) at java.base/java.lang.Thread.run(Thread.java:834) C aused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java: 1187) ... 54 more |
These are Tomcat logs. You said you were getting Maven (i.e. build) errors. You won't be able to run the application on Tomcat if you cannot build it. |
I can't see the image, but edal-cdm is in the central maven repository: https://search.maven.org/search?q=a:edal-cdm |
I don't quite understand the meaning of your last sentence, do you want to clone the edal project and run it together? |
The image above is a screenshot of my second comment |
If you want to make any meaningful changes, they will be in edal-java, so yes, you will need to have both of them within your development environment. |
Those artifacts are in the https://artifacts.unidata.ucar.edu/#browse/browse:unidata-all repository, which is configured in |
Yes, I can access it, but there is always a dependency that cannot be resolved,This is it: edu.ucar :cdm- core:5.3.2 I also tried to start edal-java, which still has the same dependency that cannot be resolved. In addition, there are some conflicts in POM of ncwms program |
This is my seventh day in learning ncwms, I read the source code, but I can't remember, I urgently need to start the program, go through it again, and then apply it to my demo. |
Just now I tried to download the source code of ncwms2.4.2 and run it. I started it successfully and downloaded the dependency successfully. |
That is the artifact which is hosted at the URL I suggested. If you can access it via a browser, then Maven should be able to access it too. The fact that it cannot is unusual, but it is a problem with your Maven configuration, not with ncWMS or EDAL. |
Finally, can ncwms be transformed into a springboot project? |
Probably, but it would take a lot of effort and I'm not sure what the advantage would be. |
Is this configured in Tomcat? What should configdir's value be?
The text was updated successfully, but these errors were encountered: