Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 命令执行包出现Spring Roo错误_Java_Spring_Spring Roo - Fatal编程技术网

Java 命令执行包出现Spring Roo错误

Java 命令执行包出现Spring Roo错误,java,spring,spring-roo,Java,Spring,Spring Roo,我不熟悉Java和Spring框架,在STS3.1.0.RELEASE和Tomcat7中使用SpringRoo 下面是log.roo: // Spring Roo 1.2.2.RELEASE [rev 7d75659] log opened at 2012-11-30 20:15:11 project --topLevelPackage com.tue3 --projectName pizza --java 6 --packaging WAR // Spring Roo 1.2.2.RELEA

我不熟悉Java和Spring框架,在STS3.1.0.RELEASE和Tomcat7中使用SpringRoo

下面是log.roo:

 // Spring Roo 1.2.2.RELEASE [rev 7d75659] log opened at 2012-11-30 20:15:11
project --topLevelPackage com.tue3 --projectName pizza --java 6 --packaging WAR
// Spring Roo 1.2.2.RELEASE [rev 7d75659] log closed at 2012-11-30 20:15:51
// Spring Roo 1.2.2.RELEASE [rev 7d75659] log opened at 2012-11-30 20:16:02
mongo setup --databaseName pizzadb
entity mongo --class ~.domain.Person --testAutomatically
field string --fieldName name --notNull
repository mongo --interface ~.repository.PersonRepository --entity ~.domain.Person
web mvc setup
web mvc scaffold --class ~.domain.PersonController
perform package
perform package
// Spring Roo 1.2.2.RELEASE [rev 7d75659] log closed at 2012-11-30 21:46:42
Iam收到以下错误:

     perform package
[INFO] Scanning for projects...
The command 'mvn.bat -DskipTests=true package' did not complete successfully
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building pizza 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- aspectj-maven-plugin:1.2:compile (default) @ pizza ---
[ERROR] can't determine annotations of missing type javax.persistence.Entity
when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean$ApplicationConversionServiceFactoryBean_Roo_ConversionService$2
when weaving classes 
when weaving 
when batch building BuildConfig[null] #Files=10 AopXmls=#0
 [Xlint:cantFindType]
[ERROR] can't determine annotations of missing type javax.persistence.Entity
when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean$ApplicationConversionServiceFactoryBean_Roo_ConversionService$1
when weaving classes 
when weaving 
when batch building BuildConfig[null] #Files=10 AopXmls=#0
 [Xlint:cantFindType]
[ERROR] can't determine annotations of missing type javax.persistence.Entity
when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean$ApplicationConversionServiceFactoryBean_Roo_ConversionService$3
when weaving classes 
when weaving 
when batch building BuildConfig[null] #Files=10 AopXmls=#0
 [Xlint:cantFindType]
[ERROR] can't determine annotations of missing type javax.persistence.Entity
when weaving type com.tue3.domain.Person
when weaving classes 
when weaving 
when batch building BuildConfig[null] #Files=10 AopXmls=#0
 [Xlint:cantFindType]
[ERROR] can't determine annotations of missing type javax.persistence.Entity
when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean
when weaving classes 
when weaving 
when batch building BuildConfig[null] #Files=10 AopXmls=#0
 [Xlint:cantFindType]
[ERROR] can't determine annotations of missing type javax.persistence.Entity
when weaving type com.tue3.repository.PersonRepository
when weaving classes 
when weaving 
when batch building BuildConfig[null] #Files=10 AopXmls=#0
 [Xlint:cantFindType]
[ERROR] can't determine annotations of missing type javax.persistence.Entity
when weaving type com.tue3.domain.PersonController
when weaving classes 
when weaving 
when batch building BuildConfig[null] #Files=10 AopXmls=#0
 [Xlint:cantFindType]
[WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.520s
[INFO] Finished at: Sat Dec 01 03:26:49 PKT 2012
[INFO] Final Memory: 6M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project pizza: Compiler errors :
[ERROR] error at (no source information available)
[ERROR] D:\springy\roo\pizza\src\main\java\com\tue3\domain\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj:0::0 can't determine annotations of missing type javax.persistence.Entity
[ERROR] when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean$ApplicationConversionServiceFactoryBean_Roo_ConversionService$2
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=10 AopXmls=#0
[ERROR] [Xlint:cantFindType]
[ERROR] error at (no source information available)
[ERROR] D:\springy\roo\pizza\src\main\java\com\tue3\domain\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj:0::0 can't determine annotations of missing type javax.persistence.Entity
[ERROR] when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean$ApplicationConversionServiceFactoryBean_Roo_ConversionService$1
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=10 AopXmls=#0
[ERROR] [Xlint:cantFindType]
[ERROR] error at (no source information available)
[ERROR] D:\springy\roo\pizza\src\main\java\com\tue3\domain\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj:0::0 can't determine annotations of missing type javax.persistence.Entity
[ERROR] when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean$ApplicationConversionServiceFactoryBean_Roo_ConversionService$3
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=10 AopXmls=#0
[ERROR] [Xlint:cantFindType]
[ERROR] error at (no source information available)
[ERROR] D:\springy\roo\pizza\src\main\java\com\tue3\domain\Person.java:0::0 can't determine annotations of missing type javax.persistence.Entity
[ERROR] when weaving type com.tue3.domain.Person
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=10 AopXmls=#0
[ERROR] [Xlint:cantFindType]
[ERROR] error at (no source information available)
[ERROR] D:\springy\roo\pizza\src\main\java\com\tue3\domain\ApplicationConversionServiceFactoryBean.java:0::0 can't determine annotations of missing type javax.persistence.Entity
[ERROR] when weaving type com.tue3.domain.ApplicationConversionServiceFactoryBean
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=10 AopXmls=#0
[ERROR] [Xlint:cantFindType]
[ERROR] error at (no source information available)
[ERROR] D:\springy\roo\pizza\src\main\java\com\tue3\repository\PersonRepository.java:0::0 can't determine annotations of missing type javax.persistence.Entity
[ERROR] when weaving type com.tue3.repository.PersonRepository
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=10 AopXmls=#0
[ERROR] [Xlint:cantFindType]
[ERROR] error at (no source information available)
[ERROR] D:\springy\roo\pizza\src\main\java\com\tue3\domain\PersonController.java:0::0 can't determine annotations of missing type javax.persistence.Entity
[ERROR] when weaving type com.tue3.domain.PersonController
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=10 AopXmls=#0
[ERROR] [Xlint:cantFindType]
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
有没有人能指导我,我做错了什么,以及如何纠正

提前谢谢

看起来pom.xml对javax.persistence.Entity包没有依赖关系

<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
看起来pom.xml对javax.persistence.Entity包没有依赖关系

<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>