First, install the ACTIVEMQ
Download ACTIVEMQ
Download Address: http://activemq.apache.org/download.html
I'm using a apache-activemq-5.9.0-bin.zip.
Decompression Apache-activemq-5.9.0-bin.zip
Go to Bin directory
I'm using a win7 64-bit system.
If you run the Activemq.bat file directly in the bin directory, it will flash back
Then I went into the Win64 directory to run Activemq.bat
There will be no flash back, but there is an error message Java_home not set
Then you need to configure the Java_home in the environment variable
Run or error after setting the environment variable: wrapper | Critical error:wait for JVM process failed
On the internet for half a day did not solve the problem, and finally found unable to run the Win64 directory inside the Activemq.bat
And then I ran the Activemq.bat in the Win32 directory and it finally started.
Additionally, the following issues should be noted when installing ACTIVEMQ:
First, on the official website download ACTIVEMQ after decompression set ACTIVEMQ environment variable
Second, note the installation path of ACTIVEMQ can not have spaces
"F:\Program files\apache-activemq-5.10.0"
When you start activemq like this, you get a problem: You can't find it or load it.
Questions about the Maven build Spring3.1 MVC + Hibernate4.1 + ACTIVEMQ Integration
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> < Springversion>3.1.1.release</springversion> <junitversion>3.8.1</junitversion> </ Properties> <dependencies> <!--junit Start-to-<dependency> <groupId>junit< /groupid> <artifactId>junit</artifactId> <version>3.8.1</version> <SCOPE&G T;test</scope> </dependency> <!--junit End--<!--jstl Start-to-<dependency > <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version& gt;1.2</version> </dependency> <dependency> <groupId>taglibs</groupId> & lt;artifactid>standard</artifactid> <version>1.1.2</version> </dependency> <!- -Jstl End--<!--Spring 3.1 MVC StArt--<dependency> <groupId>org.springframework</groupId> <artifactid>spring- Aop</artifactid> <version>${springversion}</version> <type>jar</type> < scope>compile</scope> </dependency> <dependency> <groupId>org.springframework<
/groupid> <artifactId>spring-asm</artifactId> <version>${springversion}</version>
<type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> &
Lt;version>${springversion}</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <ARTIFAC tid>spring-beans</artifactid> <version>${springversion}</version> <type>jar</type> <scope> ;compile</scope> </dependency> <dependency> <groupid>org.springframework</groupid
> <artifactId>spring-context</artifactId> <version>${springversion}</version>
<type>jar</type> <scope>compile</scope> </dependency> <dependency>
<groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${springversion}</version> <type>jar</type> <scope>compile</scope > </dependency> <dependency> <groupId>org.springframework</groupId> <art Ifactid>spring-core</artifactid> <version>${springversion}</version> <type>jar</ Type> <scope>compile</scope> </dependency> <dependency> <groupid>org.springframework</grou
Pid> <artifactId>spring-expression</artifactId> <version>${springversion}</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency>
; <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <versio N>${springversion}</version> <type>jar</type> <scope>compile</scope> < /dependency> <dependency> <groupId>org.springframework</groupId> <ARTIFACTID>SP
Ring-jms</artifactid> <version>${springversion}</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupid>org.springframewor K</groupid> <artifactId>spring-orm</artifactId> <version>${springversion}</version> <type>ja r</type> <scope>compile</scope> </dependency> <dependency> <GROUPID&G T;org.springframework</groupid> <artifactId>spring-oxm</artifactId> <VERSION>${SPRINGV ersion}</version> <type>jar</type> <scope>compile</scope> </dependency>
; <dependency> <groupId>org.springframework</groupId> <artifactid>spring-tx</artifact id> <version>${springversion}</version> <type>jar</type> <scope>compile
</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${springversion}</version> <type> ; jar</type> <scope>compile</scope> </dependency> <dependency> <groupid>org.s Pringframework</groupid> <artifactId>spring-webmvc</artifactId> <version>${springversi
on}</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactid>spring-test</arti factid> <version>${springversion}</version> <type>jar</type> <scope>com
pile</scope> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.1</version> </dependen cy> <dependency> <groupId>commons-logging</groupId> <artifactid>commons-logging
</artifactId> <version>1.1</version> </dependency> <dependency> <groupid>org.jasypt</group
id> <artifactId>jasypt</artifactId> <version>1.7.1</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactid>jackson-core-asl</ artifactid> <version>1.9.13</version> </dependency> <dependency> <groupid>o Rg.codehaus.jackson</groupid> <artifactId>jackson-jaxrs</artifactId> <version>1.9.13< /version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> < Artifactid>jackson-mapper-asl</artifactid> <version>1.9.13</version> </dependency> & lt;! --Spring 3.1 MVC end--<!--hibernate 4.1 Start--<dependency> <groupid>org.hibe Rnate</groupid> <aRtifactid>hibernate-entitymanager</artifactid> <version>4.1.0.Final</version> </ dependency> <dependency> <groupId>org.hibernate</groupId> <artifactid>hibernate-core& lt;/artifactid> <version>4.1.2</version> </dependency> <dependency> <groupid>org. Hibernate.javax.persistence</groupid> <artifactId>hibernate-jpa-2.0-api</artifactId> < version>1.0.1.final</version> </dependency> <dependency> <groupid>org.hibernate</ groupid> <artifactId>hibernate-ehcache</artifactId> <version>4.1.2</version> </ dependency> <dependency> <groupId>org.hibernate.common</groupId> <artifactId>
Hibernate-commons-annotations</artifactid> <version>4.0.0.CR2</version> </dependency> <dependency> <groupId>c3p0</groupId> <artifactid>c3p0</artifactid> <version>0.9.1.2</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version& Gt;5.1.18</version> </dependency> <!--hibernate 4.1 End--<!--log4j Start-to-<DEP endency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version&
gt;1.2.15</version> <!--add nodes to avoid maven incompatibilities-<exclusions> <exclusion> <groupId>com.sun.jmx</groupId> <artifactId>jmxri</artifactId> </exclusion&
Gt <exclusion> <groupId>com.sun.jdmk</groupId> <artifactid>jmxtools</artifacti d> </exclusion> <exclusion> <groupId>javax.jms</groupId> &L T;artifactid>jms</artifactId> </exclusion> </exclusions> </dependency> <!--log4j End -<!--solrj Start--<dependency> <groupId>org.apache.solr</groupId> <a Rtifactid>solr-solrj</artifactid> <version>4.9.0</version> </dependency> <!--SOLRJ End-<!--apache-poi Start--<dependency> <groupId>org.apache.poi</groupId> <
artifactid>poi</artifactid> <version>3.7</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> <version> ;3.7</version> </dependency> <!--Apache-poi End--<!--org.apache.ant start-->
; <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> <ver sion>1.9.4</vErsion> </dependency> <!--org.apache.ant End--<!--fileupload Start-to-< Dependency> <groupId>commons-fileupload</groupId> <artifactid>commons-fileupload</ artifactid> <version>1.3.1</version> </dependency> <dependency> <groupid>co Mmons-io</groupid> <artifactId>commons-io</artifactId> <version>2.4</version> < /dependency> <!--fileupload End--<dependency> <groupid>javax.annotation</gr oupid> <artifactId>jsr250-api</artifactId> <version>1.0</version> </dependen cy> <dependency> <groupId>org.apache.activemq</groupId> <artifactid>activemq-co re</artifactid> <version>5.7.0</version> </dependency> </dependencies>
The program works well before I build Spring + hibernate
But when I joined ACTIVEMQ, I found the project error.
I opened the Java Build path and found that there were problems with these two jars
Then I went to the MAVEN local repository and found that these two jar packages were not downloaded
http://mvnrepository.com/then I downloaded the two packages from the Mvnrepository and then joined the local repository.
Well, the project did not error, but Pom.xml file inside error, later found the next solution on the Internet, in the Pom.xml to join
<repositories>
<repository>
<id>java</id>
<url>http:// download.java.net/maven/2/</url>
<releases>
<enabled>true</enabled>
</ releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</ Repository>
</repositories>
OK, the problem solving project is no problem.