cancel
Showing results for 
Search instead for 
Did you mean: 

website preview not working

surendar
Champ in-the-making
Champ in-the-making
Hi,
I am very new to alfresco.
I recently installed Alfresco 3 stable version.
I created a webproject and imported C:\Alfresco\extras\wcm\alfresco-sample-website.war file.
when I try to click on preview website link from MySandbox, I am getting an error 404 the webpage cannot be found.

I have started Alfresco server and Virtualization server. Both are running properly.
I have gone through some posts in this forum and checked all the virtualization configurations as per posts.
I think all my configurations are correct.

But don't know how to solve this issue. please let me know if someone faced the same problem in the past.

Thanks
21 REPLIES 21

damonsmith
Champ in-the-making
Champ in-the-making
You haven't really provided enough info to know what the problem might be.  Can you:
1. stop virtual-tomcat
2. remove your logs
3. start virtual-tomcat
4. check if there are any errors starting up and post them
5. preview your web app and see if there are any new exceptions and post those

You should also be able to click on "Browse Website" and see the web app structure in the base folder; a WEB-INF folder, and various other resources.

cheers,

Damon

surendar
Champ in-the-making
Champ in-the-making
Hi Please find the below log.
please let me know it you need any other logs.

c:\Alfresco\virtual-tomcat\logs\catalina.2009-02-04.log

Feb 4, 2009 12:02:26 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_12\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.6.0_12/bin;C:\Alfresco\bin;C:\ORACLE\Ora92\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Credant\CMG Shield;C:\Program Files\Java\jre6\bin;C:\Perl\bin;
Feb 4, 2009 12:02:26 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
Feb 4, 2009 12:02:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1723 ms
Feb 4, 2009 12:02:30 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 4, 2009 12:02:30 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5
Feb 4, 2009 12:02:30 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@fe748f: display name [org.springframework.context.support.FileSystemXmlApplicationContext@fe748f]; startup date [Wed Feb 04 12:02:30 PST 2009]; root of context hierarchy
Feb 4, 2009 12:02:30 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [file:C:/Alfresco/virtual-tomcat/conf/alfresco-virtserver-context.xml]
Feb 4, 2009 12:02:31 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext@fe748f]: org.springframework.beans.factory.support.DefaultListableBeanFactory@288051
Feb 4, 2009 12:02:31 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from URL [file:C:/Alfresco/virtual-tomcat/conf/alfresco-shared.properties]
Feb 4, 2009 12:02:31 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from URL [file:C:/Alfresco/virtual-tomcat/conf/alfresco-virtserver.properties]
Feb 4, 2009 12:02:31 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@288051: defining beans [virtserver-properties,avmReauthenticatingAdvisor,reauthenticatingAdvice,clientTicketHolder,authenticationService,avmRemote,avmRemoteTransport,avmRemoteTransportRaw,attributeService,attributeServiceTransport,attributeServiceTransportRaw,jndiInfoBean,virtServerInfo,virtServerMBeanServer,virtServerRegistry,serverConnector,virtServerExporter,virtWebappRegistry,cacheControlInfo]; root of factory hierarchy
Feb 4, 2009 12:02:33 PM org.springframework.remoting.rmi.RmiRegistryFactoryBean getRegistry
INFO: Looking for RMI registry at port '50510'
Feb 4, 2009 12:02:34 PM org.springframework.remoting.rmi.RmiRegistryFactoryBean getRegistry
INFO: Could not detect RMI registry - creating new one
Feb 4, 2009 12:02:35 PM org.springframework.jmx.support.ConnectorServerFactoryBean afterPropertiesSet
INFO: JMX connector server started: javax.management.remote.rmi.RMIConnectorServer@d17ec3
Feb 4, 2009 12:02:35 PM org.springframework.jmx.export.MBeanExporter afterPropertiesSet
INFO: Registering beans for JMX exposure on startup
Feb 4, 2009 12:02:36 PM org.alfresco.catalina.host.AVMHost start
INFO: XML validation disabled
Feb 4, 2009 12:02:36 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 4, 2009 12:02:40 PM org.alfresco.mbeans.VirtServerRegistrationThread registerVirtServer
INFO: Connected to remote Alfresco JMX Server
Feb 4, 2009 12:02:52 PM org.apache.catalina.core.ApplicationContext log
INFO: SSIFilter.init() SSI invoker started with 'debug'=1
Feb 4, 2009 12:02:53 PM org.apache.catalina.core.ApplicationContext log
INFO: SSIFilter.init() SSI invoker started with 'debug'=1
Feb 4, 2009 12:02:53 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 4, 2009 12:02:54 PM org.apache.catalina.loader.WebappLoader start
INFO: Dual registration of jndi stream handler: factory already defined
Feb 4, 2009 12:02:56 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
Feb 4, 2009 12:02:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8109
Feb 4, 2009 12:02:56 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
Feb 4, 2009 12:02:56 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Feb 4, 2009 12:02:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 29522 ms

pmonks
Star Contributor
Star Contributor
One immediate problem is that you have the crusty old JRE v1.1.8 from Oracle in your PATH - that can cause all sorts of problems.

