ITPub博客

首页 > Linux操作系统 > Linux操作系统 > JBoss下oracle11跑不了!

JBoss下oracle11跑不了!

原创 Linux操作系统 作者:Deadmonth 时间:2011-08-09 19:21:18 0 删除 编辑
unknown Oracle major version [11]的问题怎么办!
由于这个问题让我费了半天功夫,是我又笨了,不知道多查查.....
<1>显示的错误信息
 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#studentPU state=Create
javax.persistence.PersistenceException: [PersistenceUnit: studentPU] Unable to build EntityManagerFactory
 at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
 at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
 at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
 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.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
 at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
 at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
 at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
 at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
 at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
 at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
 at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
 at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
 at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
 at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
 at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
 at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
 at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
 at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
 at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
 at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
 at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
 at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
 at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
 at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
 at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
 at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
 at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
 at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
 at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
 at org.jboss.Main.boot(Main.java:221)
 at org.jboss.Main$1.run(Main.java:556)
 at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.HibernateException: unknown Oracle major version [11]
 at org.hibernate.dialect.DialectFactory$1.getDialectClass(DialectFactory.java:173)
 at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:88)
 at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:62)
 at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:460)
 at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:155)
 at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
 at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
 at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
 ... 61 more
19:20:23,250 INFO  [JBossASKernel] Created KernelDeployment for: testejb.jar
19:20:23,250 INFO  [JBossASKernel] installing bean: jboss.j2ee:jar=testejb.jar,name=HelloImpl,service=EJB3
19:20:23,250 INFO  [JBossASKernel]   with dependencies:
19:20:23,250 INFO  [JBossASKernel]   and demands:
19:20:23,250 INFO  [JBossASKernel]  jboss.ejb:service=EJBTimerService
19:20:23,250 INFO  [JBossASKernel]   and supplies:
19:20:23,251 INFO  [JBossASKernel]  jndi:HelloImpl/remote-com.testejb.IHello
19:20:23,251 INFO  [JBossASKernel]  Class:com.testejb.IHello
19:20:23,251 INFO  [JBossASKernel]  jndi:HelloImpl/remote
19:20:23,251 INFO  [JBossASKernel] Added bean(jboss.j2ee:jar=testejb.jar,name=HelloImpl,service=EJB3) to KernelDeployment of: testejb.jar
19:20:23,252 INFO  [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@f87a17{name=jboss.j2ee:jar=testejb.jar,name=HelloImpl,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
19:20:23,296 INFO  [SessionSpecContainer] Starting jboss.j2ee:jar=testejb.jar,name=HelloImpl,service=EJB3
19:20:23,297 INFO  [EJBContainer] STARTED EJB: com.testejb.HelloImpl ejbName: HelloImpl
19:20:23,320 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
 HelloImpl/remote - EJB3.x Default Remote Business Interface
 HelloImpl/remote-com.testejb.IHello - EJB3.x Remote Business Interface
19:20:23,557 INFO  [TomcatDeployment] deploy, ctxPath=/admin-console
19:20:23,665 INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'
19:20:31,339 INFO  [TomcatDeployment] deploy, ctxPath=/
19:20:31,618 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
19:20:31,720 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.j2ee:jar=student.jar,name=StudentDAOImpl,service=EJB3" is missing the following dependencies:
    Dependency "" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#studentPU' **")
  Deployment "jboss.j2ee:jar=student.jar,name=StudentDAOImpl,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:jar=student.jar,name=StudentDAOImpl,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
DEPLOYMENTS IN ERROR:
  Deployment "" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#studentPU' **
  Deployment "persistence.unit:unitName=#studentPU" is in error due to the following reason(s):
 
<2>解决方法
例如我的要打包的文件student.jar放到E:\jboss-5.1.0.GA\server\default\deploy目录下时,就显示上面这个错误.........
在student这个EJB项目中,修改persistence.xml文件
 
 
  org.hibernate.ejb.HibernatePersistence
  java:OracleDS
  
  

     
   
   
   
   
  
 
 这句不能少,上面的问题就是这个问题,你懂的,试试就知道
<3>其他的问题像 java:OracleDS也要注意.....
 
<4>还有就是在E:\jboss-5.1.0.GA\server\default\deploy目录下的oracle-ds.xml中的修改,这个模板文件来自
E:\jboss-5.1.0.GA\docs\examples\jca目录下,这个目录下有你所要用的数据库的模板文件,只需要copy 和 改就行了
<5>不要忘了将你要用到的数据库的驱动jar包拷贝到E:\jboss-5.1.0.GA\server\default\lib下
<4>和<5>的修改在JBoss中修改是不能忘了的............................................................................
 
 
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25436591/viewspace-704522/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-04-02

  • 博文量
    18
  • 访问量
    45206