web stats
Mirth keep .jpg in use - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-04-2011, 08:08 AM
Benzo Benzo is offline
OBX.1 Kenobi
 
Join Date: May 2010
Location: Québec Canada
Posts: 35
Benzo is on a distinguished road
Question Mirth keep .jpg in use

Hi all

First
Happy new year to all

Second

I have create a chanel that take a .jpg from a directory and create a pdf with this image in it. after it save the pdf to another directory.
and to finish it move the original .jpg to a third dirctory.

In the source tab I have put the connector type to File reader
Method; File
Dierctory = C:/HL7/Images
Filname Filter Pattern :*.jpg

Polling type = Interval
Polling frequency = 10000
Delete File after read = No
Move to directory = C:/hl7/Org

In the destination tab I got this

Connector Type = Document Writer
Directory = C:/HL7/PDF
Filename = ${SYSTIME}
Document Type = PDF
Encrypted = No

And in the template section i have wrote

<table>
<tr>
<td>${ORIGINALNAME}</td>
</tr>
</table>
<img src= "/HL7/Images/${ORIGINALNAME}"/>

Mirth can create the pdf with the good .jpg in it but it can't move the .jpg to the c:/hl7/Org directory
In this situation it generate a lot of pdf from the same .jpg
I a found that Mirth keep the .jpg in use In fact the only way fro me to free the .Jpg is to stop the server


I have done a test with just one .jpg file and i got this error message

[2011-01-04 14:00:57,696] ERROR (org.mule.impl.DefaultComponentExceptionStrategy:9 5): Caught exception in Exception Strategy for: ded9095c-b38e-4f05-8fca-d88e2ad816ae: org.mule.MuleException: Failed to move file "C:/HL7/Images/obx.jpg" to "C:/HL7/Org/obx.jpg". The file already exists.
org.mule.MuleException: Failed to move file "C:/HL7/Images/obx.jpg" to "C:/HL7/Org/obx.jpg". The file already exists.
at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(FileMessageReceiver.java:261)
at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(FileMessageReceiver.java:123)
at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:90)
at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
at java.lang.Thread.run(Unknown Source)

I have check and the obx.jpg file is not in the "C:/HL7/Org" directory

Can some one help me with these ?
It must be a better way to do this ?

TIA

Last edited by Benzo; 01-04-2011 at 11:06 AM. Reason: More information
Reply With Quote
  #2  
Old 01-05-2011, 10:22 AM
Benzo Benzo is offline
OBX.1 Kenobi
 
Join Date: May 2010
Location: Québec Canada
Posts: 35
Benzo is on a distinguished road
Default

Hi All
Just to add information I have try to change the Incoming Data.
The only type tha generate a pdf is the HL7 v2.x but it can't move or delete the file
all the other type move the file in the good directory but d'ont create the Pdf file.

I'm starting to think that i can't use Mirt for this kind of operation
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation