gpt4 book ai didi

java - Spring MVC 项目在终端上运行但在 Intellij 上运行时出错

转载 作者:行者123 更新时间:2023-11-30 12:07:30 26 4
gpt4 key购买 nike

我有一个应该部署在 Tomcat 服务器上的 Spring MVC Web 应用程序。当我从终端运行它时它被部署,即 maven 构建,然后将 .war 文件复制并粘贴到 Tomcat 的 webapps 文件夹中。但是,当我使用 Smart Tomcat 插件在 Intellij 中构建和运行相同的应用程序时,出现 NullPoiinterException 错误。我不知道如何调试它。我是 Spring MVC 的新手。我附上了 stacktract.txt 文件。

堆栈跟踪.txt

java.lang.IllegalArgumentException: Argument for @NotNull parameter 'file' of com/intellij/openapi/module/ModuleUtilCore.findModuleForFile must not be null
at com.intellij.openapi.module.ModuleUtilCore.$$$reportNull$$$0(ModuleUtilCore.java)
at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java)
at com.poratu.idea.plugins.tomcat.conf.TomcatSettingsEditor$2.textChanged(TomcatSettingsEditor.java:150)
at com.intellij.ui.DocumentAdapter.insertUpdate(DocumentAdapter.java:15)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669)
at javax.swing.text.JTextComponent.setText(JTextComponent.java:1717)
at com.intellij.ui.components.JBTextField.setText(JBTextField.java:84)
at com.intellij.openapi.ui.TextFieldWithBrowseButton.setText(TextFieldWithBrowseButton.java:104)
at com.poratu.idea.plugins.tomcat.conf.TomcatSettingsEditor.resetEditorFrom(TomcatSettingsEditor.java:65)
at com.poratu.idea.plugins.tomcat.conf.TomcatSettingsEditor.resetEditorFrom(TomcatSettingsEditor.java:37)
at com.intellij.openapi.options.SettingsEditor.lambda$resetFrom$0(SettingsEditor.java:73)
at com.intellij.openapi.options.SettingsEditor.bulkUpdate(SettingsEditor.java:80)
at com.intellij.openapi.options.SettingsEditor.resetFrom(SettingsEditor.java:73)
at com.intellij.execution.impl.ConfigurationSettingsEditor$ConfigToSettingsWrapper.resetEditorFrom(ConfigurationSettingsEditor.java:292)
at com.intellij.execution.impl.ConfigurationSettingsEditor$ConfigToSettingsWrapper.resetEditorFrom(ConfigurationSettingsEditor.java:276)
at com.intellij.openapi.options.CompositeSettingsEditor.resetEditorFrom(CompositeSettingsEditor.java:52)
at com.intellij.execution.impl.ConfigurationSettingsEditorWrapper.resetEditorFrom(ConfigurationSettingsEditorWrapper.java:98)
at com.intellij.execution.impl.ConfigurationSettingsEditorWrapper.resetEditorFrom(ConfigurationSettingsEditorWrapper.java:25)
at com.intellij.openapi.options.SettingsEditor.lambda$resetFrom$0(SettingsEditor.java:73)
at com.intellij.openapi.options.SettingsEditor.bulkUpdate(SettingsEditor.java:80)
at com.intellij.openapi.options.SettingsEditor.resetFrom(SettingsEditor.java:73)
at com.intellij.openapi.options.SettingsEditorConfigurable.reset(SettingsEditorConfigurable.java:41)
at com.intellij.execution.impl.SingleConfigurationConfigurable.reset(SingleConfigurationConfigurable.java:131)
at com.intellij.execution.impl.SingleConfigurationConfigurable.editSettings(SingleConfigurationConfigurable.java:94)
at com.intellij.execution.impl.RunConfigurable.getSafeUserObject(RunConfigurable.kt:352)
at com.intellij.execution.impl.RunConfigurable.access$getSafeUserObject(RunConfigurable.kt:73)
at com.intellij.execution.impl.RunConfigurable$initTree$3.valueChanged(RunConfigurable.kt:239)
at javax.swing.JTree.fireValueChanged(JTree.java:2927)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3391)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:635)
at com.intellij.ui.treeStructure.Tree$MySelectionModel.fireValueChanged(Tree.java:650)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1093)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:294)
at javax.swing.JTree.setSelectionPaths(JTree.java:1647)
at javax.swing.JTree.setSelectionRows(JTree.java:1729)
at javax.swing.JTree.setSelectionRow(JTree.java:1704)
at com.intellij.util.ui.tree.TreeUtil.lambda$showAndSelect$10(TreeUtil.java:565)
at com.intellij.util.ui.tree.TreeUtil.showAndSelect(TreeUtil.java:600)
at com.intellij.util.ui.tree.TreeUtil.showRowCentered(TreeUtil.java:510)
at com.intellij.util.ui.tree.TreeUtil.showRowCentered(TreeUtil.java:501)
at com.intellij.util.ui.tree.TreeUtil.showRowCentred(TreeUtil.java:496)
at com.intellij.util.ui.tree.TreeUtil.selectPath(TreeUtil.java:427)
at com.intellij.util.ui.tree.TreeUtil.selectInTree(TreeUtil.java:909)
at com.intellij.util.ui.tree.TreeUtil.selectInTree(TreeUtil.java:897)
at com.intellij.execution.impl.RunConfigurable.selectConfiguration(RunConfigurable.kt:307)
at com.intellij.execution.impl.RunConfigurable.access$selectConfiguration(RunConfigurable.kt:73)
at com.intellij.execution.impl.RunConfigurable$selectConfigurableOnShow$1.run(RunConfigurable.kt:283)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1077)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:698)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:430)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1681)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1630)
at com.intellij.execution.actions.EditRunConfigurationsAction.actionPerformed(EditRunConfigurationsAction.java:48)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:258)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:275)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:287)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:283)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:106)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:277)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:522)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:544)
at java.awt.Component.processMouseEvent(Component.java:6548)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

最佳答案

这个错误出现在第三方Smart Tomcat插件,你应该report it here .

Disabling该插件应该有所帮助。在 IntelliJ IDEA Ultimate 中使用内置的 Tomcat 集成。

关于java - Spring MVC 项目在终端上运行但在 Intellij 上运行时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54861774/

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