gpt4 book ai didi

java - 泽西客户端创建错误

转载 作者:IT王子 更新时间:2023-10-29 00:35:12 26 4
gpt4 key购买 nike

经过一个小时的交通后,我有以下异常,我必须检查什么?此代码可在一个小时内正常运行。我认为某些系统文件夹已满。

Dec 21, 2014 2:27:32 PM com.sun.jersey.multipart.impl.MultiPartReaderClientSide createMimeConfig
WARNING: Cannot create temporary files. Multipart attachments will be limited to 4096 bytes.
java.io.IOException: No space left on device
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at java.io.File.createTempFile(File.java:1989)
at java.io.File.createTempFile(File.java:2040)
at com.sun.jersey.multipart.impl.MultiPartReaderClientSide.createMimeConfig(MultiPartReaderClientSide.java:120)
at com.sun.jersey.multipart.impl.MultiPartReaderClientSide.<init>(MultiPartReaderClientSide.java:109)
at sun.reflect.GeneratedConstructorAccessor83.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.sun.jersey.core.spi.component.ComponentConstructor._getInstance(ComponentConstructor.java:210)
at com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:180)
at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:166)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:137)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:283)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:163)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:343)
at com.sun.jersey.api.client.Client.access$000(Client.java:119)
at com.sun.jersey.api.client.Client$1.f(Client.java:192)
at com.sun.jersey.api.client.Client$1.f(Client.java:188)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.<init>(Client.java:188)
at com.sun.jersey.api.client.Client.<init>(Client.java:171)
at com.sun.jersey.api.client.Client.create(Client.java:683)

异常显示"Client client = Client.create(config);"代码语句无法执行。

private static boolean callFileDownloadDelete(User user, String fileUrl, boolean isDownloadCompleted) {
ClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
client.addFilter(new HTTPBasicAuthFilter(user.getUserName(), user.getPassword()));

我正在模拟客户端-服务器交互,就像真实用户执行操作一样,我是否必须为每个用户创建一个客户端实例,或者是否应该在每次执行操作时创建客户端?

最佳答案

我在消息中遇到了类似的错误:

WARNING: Cannot create temporary files. Multipart attachments will be limited to 4096 bytes. java.io.IOException: No such file or directory

这是因为文件夹${APACHE_HOME}/temp不存在。

创建丢失的文件夹并重新启动 tomcat 后,错误消息停止显示。

关于java - 泽西客户端创建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27589379/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com