我有一个用java编写的大项目问题。我的java知识是平均的,所以我需要帮助。下面提到的日志导致一个xml文件gorules-ontology-beans.xml。我在rulego \ gorulespolsl \ go-ontology \ target \ classes和rulego \ gorulespolsl \ go-ontology \ src \ main \ resources中找到了两个这样的文件。我试图解决它,但那没有'帮助很多。该文件的内容:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd
">
<neo4j:repositories base-package="pl.polsl.lstypka.gorules.ontology.repository" />
</beans>
程序日志,我剪了它因为它太长了。
SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 11 in XML document from class path resource [gorules-ontology-beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 84; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'neo4j:repositories'.
org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 5; SchemaLocation: schemaLocation value = 'http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd ' must have even number of URI's.
INFO : org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@61df6a84: defining beans [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.context.annotation.internalAsyncAnnotationProcessor,org.springframework.context.annotation.internalScheduledAnnotationProcessor,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,fdrCalculator,ruleSimilarityCalculator,copyRuleSimilarityFilter,fdrFilter,goIncludedFilter,mainFilter,PValueFilter,ruleSimilarityFilter,decisionTableService,ruleCandidateService,ruleService,workerService,ruleSorter,resultMapper,goRulesCoreConfig,abstractController,notificationController,ontologyController,speciesController,taskController,testController,userController,coreOntologyService,coreResultService,coreSpeciesService,coreStatisticsService,coreTaskService,coreUserService,emailService,notificationService,passwordService,sessionTokenService,speciesMappingService,taskValidator,userValidator,cleanupViewWorker,sessionTokenWorker,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,jsonMessageConverter,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,goDatabaseConfig,geneDao,geneDatabaseDao,notificationDao,sessionTokenDao,speciesDao,speciesImportDao,taskDao,userDao,authorityMapper,geneMapper,speciesMapper,userMapper,authorityRepository,geneRepository,notificationRepository,sessionTokenRepository,speciesMappingRepository,speciesRepository,taskRepository,termRepository,userRepository,org.springframework.aop.config.internalAutoProxyCreator,ontologyCoreConfig,isAHandler,relationshipHandler,alternativeIdHandler,anonymousHandler,commentHandler,considerHandler,defHandler,idHandler,nameHandler,namespaceHandler,obsoleteHandler,replacedByHandler,subsetHandler,synonymHandler,xrefHandler,migrator,relationshipMigrator,termMigrator,ontologyMigratorService,ontologyService,org.springframework.data.repository.core.support.RepositoryInterfaceAwareBeanPostProcessor#0,org.springframework.data.repository.core.support.RepositoryInterfaceAwareBeanPostProcessor#1,org.springframework.data.repository.core.support.RepositoryInterfaceAwareBeanPostProcessor#2,org.springframework.data.repository.core.support.RepositoryInterfaceAwareBeanPostProcessor#3,resultConfig,goDocumentMapper,recalculateMapper,resultDocumentMapper,ruleDocumentMapper,statisticsMapper,submitMapper,connectorService,resultService,delegatingWebMvcConfiguration,requestMappingHandlerMapping,viewControllerHandlerMapping,beanNameHandlerMapping,resourceHandlerMapping,defaultServletHandlerMapping,requestMappingHandlerAdapter,mvcConversionService,mvcValidator,httpRequestHandlerAdapter,simpleControllerHandlerAdapter,handlerExceptionResolver,proxyTransactionManagementConfiguration,org.springframework.transaction.config.internalTransactionAdvisor,transactionAttributeSource,transactionInterceptor,configureDataSource,configureEntityManagerFactory,exceptionTranslation,goCoreTransactionManager,graphDatabaseService,mappingInfrastructure,isNewStrategyFactory,neo4jTemplate,relationshipTypeRepresentationStrategy,nodeTypeRepresentationStrategy,typeRepresentationStrategyFactory,entityStateHandler,nodeTypeMapper,relationshipTypeMapper,entityFetchHandler,nodeStateTransmitter,neo4jConversionService,graphRelationshipInstantiator,graphEntityInstantiator,neo4jMappingContext,entityAlias,relationshipEntityStateFactory,nodeEntityStateFactory,nodeDelegatingFieldAccessorFactory,relationshipDelegatingFieldAccessorFactory,neo4jTransactionManager,indexCreationMappingEventListener,graphDatabase,configurationCheck,persistenceExceptionTranslator,indexProvider,typeSafetyPolicy]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@f418199
ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 11 in XML document from class path resource [gorules-ontology-beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 84; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'neo4j:repositories'.
Caused by: org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 84; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'neo4j:repositories'.
wrz 22, 2016 7:17:25 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [appServlet] in web application [/go-core] threw load() exception
org.xml.sax.SAXParseException; lineNumber: 11; columnNumb
答案 0 :(得分:0)
你是否在classpath上有spring-data-neo4j jar?引用的XSD包含在该jar文件的2.x版本中:
答案 1 :(得分:0)
我在类路径上找不到这个。我在rulego \ gorulespolsl \ go-ontology和rulego \ gorulespolsl \ go-ontology \ target \ classes \ META-INF \ mave n \ pl.polsl.lstypka \ g o-ontology中的pom.xml中只找到了这个。它包含
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>