Copy Project start error

Source: Internet
Author: User

Copying a new project today made a low-level mistake and recorded it as a warning:

Copied the project, copied the configuration file, modified the service name, launched Tomcat, the error is as follows:

Severe: creation of the naming context failed:  javax.naming.operationnotsupportedexception: context is read  Onlyjavax.naming.namenotfoundexception: name [comp/env/testservice] is not bound  in this Context. Unable to find [comp].at  Org.apache.naming.NamingContext.lookup (namingcontext.java:819) At org.apache.naming.namingcontext.lookup ( namingcontext.java:167) At org.apache.naming.selectorcontext.lookup (selectorcontext.java:156) at  Javax.naming.InitialContext.lookup (initialcontext.java:411) at com.jerehnet.util.dbutil.dbhelper.< Clinit> (dbhelper.java:55) At com.jerehnet.manage.applicationlistener.getcategorymapgift ( applicationlistener.java:82) at com.jerehnet.manage.applicationlistener.contextinitialized ( applicationlistener.java:29) At org.apache.catalina.core.standardcontext.listenerstart ( standardcontext.java:4973) At org.apache.catalina. Core. Standardcontext.startinternal (standardcontext.java:5467) At org.apache.catalina.util.lifecyclebase.start ( lifecyclebase.java:150) At org.apache.catalina.core.containerbase$startchild.call (ContainerBase.java:1559) At org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1549) at  Java.util.concurrent.FutureTask.run (futuretask.java:262) at  Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145) at  Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615) At java.lang.Thread.run ( thread.java:745)

The survey only found that the configuration file has errors:

Original:

<service name= "Test" >    <connector port= "1111"      Maxhttpheadersize= "8192"                 maxthreads= "2048"  minsparethreads= " maxsparethreads=" 475 "                enablelookups= "false"  redirectport= "8443"  acceptcount= "              "  connectiontimeout= "20000"  disableuploadtimeout= "true"   uriencoding= "Utf-8"/>     <engine name= "test"  defaulthost= "localhost" >         <realm classname= "Org.apache.catalina.realm.UserDatabaseRealm"  resourcename= " Userdatabase "/>        

Copy the NEW:

<service name= "Test2" >    <connector port= "1111"      maxhttpheadersize= "8192"                 maxthreads= "2048"  minsparethreads= " maxsparethreads=" 475 "                enablelookups= "false"  redirectPort= " 8443 " acceptcount="                 connectiontimeout= "20000"  disableuploadtimeout= "true"   uriencoding= "Utf-8"/>     <engine name= "test"  defaulthost= "localhost" >         <realm classname= "Org.apache.catalina.realm.UserDatabaseRealm"   Resourcename= "userdatabase"/>        

The error is to modify only the server name

<service name= "Test2" >

Without modification

Engine Name

After adjusting the problem as follows, if you are also this error, you can try to see if this is the problem!

<service name= "Test2" > <connector port= "1111" maxhttpheadersize= "8192" maxthreads= "2048" MinS               parethreads= "maxsparethreads=" 475 "enablelookups=" false "redirectport=" 8443 "acceptcount=" 800 " connectiontimeout= "20000" disableuploadtimeout= "true" uriencoding= "Utf-8"/> <engine name= "Test2" DefaultHo st= "localhost" >


Copy Project start error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.