通过jndi配置数据源时,启动jboss服务器时出错 [英] Getting error starting jboss server when datasource is configured through jndi

查看:458
本文介绍了通过jndi配置数据源时,启动jboss服务器时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过jboss中的jndi配置数据源.

I am trying to configure datasource through jndi in jboss.

启动服务器时出现以下错误

I get the following error while starting the server

    2013-01-06 00:18:01,078 ERROR [ProfileServiceBootstrap] (Thread-2) Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

    *** DEPLOYMENTS MISSING DEPLOYERS: Name

    vfs:///D:/downloads/jboss-6.1.0.Final/server/default/deploy/jboss-local-jdbc.rar

    DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "jboss-switchboard:appName=practice,module=practice" is missing the following dependencies:
        Dependency "java:/DefaultDS" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:/DefaultDS' **")
      Deployment "jboss.web.deployment:war=/practice" is missing the following dependencies:
        Dependency "jboss-switchboard:appName=practice,module=practice" (should be in state "Installed", but is actually in state "Create")
      Deployment "jboss:service=KeyGeneratorFactory,type=HiLo" is missing the following dependencies:
        Dependency "jboss.jca:name=DefaultDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **")

    DEPLOYMENTS IN ERROR:
      Deployment "java:/DefaultDS" is in error due to the following reason(s): ** NOT FOUND Depends on 'java:/DefaultDS' **
      Deployment "jboss.jca:name=DefaultDS,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **
      Deployment "vfs:///D:/downloads/jboss-6.1.0.Final/server/default/deploy/oracle-ds.xml" is in error due to the following reason(s): java.lang.IllegalStateException: No ConnectorMetaData found for mdf rarName: jboss-local-jdbc.rar

        at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]
        at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]
        at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]
        at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
        at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0.Final]
        at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]
        at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
        at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
        at java.lang.Thread.run(Thread.java:662) [:1.6.0_31]

    2013-01-06 00:18:01,156 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-2) Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
    2013-01-06 00:18:01,171 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-2) Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
    2013-01-06 00:18:01,171 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-2) JBossAS [6.1.0.Final "Neo"] Started in 2m:57s:984ms

以下是$ JBOSS_HOME \ server \ default \ deploy目录中的oracle-ds.xml文件

Following is the oracle-ds.xml file in $JBOSS_HOME\server\default\deploy directory

oralce-ds.xml ................................................... ...............................

oralce-ds.xml .................................................................................

    <datasources>
      <local-tx-datasource>
        <jndi-name>DefaultDS</jndi-name>
        <connection-url>jdbc:oracle:thin:@localhost:1521:myDB</connection-url>
        <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
        <user-name>user_name</user-name>
        <password>pwd</password>
        <min-pool-size>5</min-pool-size>
        <max-pool-size>20</max-pool-size>
        <!-- Checks the Oracle error codes and messages for fatal errors -->
        <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

         <metadata>
             <type-mapping>Oracle9i</type-mapping>
          </metadata>
      </local-tx-datasource>

    </datasources>

web.xml的内容

Content of web.xml

    web.xml
    ....................................................
    <resource-ref>
          <description>Oracle DS</description>
          <res-ref-name>jdbc/DefaultDS</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
    </resource-ref>

jboss-web.xml的内容

Content of jboss-web.xml

  jboss-web.xml
    ..................................................
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-web>
        <resource-ref>
            <res-ref-name>jdbc/DefaultDS</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <jndi-name>java:/DefaultDS</jndi-name>
        </resource-ref>
    </jboss-web>


Any help will be appreciated.

推荐答案

JBoss使用DefaultDS.您必须将"DefaultDS"更改为另一个名称.

DefaultDS is used by JBoss.You must change "DefaultDS" to another name.

这篇关于通过jndi配置数据源时,启动jboss服务器时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