我在本地计算机上生成证书时遇到以下错误.
C:\Users\abc>keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
Run Code Online (Sandbox Code Playgroud)
我认为在jdk版本中存在一些问题.我在我的同事机器上运行了相同的命令,它运行正常.
请分享您的意见.
我想从事多线程,但我目前的项目没有这样的机会.有人请指导我应该从哪里开始.我需要实时场景,以便我可以直接跳转到编码.我也是并排阅读.
你可以参考一些网站进行练习吗?
我有一个已安装的窗口服务.我在Intelli J.中打开了应用程序的源代码.
我将配置IntelliJ如下所示

我检查了它正在使用的服务和端口的PID.
在Intelli J中运行远程配置时会出现以下错误
4:09:18 PM Error running Remote: Unable to open debugger port : java.net.ConnectException "Connection refused: connect"
Run Code Online (Sandbox Code Playgroud)
有人可以说明如何在IntelliJ中调试窗口服务.这是一份工作计划申请.
installService.cmd如下
set HOME_DIR=%~dp0
set SERVICE="Service_Name"
SET JAVA_OPTIONS=-Xms256m -Xmx256m
@echo Service name is Service_Name
"pathname\Service_Name.exe" -install %SERVICE% %JVM% %JAVA_OPTIONS% -Djava.class.path="pathname\Service_Name.jar" -Dorg.quartz.properties="pathname/Service_NameScheduler.properties" -start com.org.st.Service_Name -stop com.org.st.Service_Name -out "D:/core_log\Service_Name_service_out.log" -err "D:/core_log\Service_Name_service_error.log" -current "pathname\apps"
set JVM="C:/Program Files/Java/jdk1.6.0_29/jre/bin/server/jvm.dll"
Run Code Online (Sandbox Code Playgroud) 我遇到了java.util.zip的奇怪行为.*
我有一个zip文件,在解压缩后会发生这种情况
ZipFile zipfile = new ZipFile(file, ZipFile.OPEN_READ);
Run Code Online (Sandbox Code Playgroud)
这是exaxt错误消息
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.zip.ZipFile.<init>(ZipFile.java:143)
at com.basware.ExtractZip.unpack(ExtractZip.java:27)
at com.basware.ExtractZip.main(ExtractZip.java:17)
Run Code Online (Sandbox Code Playgroud)
但是,如果我使用以下代码,它可以打开存档而不会出现任何错误
try {
BufferedOutputStream dest = null;
File file = new File("File_Path");
FileInputStream fis = new FileInputStream(file);
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
ZipEntry entry;
while((entry = zis.getNextEntry()) != null) {
System.out.println("Extracting: " +entry);
int count;
byte data[] = new byte[BUFFER];
// write the files to the disk
FileOutputStream fos = …Run Code Online (Sandbox Code Playgroud) 我正在解压缩 Zip 档案。因为有两种类型的档案 - Zip 和 GZip。
我正在使用以下
ZipFile zipFile = new ZipFile(file, ZipFile.OPEN_READ);
Run Code Online (Sandbox Code Playgroud)
但是对于 GZip 类型的档案,它给出了以下错误
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
Run Code Online (Sandbox Code Playgroud)
此代码适用于 Zip 压缩类型的档案,不适用于 GZip
有没有办法使用上面的代码,因为我在各种功能中都有使用 ZipFile 的现有功能。如果我将 ZipFile 接口更改为 ZipInputStream 或 GZipInputStream,那么我需要更改多项内容。
编辑:如果传入的档案是 Zip 和 GZip 类型,我是否需要根据@Joachim Sauer 的评论进行不同的实现
在Visual Studio for Web Api 2项目的ASP.NET身份验证生成的模板项目中,我添加了一个类ApplicationUserStore(这就是我的自定义用户)
public class ApplicationUserStore : IUserStore<ApplicationUser>
{
private readonly ApplicationDbContext _context;
public ApplicationUserStore(ApplicationDbContext context)
{
_context = context;
}
public async Task<ApplicationUser> FindByIdAsync(string userName)
{
return await _context.Users.Include(x => x.FMBP_Company).FirstOrDefaultAsync(n => n.UserName == userName);
}
public Task CreateAsync(ApplicationUser user)
{
throw new NotImplementedException();
}
public Task DeleteAsync(ApplicationUser user)
{
throw new NotImplementedException();
}
public Task<ApplicationUser> FindByNameAsync(string userName)
{
return _context.Users.Include(x => x.FMBP_Company).FirstOrDefaultAsync(n => n.UserName == userName);
}
public Task UpdateAsync(ApplicationUser user)
{
throw new NotImplementedException(); …Run Code Online (Sandbox Code Playgroud) 如果我在.xhtml文件中进行更改,则更改不会反映在浏览器的屏幕上.为了使它工作,我必须每次都重新启动服务器.这对我来说似乎很笨拙.
我在我的添加了以下上下文参数web.xml:
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>1</param-value>
</context-param>
Run Code Online (Sandbox Code Playgroud)
但是,它们没有任何效果.
我的技术堆栈如下:
我正在集成SWF 2.2.1,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0M1.我能够点击Spring web-flow xml中提到的第一页,但是出现了以下错误.
com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SEVERE: Error Rendering View[/WEB-INF/flows/AccSrch/searchAccIns.xhtml]
java.lang.UnsupportedOperationException
at javax.faces.context.FacesContext.isReleased(FacesContext.java:609)
at com.sun.faces.context.PartialViewContextImpl.updateFacesContext(PartialViewContextImpl.java:468)
at com.sun.faces.context.PartialViewContextImpl.isAjaxRequest(PartialViewContextImpl.java:108)
at javax.faces.context.PartialViewContextWrapper.isAjaxRequest(PartialViewContextWrapper.java:117)
at javax.faces.component.UIViewRoot.getRendersChildren(UIViewRoot.java:1020)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1755)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80)
at org.springframework.faces.webflow.JsfView.render(JsfView.java:90)
Run Code Online (Sandbox Code Playgroud)
令我惊讶的是,我的.xhtml中只有最少的代码
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:define name="content">
<f:view>
<h:form id="expire" prependId="false">
<h:outputText value="HEllo" />
</h:form>
</f:view>
</ui:define>
</ui:composition>
Run Code Online (Sandbox Code Playgroud)
请参阅此帖子以获取上下文 链接
我无法渲染primefaces 的面包屑控件.我正在使用ui:repeat动态构建面包屑.我把它包装在p:breadCrumb标签内的那一刻,我无法在页面上看到控件
以下代码我在我的.xhtml中使用
<p:breadCrumb>
<ui:repeat value="#{conversationScope.trail}" var="bcrumb">
<h:outputLink value="#{bcrumb.url}">
<h:outputText value="#{bcrumb.label}" />
<h:outputText value=">" />
</h:outputLink>
<p:menuitem value="#{bcrumb.label}" url="#{bcrumb.url}" />
</ui:repeat>
</p:breadCrumb>
Run Code Online (Sandbox Code Playgroud)
请建议有没有其他选择?
我集成了SWF 2.2.1,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0M1I和EhCache以及AspectJ和Castor.
我在app-config.xml中为castor定义了bean
<bean id="oXMapper" class="com.abc.xyz.util.OXMapper">
<property name="unmarshaller" ref="unmarshaller" />
<property name="marshaller" ref="marshaller" />
<property name="acordRequest" ref="acordRequest" />
<property name="acordResponse" ref="acordResponse" />
</bean>
<bean id="unmarshaller" class="org.springframework.oxm.castor.CastorMarshaller">
<property name="mappingLocation"
value="classpath:/templates/mapping/ACORD_Response_Mapping.xml" />
</bean>
<bean id="marshaller" class="org.springframework.oxm.castor.CastorMarshaller">
<property name="mappingLocation"
value="classpath:/templates/mapping/ACORD_Request_Mapping.xml" />
</bean>
<bean id="acordRequest" class="com.abc.xyz.cate.domain.ACORD">
<property name="insuranceSvcRq" ref="insuranceSvcRq" />
<property name="signonRq" ref="CltSearch_signonRq" />
</bean>
Run Code Online (Sandbox Code Playgroud)
我有一个搜索页面,我在这里建立参数,如
<h:panelGrid>
<h:selectOneRadio id="#{msg.srchType}" value="#{acordRequest.insuranceSvcRq.com_csc_ClientSearchRq.com_csc_SearchInfo.com_csc_SearchCriteria.com_csc_ClientSearch.com_csc_SearchNameByType}">
<f:selectItem itemLabel="#{msg.exact}" itemValue="E" id="#{msg.exact}" />
<f:selectItem itemLabel="#{msg.phonetic}" itemValue="S" id="#{msg.phonetic}" />
<f:selectItem itemLabel="#{msg.truncated}" itemValue="P" id="#{msg.truncated}" />
</h:selectOneRadio>
</h:panelGrid>
Run Code Online (Sandbox Code Playgroud)
使用Spring Webflow,我调用OXMapper函数并将ACORD(用于构建xml的分层结构)对象传递给它.此OXMapper类分别负责对象和xml的编组和解组. …
我有两个xmls.There字段可以包含像54.2,54.23,54.234,54.234567这样的值.
有人请告诉我如何确保输出xml中至少会出现两位小数.当前54.2转换为54,2,但我希望它是54,20
我在集成SWF,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0时遇到了奇怪的错误
INFO: Unsanitized stacktrace from failed start...
com.sun.faces.config.ConfigurationException:
Source Document: jar:file:/E:/30May2011/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/simpleWeb/WEB-INF/lib/primefaces-2.2.1.jar!/META-INF/faces-config.xml
Cause: Class 'org.primefaces.component.autocomplete.AutoCompleteRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/component/behavior/ClientBehaviorHolder
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:253)
at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:251)
at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:152)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
at com.sun.faces.config.processor.ManagedBeanConfigProcessor.process(ManagedBeanConfigProcessor.java:265)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
at com.sun.faces.config.processor.ValidatorConfigProcessor.process(ValidatorConfigProcessor.java:107)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
at com.sun.faces.config.processor.ConverterConfigProcessor.process(ConverterConfigProcessor.java:117)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
at com.sun.faces.config.processor.ComponentConfigProcessor.process(ComponentConfigProcessor.java:108)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:312)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:114)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:183)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:301)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:205)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) …Run Code Online (Sandbox Code Playgroud)