spring項(xiàng)目在idea下使用jrebel熱部署報(bào)錯(cuò)浸剩!

先上報(bào)錯(cuò)信息:

2019-06-04 10:30:45 JRebel: ERROR Class 'org.springframework.core.io.support.PathMatchingResourcePatternResolver' could not be processed by org.zeroturnaround.javarebel.integration.spring.core.cbp.PathMatchingResourcePatternResolverCBP@sun.misc.Launcher$AppClassLoader@14dad5dc: org.zeroturnaround.bundled.javassist.CannotCompileException: [source error] getURL() not found in java.net.URL
    at org.zeroturnaround.bundled.javassist.expr.MethodCall.replace(JRebel:241)
    at org.zeroturnaround.javarebel.integration.spring.core.cbp.PathMatchingResourcePatternResolverCBP$1.edit(PathMatchingResourcePatternResolverCBP.java:70)
    at org.zeroturnaround.bundled.javassist.expr.ExprEditor.loopBody(JRebel:192)
    at org.zeroturnaround.bundled.javassist.expr.ExprEditor.doit(JRebel:91)
    at org.zeroturnaround.bundled.javassist.CtBehavior.instrument(JRebel:712)
    at org.zeroturnaround.javarebel.integration.spring.core.cbp.PathMatchingResourcePatternResolverCBP.processClassPathScanning(PathMatchingResourcePatternResolverCBP.java:61)
    at org.zeroturnaround.javarebel.integration.spring.core.cbp.PathMatchingResourcePatternResolverCBP.process(PathMatchingResourcePatternResolverCBP.java:39)
    at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(JRebel:117)
    at com.zeroturnaround.javarebel.jS.a(JRebel:360)
    at com.zeroturnaround.javarebel.jS.a(JRebel:349)
    at com.zeroturnaround.javarebel.jS.a(JRebel:317)
    at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:130)
    at com.zeroturnaround.javarebel.jD.transform(JRebel:57)
    at java.lang.ClassLoader.defineClass(ClassLoader.java)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.springframework.context.support.AbstractApplicationContext.getResourcePatternResolver(AbstractApplicationContext.java:438)
    at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:217)
    at org.springframework.context.support.GenericApplicationContext.<init>(GenericApplicationContext.java:104)
    at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:60)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at org.springframework.beans.BeanUtils.instantiate(BeanUtils.java:77)
    at org.springframework.boot.SpringApplication.createApplicationContext(SpringApplication.java:573)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:310)
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:175)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:98)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:64)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:73)
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
    at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:336)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
    at io.hcbm.mdata.HcbmMdataServiceApplication.main(HcbmMdataServiceApplication.java:34)
Caused by: compile error: getURL() not found in java.net.URL
    at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atMethodCallCore(JRebel:749)
    at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(JRebel:695)
    at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(JRebel:157)
    at org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(JRebel:46)
    at org.zeroturnaround.bundled.javassist.compiler.CodeGen.doTypeCheck(JRebel:242)
    at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atDeclarator(JRebel:743)
    at org.zeroturnaround.bundled.javassist.compiler.ast.Declarator.accept(JRebel:100)
    at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(JRebel:351)
    at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(JRebel:50)
    at org.zeroturnaround.bundled.javassist.compiler.Javac.compileStmnt(JRebel:569)
    at org.zeroturnaround.bundled.javassist.expr.MethodCall.replace(JRebel:235)
    ... 49 more

在spring項(xiàng)目中使用idea自帶的debug是可以運(yùn)行項(xiàng)目的但是使用jrebel啟動(dòng)項(xiàng)目就報(bào)錯(cuò)糠馆,報(bào)錯(cuò)信息如上。
經(jīng)過查詢資料:https://segmentfault.com/q/1010000006068898
評(píng)論區(qū)發(fā)現(xiàn):
這是jrebel的一個(gè)bug,原因是jrebel不支持高于spring4.2.7以上的版本工腋。
解決辦法:
將spring降到4.2.7以下
或者
升級(jí)jrebel的版本至最新
然后我查看自己項(xiàng)目中的spring版本,發(fā)現(xiàn)確實(shí)是高于4.2.7版本的

