Get Error Read/Write Excel Sheet - fileinputstream

Hi In my project I implement Read/Write excel sheet this code working in my local host but I upload this code on server that time i get error like this below;
at java.lang.Thread.run(Thread.java:744)
at java.lang.Thread.run(Thread.java:744)
java.io.FileNotFoundException: D:\question(h).xls (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileInputStream.<init>(FileInputStream.java:101)
Controller.AdminExelSheetController.read(AdminExelSheetController.jav a:189)

Related

SFTP On New or Update throws error Pipe close

I'm using the "On New or Update" source of the Mule 4 SFTP Connector, to process files from an SFTP server directory. The process works fine, however while reading the last file the SFTP connector throws an error as shown below and the file remains in directory waiting next schedule time to be picked up and the same thing will happen for the last file of other new set of files.
Any thoughts on how to fix this issue?
ERROR:
11:20:45.315 05/04/2022 Worker-0 [MuleRuntime].uber.27: [sftp-demo-app].prcsACKFiles-Error-SuccessFlow.CPU_INTENSIVE #1648077b ERROR
event:c458bc90-cbbd-11ec-85e2-06a565d43154
********************************************************************************
Message : "org.mule.weave.v2.module.reader.ReaderParsingException: org.mule.runtime.api.exception.MuleRuntimeException - Exception was found trying to retrieve the contents of file /home/messages/file_8ddb7674.json
org.mule.runtime.api.exception.MuleRuntimeException: Exception was found trying to retrieve the contents of file /home/messages/file_8ddb7674.json
at org.mule.extension.sftp.internal.connection.SftpClient.exception(SftpClient.java:427)
at org.mule.extension.sftp.internal.connection.SftpClient.exception(SftpClient.java:423)
at org.mule.extension.sftp.internal.connection.SftpClient.getFileContent(SftpClient.java:349)
at org.mule.extension.sftp.internal.connection.SftpFileSystem.retrieveFileContent(SftpFileSystem.java:117)
at org.mule.extension.sftp.internal.SftpInputStream$SftpFileInputStreamSupplier.getContentInputStream(SftpInputStream.java:111)
at org.mule.extension.sftp.internal.SftpInputStream$SftpFileInputStreamSupplier.getContentInputStream(SftpInputStream.java:93)
at org.mule.extension.file.common.api.AbstractConnectedFileInputStreamSupplier.getContentInputStream(AbstractConnectedFileInputStreamSupplier.java:81)
at org.mule.extension.file.common.api.AbstractFileInputStreamSupplier.get(AbstractFileInputStreamSupplier.java:65)
at org.mule.extension.file.common.api.AbstractFileInputStreamSupplier.get(AbstractFileInputStreamSupplier.java:33)
at org.mule.extension.file.common.api.stream.LazyStreamSupplier.lambda$new$1(LazyStreamSupplier.java:29)
at org.mule.extension.file.common.api.stream.LazyStreamSupplier.get(LazyStreamSupplier.java:42)
at org.mule.extension.file.common.api.stream.AbstractNonFinalizableFileInputStream.lambda$createLazyStream$0(AbstractNonFinalizableFileInputStream.java:48)
at $java.io.InputStream$$EnhancerByCGLIB$$55e4687e.read(<generated>)
at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:102)
at org.mule.runtime.core.internal.streaming.bytes.AbstractInputStreamBuffer.consumeStream(AbstractInputStreamBuffer.java:111)
at com.mulesoft.mule.runtime.core.internal.streaming.bytes.FileStoreInputStreamBuffer.consumeForwardData(FileStoreInputStreamBuffer.java:239)
at com.mulesoft.mule.runtime.core.internal.streaming.bytes.FileStoreInputStreamBuffer.consumeForwardData(FileStoreInputStreamBuffer.java:202)
at com.mulesoft.mule.runtime.core.internal.streaming.bytes.FileStoreInputStreamBuffer.doGet(FileStoreInputStreamBuffer.java:125)
at org.mule.runtime.core.internal.streaming.bytes.AbstractInputStreamBuffer.get(AbstractInputStreamBuffer.java:93)
at org.mule.runtime.core.internal.streaming.bytes.BufferedCursorStream.assureDataInLocalBuffer(BufferedCursorStream.java:126)
at org.mule.runtime.core.internal.streaming.bytes.BufferedCursorStream.doRead(BufferedCursorStream.java:101)
at org.mule.runtime.core.internal.streaming.bytes.AbstractCursorStream.read(AbstractCursorStream.java:124)
at org.mule.runtime.core.internal.streaming.bytes.BufferedCursorStream.read(BufferedCursorStream.java:26)
at java.io.InputStream.read(InputStream.java:101)
at org.mule.runtime.core.internal.streaming.bytes.ManagedCursorStreamDecorator.read(ManagedCursorStreamDecorator.java:96)
at org.mule.weave.v2.el.SeekableCursorStream.read(MuleTypedValue.scala:306)
at org.mule.weave.v2.module.reader.UTF8StreamSourceReader.handleBOM(SeekableStreamSourceReader.scala:179)
at org.mule.weave.v2.module.reader.UTF8StreamSourceReader.readAscii(SeekableStreamSourceReader.scala:163)
at org.mule.weave.v2.module.json.reader.JsonTokenizer.$init$(JsonTokenizer.scala:21)
at org.mule.weave.v2.module.json.reader.indexed.IndexedJsonTokenizer.<init>(IndexedJsonTokenizer.scala:15)
at org.mule.weave.v2.module.json.reader.indexed.IndexedJsonParser.parser(IndexedJsonParser.scala:17)
at org.mule.weave.v2.module.json.reader.JsonReader.readValue(JsonReader.scala:40)
at org.mule.weave.v2.module.json.reader.JsonReader.doRead(JsonReader.scala:30)
at org.mule.weave.v2.module.reader.Reader.read(Reader.scala:35)
at org.mule.weave.v2.module.reader.Reader.read$(Reader.scala:33)
at org.mule.weave.v2.module.json.reader.JsonReader.read(JsonReader.scala:20)
at org.mule.weave.v2.el.MuleTypedValue.value(MuleTypedValue.scala:147)
at org.mule.weave.v2.model.values.wrappers.DelegateValue.valueType(DelegateValue.scala:17)
at org.mule.weave.v2.model.values.wrappers.DelegateValue.valueType$(DelegateValue.scala:16)
at org.mule.weave.v2.el.MuleTypedValue.valueType(MuleTypedValue.scala:177)
at org.mule.weave.v2.model.types.ObjectType$.accepts(Type.scala:1068)
Caused by: org.mule.extension.sftp.api.SftpConnectionException: Error occurred while trying to connect to host
... 112 more
Caused by: org.mule.runtime.api.connection.ConnectionException:
at org.mule.extension.sftp.api.SftpConnectionException.<init>(SftpConnectionException.java:38)
... 112 more
Caused by: org.mule.runtime.api.connection.ConnectionException:
... 112 more
Caused by: 4:
at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1540)
at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1290)
at org.mule.extension.sftp.internal.connection.SftpClient.getFileContent(SftpClient.java:347)
... 110 more
Caused by: java.io.IOException: Pipe closed
Error Pipe closed in SFTP indicates a communication error that the SFTP connector can not resolve, so the operation fails. I don't believe that there is anything that you can do about that. You might try to test a newer version of the connector if you are using an older one, just in case.

