Исключение TopLink - PullRequest
       20

Исключение TopLink

1 голос
/ 01 августа 2011

Привет, я работаю с TopLink.При запуске сервера TomCat я получаю следующее исключение.

     Initializing TopLink SessionFactory from [toplink-sessions.xml] 
Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@a2ba05: defining beans [storefrontClientWS,businessObjectSequenceService,userDetailsService,passwordEncoder,saltSource,resourceService,entitlementService,learnerHomeworkAssignmentSubmissionService,courseAndCourseGroupService,statisticsService,launchCourseService,learnerService,orgGroupLearnerGroupService,surveyService,enrollmentService,distributorService,trainingPlanService,orderService,authorService,customerService,reportingConfigurationService,reportExecutionService,updateProfileService,brandService,orderCreatedEventService,learningSessionService,aiccStatisticsHandler,accreditationService,brandDomainService,synchronousClassService,commissionService,customFieldService,securityAndRolesService,batchImportLearnersService,asyncTaskExecutorWrapper,enrollLearnerAsyncTask,timeZoneService,synchronousMeetingServiceFactory,globalScholarMeetingService,webExMeetingService,dimdimMeetingService,instructorService,certificateService,expertService,businessObjectSequenceDAO,authorDAO,timeZoneDAO,securityAndRolesDAO,customFieldDAO,commissionDAO,instructorDAO,synchronousSessionDAO,brandDomainDao,brandDao,userDAO,entitlementDAO,courseAndCourseGroupDAO,learnerHomeworkAssignmentSubmissionDAO,trainingPlanDAO,synchronousClassDAO,statisticsDAO,learnerDAO,orgGroupLearnerGroupDAO,surveyDAO,enrollmentDAO,distributorDistributorGroupDAO,customerDAO,reportDAO,orderDAO,accreditationDAO,learnersToBeMailedService,velocityEngine,expertDAO,sessionFactory,_authenticationManager,_filterChainProxy,_httpSessionContextIntegrationFilter,_filterChainProxyPostProcessor,_filterChainList,_securityContextHolderAwareRequestFilter,_accessManager,_portMapper,_exceptionTranslationFilter,_filterSecurityInterceptor,_anonymousAuthenticationProvider,_anonymousProcessingFilter,_rememberMeServices,_rememberMeAuthenticationProvider,_rememberMeFilter,_rememberMeServicesInjectionBeanPostProcessor,_logoutFilter,_basicAuthenticationEntryPoint,_basicAuthenticationFilter,_entryPointInjectionBeanPostProcessor,_userServiceInjectionPostProcessor,authenticationProcessingFilterEntryPoint,myAuthenticationProcessingFilter,org.springframework.security.providers.dao.DaoAuthenticationProvider#0,org.springframework.security.providers.dao.DaoAuthenticationProvider#1,loggerListener,switchUserModeProcessingFilter,adminProxyEntitySetupFilter,vu360UserAuthenticationDetailsSource,messageFactory,messageReceiver,lmsStorefront,lmsIntegration,lmsLcms,lmsIntegrationSchema,lmsSfSchema,lmsLcmsSchema,schemaCollection,lmsIntegrationService,lmsStorefrontService,lmsLcmsService,org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter#0,marshaller,org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping#0,org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter#1,org.springframework.ws.soap.server.endpoint.SoapFaultAnnotationExceptionResolver#0,org.springframework.ws.soap.server.endpoint.SoapFaultMappingExceptionResolver#0]; root of factory hierarchy
- Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'businessObjectSequenceService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'businessObjectSequenceDAO' while setting bean property 'businessObjectSequenceDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'businessObjectSequenceDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is Exception [TOPLINK-9005] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.SessionLoaderException
Exception Description: An exception was thrown while loading the <project-xml> file [toplink-mappings.xml].
Internal Exception: Exception [TOPLINK-106] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.DescriptorException
Exception Description: The method [setPlatformClassName] on the object is throwing an exception. 
Argument: [oracle.toplink.platform.database.SQLServerPlatform
        ]
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: Exception [TOPLINK-7042] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.ValidationException
Exception Description: Database platform class [oracle.toplink.platform.database.SQLServerPlatform
        ] not found.
Internal Exception: Exception [TOPLINK-3007] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.ConversionException
Exception Description: The object [oracle.toplink.platform.database.SQLServerPlatform
        ], of class [class java.lang.String], could not be converted to [class java.lang.Class].  Please ensure that the class [oracle.toplink.platform.database.SQLServerPlatform
        ] is on the CLASSPATH.  You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: oracle.toplink.platform.database.SQLServerPlatform

Mapping: oracle.toplink.ox.mappings.XMLDirectMapping[platform-class-->toplink:platform-class/text()]
Descriptor: XMLDescriptor(oracle.toplink.sessions.DatasourceLogin --> [DatabaseTable(login)])
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'businessObjectSequenceDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is Exception [TOPLINK-9005] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.SessionLoaderException
Exception Description: An exception was thrown while loading the <project-xml> file [toplink-mappings.xml].
Internal Exception: Exception [TOPLINK-106] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.DescriptorException
Exception Description: The method [setPlatformClassName] on the object is throwing an exception. 
Argument: [oracle.toplink.platform.database.SQLServerPlatform
        ]
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: Exception [TOPLINK-7042] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.ValidationException
Exception Description: Database platform class [oracle.toplink.platform.database.SQLServerPlatform
        ] not found.
Internal Exception: Exception [TOPLINK-3007] (Oracle TopLink - 10g Release 3 (10.1.3.5.0) (Build 090715)): oracle.toplink.exceptions.ConversionException
Exception Description: The object [oracle.toplink.platform.database.SQLServerPlatform
        ], of class [class java.lang.String], could not be converted to [class java.lang.Class].  Please ensure that the class [oracle.toplink.platform.database.SQLServerPlatform
        ] is on the CLASSPATH.  You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: oracle.toplink.platform.database.SQLServerPlatform
        `

Пожалуйста, помогите мне.

Ответы [ 2 ]

1 голос
/ 02 августа 2011

Скорее всего, это проблема пути к классам Tomcat. Кажется, веб-приложение не имеет видимости в банку TopLink. Убедитесь, что загрузчик классов веб-приложения отображается в банке TopLink.

0 голосов
/ 26 февраля 2012

На самом деле я решил эту проблему.

В конфигурации xml есть нежелательное пространство, которое не разрешено toplink.Пространство пришло, потому что я отформатировал стиль кода (CTRL + SHFT + F) в файле xml, используя eclipse.Это создало нежелательное пространство, которое вызвало эту проблему.

...