1. First, you must put the jar packages and configuration files used by hibernate on the classpath path that WebLogic can search. Many people are confused about this step. In fact, let's take a closer look at the startup script files startweblogic. CMD and startwls. CMD of weblogic. I think most people know how to configure it.
There is a hibernate project on my machine. Under the D: estoracle directory, the structure of this directory is:
D: estoraclelib: Place all the jar packages of hibernate.
D: Place estoraclesrcSource code
D: compiled by estoracleclassesCodeAnd hibernate configuration files (hibernate. properties, log4j. properties, cache. CCF)
Now we need to place the jar files and the D: estoracleclasses directories under the D: estoraclelib Directory into the Weblogic classpath. Therefore, we need to modify the Weblogic STARTUP script startweblogic in mydomain. CMD: Before Weblogic is started, insert the classpath setting command as follows:
@ REM set hibernate classpath
Set hibernate_lib = D: estpoliclelib
Set hibernate_classes = D: estoracleclasses
Set classpath = % classpath %; % hibernate_lib % cglib-asm.jar; % hibernate_lib % commons-beanutils.jar;
% Hibernate_lib % commons-collections.jar; % hibernate_lib % commons-lang.jar;
% Hibernate_lib % commons-logging.jar; % hibernate_lib % dom4j-full.jar;
% Hibernate_lib % hibernate2.jar; % hibernate_lib % JCs. jar;
% Hibernate_lib % log4j-1.2.8.jar; % hibernate_lib % ODMG. jar;
% Hibernate_lib % JTA. jar; % hibernate_classes %;
The following line is the startup command in the script:
@ REM call WebLogic Server
Call "C: