Storm and spring framework integration problems during storm and spring integration, we thought we could succeed at once, with a lot of hope, but a java was reported during the runtime. io. notSerializableException. This exception requires the injection-dependent jar package to implement the serialization interface, but those jar packages are developed by others. You cannot change the source code one by one before using them in the project. Someone has encountered a similar problem on the Internet. The specific reason is that they do not have a deep understanding of storm's spout and bolt lifecycles. Generally, the spout/bolt lifecycle is as follows: 1. after submitting a topology (on the machine where nimbus is located), create a spout/bolt instance (called component in storm) and serialize it. 2. send the serialized component to the machine where all tasks are located. deserializing component.4. before starting a task, execute the component initialization method (bolt is prepare and spout is open ). therefore, the component initialization operation should be performed in the prepare/open method, rather than during component instantiation. according to this statement, the structure problem disappears. But then there is a new problem: Caused by: org. xml. sax. SAXParseException: Content is not allowed in prolog. this exception was found after searching on the internet due *. xml file encoding. The reason is that the BOM header is added to the file encoding when editing from other projects or editing tools. Therefore, you can use notePad ++ to open the xml file and choose to remove the BOM header information, save it again. When running again, everything is OK.