On Sunday, January 5, 2014 4:33:33 PM UTC+8, Tapir wrote:
>
> Ok, found the problem by accident.
>
> After finding the google maven example on github works well, I copied the 
> META-INF folder to my project.
> A replace files dialog was expected to show up.
> But, no, it didn't show!
> Then there are two META-INF folders in my project.
> Two identical folders in my project!!!
>
> Researched it for a while, I copy the two folder name into a notepad file, 
> the difference is obvious.
> One "-" character is longer than the other one.
>  (But in windows file explorer, they are the same length! However, in IE 
> browser,  the shorter one becomes longer)
> The hexdump shows the longer is e22d 9180, the shorter one is 000A.
>
> Ok, the short one is the correct one. It is META-INF
> The longer one is META-INF.
>
> sorry, I messed up, META-INF is wrong, META-INF is correct.
 

> So, it looks it must be my mistake?
> Aha, no.
> I search the longer one in the google document: 
> https://developers.google.com/appengine/docs/java/modules/
> Eh, it seems this page mixes the longer one and the shorter one many times.
> I'm so lucky that I picked the wrong one.
>
> Can't believe no one else has found this problem before. 
> Does this mean there are very few projects using the modules feature?
>
>
>
>
> On Thursday, January 2, 2014 5:31:01 PM UTC+8, Tapir wrote:
>
>>
>>
>> On Thursday, January 2, 2014 3:31:14 PM UTC+8, Vinny P wrote:
>>>
>>> On Wed, Jan 1, 2014 at 11:03 PM, Tapir <tapi...@gmail.com> wrote:
>>>
>>>> This page mentions all modules instances will be started. 
>>>> https://developers.google.com/appengine/docs/java/modules/routing
>>>> But I don't how to do this. When call dev_server on a second module, it 
>>>> says:
>>>> Could not open the requested socket: Address already in use: bind. Try 
>>>> overriding --address and/or --port.
>>>>
>>>
>>>
>>>
>>> The dev server should be starting up all the modules automatically, you 
>>> don't need to call the dev server a second time.
>>>
>>> When you call the dev server on the second module - after already 
>>> calling it on the first module - the second dev server instance is unable 
>>> to run because (as it points out in the error text) the first dev server 
>>> instance is already bound to the port. So this is correct behavior.
>>>
>>>
>>> On Wed, Jan 1, 2014 at 11:03 PM, Tapir <tapi...@gmail.com> wrote:
>>>
>>>> If I call dev_server on the ear directory, it says
>>>>
>>>> com.google.apphosting.utils.config.AppEngineConfigException: Could not 
>>>> locate D:\my-project\ear\WEB-INF\appengine-web.xml
>>>>
>>>> yes, there is no WEB-INF in the ear folder but only a META-INF folder 
>>>> and module folders in the ear folder.
>>>>
>>>
>>>
>>>
>>> More than likely, the dev server is interpreting your folder as a basic, 
>>> single-module application rather than a multi-module application (i.e. JAR 
>>> rather than an EAR). Can you post the stack trace for the 
>>> AppEngineConfigException?
>>>
>>
>> yes, I think so. How to let dev_server not interpret the folder as a 
>> single-module app?
>>
>> The folder structure is like this:
>> my-project
>> --- ear
>> ------ META-INF
>> --------- appengine-application.xml
>> --------- application.xml
>> ------ default
>> --------- war
>> ------------ WEB-INF
>> --------------- appengine-web.xml
>> ---------------- web.xml
>> ------ websockets
>> --------- war
>> ------------ WEB-INF
>> --------------- appengine-web.xml
>> ---------------- web.xml
>>
>> The following is added in application.xml:
>>
>>   <module>
>>     <web>
>>       <web-uri>default</web-uri>
>>       <context-root>default</context-root>
>>     </web>
>>   </module>
>>   <module>
>>     <web>
>>       <web-uri>websokets</web-uri>
>>       <context-root>websokets</context-root>
>>     </web>
>>   </module>
>>
>> I downloaded the example on git, but I dislike the mvn style so I give up 
>> it.
>> The mvn style hide too many details, so I think it is not a good example 
>> to start.
>>
>> Afte run "dev_appserver.cmd ear", the stack trace is output:
>>
>> Jan 02, 2014 5:15:46 PM 
>> com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
>> SEVERE: Received exception processing 
>> D:\my-project\ear\WEB-INF/appengine-web.xml
>> com.google.apphosting.utils.config.AppEngineConfigException: Could not 
>> locate D:\my-project\ear\WEB-INF\appengine-web.xml
>>         at 
>> com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:140)
>>         at 
>> com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:75)
>>         at 
>> com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:166)
>>         at 
>> com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:399)
>>         at 
>> com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:146)
>>         at 
>> com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:88)
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:139)
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
>> Method)
>>         at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>         at 
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:258)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:94)
>>         at 
>> com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:265)
>>         at 
>> com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
>>         at 
>> com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219)
>>         at 
>> com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)
>> Caused by: java.io.FileNotFoundException: 
>> D:\my-project\ear\WEB-INF\appengine-web.xml (The system cannot find the 
>> path specified)
>>         at java.io.FileInputStream.open(Native Method)
>>         at java.io.FileInputStream.<init>(FileInputStream.java:146)
>>         at java.io.FileInputStream.<init>(FileInputStream.java:101)
>>         at 
>> com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:137)
>>         ... 21 more
>> com.google.apphosting.utils.config.AppEngineConfigException: Invalid 
>> configuration
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl.reportDeferredConfigurationException(DevAppServerImpl.java:445)
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:225)
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:212)
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:210)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:210)
>>         at 
>> com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:277)
>>         at 
>> com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
>>         at 
>> com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219)
>>         at 
>> com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)
>> Caused by: com.google.apphosting.utils.config.AppEngineConfigException: 
>> Invalid appengine-web.xml(D:\my-project\ear\WEB-INF/appengine-web.xml) - 
>> Could not locate D:\my-project\ear\WEB-INF\appengine-web.xml
>>         at 
>> com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:168)
>>         at 
>> com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:399)
>>         at 
>> com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:146)
>>         at 
>> com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:88)
>>         at 
>> com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:139)
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
>> Method)
>>         at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>         at 
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:258)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224)
>>         at 
>> com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:94)
>>         at 
>> com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:265)
>>         ... 3 more
>>
>>
>>  
>>
>>>
>>>  
>>> On Wed, Jan 1, 2014 at 11:32 PM, Tapir <tapi...@gmail.com> wrote:
>>>
>>>> The folder structure of my-projects is total a clone from the above GAE 
>>>> document link.
>>>>
>>>
>>>
>>>
>>> Can you try cloning the modules example from here: 
>>> https://github.com/GoogleCloudPlatform/appengine-modules-sample-javaand see 
>>> if that works for you? 
>>>  
>>>
>>  
>>>  
>>> -----------------
>>> -Vinny P
>>> Technology & Media Advisor
>>> Chicago, IL
>>>
>>> App Engine Code Samples: http://www.learntogoogleit.com
>>>  
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to