使用VS2017新建的Web项目报错:Package Microsoft.Composition 1.0.27 is not compatible with netcoreapp1.1...

使用VS2017新建的Web项目报错:

看到这样的错误提示,毫无意义。赶脚这应该是VS2017的BUG,没有显示错误的位置。于是用dotnet restore手动还原,结果在控制台中终于显示了详细的错误:

C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): error : Package Microsoft.Composition 1.0.27 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Composition 1.0.27 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) [C:\Users\username\Documents\Admin.Web.Tests\Admin.Web.Tests.csproj]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): error : One or more packages are incompatible with .NETCoreApp,Version=v1.1. [C:\Users\username\Documents\test\Admin.Web.Tests\Admin.Web.Tests.csproj]

错误项目中的csproj文件:在PropertyGroup节点下增加portable-net45+win8+wp8+wpa81 

解决方案 :右键编辑项目添加下面内容

 <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <PackageTargetFallback>portable-net45+win8+wp8+wpa81</PackageTargetFallback>
  </PropertyGroup>

 转载:https://q.cnblogs.com/q/91766

展开阅读全文

weblogic部署web项目报错java.lang.ClassCastException

10-11

tomcat本地测试都是可以的,但在weblogic上部署,就会报错:rnrnjava.lang.RuntimeException: Unable to create XMLReaderrn at org.jasig.cas.client.util.XmlUtils.getXmlReader(XmlUtils.java:58)rn at org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:130)rn at org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:82)rn at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:217)rn at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:169)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)rn at com.zjhhcsoft.uac.clinet.UacAuthenticationFilter.doFilter(UacAuthenticationFilter.java:176)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)rn at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)rn at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)rn at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)rn at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)rn at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)rn at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)rn at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)rnCaused by: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactoryrn at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)rn at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)rn at org.jasig.cas.client.util.XmlUtils.getXmlReader(XmlUtils.java:56)rn ... 16 morern rn 论坛

没有更多推荐了,返回首页