DB에 연결하는 데 사용되는 jndi/db 별칭을 사용하고 있습니다. 그 JNDI를 사용하여 최대 절전 모드에서 DB에 연결하는 방법
<property name="hibernate.connection.datasource">jdbc/ASPTADMINDEV</property>
그리고 resurce.xml 파일
, 나는,가 나는 특성 아래에서 사용할 때 연결할 수 아니에요 ... 내가 최대 절전 모드를 사용하여 동일한 작업을 수행 할 필요가 잘 작동 .. 그러나 .. 아래), 난
를 오류 얻고있다,이 사용(
<factories xmi:type="resources.jdbc:DataSource" xmi:id="DataSource_1233129165895" name="Oracle JDBC Driver DataSource" jndiName="jdbc/ASPTADMINDEV" description="New JDBC Datasource" providerType="Oracle JDBC Driver" authMechanismPreference="BASIC_PASSWORD" authDataAlias="ccixdmgr-nprd1-01-nodeMgr/GITPTDEV-ASPTADMIN-ASPTI" manageCachedHandles="false" logMissingTransactionContext="true" diagnoseConnectionUsage="false" relationalResourceAdapter="builtin_rra" statementCacheSize="10" datasourceHelperClassname="com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper">
<propertySet xmi:id="J2EEResourcePropertySet_1233129165915">
<resourceProperties xmi:id="J2EEResourceProperty_1233129165915" name="driverType" type="java.lang.String" value="oci8" description="The type of the driver. The possible values are: thin, oci8." required="false"/>
<resourceProperties xmi:id="J2EEResourceProperty_1233129165916" name="oracleLogFileSizeLimit" type="java.lang.Integer" value="0" description="Oracle10g and beyond: The oracleLogFileSizeLimit specifies the maximum number of bytes to be written to any one file. Property is relevant only if trace file is specified. Default is unlimited" required="false"/>
<resourceProperties xmi:id="J2EEResourceProperty_1233129165917" name="oracleLogFileCount" type="java.lang.Integer" value="1" description="Oracle10g and beyond: The oracleLogFileCount specifies the number of files to use. Property is relevant only if trace file is specified. Default is 1." required="false"/>
<resourceProperties xmi:id="J2EEResourceProperty_1233129165918" name="oracleLogFileName" type="java.lang.String" value="" description="Oracle10g and beyond: The oracleLogFileName indicates which file to write the traces to" required="false"/>
<resourceProperties xmi:id="J2EEResourceProperty_1233129165919" name="oracleLogTraceLevel" type="java.lang.String" value="INFO" description="Oracle10g and beyond: The oracleLogTraceLevel specifies which message ">
......... and so
}
오류를 붙여 잊어 버려 .. 제가 여기에 실수를하고있는 중이 야 무엇을 알려 주시기 바랍니다
INFO: JNDI InitialContext properties:{}
Apr 9, 2014 4:17:19 PM org.hibernate.connection.DatasourceConnectionProvider configure
SEVERE: Could not find datasource: java:comp/env/jdbc/ASPTADMINDEV
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
Initial SessionFactory creation failed.org.hibernate.HibernateException: Could not find datasource
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
.
어떤 것을 변경해야합니까? 아래 속성을 사용하고 있습니다.
<property name="hibernate.connection.datasource">java:comp/env/jdbc/ASPTADMINDEV</property>
응용 프로그램 배포 위치 : Tomcat 또는 응용 프로그램 서버 (어느 쪽입니까?)? 예를 들어 데이터 소스가 올바르게 등록되었는지 확인하십시오 (응용 프로그램 서버에서 확인하십시오). –
오, 당신은 코멘트가 있다고 아래에서 말했습니까? 흥미로운 ... 시스템에서 어떤 오류가 발생했는지 정말로 알기를 기대합니까? –
@AndreiI 오류를 붙여 넣는 것을 잊지 마십시오. ;). 나는 TOMCAT 서버에 배포했습니다. 오류 – Arun