i using weblogic 11. after initial deployment of jms configurations, jdbc configuration (from xads-jdbc.xml) , ears works properly.
but after weblogic restart application fails initialize error
caused by: java.lang.unsupportedoperationexception: user must supply jdbc connection @ org.hibernate.connection.usersuppliedconnectionprovider.getconnection(usersuppliedconnectionprovider.java:54) @ org.hibernate.tool.hbm2ddl.suppliedconnectionproviderconnectionhelper.prepare(suppliedconnectionproviderconnectionhelper.java:51) @ org.hibernate.tool.hbm2ddl.schemavalidator.validate(schemavalidator.java:130) @ org.hibernate.impl.sessionfactoryimpl.<init>(sessionfactoryimpl.java:349) @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1327) @ org.hibernate.cfg.annotationconfiguration.buildsessionfactory(annotationconfiguration.java:867) @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:669) @ org.hibernate.ejb.hibernatepersistence.createcontainerentitymanagerfactory(hibernatepersistence.java:132)...
according log jdbc , ear start initialization simultaniously. when ear tries validate db scheme jdbc configuration initialization not completed yet.
what fix such situation? there weblogic configurations using deployment items initialization ordered?
thanks in advance.
persistence.xml:
<?xml version="1.0" encoding="utf-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="testdspu" transaction-type="jta"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <jta-data-source>jdbc/testn/test/testxads</jta-data-source> <mapping-file>meta-inf/orm.xml</mapping-file> <properties> <!-- <property name="hibernate.dialect" value="org.hibernate.dialect.oracle9idialect"/> --> <property name="hibernate.dialect" value="org.hibernate.dialect.oracle10gdialect"/> <property name="hibernate.max_fetch_depth" value="3"/> <!-- <property name="hibernate.cache.use_query_cache" value="true"/> --> <property name="hibernate.cache.region_prefix" value="hibernate.test"/> <property name="hibernate.jdbc.use_streams_for_binary" value="true"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.weblogictransactionmanagerlookup"/> <property name="show_sql" value="true"/> <property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.classicquerytranslatorfactory"/> <property name="hibernate.hbm2ddl.auto" value="validate" /> </properties> </persistence-unit>
did try creating jdbc connections through admin console? if not, please try creating data source through admin console. once done, open config.xml, should see below:
<jdbc-system-resource> <name>testxads</name> <target>adminserver</target> <descriptor-file-name>jdbc/testxads-jdbc.xml</descriptor-file-name> </jdbc-system-resource>
please note: outer node should <jdbc-system-resource >
Comments
Post a Comment