All (or anyone who cares),
NOTE: The datasource is now observable as I stated before (the original problem of this thread), but have decided to see this thread all the way to the conclusion of the session factory problem ....
Though I have not yet executed the instruction
Code:
log.info("Binding the session factory to the context object");
wlsContext.bind(SESSION_FACTORY_JNDI, factory);
It seems that the SessionFactory has actually bound to JNDI under the hibernate context by running only the configuration step (verified with the JNDI Explorer Pluggin for Eclipse). Unfortunately, I am getting the exception:
Code:
<Dec 4, 2003 3:09:21 PM CST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "HibernateBinder", java.lang.Exception: NamingException: hibernate is already
bound
java.lang.Exception: NamingException: hibernate is already bound
at com.bankofamerica.hibernate.weblogic.Startup.doBind(Startup.java:91)
at com.bankofamerica.hibernate.weblogic.Startup.startup(Startup.java:61)
at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:177)
at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:158)
at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:121)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:116)
at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentStartupService.java:22)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
>
To get to this step, I made the following revisions to my code and configuration:
1. Precreated a subcontext for hibernate in my startup class (prior to the
hibernate configuration stage.
2. Added log4j to get the "trace/debug" statements inside Hiberante ....
3. Modified the hibernate.cfg.xml file inorder to accomodate the new context (since the original one was read only).
Have included the following with this posting:
The updated Startup class source code
The updated hibernate configuration file
The log4j configuration file (adopted from the sample in Jakarta)
The complete log (including the stack trace shown earlier)
NOTE: The datasource is configured in weblogic as "jdbc/quickstart"
Here is the java source (ignore the diagnostic methods at the bottom):
Code:
/*
* Created on Dec 1, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.bankofamerica.hibernate.weblogic;
import java.util.Hashtable;
import java.util.Properties;
import javax.naming.InitialContext;
import javax.naming.*;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import net.sf.hibernate.*;
import net.sf.hibernate.cfg.Configuration;
import org.apache.commons.logging.*;
import weblogic.common.T3StartupDef;
import weblogic.common.T3ServicesDef;
/**
* @author nbku21j
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Startup implements T3StartupDef {
private static final Log log = LogFactory.getLog(Startup.class);
public static final String SESSION_FACTORY_JNDI = "hibernate";
public static final String URL = "t3://localhost:7001";
private T3ServicesDef aT3ServicesDef;
private Hashtable someStartupArgs;
/**
*
*/
public Startup() {
LogFactory.getFactory().setAttribute(SESSION_FACTORY_JNDI, someStartupArgs);
}
/* (non-Javadoc)
* @see weblogic.common.T3StartupDef#setServices(weblogic.common.T3ServicesDef)
*/
public void setServices(T3ServicesDef _T3ServicesDef) {
// TODO Auto-generated method stub
this.aT3ServicesDef = _T3ServicesDef;
}
/* (non-Javadoc)
* @see weblogic.common.T3StartupDef#startup(java.lang.String, java.util.Hashtable)
*/
public String startup(String _virtualName, Hashtable _startupArgs) throws Exception {
// TODO Auto-generated method stub
log.info(new StringBuffer("Attempting to bind Hibernate 2.1 Session Factory to JNDI ... ")
.append(_virtualName).toString());
doBind(_startupArgs);
return "Hibernate 2.1 Session Factory successfully bound to WebLogic JNDI";
}
private void doBind(Hashtable _startupArgs) throws Exception {
InitialContext context = null;
Context wlsContext = null, subContext = null;
SessionFactory factory = null;
try {
log.info("Updating the startup args for the weblogic context object");
_startupArgs.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
_startupArgs.put(Context.PROVIDER_URL, URL);
log.info("Retrieving the weblogic Initial context");
wlsContext = this.aT3ServicesDef.name().getInitialContext();
log.info("Creating subcontext called: hibernate");
subContext = wlsContext.createSubcontext("hibernate");
log.info("Closing the newly created subcontext.");
subContext.close();
log.info("Building the session factory");
factory = new Configuration().configure().buildSessionFactory();
log.info("Binding the session factory to the context object");
wlsContext.bind(SESSION_FACTORY_JNDI, factory);
} catch (NamingException eN) {
throw new Exception( "NamingException: " + eN.getMessage( ));
} finally {
if (context != null) {
try {
context.close();
context = null;
} catch (NamingException eNFinally) {
throw new Exception(new StringBuffer("NamingException for context close: ").append(eNFinally.getMessage()).toString());
}
}
}
}
private void showAllContextItems(Context _context) throws NamingException {
String namespaceName = _context.getNameInNamespace();
//String namespaceName =
log.info(new StringBuffer("The name context is:_|").append(namespaceName).append("|___").toString());
walkContextTree(_context,namespaceName, 2);
}
private void walkContextTree(Context _context, String _name, int _depth) throws NamingException {
NameClassPair contextItem = null;
String contextItemName = null;
String contextItemClassName = null;
StringBuffer leftPadding = new StringBuffer();
NamingEnumeration enum = _context.list(_name);
if (enum.hasMore()) {
for (int i = 0; i < _depth; i ++) {
leftPadding.append("_");
}
leftPadding.append("|");
try {
while (enum.hasMore()) {
contextItem = (NameClassPair) enum.next();
contextItemName = contextItem.getName();
contextItemClassName = contextItem.getClassName();
log.info(new StringBuffer(leftPadding.toString()).append(contextItemName).append("--->").append(contextItemClassName).append(" is relative ").append(contextItem.isRelative()).append("|___").toString());
walkContextTree(_context,contextItemName,2 + _depth);
}
} catch (NamingException eN) {
log.error("Had trouble pulling context items for: " + _name, eN);
} finally {
enum.close();
}
}
}
private void showAllDirectoryContextItems(DirContext _dirContext) throws NamingException {
showAttributes(_dirContext,"javax");
showAttributes(_dirContext,"jdbc");
showAttributes(_dirContext,"jms");
showAttributes(_dirContext,"weblogic");
}
private void showAttributes(DirContext _dirContext,String _j2eeDirContext) throws NamingException {
NamingEnumeration attributeEnumeration = null
,attributeValueEnumeration = null;
try {
log.info("Getting attributes for " + _j2eeDirContext);
Attributes attributes = _dirContext.getAttributes(_j2eeDirContext);
attributeEnumeration = attributes.getAll();
Attribute attribute = null;
while (attributeEnumeration.hasMore()) {
attribute = (Attribute) attributeEnumeration.next();
log.info("Attribute Name is:" + attribute.getID());
attributeValueEnumeration = attribute.getAll();
while (attributeValueEnumeration.hasMore()) {
log.info("value:" + attributeValueEnumeration.next());
}
}
} catch (NamingException eN) {
log.error(_j2eeDirContext, eN);
} finally {
if (attributeEnumeration != null) attributeEnumeration.close();
if (attributeValueEnumeration != null) attributeValueEnumeration.close();
}
}
}
Here is the new hibernate configuration file:
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory name="hibernate/SessionFactory">
<property name="connection.datasource">jdbc/quickstart</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<!-- Mapping files -->
<mapping resource="Cat.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Here is the log4j configuration file:
Code:
log4j.rootLogger=trace, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log
log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
And here is the log:
Code:
C:\bea\user_projects\domains\mydomain>startweblogic
C:\bea\user_projects\domains\mydomain>ECHO OFF
.
CLASSPATH=C:\bea\jdk141_03\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblogic.jar;C:\bea\WEBLOG~1\server\lib\ojdbc14.jar;C:\bea\WEBLOG~1\c
ommon\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;C:\bea\jdk141_03\jre\lib\rt.jar;C:\bea\WEBLOG~1\server\lib\webservices.jar;C:\apach
e\jakarta-log4j-1.2.8\dist\lib\log4j-1.2.8.jar;c:\mysql\mysql-connector-java-3.0.8-stable\mysql-connector-java-3.0.8-stable-bin.jar;c:\hibernate\hibernate-2.0.3\resources;c:\hibern
ate\hibernate-2.0.3\lib\dom4j.jar;c:\hibernate\hibernate-2.0.3\lib\cglib-asm.jar;c:\hibernate\hibernate-2.0.3\lib\commons-beanutils.jar;c:\hibernate\hibernate-2.0.3\lib\hibernate2.
jar;c:\hibernate\hibernate-2.0.3\lib\commons-collections.jar;c:\hibernate\hibernate-2.0.3\lib\commons-lang.jar;c:\hibernate\hibernate-2.0.3\lib\commons-logging.jar;c:\hibernate\hib
ernate-2.0.3\lib\odmg.jar;C:\bea\jdk141_03\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblogic.jar;C:\bea\WEBLOG~1\server\lib\ojdbc14.jar;C
:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;C:\bea\jdk141_03\jre\lib\rt.jar;C:\bea\WEBLOG~1\server\lib\webservi
ces.jar
.
PATH=C:\bea\WEBLOG~1\server\bin;C:\bea\jdk141_03\jre\bin;C:\bea\jdk141_03\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;c:\Pro
gram Files\Tivoli\lcf\swdis\DisConEP\lib;c:\Program Files\Tivoli\lcf\swdis\DisConEP\bin;c:\Program Files\Tivoli\lcf\bin\w32-ix86\mrt;c:\Program Files\Tivoli\lcf\dat\1\cache\lib\w32
-ix86;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Rational\common;C:\Program Files\UltraEdit;c:\j2sdk1.4.2_01\bin;C:\jwsdp-1.2\jwsdp-shared\bin;C:\Program Fi
les\lemmy;C:\mysql\bin;c:\apache\apache-ant-1.5.4\bin;C:\bea\WEBLOG~1\server\bin\oci920_8
MEM_ARGS=-Xms128m -Xmx256m
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\[hostname]:[port]\console *
***************************************************
<Dec 4, 2003 3:32:31 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.1_03-b02 from Sun Microsystems Inc.>
<Dec 4, 2003 3:32:31 PM CST> <Info> <Configuration Management> <BEA-150016> <This server is being started as the administration server.>
<Dec 4, 2003 3:32:31 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 8.1 SP1 Fri Jun 20 23:06:40 PDT 2003 271009
WebLogic XMLX Module 8.1 SP1 Fri Jun 20 23:06:40 PDT 2003 271009>
<Dec 4, 2003 3:32:31 PM CST> <Notice> <Management> <BEA-140005> <Loading domain configuration from configuration repository at C:\bea\user_projects\domains\mydomain\.\config.xml.>
<Dec 4, 2003 3:32:33 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea\user_projects\domains\mydomain\myserver\myserver.log is opened. All server side log
events will be written to this file.>
<Dec 4, 2003 3:32:35 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Dec 4, 2003 3:32:35 PM CST> <Notice> <WebLogicServer> <BEA-000327> <Starting WebLogic Admin Server "myserver" for domain "mydomain">
INFO [main] (Startup.java:59) - Attempting to bind Hibernate 2.1 Session Factory to JNDI ... HibernateBinder
INFO [main] (Startup.java:72) - Updating the startup args for the weblogic context object
INFO [main] (Startup.java:75) - Retrieving the weblogic Initial context
INFO [main] (Startup.java:78) - Creating subcontext called: hibernate
INFO [main] (Startup.java:80) - Closing the newly created subcontext.
INFO [main] (Startup.java:82) - Building the session factory
INFO [main] (Environment.java:403) - Hibernate 2.0.3
INFO [main] (Environment.java:432) - hibernate.properties not found
INFO [main] (Environment.java:452) - using CGLIB reflection optimizer
INFO [main] (Environment.java:462) - JVM proxy support: true
INFO [main] (Configuration.java:703) - Configuration resource: /hibernate.cfg.xml
DEBUG [main] (DTDEntityResolver.java:20) - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in classpath under net/sf/hibernate/
DEBUG [main] (DTDEntityResolver.java:29) - found http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in classpath
DEBUG [main] (Configuration.java:689) - connection.datasource=jdbc/quickstart
DEBUG [main] (Configuration.java:689) - show_sql=true
DEBUG [main] (Configuration.java:689) - use_outer_join=true
DEBUG [main] (Configuration.java:689) - dialect=net.sf.hibernate.dialect.MySQLDialect
DEBUG [main] (Configuration.java:689) - transaction.manager_lookup_class=net.sf.hibernate.transaction.WeblogicTransactionManagerLookup
DEBUG [main] (Configuration.java:836) - hibernate/SessionFactory<-org.dom4j.tree.DefaultAttribute@18297fe [Attribute: name resource value "Cat.hbm.xml"]
INFO [main] (Configuration.java:270) - Mapping resource: Cat.hbm.xml
DEBUG [main] (DTDEntityResolver.java:20) - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/
DEBUG [main] (DTDEntityResolver.java:29) - found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
INFO [main] (Binder.java:178) - Mapping class: com.bankofamerica.hibernate.weblogic.Cat -> CAT
DEBUG [main] (Binder.java:394) - Mapped property: id -> CAT_ID, type: string
DEBUG [main] (Binder.java:394) - Mapped property: name -> NAME, type: string
DEBUG [main] (Binder.java:394) - Mapped property: sex -> sex, type: character
DEBUG [main] (Binder.java:394) - Mapped property: weight -> weight, type: float
INFO [main] (Configuration.java:885) - Configured SessionFactory: hibernate/SessionFactory
DEBUG [main] (Configuration.java:886) - properties: {show_sql=true, java.vendor=Sun Microsystems Inc., org.xml.sax.parser=weblogic.xml.jaxp.RegistryParser, connection.datasource=jd
bc/quickstart, os.name=Windows 2000, sun.boot.class.path=C:\bea\jdk141_03\jre\lib\rt.jar;C:\bea\jdk141_03\jre\lib\i18n.jar;C:\bea\jdk141_03\jre\lib\sunrsasign.jar;C:\bea\jdk141_03\
jre\lib\jsse.jar;C:\bea\jdk141_03\jre\lib\jce.jar;C:\bea\jdk141_03\jre\lib\charsets.jar;C:\bea\jdk141_03\jre\classes, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsy
stems Inc., java.runtime.version=1.4.1_03-b02, weblogic.Name=myserver, jmx.implementation.vendor=Sun Microsystems, user.name=nbku21j, hibernate.session_factory_name=hibernate/Sessi
onFactory, jmx.implementation.name=JMX RI, user.language=en, java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory, sun.boot.library.path=C:\bea\jdk141_03\jre\bin, dial
ect=net.sf.hibernate.dialect.MySQLDialect, jmx.specification.name=Java Management Extensions, java.version=1.4.1_03, user.timezone=America/Chicago, sun.arch.data.model=32, hibernat
e.use_outer_join=true, javax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl, jmx.specification.version=1.0 Final Release, java.endorsed.dirs=C:\bea\jdk141_03\jre\lib\endorsed,
vde.home=.\myserver\ldap, sun.cpu.isalist=pentium i486 i386, jmx.implementation.version=1.0, file.encoding.pkg=sun.io, weblogic.mbeanLegalClause.ByPass=false, file.separator=\, jav
a.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, user.country=US, java.home=C:\bea\jdk141_03\jre, java.
vm.info=mixed mode, os.version=5.0, hibernate.connection.datasource=jdbc/quickstart, org.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB, path.separator=;, java.vm.version=1.4.1
_03-b02, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, user.variant=, java.protocol.handler.pkgs=weblogic.utils|weblogic.utils|weblogic.net, jmx.spe
cification.vendor=Sun Microsystems, java.awt.printerjob=sun.awt.windows.WPrinterJob, java.security.policy=C:\bea\WEBLOG~1\server\lib\weblogic.policy, sun.io.unicode.encoding=Unicod
eLittle, awt.toolkit=sun.awt.windows.WToolkit, transaction.manager_lookup_class=net.sf.hibernate.transaction.WeblogicTransactionManagerLookup, java.naming.factory.url.pkgs=weblogic
.jndi.factories:weblogic.corba.j2ee.naming.url, user.home=C:\Documents and Settings\nbku21j, java.specification.vendor=Sun Microsystems Inc., org.xml.sax.driver=weblogic.apache.xer
ces.parsers.SAXParser, java.library.path=C:\bea\jdk141_03\bin;.;C:\WINNT\System32;C:\WINNT;C:\bea\WEBLOG~1\server\bin;C:\bea\jdk141_03\jre\bin;C:\bea\jdk141_03\bin;C:\oracle\ora92\
bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;c:\Program Files\Tivoli\lcf\swdis\DisConEP\lib;c:\Program Files\Tivoli\lcf\swdis\DisConEP\bin;c:\Pro
gram Files\Tivoli\lcf\bin\w32-ix86\mrt;c:\Program Files\Tivoli\lcf\dat\1\cache\lib\w32-ix86;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Rational\common;C:\Pr
ogram Files\UltraEdit;c:\j2sdk1.4.2_01\bin;C:\jwsdp-1.2\jwsdp-shared\bin;C:\Program Files\lemmy;C:\mysql\bin;c:\apache\apache-ant-1.5.4\bin;C:\bea\WEBLOG~1\server\bin\oci920_8, jav
a.vendor.url=http://java.sun.com/, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, java.runtime.name=Java(TM) 2 Runtime Environment,
Standard Edition, java.class.path=C:\bea\jdk141_03\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblogic.jar;C:\bea\WEBLOG~1\server\lib\ojdbc
14.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;C:\bea\jdk141_03\jre\lib\rt.jar;C:\bea\WEBLOG~1\server\lib\
webservices.jar;C:\apache\jakarta-log4j-1.2.8\dist\lib\log4j-1.2.8.jar;c:\mysql\mysql-connector-java-3.0.8-stable\mysql-connector-java-3.0.8-stable-bin.jar;c:\hibernate\hibernate-2
.0.3\resources;c:\hibernate\hibernate-2.0.3\lib\dom4j.jar;c:\hibernate\hibernate-2.0.3\lib\cglib-asm.jar;c:\hibernate\hibernate-2.0.3\lib\commons-beanutils.jar;c:\hibernate\hiberna
te-2.0.3\lib\hibernate2.jar;c:\hibernate\hibernate-2.0.3\lib\commons-collections.jar;c:\hibernate\hibernate-2.0.3\lib\commons-lang.jar;c:\hibernate\hibernate-2.0.3\lib\commons-logg
ing.jar;c:\hibernate\hibernate-2.0.3\lib\odmg.jar;C:\bea\jdk141_03\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblogic.jar;C:\bea\WEBLOG~1\
server\lib\ojdbc14.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;C:\bea\jdk141_03\jre\lib\rt.jar;C:\bea\WEBL
OG~1\server\lib\webservices.jar, use_outer_join=true, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, javax.rmi.CORBA.PortableRemo
teObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl, sun.cpu.endian=little, sun.os.patch.level=Service Pack 3, java.io.tmpdir=C:\DOCUME~1\nbku21j\LOCALS~1\Temp\, java.vend
or.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\bea\jdk141_03\jre\lib\ext, user.dir=C:\be
a\user_projects\domains\mydomain, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, javax.xml.soap.MessageFactory=weblogic.webservice.core.soap.MessageFactoryImpl, file.encoding=Cp1252, org.omg.CORBA.ORBClass=weblogic.cor
ba.orb.ORB, javax.xml.rpc.ServiceFactory=weblogic.webservice.core.rpc.ServiceFactoryImpl, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.WeblogicTransactio
nManagerLookup, weblogic.ProductionModeEnabled=, java.specification.version=1.4, hibernate.show_sql=true}
INFO [main] (Configuration.java:492) - processing one-to-many association mappings
INFO [main] (Configuration.java:503) - processing foreign key constraints
INFO [main] (SessionFactoryImpl.java:132) - building session factory
DEBUG [main] (SessionFactoryImpl.java:134) - instantiating session factory with properties: {java.vendor=Sun Microsystems Inc., show_sql=true, org.xml.sax.parser=weblogic.xml.jaxp.
RegistryParser, connection.datasource=jdbc/quickstart, os.name=Windows 2000, sun.boot.class.path=C:\bea\jdk141_03\jre\lib\rt.jar;C:\bea\jdk141_03\jre\lib\i18n.jar;C:\bea\jdk141_03\
jre\lib\sunrsasign.jar;C:\bea\jdk141_03\jre\lib\jsse.jar;C:\bea\jdk141_03\jre\lib\jce.jar;C:\bea\jdk141_03\jre\lib\charsets.jar;C:\bea\jdk141_03\jre\classes, sun.java2d.fontpath=,
java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.4.1_03-b02, weblogic.Name=myserver, jmx.implementation.vendor=Sun Microsystems, user.name=nbku21j, hibern
ate.session_factory_name=hibernate/SessionFactory, jmx.implementation.name=JMX RI, user.language=en, java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory, sun.boot.lib
rary.path=C:\bea\jdk141_03\jre\bin, dialect=net.sf.hibernate.dialect.MySQLDialect, jmx.specification.name=Java Management Extensions, java.version=1.4.1_03, user.timezone=America/C
hicago, sun.arch.data.model=32, hibernate.use_outer_join=true, javax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl, jmx.specification.version=1.0 Final Release, java.endorsed.
dirs=C:\bea\jdk141_03\jre\lib\endorsed, vde.home=.\myserver\ldap, sun.cpu.isalist=pentium i486 i386, jmx.implementation.version=1.0, file.encoding.pkg=sun.io, weblogic.mbeanLegalCl
ause.ByPass=false, file.separator=\, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, user.country=U
S, java.home=C:\bea\jdk141_03\jre, java.vm.info=mixed mode, os.version=5.0, hibernate.connection.datasource=jdbc/quickstart, org.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB,
path.separator=;, java.vm.version=1.4.1_03-b02, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, user.variant=, java.protocol.handler.pkgs=weblogic.ut
ils|weblogic.utils|weblogic.net, jmx.specification.vendor=Sun Microsystems, java.awt.printerjob=sun.awt.windows.WPrinterJob, java.security.policy=C:\bea\WEBLOG~1\server\lib\weblogi
c.policy, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, transaction.manager_lookup_class=net.sf.hibernate.transaction.WeblogicTransactionManagerLooku
p, java.naming.factory.url.pkgs=weblogic.jndi.factories:weblogic.corba.j2ee.naming.url, user.home=C:\Documents and Settings\nbku21j, java.specification.vendor=Sun Microsystems Inc.
, org.xml.sax.driver=weblogic.apache.xerces.parsers.SAXParser, java.library.path=C:\bea\jdk141_03\bin;.;C:\WINNT\System32;C:\WINNT;C:\bea\WEBLOG~1\server\bin;C:\bea\jdk141_03\jre\b
in;C:\bea\jdk141_03\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;c:\Program Files\Tivoli\lcf\swdis\DisConEP\lib;c:\Program Fi
les\Tivoli\lcf\swdis\DisConEP\bin;c:\Program Files\Tivoli\lcf\bin\w32-ix86\mrt;c:\Program Files\Tivoli\lcf\dat\1\cache\lib\w32-ix86;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbe
m;C:\Program Files\Rational\common;C:\Program Files\UltraEdit;c:\j2sdk1.4.2_01\bin;C:\jwsdp-1.2\jwsdp-shared\bin;C:\Program Files\lemmy;C:\mysql\bin;c:\apache\apache-ant-1.5.4\bin;
C:\bea\WEBLOG~1\server\bin\oci920_8, java.vendor.url=http://java.sun.com/, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, java.runti
me.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=C:\bea\jdk141_03\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblo
gic.jar;C:\bea\WEBLOG~1\server\lib\ojdbc14.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;C:\bea\jdk141_03\jr
e\lib\rt.jar;C:\bea\WEBLOG~1\server\lib\webservices.jar;C:\apache\jakarta-log4j-1.2.8\dist\lib\log4j-1.2.8.jar;c:\mysql\mysql-connector-java-3.0.8-stable\mysql-connector-java-3.0.8
-stable-bin.jar;c:\hibernate\hibernate-2.0.3\resources;c:\hibernate\hibernate-2.0.3\lib\dom4j.jar;c:\hibernate\hibernate-2.0.3\lib\cglib-asm.jar;c:\hibernate\hibernate-2.0.3\lib\co
mmons-beanutils.jar;c:\hibernate\hibernate-2.0.3\lib\hibernate2.jar;c:\hibernate\hibernate-2.0.3\lib\commons-collections.jar;c:\hibernate\hibernate-2.0.3\lib\commons-lang.jar;c:\hi
bernate\hibernate-2.0.3\lib\commons-logging.jar;c:\hibernate\hibernate-2.0.3\lib\odmg.jar;C:\bea\jdk141_03\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\
server\lib\weblogic.jar;C:\bea\WEBLOG~1\server\lib\ojdbc14.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;C:\
bea\jdk141_03\jre\lib\rt.jar;C:\bea\WEBLOG~1\server\lib\webservices.jar, use_outer_join=true, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.v
ersion=1.0, javax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl, sun.cpu.endian=little, sun.os.patch.level=Service Pack 3, java.io.tmpdir=C:\DO
CUME~1\nbku21j\LOCALS~1\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, os.arch=x86, java.ext.dirs=C:\b
ea\jdk141_03\jre\lib\ext, user.dir=C:\bea\user_projects\domains\mydomain, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, javax.xml.soap.MessageFactory=weblogic.webservice.core.soap.MessageFactoryImpl, org.omg.CORBA.ORBClass=weblogic.corba.orb.ORB, file.encod
ing=Cp1252, javax.xml.rpc.ServiceFactory=weblogic.webservice.core.rpc.ServiceFactoryImpl, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.WeblogicTransactio
nManagerLookup, weblogic.ProductionModeEnabled=, java.specification.version=1.4, hibernate.show_sql=true}
INFO [main] (Dialect.java:83) - Using dialect: net.sf.hibernate.dialect.MySQLDialect
INFO [main] (NamingHelper.java:26) - JNDI InitialContext properties:{}
INFO [main] (DatasourceConnectionProvider.java:52) - Using datasource: jdbc/quickstart
INFO [main] (SessionFactoryImpl.java:162) - Use outer join fetching: true
INFO [main] (SessionFactoryImpl.java:185) - Use scrollable result sets: true
INFO [main] (SessionFactoryImpl.java:186) - JDBC 2 max batch size: 15
INFO [main] (SessionFactoryImpl.java:194) - echoing all SQL to stdout
DEBUG [main] (SessionFactoryObjectFactory.java:39) - initializing class SessionFactoryObjectFactory
DEBUG [main] (SessionFactoryObjectFactory.java:76) - registered: 2b32d0a9f943282700f94328297b0000 (hibernate/SessionFactory)
INFO [main] (SessionFactoryObjectFactory.java:86) - Factory name: hibernate/SessionFactory
INFO [main] (NamingHelper.java:26) - JNDI InitialContext properties:{}
DEBUG [main] (NamingHelper.java:48) - binding: hibernate/SessionFactory
DEBUG [main] (SessionFactoryImpl.java:595) - serializing: 2b32d0a9f943282700f94328297b0000
DEBUG [main] (SessionFactoryImpl.java:597) - serialized
DEBUG [main] (SessionFactoryImpl.java:590) - deserializing
DEBUG [main] (SessionFactoryImpl.java:592) - deserialized: 2b32d0a9f943282700f94328297b0000
DEBUG [main] (SessionFactoryImpl.java:497) - Resolving serialized SessionFactory
DEBUG [main] (SessionFactoryObjectFactory.java:145) - lookup: uid=2b32d0a9f943282700f94328297b0000
DEBUG [main] (SessionFactoryImpl.java:512) - resolved SessionFactory by uid
DEBUG [main] (SessionFactoryImpl.java:487) - Returning a Reference to the SessionFactory
DEBUG [main] (NamingHelper.java:76) - Bound name: hibernate/SessionFactory
INFO [main] (SessionFactoryObjectFactory.java:91) - Bound factory to JNDI name: hibernate/SessionFactory
WARN [main] (SessionFactoryObjectFactory.java:101) - InitialContext did not implement EventContext
INFO [main] (SessionFactoryImpl.java:269) - Query language substitutions: {}
DEBUG [main] (SessionFactoryImpl.java:281) - instantiated session factory
INFO [main] (Startup.java:84) - Binding the session factory to the context object
DEBUG [main] (SessionFactoryImpl.java:595) - serializing: 2b32d0a9f943282700f94328297b0000
DEBUG [main] (SessionFactoryImpl.java:597) - serialized
DEBUG [main] (SessionFactoryImpl.java:590) - deserializing
DEBUG [main] (SessionFactoryImpl.java:592) - deserialized: 2b32d0a9f943282700f94328297b0000
DEBUG [main] (SessionFactoryImpl.java:497) - Resolving serialized SessionFactory
DEBUG [main] (SessionFactoryObjectFactory.java:145) - lookup: uid=2b32d0a9f943282700f94328297b0000
DEBUG [main] (SessionFactoryImpl.java:512) - resolved SessionFactory by uid
DEBUG [main] (SessionFactoryImpl.java:487) - Returning a Reference to the SessionFactory
<Dec 4, 2003 3:32:42 PM CST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "HibernateBinder", java.lang.Exception: NamingException: hibernate is already
bound
java.lang.Exception: NamingException: hibernate is already bound
at com.bankofamerica.hibernate.weblogic.Startup.doBind(Startup.java:88)
at com.bankofamerica.hibernate.weblogic.Startup.startup(Startup.java:61)
at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:177)
at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:158)
at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:121)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:116)
at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentStartupService.java:22)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
>
<Dec 4, 2003 3:32:42 PM CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "myserver" for domain "mydomain" running in Development Mode>
<Dec 4, 2003 3:32:42 PM CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
<Dec 4, 2003 3:32:42 PM CST> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*>
Since the SessionFactory appears to be bound to the JNDI, can anyone tell me if I can ignore this stack trace - and in fact remove the lines 85,85 from my program safely? I am only asking because I don't want to bang my head untill its bloody from downstream problems related to this..... (Gavin?).
Thanks,
SCott