developing JSF on GAE, can't run my project , when i run , it throws this exception
Jun 26, 2011 4:09:21 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 26, 2011 4:09:21 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\THS\workspace\jsfgae\war\WEB-INF/appengine-web.xml
Jun 26, 2011 4:09:21 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\THS\workspace\jsfgae\war\WEB-INF/web.xml
Jun 26, 2011 4:09:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext#1700391{/,C:\Users\THS\workspace\jsfgae\war}: java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
Jun 26, 2011 4:09:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler#78dc4c: java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
Jun 26, 2011 4:09:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
at com.sun.faces.config.WebConfiguration.processJndiEntries(WebConfiguration.java:613)
at com.sun.faces.config.WebConfiguration.<init>(WebConfiguration.java:122)
at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:182)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:163)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:186)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:157)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:169)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Jun 26, 2011 4:09:23 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/
Yes, it's common problem, look at http://java.dzone.com/news/jsf2-configuration-google-app how to fix this.
And also look at http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine There is a lot of information about what Java libraries works on GAE, and what are not
Related
I am attempting to run the sample GWT application with Google App Engine. I simply installed the Google Plugin for Eclipse and created a new project that uses both GWT and GAE, with the sample code project. The library versions that I'm using are: JDK-1.7.0_55; GAE-1.6.4; GWT-2.6.0. I'm getting the following exception when I try to run locally:
Initializing App Engine server
Jun 14, 2014 11:36:48 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 14, 2014 11:36:48 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\Andy\workspace\GAETest\war\WEB-INF/appengine-web.xml
Jun 14, 2014 11:36:48 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\Andy\workspace\GAETest\war\WEB-INF/web.xml
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/appengine/api/utils/SystemProperty
at com.google.appengine.tools.development.AbstractContainerService.setSystemProperties(AbstractContainerService.java:438)
at com.google.appengine.tools.development.AbstractContainerService.staticInitialize(AbstractContainerService.java:386)
at com.google.appengine.tools.development.AbstractContainerService.loadAppEngineWebXml(AbstractContainerService.java:369)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:237)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844)
at com.google.gwt.dev.DevMode.main(DevMode.java:322)
Caused by: java.lang.ClassNotFoundException: com.google.appengine.api.utils.SystemProperty
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at com.google.appengine.tools.development.DevAppServerClassLoader.loadClass(DevAppServerClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 10 more
I've tried adding various jar files that include the SystemProperty class, but I nothing seems to work correctly. I would really appreciate any suggestions or direction on this ... I know that it should work in some form, since I've seen GWT applications running on GAE.
Make sure that appengine-api.jar (choose one that comes with the App Engine SDK) is included in /war/WEB-INF/lib/ folder. It's not enough to add it to your classpath. Eclipse should give you a warning in Problems tab.
I do not know how to debug the following error : (could you explain me how to debug this kind of error ?).
One error is related to Guice Filter, and the other one is related to MessageBodyReader.
Initializing App Engine server
May 25, 2013 1:46:06 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\JUNO-WS\0-MS\war\WEB-INF/appengine-web.xml
May 25, 2013 1:46:06 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\JUNO-WS\0-MS\war\WEB-INF/web.xml
May 25, 2013 1:46:06 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\0-LIB\GAE\appengine-java-sdk-1.7.7.1\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\JUNO-WS\0-MS\war\WEB-INF\appengine-web.xml'
May 25, 2013 1:46:06 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
May 25, 2013 1:46:07 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
May 25, 2013 1:46:09 PM com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized:
Type: Master/Slave
Storage: C:\JUNO-WS\0-MS\war\WEB-INF\appengine-generated\local_db.bin
May 25, 2013 1:46:09 PM com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: Time to load datastore: 21 ms
May 25, 2013 1:46:09 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed guiceFilter: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate MessageBodyReader
May 25, 2013 1:46:09 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext#816c920{/,C:\JUNO-WS\0-MS\war}
java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate MessageBodyReader
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:35)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:212)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67)
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.init(FilterDispatcher.java:39)
at com.MS.server.guice.GuiceRestEasyFilterDispatcher.init(GuiceRestEasyFilterDispatcher.java:34)
at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:114)
at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:98)
at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:172)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:230)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:307)
at com.google.appengine.tools.development.AutomaticServerInstanceHolder.startUp(AutomaticServerInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractServer.startup(AbstractServer.java:80)
at com.google.appengine.tools.development.Servers.startup(Servers.java:78)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:216)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.RuntimeException: Unable to instantiate MessageBodyReader
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1164)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1107)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:70)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:31)
... 31 more
Caused by: java.lang.RuntimeException: Failed to construct public org.jboss.resteasy.plugins.providers.DocumentProvider(org.jboss.resteasy.spi.ResteasyConfiguration)
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:144)
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:1861)
at org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(ResteasyProviderFactory.java:704)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1159)
... 34 more
Caused by: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:108)
at org.jboss.resteasy.plugins.providers.DocumentProvider.<init>(DocumentProvider.java:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:127)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:135)
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:132)
... 37 more
May 25, 2013 1:46:09 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
May 25, 2013 1:46:09 PM com.google.appengine.tools.development.AbstractServer startup
INFO: Server default is running at http://localhost:8888/
May 25, 2013 1:46:09 PM com.google.appengine.tools.development.AbstractServer startup
INFO: The admin console is running at http://localhost:8888/_ah/admin
May 25, 2013 1:46:09 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: Dev App Server is now running
Linking modules
Bootstrap link for command-line module 'com.MS.MS'
Linking module 'MS'
Invoking Linker Cross-Site-Iframe
Ignoring the following script tags in the gwt.xml file
jsonpath.js
May 25, 2013 1:46:39 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$PersistDatastore persist
INFO: Time to persist datastore: 19 ms
-- Thanks you
I solved my error adding xalan-2.7.1.jar to the classpath.
Trying to get work a JUnittest in a Google-App-Engine Eclipse-Environment
Unittest is testing a Class handling JPA Entities by getting an Entitymanager.
In the "Class under Test" following call succeds in productivety code, but fails if I run
it as JUnit Test.
EntityManager em = EMF.get().createEntityManager();
In JUnit Test above call throws an exception, "Unable to find a default provider" (see stack trace)
I moved the unittest directly in the src- Directory tree, for beeing sure that persistence.xml is reachable. It throws the same exception. It seems that the persistenceUnit with the name "transactions-optional" is reachable.
How can I configure a default provider in JUnittest?
I included following jars:
${SDK_ROOT}/lib/impl/appengine-api.jar
${SDK_ROOT}/lib/impl/appengine-api-labs.jar
${SDK_ROOT}/lib/impl/appengine-api-stubs.jar
The demo-Unittest on GAE- site is working fine:
GAE Demo JUnittest
Do I have to do additional configuration in case of JPA-Use in the test-Setup?
private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
Console output with stack-trace:
Jun 07, 2013 12:33:17 PM com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized:
Type: Master/Slave
Storage: In-memory
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.client.GreetingService was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.persistence.EMF was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.connectivity.UserServlet was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.business.AShopperManagerTest was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.business.AShopperManager was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.shared.FieldVerifier was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.server.GreetingServiceImpl was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.client.AShopperCloud was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.metadata.MetaDataManager loadPersistenceUnit
WARNING: Class ch.didge.ashopper.cloud.client.GreetingServiceAsync was specified in persistence-unit transactions-optional but not annotated, so ignoring
Jun 07, 2013 12:33:18 PM org.datanucleus.NucleusContext getValidationHandler
WARNING: Unable to create validator handler
javax.validation.ValidationException: Unable to find a default provider
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264)
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111)
at org.datanucleus.NucleusContext.getValidationHandler(NucleusContext.java:1067)
at org.datanucleus.api.jpa.JPAEntityManager.<init>(JPAEntityManager.java:138)
at org.datanucleus.api.jpa.JPAEntityManagerFactory.newEntityManager(JPAEntityManagerFactory.java:564)
at org.datanucleus.api.jpa.JPAEntityManagerFactory.createEntityManager(JPAEntityManagerFactory.java:529)
at ch.didge.ashopper.cloud.business.AShopperManager.register(AShopperManager.java:169)
at ch.didge.ashopper.cloud.business.AShopperManagerTest.testRegister(AShopperManagerTest.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Jun 07, 2013 12:33:18 PM com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized:
Type: Master/Slave
Storage: In-memory
Has anybody an idea what went wrong?
It is looking for a default provider for BEAN VALIDATION, not JPA. If you want to use bean validation then put something like Apache BVAL or Hibernate Validator in the CLASSPATH.
i get crazy. I wanna use the google youtube direct and i have followed exactly the instruction of code.google.com/p/youtube-direct/wiki/GettingStarted
but in the end, when i´d try to run (debug) the YTD in eclipse for testing it local, i get the following failur code instead the message, that the server is available under
(localhost:8080/)
I have installed - jdk 1.6.0.38 & jdk 1.7.0.10
also the latest google eclipse plugin
i have adapted the appengine-web.xlm file as mentioned with my id and the developer key
i am totally lost for the moment. may you can help. thanks
11.01.2013 22:41:39 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
11.01.2013 22:41:39 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\martin\workspace1\ytd\war\WEB-INF/appengine-web.xml
11.01.2013 22:41:39 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\martin\workspace1\ytd\war\WEB-INF/web.xml
11.01.2013 22:41:39 com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value 'D:\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.7.4\appengine-java-sdk-1.7.4\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\martin\workspace1\ytd\war\WEB-INF\appengine-web.xml'
11.01.2013 22:41:39 com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
11.01.2013 22:41:40 com.google.apphosting.utils.jetty.JettyLogger warn
WARNUNG: failed com.google.appengine.tools.development.DevAppEngineWebAppContext#4a1c2f8c{/,C:\Users\martin\workspace1\ytd\war}: java.lang.UnsupportedClassVersionError: com/google/ytd/guice/GuiceServletConfig : Unsupported major.minor version 51.0
11.01.2013 22:41:40 com.google.apphosting.utils.jetty.JettyLogger warn
WARNUNG: failed JettyContainerService$ApiProxyHandler#75b657: java.lang.UnsupportedClassVersionError: com/google/ytd/guice/GuiceServletConfig : Unsupported major.minor version 51.0
11.01.2013 22:41:40 com.google.apphosting.utils.jetty.JettyLogger warn
WARNUNG: Error starting handlers
java.lang.UnsupportedClassVersionError: com/google/ytd/guice/GuiceServletConfig : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:213)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1101)
at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:630)
at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:205)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:232)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:157)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:333)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:269)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:245)
11.01.2013 22:41:40 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#127.0.0.1:8888
11.01.2013 22:41:40 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/
11.01.2013 22:41:40 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at http://localhost:8888/_ah/admin
Have you checked the port of the server in which it was running, your eclipse console message says that it is running on http://localhost:8888/ and you are trying to run it on http://localhost:8080/
And you can see the YTD admin under http://localhost:8888/admin
I'm having issues setting up Solr as Tomcat service in CentOS. I’m using solr 3.3.0 which should be working with Tomcat 5.5 installed from cPanel. The error I was getting is:
Can't find resource 'solrconfig.xml' in classpath or '/home/sampleuser/public_html/apache-solr/example/solr/./conf/', cwd=/usr/local/jakarta/apache-tomcat-5.5.33/bin
I saw other people having similar issues. I googled and tried to apply all of the approaches. However nothing worked for me so far.
I did the following:
Copied solr.war to tomcat/webapps
Restarted Tomcat Service
Edited /usr/local/jakarta/tomcat/webapps/solr/WEB-INF/web.xml as:
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/home/sampleuser/public_html/apache-solr/example/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
Created solr.xml in /usr/local/jakarta/tomcat/conf/Catalina/localhost as:
<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/usr/local/jakarta/tomcat/webapps/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String"
value="/home/sampleuser/public_html/apache-solr/example"override="true"/>
</Context>
Edited tomcat startup script at etc/init.d (not sure if I had to do it at all) with:
export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/sampleuser/public_html/apache-solr/example/solr"
Below is the complete error log from catalina.err:
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 9, 2011 7:35:21 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk/jre/lib/amd64/server:/usr/local/jdk/jre/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Oct 9, 2011 7:35:23 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 9, 2011 7:35:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2875 ms
Oct 9, 2011 7:35:23 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 9, 2011 7:35:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.33
Oct 9, 2011 7:35:23 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 9, 2011 7:35:24 PM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase /usr/local/jakarta/tomcat/webapps/solr.war inside the host appBase has been specified, and will be ignored
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/sampleuser/public_html/apache-solr/example/solr/'
Oct 9, 2011 7:35:25 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:25 PM org.apache.solr.core.CoreContainer$Initializer initialize
INFO: looking for solr.xml: /home/sampleuser/public_html/apache-solr/example/solr/solr.xml
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:25 PM org.apache.solr.core.CoreContainer <init>
INFO: New CoreContainer: solrHome=/home/sampleuser/public_html/apache-solr/example/solr/ instance=1537767228
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/sampleuser/public_html/apache-solr/example/solr/'
Oct 9, 2011 7:35:26 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/sampleuser/public_html/apache-solr/example/solr/./'
Oct 9, 2011 7:35:26 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or '/home/sampleuser/public_html/apache-solr/example/solr/./conf/', cwd=/usr/local/jakarta/apache-tomcat-5.5.33/bin
at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:268)
at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:234)
at org.apache.solr.core.Config.<init>(Config.java:141)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:131)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:435)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:133)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3666)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:634)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:561)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:496)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219)
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: user.dir=/usr/local/jakarta/apache-tomcat-5.5.33/bin
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init()
Oct 9, 2011 7:35:26 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init() done
Oct 9, 2011 7:35:26 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrUpdateServlet init
INFO: SolrUpdateServlet.init() done
When I copy the missing path via shell I was able to navigate just fine. Seem like Tomcat cannot locate the solrconfig.xml.
First off: you don't need to #3 and #4 and 5. #3 isn't really recommended unless you are explicitly customizing the solr.war. #4 and #5 are two different ways to do the same thing - use whichever one is most convenient for you (JNDI vs system properties)
Second: please note that while #3 and #5 are consistent, in #4 you actually specify a different Solr home dir (the parent dir of what you really want)
Third: I think the crux of your problem is file permissions.
The logging is a bit confusing due to SOLR-3264 which causes "instanceDirs" for each core to be refered to erroneously as "Solr Home" but what seems to be happening is that it can't find (or read) your "/home/sampleuser/public_html/apache-solr/example/solr/solr.xml" so it's going into legacy "Single Core" mode where it assumes that you want to use your Solr Home dir as an instanceDir for a (single) Solr Core -- so it then looks for "/home/sampleuser/public_html/apache-solr/example/solr/solrconf.xml" and if it can't find (or read) that file it gives up.
So depending on whether your main concern is that you actually have a solr.xml (pointing to alternate instanceDirs) hat it's not finding, or if you actually have a solrconfig.xml file where it's looking, check the file permissions of those files (and their directories), and make sure they are readable by the effective user of your tomcat server.
(FWIW: Solr 3.6 and up will have better logging when solr.xml is not found and legacy mode is used, and I've opened SOLR-3266 to pursue better ways of logging/erroring on unreadable files in the future)