I just got to fix the old project from other guys which use visual studio 2012. I think it was built on MVC4 because it still uses WebMatrix.Data and WebMatrix.WebData. Because I don't have that vs version so I was using visual studio 2013 community edition and run install-package update. After couple fixes, I got this problem when I tried to run it. The following is the error messages:
Server Error in '/' Application.
Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or
assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system
cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the exception
can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = System.Web.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///D:/BitBucketGit/DirtOilGas.Website/
LOG: Initial PrivatePath = D:\BitBucketGit\DirtOilGas.Website\bin
Calling assembly : System.Web.WebPages.Razor, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\BitBucketGit
\DirtOilGas.Website\web.config
LOG: Using host configuration file: C:\Users\amie\Documents\IISExpress
\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET
\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.Razor, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET
/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a
/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET
/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a
/System.Web.Razor/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///D:/BitBucketGit
/DirtOilGas.Website/bin/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///D:/BitBucketGit
/DirtOilGas.Website/bin/System.Web.Razor/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET
/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a
/System.Web.Razor.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET
/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a
/System.Web.Razor/System.Web.Razor.EXE.
LOG: Attempting download of new URL file:///D:/BitBucketGit
/DirtOilGas.Website/bin/System.Web.Razor.EXE.
LOG: Attempting download of new URL file:///D:/BitBucketGit
/DirtOilGas.Website/bin/System.Web.Razor/System.Web.Razor.EXE.
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Web.Razor,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one
of its dependencies. The system cannot find the file specified.]
WebMatrix.WebData.PreApplicationStartCode.Start() +0
[InvalidOperationException: The pre-application start initialization method
Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception
with the following error message: Could not load file or assembly
'System.Web.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system
cannot find the file specified..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1
methods, Func`1 setHostingEnvironmentCultures) +547
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1
methods) +132
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String
preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters,
PolicyLevel policyLevel, Exception appDomainCreationException) +521
[HttpException (0x80004005): The pre-application start initialization method
Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception
with the following error message: Could not load file or assembly
'System.Web.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system
cannot find the file specified..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9930508
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +254
Server Error in '/' Application.
Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///D:/BitBucketGit/DirtOilGas.Website/
LOG: Initial PrivatePath = D:\BitBucketGit\DirtOilGas.Website\bin
Calling assembly : System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\BitBucketGit\DirtOilGas.Website\web.config
LOG: Using host configuration file: C:\Users\amie\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a/System.Web.Razor/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///D:/BitBucketGit/DirtOilGas.Website/bin/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///D:/BitBucketGit/DirtOilGas.Website/bin/System.Web.Razor/System.Web.Razor.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a/System.Web.Razor.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/86bf6c81/eeee762a/System.Web.Razor/System.Web.Razor.EXE.
LOG: Attempting download of new URL file:///D:/BitBucketGit/DirtOilGas.Website/bin/System.Web.Razor.EXE.
LOG: Attempting download of new URL file:///D:/BitBucketGit/DirtOilGas.Website/bin/System.Web.Razor/System.Web.Razor.EXE.
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
WebMatrix.WebData.PreApplicationStartCode.Start() +0
[InvalidOperationException: The pre-application start initialization method Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +547
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +521
[HttpException (0x80004005): The pre-application start initialization method Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9930508
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Manual solution findings may take time. Just Right click project and click 'Manage Nuget Packages' , search 'Microsoft ASP.NET Razor' and install version 3.2.3. it will update required assemblies and references.
Hope it will help you.
I follow the guide : http://www.highcharts.com/docs/export-module/setting-up-the-server
Windows : 7
JDK : 8.0.20
Maven : 3.2.3
Apache Tomcat : 8.0.12
Highcharts-export-web : Version f97fbcf5f0d8cc72942a3b680e0e2a187ba1aedf and v4.0.4
I put the war into the webapps folder and I start the server. The server does not start
I have tried on several versions (checkout from 5 November 2014 and the last tag v4.0.4). It produces the same output
I have tried jetty version too, and this is the same result.
Output of the startup.bat
05-Nov-2014 16:14:23.756 INFO [main] org.apache.catalina.core.AprLifecycleListen
er.init The APR based Apache Tomcat Native library which allows optimal performa
nce in production environments was not found on the java.library.path: C:\devtoo
ls\jdks\jdk1.8.0_20\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C
:\ProgramData\Oracle\Java\javapath;C:\devtools\Microchip\mplabc32\v2.02\bin;C:\d
evtools\Microchip\MPLAB C30\bin;C:\Windows\system32;C:\Windows;C:\Windows\System
32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Micro
soft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\T
ools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Progra
m Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Serv
er\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSSh
ell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\
PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\
Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\
Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Microsoft\Web Platfor
m Installer\;C:\Program Files (x86)\Microsoft Team Foundation Server 2013 Power
Tools\;C:\Program Files (x86)\Microsoft Team Foundation Server 2013 Power Tools\
Best Practices Analyzer\;C:\Program Files (x86)\Windows Kits\8.1\Windows Perform
ance Toolkit\;C:\devtools\Microchip\MPLAB C32 Suite\bin;C:\Program Files\Microso
ft SQL Server\120\Tools\Binn\;C:\devtools\Git\cmd;C:\devtools\Git\bin;C:\Program
Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\devtools\adt-bundle-windows-x86-2
0140624\sdk\tools;C:\devtools\apache-ant-1.9.4\bin;C:\devtools\jdks\jdk1.8.0_20\
bin;C:\Program Files\Symantec.cloud\PlatformAgent\;C:\devtools\apache-maven-3.2.
3\bin;;.
05-Nov-2014 16:14:24.006 INFO [main] org.apache.coyote.AbstractProtocol.init Ini
tializing ProtocolHandler ["http-nio-8080"]
05-Nov-2014 16:14:24.075 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.
getSharedSelector Using a shared selector for servlet write/read
05-Nov-2014 16:14:24.078 INFO [main] org.apache.coyote.AbstractProtocol.init Ini
tializing ProtocolHandler ["ajp-nio-8009"]
05-Nov-2014 16:14:24.081 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.
getSharedSelector Using a shared selector for servlet write/read
05-Nov-2014 16:14:24.082 INFO [main] org.apache.catalina.startup.Catalina.load I
nitialization processed in 651 ms
05-Nov-2014 16:14:24.110 INFO [main] org.apache.catalina.core.StandardService.st
artInternal DÚmarrage du service Catalina
05-Nov-2014 16:14:24.110 INFO [main] org.apache.catalina.core.StandardEngine.sta
rtInternal Starting Servlet Engine: Apache Tomcat/8.0.12
05-Nov-2014 16:14:24.158 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployWAR DÚploiement de l'archive C:\devtools\apache-tomcat-8.0.12
-Highcharts\webapps\highcharts-export-web.war de l'application web
05-Nov-2014 16:14:24.177 WARNING [localhost-startStop-1] org.apache.catalina.sta
rtup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting
property 'antiJARLocking' to 'true' did not find a matching property.
[ERROR] [localhost-startStop-1 04:14:26] (ContextLoader.java:initWebApplicationC
ontext:307) Context initialization failed
**java.lang.IllegalArgumentException**
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:52)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactor
y.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFacto
ry.getMetadataReader(CachingMetadataReaderFactory.java:101)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactor
y.getMetadataReader(SimpleMetadataReaderFactory.java:76)
at org.springframework.context.annotation.ConfigurationClassParser.getIm
ports(ConfigurationClassParser.java:298)
at org.springframework.context.annotation.ConfigurationClassParser.getIm
ports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.getIm
ports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.doPro
cessConfigurationClass(ConfigurationClassParser.java:230)
at org.springframework.context.annotation.ConfigurationClassParser.proce
ssConfigurationClass(ConfigurationClassParser.java:153)
at org.springframework.context.annotation.ConfigurationClassParser.parse
(ConfigurationClassParser.java:130)
at org.springframework.context.annotation.ConfigurationClassPostProcesso
r.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
at org.springframework.context.annotation.ConfigurationClassPostProcesso
r.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
at org.springframework.context.support.AbstractApplicationContext.invoke
BeanFactoryPostProcessors(AbstractApplicationContext.java:630)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebA
pplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:4751)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5175)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:724)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:70
0)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
1704)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
05-Nov-2014 16:14:26.930 SEVERE [localhost-startStop-1] org.apache.catalina.core
.StandardContext.startInternal Error listenerStart
05-Nov-2014 16:14:27.028 SEVERE [localhost-startStop-1] org.apache.catalina.core
.StandardContext.startInternal Erreur de dÚmarrage du contexte [/highcharts-expo
rt-web] suite aux erreurs prÚcÚdentes
05-Nov-2014 16:14:27.040 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployWAR Deployment of web application archive C:\devtools\apache-
tomcat-8.0.12-Highcharts\webapps\highcharts-export-web.war has finished in 2á882
ms
05-Nov-2014 16:14:27.041 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployWAR DÚploiement de l'archive C:\devtools\apache-tomcat-8.0.12
-Highcharts\webapps\richCharts.war de l'application web
05-Nov-2014 16:14:28.470 INFO [localhost-startStop-1] com.sun.faces.config.Confi
gureListener.contextInitialized Initializing Mojarra (1.2_13-b01-FCS) for contex
t '/richCharts'
05-Nov-2014 16:14:28.476 WARNING [localhost-startStop-1] com.sun.faces.config.Co
nfigureListener.contextInitialized JSF1059: WARNING! The com.sun.faces.verifyOb
jects feature is to aid developers not using tools. It shouldn''t be enabled if
using an IDE, or if this application is being deployed for production as it wil
l impact application start times.
log4j:WARN No appenders could be found for logger (org.ajax4jsf.renderkit.Chamel
eonRenderKitFactory).
log4j:WARN Please initialize the log4j system properly.
05-Nov-2014 16:14:29.403 INFO [localhost-startStop-1] com.sun.faces.spi.Injectio
nProviderFactory.createInstance JSF1048: PostConstruct/PreDestroy annotations pr
esent. ManagedBeans methods marked with these annotations will have said annota
tions processed.
05-Nov-2014 16:14:31.062 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployWAR Deployment of web application archive C:\devtools\apache-
tomcat-8.0.12-Highcharts\webapps\richCharts.war has finished in 4á020 ms
05-Nov-2014 16:14:31.064 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory DÚploiement du rÚpertoire C:\devtools\apache-tomcat
-8.0.12-Highcharts\webapps\docs de l'application web
05-Nov-2014 16:14:31.088 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory Deployment of web application directory C:\devtools
\apache-tomcat-8.0.12-Highcharts\webapps\docs has finished in 24 ms
05-Nov-2014 16:14:31.088 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory DÚploiement du rÚpertoire C:\devtools\apache-tomcat
-8.0.12-Highcharts\webapps\examples de l'application web
05-Nov-2014 16:14:31.525 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory Deployment of web application directory C:\devtools
\apache-tomcat-8.0.12-Highcharts\webapps\examples has finished in 436 ms
05-Nov-2014 16:14:31.525 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory DÚploiement du rÚpertoire C:\devtools\apache-tomcat
-8.0.12-Highcharts\webapps\host-manager de l'application web
05-Nov-2014 16:14:31.566 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory Deployment of web application directory C:\devtools
\apache-tomcat-8.0.12-Highcharts\webapps\host-manager has finished in 41 ms
05-Nov-2014 16:14:31.567 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory DÚploiement du rÚpertoire C:\devtools\apache-tomcat
-8.0.12-Highcharts\webapps\manager de l'application web
05-Nov-2014 16:14:31.595 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory Deployment of web application directory C:\devtools
\apache-tomcat-8.0.12-Highcharts\webapps\manager has finished in 28 ms
05-Nov-2014 16:14:31.596 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory DÚploiement du rÚpertoire C:\devtools\apache-tomcat
-8.0.12-Highcharts\webapps\ROOT de l'application web
05-Nov-2014 16:14:31.620 INFO [localhost-startStop-1] org.apache.catalina.startu
p.HostConfig.deployDirectory Deployment of web application directory C:\devtools
\apache-tomcat-8.0.12-Highcharts\webapps\ROOT has finished in 25 ms
05-Nov-2014 16:14:31.626 INFO [main] org.apache.coyote.AbstractProtocol.start St
arting ProtocolHandler ["http-nio-8080"]
05-Nov-2014 16:14:31.637 INFO [main] org.apache.coyote.AbstractProtocol.start St
arting ProtocolHandler ["ajp-nio-8009"]
05-Nov-2014 16:14:31.640 INFO [main] org.apache.catalina.startup.Catalina.start
Server startup in 7558 ms
Do you have a stable version which does not contain this problem ?
I'm getting an error when I deploy a fresh MVC 3 web app to Azure. Though the site appears to work there are role initialisation errors meaning that the deployment from VS2010 never completes. (See output below.)
I suspect the Mindscape.Lightspeed.Web assembly is dependent on MVC 2. But I thought the following config section would override it.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
You can simulate this with an Azure project by uninstalling MVC 2 from your development system and then running in the development fabric.
How can I fix this?
Microsoft.WindowsAzure.ServiceRuntime Critical: 201 : 'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1001b7f1\d3c78bbf\assembly\dl3\d2532ce7\a08fd830_9d4bcd01\Microsoft.WindowsAzure.Configuration.DLL'
Role entrypoint could not be created:
System.TypeLoadException: Unable to load the role entry point due to the following exceptions:
-- System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
=== Pre-bind state information ===
LOG: User = DiscoveryOne\scott
LOG: DisplayName = System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/scott/Documents/Visual Studio 2010/Projects/Teto.Azure/Teto.Azure/csx/Debug/roles/Teto.Web/approot/bin
LOG: Initial PrivatePath = C:\Users\scott\Documents\Visual Studio 2010\Projects\Teto.Azure\Teto.Azure\csx\Debug\roles\Teto.Web\approot\bin
Calling assembly : Mindscape.LightSpeed.Web, Version=4.0.1351.20441, Culture=neutral, PublicKeyToken=360c8f37b466ebb2.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Users/scott/Documents/Visual Studio 2010/Projects/Teto.Azure/Teto.Azure/csx/Debug/roles/Teto.Web/approot/bin/System.Web.Mvc.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly)
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.CreateRoleEntryPoint(RoleType roleTypeEnum)
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
The program '[1564] WaIISHost.exe: Program Trace' has exited with code 0 (0x0).
The program '[1564] WaIISHost.exe: Managed (v4.0.30319)' has exited with code -1 (0xffffffff).
The assembly redirect should be fine, but don't forget that you might need to configure it in multiple files:
Web.config
Views\Web.config
WaIISHost.exe.config
You'll need to make sure you modify both Web.config files. If you're calling that LightSpeed assembly from your WebRole.cs file, I suggest you create a new file called WeIISHost.exe.config, add the redirect and set it the Copy to Output Directory to always. This is required because the WebRole now uses full IIS.
Have you checked to make sure Lightspeed is configured to run in Partial Trust mode?
http://www.mindscapehq.com/blog/index.php/2010/01/13/the-dynamic-duo-lightspeed-azure
I have Orbeon 3.9 PE-version running on Tomcat 6.0, installed on Debian 6.0.2 with MySQL 5.1.
I can get the Orbeon running and access/use applications deployed in the resources/apps but accessing the form builder new-form-creation (../orbeon/fr/orbeon/builder/new) causes the following error to be printed into log (and the page does not load, preventing from creating forms):
2011-10-04 14:11:09,274 INFO OrbeonSessionListener - Session Listener - Session created.
2011-10-04 14:11:10,631 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2011-10-04 14:11:10,631 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2011-10-04 14:11:11,838 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2011-10-04 14:11:11,838 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2011-10-04 14:12:00,649 ERROR ProcessorService - Exception with no location data
java.lang.StackOverflowError
at java.lang.Exception.<init>(Exception.java:41)
at java.lang.RuntimeException.<init>(RuntimeException.java:43)
at org.orbeon.oxf.common.OXFException.<init>(OXFException.java:203)
at org.orbeon.oxf.common.ValidationException.<init>(ValidationException.java:105)
at org.orbeon.oxf.xforms.xbl.XBLContainer.performDefaultAction(XBLContainer.java:809)
at org.orbeon.oxf.xforms.XFormsContainingDocument.performDefaultAction(XFormsContainingDocument.java:1004)
at org.orbeon.oxf.xforms.xbl.XBLContainer.dispatchEvent(XBLContainer.java:1035)
at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:880)
at org.orbeon.oxf.xforms.XFormsContextStack.pushBinding(XFormsContextStack.java:562)
at org.orbeon.oxf.xforms.XFormsContextStack.pushBinding(XFormsContextStack.java:247)
at org.orbeon.oxf.xforms.ControlTree$CreateControlsListener.pushBinding(ControlTree.java:824)
.....
My context file 'orbeon.xml':
<Context path="/orbeon" docBase="/usr/local/orbeon-3.9" debug="0" reloadable="true">
<Resource name="jdbc/orbeonmysql" auth="Container" type="javax.sql.DataSource" initialSize="3" maxActive="10" maxIdle="20" maxWait="30000" driverClassName="com.mysql.jdbc.Driver" poolPreparedStatements="true" username="orbeon" password="xxx" url="jdbc:mysql://localhost:3306/orbeon?useUnicode=true&characterEncoding=UTF8"/>
</Context>
The database config in properties-local.xml:
<property as="xs:anyURI" name="oxf.fr.persistence.service.mysql.datasource" value="orbeonmysql"/>
<property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/mysql"/>
I have installed the same Orbeon PE package on windows 7 with tomcat6 and mysql 5.1 with the same settings and it works just fine.
On the Debian server I have Confluence installed on the same tomcat, connecting to the same database server, which also works just fine.
I have tried with 2 versions of MySQL Connectors:
mysql-connector-java-5.0.8
mysql-connector-java-5.1.17
I'm lost here as the error log tells me nothing that I could work with, nor am I able to find any similar issues to get clues from.
// UPDATE
Tried both the -Xss16m and -Xss32m. The page will not give the StackOverFlowError anymore, but will never stop loading either.
I also removed the Confluence instance from the Tomcat to be sure it is not part of the problem.
I inserted a database dump and noticed that the builder/summary page will display the forms in the db.
I can access the summary pages of published forms. Also it is possible to fill in new data with the published forms or edit existing.
The only thing not working are the builder edit/new pages.
I also tried adding 'ulimit -s 2048' to tomcat startup, no effect.
The tomcat JAVA_OPTS in tomcat config are as follows:
ulimit -s 2048
export JAVA_OPTS="-Djava.awt.headless=true -Xmx1024M -Xms256m -XX:PermSize=256m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Xss32m"
export CATALINA_OPTS="$CATALINA_OPTS $JAVA_OPTS"
The last log entries printed are:
2011-10-06 08:41:09,051 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2011-10-06 08:41:09,051 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2011-10-06 08:41:10,289 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2011-10-06 08:41:10,289 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
// END OF LOG, no new rows after 10mins of waiting
I am trying to deploy a JSF 2.0 application with Facelets 1.1.14 to Tomcat7. I am getting the following exceptions:
INFO: Initializing Mojarra 2.0.0 (FCS b23) for context '/AdminUI'
3 Aug, 2011 7:44:32 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
3 Aug, 2011 7:44:33 PM com.sun.faces.config.ConfigManager initialized
INFO: Unsanitized stacktrace from failed start...
java.lang.NullPointerException
at com.sun.faces.util.Util.loadClass(Util.java:200)
at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:312)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:416)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:370)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:313)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:262)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:337)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:219)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
3 Aug, 2011 7:44:33 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
3 Aug, 2011 7:44:33 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/AdminUI] startup failed due to previous errors
3 Aug, 2011 7:44:33 PM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:104)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:305)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4763)
at org.apache.catalina.core.StandardContext$4.run(StandardContext.java:5472)
at java.lang.Thread.run(Thread.java:662)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5481)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:225)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)
at java.lang.Thread.run(Thread.java:662)
3 Aug, 2011 7:44:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/AdminUI] appears to have started a thread named [Mojarra-ResourceCache-1-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Iam having the following jars under/WEB-INF/lib/
activation-1.1.jar
antlr-2.7.6.jar
asm-3.1.jar
cglib-2.2.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
hibernate-commons-annotations-3.2.0.final.jar
hibernate-core-3.6.5.final.jar
hibernate-entitymanager-3.6.5.final.jar
hibernate-jpa-2.0-api-1.0.0.final.jar
hibernate-validator-4.0.2.GA.jar
javassist-3.12.0.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.3.jar
jsf-api-2.0.jar
jsf-impl-2.0.0.jar
jta-1.1.jar
slf4j-api-1.6.1.jar
stax-api-1.0-2.jar
How to resolve this?
JSF 2.0 ships with Facelets 2.0 bundled. The Facelets 1.x JAR file would only collide with this. You should remove the Facelets 1.x JAR file.
All JAR files you need for developing JSF 2.0 with Facelets on Tomcat are jsf-api.jar and jsf-impl.jar.