HTTP Status- /ehour

I'm attempting to run an application "ehour" on Tomcat. When I enter in my browser http://localhost:8080/ehour I get the error HTTP Status 404-/ehour. I've downloaded the mysql connector file and extracted and copied the mysql-connector-java-5.0.8-bin.jar file into tomcat's bin directory and restarted tomcat but still get the same error. This is the error that shows in the tomcat log
"Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:47)
... 69 more".

Error in executing OWBClient.sh in UNIX

I am trying to run the OWBClient.sh with the command in UNIX and I am getting the following error:
" The JVM option is invalid: -XX: MaxPermSize=256M. Could not create the Java Virtual Machine."
OWB Version: 10.2.0.5
Oracle Database : 10g
UName: AIX
When exploring more on the above issue, I got an information that OWB 10.2 could not be run in AIX. It would be helpful if anyone can can shed some light on whether OWB 10.2.0.5 can be run on AIX?
Editing my post to share an update.I have tried to execute the owbclient.sh file by removing the -XX:MaxPermSize=256M part. I am now getting a different kind of error...
$ ./owbclient.sh
[Launcher]: Error! Cannot find and load the jar file '../../../jdk/jre/lib/ rt.jar'. OWB application may not be launched due to this error.
[Launcher]: Error! Cannot find and load the jar file '../../../jdk/jre/lib/ jce.jar'. OWB application may not be launched due to this error.
StaticLoader: Setting locale to en__
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at Launcher.main(Launcher.java:167)
Caused by: java.lang.InternalError: Can't connect to X11 window server using ':0 .0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:1 75)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi ronment.java:91)
at sun.awt.motif.MToolkit.(MToolkit.java:124)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at java.awt.Toolkit$2.run(Toolkit.java:796)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:287 )
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:787)
at java.awt.Component.getToolkitImpl(Component.java:873)
at java.awt.Component.getToolkit(Component.java:857)
at java.awt.Component.createImage(Component.java:2729)
at oracle.wh.ui.common.CommonUtils.getIcon(CommonUtils.java:622)
at oracle.wh.ui.framework.beans.splash.SplashBean.setImageLoc(SplashBean .java:111)
at oracle.wh.ui.framework.beans.splash.SplashBean.(SplashBean.java :42)
at oracle.wh.ui.framework.StaticLoader.main(StaticLoader.java:67)
... 6 more
java.lang.reflect.InvocationTargetException
$