Cheers,
Peter

surendar
Champ in-the-making
Champ in-the-making
Hi,
I have deleted C:\Program Files\Oracle\jre\1.1.8\bin; from system environment path variable.
but still problem not solved. I stopped and started both alfresco and virtual servers.

The log after virtual server has been started:
C:\Alfresco\virtual-tomcat\logs\catalina.2009-02-04.log

Feb 4, 2009 8:56:51 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_12\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.6.0_12/bin;C:\Alfresco\bin;C:\ORACLE\Ora92\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Credant\CMG Shield;C:\Program Files\Java\jre6\bin;C:\Perl\bin;
Feb 4, 2009 8:56:51 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
Feb 4, 2009 8:56:51 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1125 ms
Feb 4, 2009 8:56:52 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 4, 2009 8:56:52 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5
Feb 4, 2009 8:56:52 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@1b4fad5: display name [org.springframework.context.support.FileSystemXmlApplicationContext@1b4fad5]; startup date [Wed Feb 04 20:56:52 PST 2009]; root of context hierarchy
Feb 4, 2009 8:56:52 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [file:C:/Alfresco/virtual-tomcat/conf/alfresco-virtserver-context.xml]
Feb 4, 2009 8:56:53 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext@1b4fad5]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5e179a
Feb 4, 2009 8:56:53 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from URL [file:C:/Alfresco/virtual-tomcat/conf/alfresco-shared.properties]
Feb 4, 2009 8:56:53 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from URL [file:C:/Alfresco/virtual-tomcat/conf/alfresco-virtserver.properties]
Feb 4, 2009 8:56:53 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5e179a: defining beans [virtserver-properties,avmReauthenticatingAdvisor,reauthenticatingAdvice,clientTicketHolder,authenticationService,avmRemote,avmRemoteTransport,avmRemoteTransportRaw,attributeService,attributeServiceTransport,attributeServiceTransportRaw,jndiInfoBean,virtServerInfo,virtServerMBeanServer,virtServerRegistry,serverConnector,virtServerExporter,virtWebappRegistry,cacheControlInfo]; root of factory hierarchy
Feb 4, 2009 8:56:54 PM org.springframework.remoting.rmi.RmiRegistryFactoryBean getRegistry
INFO: Looking for RMI registry at port '50510'
Feb 4, 2009 8:56:55 PM org.springframework.remoting.rmi.RmiRegistryFactoryBean getRegistry
INFO: Could not detect RMI registry - creating new one
Feb 4, 2009 8:56:55 PM org.springframework.jmx.support.ConnectorServerFactoryBean afterPropertiesSet
INFO: JMX connector server started: javax.management.remote.rmi.RMIConnectorServer@d56b37
Feb 4, 2009 8:56:55 PM org.springframework.jmx.export.MBeanExporter afterPropertiesSet
INFO: Registering beans for JMX exposure on startup
Feb 4, 2009 8:56:55 PM org.alfresco.catalina.host.AVMHost start
INFO: XML validation disabled
Feb 4, 2009 8:56:55 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 4, 2009 8:56:58 PM org.alfresco.mbeans.VirtServerRegistrationThread registerVirtServer
INFO: Connected to remote Alfresco JMX Server
Feb 4, 2009 8:57:10 PM org.apache.catalina.core.ApplicationContext log
INFO: SSIFilter.init() SSI invoker started with 'debug'=1
Feb 4, 2009 8:57:11 PM org.apache.catalina.core.ApplicationContext log
INFO: SSIFilter.init() SSI invoker started with 'debug'=1
Feb 4, 2009 8:57:11 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 4, 2009 8:57:11 PM org.apache.catalina.loader.WebappLoader start
INFO: Dual registration of jndi stream handler: factory already defined
Feb 4, 2009 8:57:12 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
Feb 4, 2009 8:57:12 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8109
Feb 4, 2009 8:57:12 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62  config=null
Feb 4, 2009 8:57:12 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Feb 4, 2009 8:57:12 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 21250 ms

pmonks
Star Contributor
Star Contributor
That log is showing that the virtualisation server is starting correctly.  Can you post the preview (virtualisation server) URL that's returning the 404?  One possibility is that you're trying to preview a folder and don't have a mapping for that configured in your web application.

Cheers,
Peter

surendar
Champ in-the-making
Champ in-the-making
Hi,
This is the url when I click on preview website from my sandbox:
http://admin.alfrescosimple.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/

I also tried previewing the file index.jsp:
http://admin.alfrescosimple.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/index.jsp

both are returning the same 404 error.

damonsmith
Champ in-the-making
Champ in-the-making
and just to rule out any dumb reasons, can you click browse website and make sure there actually are any files in the web project?  An index.jsp for starters?

ben
Champ in-the-making
Champ in-the-making
Also, are you connected to the internet on that box?  Can you ping alfrescodemo.net?

If not, you will have to drop a line into your hosts file.

Ben.

surendar
Champ in-the-making
Champ in-the-making
Hi,
When I browse website there are lot of folders including WEB-INF and META-INF, and also index.jsp file.

I have no clue how to debug this preview issue.