自定义介体ClassNotFoundException TransactionSynchronization(Custom Mediator ClassNotFoundException TransactionSynchronization)
我创建了一个自定义中介类,它使用spring jdbc来访问数据库中的数据。
我从该类创建一个jar并将其部署在WSO2_HOME / repository / components / lib中。
之后,我将以下jar添加到同一文件夹:
春天了jdbc.jar,
弹簧tx.jar。
但是,当我尝试自定义中介时,出现错误“ClassNotFoundException org \ springframework \ transaction \ support \ TransactionSynchronization”。
问题是我很确定spring-tx.jar中提供了“TransactionSynchronization”类。 任何人都可以帮我解决这个问题吗? :)I make a custom mediator class that used spring jdbc to access data from database.
I make a jar from that class and deploy it in WSO2_HOME/repository/components/lib.
After that I add the following jar to the same folder :
spring-jdbc.jar,
spring-tx.jar.
But when I tried the custom mediator there is an error "ClassNotFoundException org\springframework\transaction\support\TransactionSynchronization".
The problem is I'm pretty sure that "TransactionSynchronization" class is available in the spring-tx.jar. Can anyone help me to solve this problem? :)
原文:https://stackoverflow.com/questions/17876698
最满意答案
您的代码假定支持File API。 支持File API的IE的第一个版本是IE10。 您的代码将永远不会像现在一样跨浏览器工作。
考虑使用Fine Uploader ,它已经跨浏览器处理上传,并包含许多有用的功能。
Your code assumes support for the File API. The first version of IE to support the File API is IE10. Your code will never work cross-browser as it stands now.
Consider using Fine Uploader which already handles uploads cross-browser and includes a number of useful features.
相关问答
更多-
这段代码应该可以做到。 对不起很久以前,我认为IE9也可以使用XHR上传(它应该,但这是Iframe选项)。 它执行以下操作: 添加一个文件输入到你的页面(也可以在HTML中完成) 将该文件选择器放在一个表单中 向表单添加凭据 将表单提交给iframe并将其页面用作返回值。 fileSelection = document.createElement("div"); //create the file input fileSelection.browseSelect = document.createEl ...
-
这不是太难了 首先,看看FileReader接口 。 所以,当提交表单时,抓住提交过程 var file = document.getElementById('fileBox').files[0]; //Files[0] = 1st file var reader = new FileReader(); reader.readAsText(file, 'UTF-8'); reader.onload = shipOff; //reader.onloadstart = ... //reader.onprogre ...
-
这个JavaScript文件的Github托管版本下载了text/plain mime-type。 如果您要在本地托管该文件,则不会出现此问题,因为内容类型为text/javascript 。 同样的规则也适用于CSS。 进一步阅读: Internet Explorer中的MIME处理更改 The Github-hosted version of this JavaScript file comes down with the text/plain mime-type. If you were to hos ...
-
我通过ajax使用这个库来处理fileupload: https : //github.com/blueimp/jquery-file-upload 。 它与IE 9很好地协作,如果你使用重定向帧,它甚至可以支持CORS。 谷歌浏览器 Apple Safari 4.0+ Mozilla Firefox 3.0+ Opera 11.0+ Microsoft Internet Explorer 6.0+ 它还支持你所说的formData我认为: https://github.com/blueimp/jQuery ...
-
IE9中的HTML5文件上传失败(HTML5 file upload fails in IE9)[2023-04-13]
您的代码假定支持File API。 支持File API的IE的第一个版本是IE10。 您的代码将永远不会像现在一样跨浏览器工作。 考虑使用Fine Uploader ,它已经跨浏览器处理上传,并包含许多有用的功能。 Your code assumes support for the File API. The first version of IE to support the File API is IE10. Your code will never work cross-browser as it ... -
MP3在IE9和Firefox HTML5中播放或播放失败(MP3 either plays or fails to play in IE9 and Firefox HTML5)[2022-04-19]
根据Firefox和IE9,MP3文件“已损坏”。 当然,没有办法判断文件是否真的“损坏”,因为它在Chrome中播放正常。 The MP3 file was "corrupted" according to Firefox and IE9. Of course, there is no way to tell if a file is actually "corrupted" as it plays fine in Chrome. -
所以你要将reader.onload事件设置为一个函数,但是你需要调用reader.readAsText()函数。 例如,将代码更改为: reader.onload = function(event) { console.log(event); }; reader.readAsText(file); 这样做的目的是告诉reader ,当你调用reader.readAsText(file)它应该运行你用reader.onload定义的函数。 你以前做过的事情永远不会加载文件,因为你只是告诉读者在函数回调 ...
-
文件API仍然是“工作草案”。 Internet Explorer 10将支持File API(原型) 更多详细信息 File API is still a 'Working Draft'. Internet Explorer 10 will support File API (prototype) More Details
-
嗯,我认为有可能,根据JayC回答的这个问题 您所谈论的是HTML5文件API。 我不确定描述它的最佳链接是什么,但这可能有所帮助。 https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications 这个问题也许可以帮到你 Well, I think it is possible, according to this question answered by JayC What you're talking about is ...
-
您对Gmail的引用,特别是指向解决方案的方向:当您单击电子邮件中的链接时,Gmail会从HTTP标题中删除引荐来源数据,除非您使用鼠标右键并选择“在新建中打开” Tab [或Window]“,大概是因为这可以防止他们的代码拦截标题。 您的脚本是否有机会检查有效的HTTP REFERRER? 您正在进行任何跨(子)域或跨协议的AJAX调用吗? 如果是这样,那么您可能必须代理请求。 请考虑Yahoo!的以下解决方案! 开发者网络: http : //developer.yahoo.com/javascript ...