Zip file extraction fails while installing

Using Install4j trying to prepare a Window GUI installer. After Installer generation when installation process starts it throws a exception from install4j itself.
Log included below.
Download: http://someurl.com/packages/jdk/jdk-6u43-win-x86/jdk.zip to c:\packages\jdk.zip; size: 92416142 bytes
Execute action successful after 6561 ms
[INFO] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 67]: Execute action
Property mode: 644
Property showProgress: true
Property destinationDirectory: installed_software
Property dirMode: 755
Property fileFilter: null
Property zipFile: packages\jdk.zip
Property rollbackSupported: true
[ERROR] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 67]: exception java.io.FileNotFoundException: c:\installed_software\jdk\bin\msvcr71.dll (The process cannot access the file because it is being used by another process)
java.io.FileNotFoundException: c:\dfdeploy\installed_software\jdk\bin\msvcr71.dll (The process cannot access the file because it is being used by another process)
java.io.FileNotFoundException: c:\installed_software\jdk\bin\msvcr71.dll (The process cannot access the file because it is being used by another process)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
at com.exe4j.runtime.util.FileUtil.extractFile(Unknown Source)
at com.install4j.runtime.beans.actions.files.ExtractZipFileAction.createFile(Unknown Source)
at com.install4j.runtime.beans.actions.files.AbstractExtractZipFileAction.extractZip(Unknown Source)

Netbeans Project Deployment Error

My Netbeans is just freaking out. 20 minutes ago it worked fine, but now it is not. I did recall all changes but it is not working.
Initializing...
deploy?DEFAULT=C:\Users\TheIntersect\Documents\NetBeansProjects\webWord\build\web&name=webWord&force=true failed on GlassFish Server 3.1
Error occurred during deployment: Exception while preparing the app : Error in generating security policy for webWord -- Error in generating security policy for webWord -- Unable to open Policy file: C:\Users\TheIntersect\.netbeans\7.0\config\GF3\domain1/generated/policy\webWord/webWord\granted.policy. Please see server.log for more details.
C:\Users\TheIntersect\Documents\NetBeansProjects\webWord\nbproject\build-impl.xml:736:
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:187)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
Don't think this is still actual, but still may help someone else.
try to manualy copy granted.policy file into glassfish appropriate directory
(PATH_TO_GF\glassfish-3.1\glassfish\domains\<domain_name>\generated\policy\app_name\app_name>\).
If you don't have that file anywhere, just create it with following content
grant {
permission javax.security.jacc.WebResourcePermission "/";
permission javax.security.jacc.WebUserDataPermission "/";
};
I just reainstall the Netbeans IDE and it solverd. But while you are deleting netbeans you should delete all files related about netbeans except project files.

Resources