image.png

這是我spring-boot的依賴畅卓,顯然我不能更換spring的依賴版本擅腰,于是嘗試更新Jrebel。
image.png

然后選中右邊的update按鈕翁潘,更新到最新版本趁冈,最后一步重啟idea,然后啟動(dòng)項(xiàng)目拜马,發(fā)現(xiàn)完美解決問題渗勘。
如果沒有破解,請(qǐng)繼續(xù)瀏覽:
image.png

上面是我用URl破解的方式:
http://139.199.89.239:1008/88414687-3b91-4286-89ba-2dc813b107ce
郵箱隨便填寫即可俩莽。

但是話又說回來了旺坠,Jrebel官方更新的版本中并未說明不支持高版本的spring依賴。

下面是官方更新的所有日志:

Change Notes
2019.1.2
Improvement: updated the "JRebel activated" notification.
Improvement: added tooltip for the Setup Guide reload step.
Bug fix: fixed a rebel.xml generation issue with special characters not being properly escaped.
Bug fix: fixed an issue when starting a run configuration with Debug with JRebel didn't start up if pre-launch tasks contained "Run Another Configuration" step.
2019.1.1
Improvement: improved enabling the automatic compilation to align with new IDE settings as of IntelliJ IDEA 2018.2.0+.
Bug fix: fixed an issue where notifications were shown with the JRebel Setup Guide open.
2019.1.0
Improvement: updated activation dialog for ZTLM team evaluation flow.
Bug fix: fixed an issue where Net Promoter Score notification was rendered incorrectly on Windows.
2018.2.7
Bug fix: fixed an issue that could cause JRebel notfications show up in wrong project window.
Bug fix: fixed an issue with incorrectly escaped space character in the Run instructions.
Bug fix: fixed an issue where generating rebel.xml for many modules caused IntelliJ to freeze.
Update: updated the EULA.
2018.2.6
Bug fix: fixed an issue where applications did not start in case custom path was targeting missing jrebel.jar.
Bug fix: fixed the documentation for running the remote Tomcat as Windows service.
Update: updated the trial period length to 10 days.
2018.2.5
Improvement: added warning in case rebel.xml is excluded from a Hybris backoffice build.
Bug fix: fixed an issue where the JRebel facet was sometimes added to non-Java modules.
Bug fix: fixed an issue where debugger occasionally did not break on breakpoints if the JRebel agent was not attached to the application being debugged.
2018.2.4
Feature: added support for automatic project-specific path variables in rebel.xml.
Bug fix: fixed an issue where debug with JRebel was not starting if run configuration contained npm script running step.
Bug fix: fixed an issue with occasional deadlocks when enabling remote servers in JRebel options.
Bug fix: fixed JRebel plugin state inconsistency when creating/deleting/moving rebel.xml manually.
Bug fix: fixed an issue causing incorrect hyphenation in the support form.
2018.2.3
Feature: dedicated dialog to ask for time saved per redeploy is now generally available.
Bug fix: fixed an issue where Net Promoter Score notification was rendered incorrectly on high DPI.
Bug fix: fixed an issue where debugger did not stop on the breakpoints for Grails process for versions prior to 3.1.5.
2018.2.2
Bug fix: fixed an issue where request made by JRebel failed if the client had an NTLM proxy.
2018.2.1
Bug fix: fix UI freezings when applying changes to rebel.xml generation settings.
2018.2.0
Improvement: added option for permanently hiding the JRebel Setup Guide.
Bug fix: don't show the JRebel Setup Guide if there is no Java project in the workspace.
2018.1.7
Feature: IntelliJ/Maven integration for rebel.xml generation is now generally available.
Improvement: for license server licensing, email is now requested on IDE startup if it was not previously provided.
Improvement: removed support for License Server floating licenses.
Bug fix: fixed occasional NullPointerExceptions when opening the JRebel Setup Guide.
Bug fix: fixed an issue where JRebel plugin was crashing with IntelliJ Ultimate 14.0.
2018.1.6
Feature: added support for automatic renewal of offline seats.
Improvement: added JRebel setup guide. Available as a pilot for randomly selected subset of users.
2018.1.5
Feature: Added the "Run with JRebel" and "Debug with JRebel" buttons to the Application Servers tool window.
Improvement: added feedback messages in UI for external rebel.xml generation.
Bug fix: fixed an issue where clicking on Select All in JRebel Panel caused exception messages in the IDE error log.
2018.1.4
Improvement: updated Startup instructions for latest WildFly versions.
Improvement: added UI to enable IntelliJ IDEA's automatic build option (pilot completed, enabling for all users).
Improvement: requests proxy credentials when proxy authentication is required.
Improvement: added shortcut to enable/disable JRebel and remote server support from project's context menu.
Improvement: updated the order of licensing options in activation dialog (license server licensing is now topmost).
Improvement: direct users to proxy guide when obtaining a license fails due to proxy configuration.
Improvement: improved JRebel startup instructions for macOS when path contains spaces.
2018.1.3.1
Bug fix: fixed an issue where disabled Gradle plugin breaks JRebel plugin initialization.
Bug fix: fixed a NPE when calling maven project lookup too early.
2018.1.3
Feature: Maven users can now configure JRebel plugin to generate rebel.xml with JRebel Maven plugin.
Improvement: JRebel 2018.1.3 dropped support for IntelliJ IDEA version 13.
Bug fix: Excessive modules for source sets not filtered out if Gradle option "Store generated project files externally" is selected.
Bug fix: fixed a MissingFormatArgumentException that caused notifications not to be shown.
Bug fix: fixed an issue where Consent radio button state was not updated after activating from JRebel Configuration.
2018.1.2
Bug fix: fixed an issue where proxy authentication fails when different configurations are used for HTTP and HTTPS proxy settings.
Bug fix: fixed an issue where proxy authentication fails on Windows with a wrong username.
2018.1.1
Feature: added a dedicated dialog to ask for time saved per redeploy (pilot for subset of users).
Feature: added UI to enable IntelliJ IDEA's automatic build (pilot for subset of users).
Improvement: removed the forum links from the About widget.
Improvement: separated the proxy configuration for licensing as used by JRebel Agent vs IDE.
Improvement: updated the Startup tab to include setup instructions for Spring Boot 2.x, Payara 4 and 5 and GlassFish 5.
Improvement: updated the Startup tab to better handle white spaces in JRebel paths in code snippets on Linux and macOS.
Improvement: generic plugin errors are now visible in jrebel-intellij.log.
Improvement: implemented a new rebel.xml lookup algorithm and generation scenarios.
Bug fix: updated the changelog link.
Bug fix: fixed lease not being updated when first update attempt fails with a soon-to-be-invalid lease.
Bug fix: fixed startup problems when using an automatic proxy.
Bug fix: JRebel project settings are now kept when disabling/re-enabling JRebel for a project.
Bug fix: fixed high DPI problems in the activation dialog.
Bug fix: corrected an error that occurred while creating the JRebel context menu.
Bug fix: improved UI behavior when the external jrebel.jar is missing.
Bug fix: fixed rebel.xml location when Maven integration plugin is disabled.
2018.1.0
Feature: added support for Java 10.
Feature: added integration for the new Run Dashboard component.
Improvement: removed the Legacy Agent.
Improvement: added better proxy support for connecting to the License Server. Best available proxy settings will be used automatically.
Improvement: implemented notifications reminding to redeploy the applications after enabling JRebel or remote server support for a project.
Improvement: disabled the "delete missing files from remote server" setting by default.
Improvement: redesigned tabs in project settings.
Bug fix: fixed scaling issues in JRebel settings for high DPI screens.
Bug fix: fixed an issue where the offline lease would become invalid when user had activated twice.
Bug fix: fixed an issue with remote synchronization getting stuck when the request failed for multiple projects and servers.
Bug fix: proxy credentials are no longer requested when checking for updates.
Bug fix: fixed an issue where adding JRebel facet to a module without facet in project settings would fail.
Bug fix: fixed an issue where the activation dialog would show an incorrect state when JRebel is configured with License Server, but is currently without a license.
Bug fix: fixed an issue that allowed specifying duplicate remote server URLs.
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末扮超,一起剝皮案震驚了整個(gè)濱河市取刃,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌瞒津,老刑警劉巖蝉衣,帶你破解...
    沈念sama閱讀 211,042評(píng)論 6 490
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異巷蚪,居然都是意外死亡损痰,警方通過查閱死者的電腦和手機(jī)撤蟆,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 89,996評(píng)論 2 384
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人士败,你說我怎么就攤上這事⊙颐穑” “怎么了瞄摊?”我有些...
    開封第一講書人閱讀 156,674評(píng)論 0 345
  • 文/不壞的土叔 我叫張陵,是天一觀的道長裸删。 經(jīng)常有香客問我八拱,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 56,340評(píng)論 1 283
  • 正文 為了忘掉前任肌稻,我火速辦了婚禮清蚀,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘爹谭。我一直安慰自己枷邪,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,404評(píng)論 5 384
  • 文/花漫 我一把揭開白布诺凡。 她就那樣靜靜地躺著东揣,像睡著了一般。 火紅的嫁衣襯著肌膚如雪腹泌。 梳的紋絲不亂的頭發(fā)上嘶卧,一...
    開封第一講書人閱讀 49,749評(píng)論 1 289
  • 那天,我揣著相機(jī)與錄音真屯,去河邊找鬼脸候。 笑死,一個(gè)胖子當(dāng)著我的面吹牛绑蔫,可吹牛的內(nèi)容都是我干的运沦。 我是一名探鬼主播,決...
    沈念sama閱讀 38,902評(píng)論 3 405
  • 文/蒼蘭香墨 我猛地睜開眼配深,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼携添!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起篓叶,我...
    開封第一講書人閱讀 37,662評(píng)論 0 266
  • 序言:老撾萬榮一對(duì)情侶失蹤烈掠,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后缸托,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體左敌,經(jīng)...
    沈念sama閱讀 44,110評(píng)論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,451評(píng)論 2 325
  • 正文 我和宋清朗相戀三年俐镐,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了矫限。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,577評(píng)論 1 340
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡佩抹,死狀恐怖叼风,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情棍苹,我是刑警寧澤无宿,帶...
    沈念sama閱讀 34,258評(píng)論 4 328
  • 正文 年R本政府宣布,位于F島的核電站枢里,受9級(jí)特大地震影響孽鸡,放射性物質(zhì)發(fā)生泄漏蹂午。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,848評(píng)論 3 312
  • 文/蒙蒙 一彬碱、第九天 我趴在偏房一處隱蔽的房頂上張望画侣。 院中可真熱鬧,春花似錦堡妒、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,726評(píng)論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至桑寨,卻和暖如春伏尼,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背尉尾。 一陣腳步聲響...
    開封第一講書人閱讀 31,952評(píng)論 1 264
  • 我被黑心中介騙來泰國打工爆阶, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人沙咏。 一個(gè)月前我還...
    沈念sama閱讀 46,271評(píng)論 2 360
  • 正文 我出身青樓辨图,卻偏偏與公主長得像,于是被迫代替她去往敵國和親肢藐。 傳聞我的和親對(duì)象是個(gè)殘疾皇子故河,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,452評(píng)論 2 348

推薦閱讀更多精彩內(nèi)容