javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [comp] error with java scheduler

后端 未结 6 1948
后悔当初
后悔当初 2021-02-05 23:02

What I\'m trying to do is to update my database after a period of time. So I\'m using java scheduler and connection pooling. I don\'t know why but my code only working once. It

6条回答
  •  一个人的身影
    2021-02-05 23:20

    This error shows that your jdbc resource is not registered! Where did you put your context.xml?

    The context.xml file must be in the META-INF directory of the war file. It must not be in the classes directory or in a jar file.

    Put the META-INF directory with the context.xml in the directory containing the root of the webapp in your source folder tree.

提交回复
热议问题