-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hbm2dll.auto=create not working
PostPosted: Tue Aug 08, 2006 4:23 pm 
Newbie

Joined: Wed Mar 01, 2006 4:27 pm
Posts: 3
Hi,

Many thanks for reading this. I've used Hibernate successfully on a few projects but i'm having trouble running it in the setup described below.
The problem is that Hibernate simply won't create the database tables when i call buildSessionFactory().

I'm using HiberateUtil exactly as described in Hibernate In Action and i'm setting:

<property name="hibernate.hbm2ddl.auto">create</property>


in my hibernate.cfg.xml file. I know its picking up this file b/c i get all kinds of errors if i move it.

I'm using a Weblogic datasource. I know its valid, since i can test it successfully from the Admin Console.

Any advice? Does anyone know why Hibernate wouldn't try to export the database schema? I'm totally stumped. It doesn't even look like its trying. Maybe there's something obvious i'm missing? Something that overrides hbm2ddl??? I included the stacktrace, tho it doesn't shed any light. Note the lack of export schema messages. And notice the first Hibernate log info is a SELECT. Its trying to do a SELECT on a table that doesn't exist thus the null pointer ex.
-matt

Environment

OS: RedHat EL4
Container: WebLogic 9.2 / Hibernate 3.1.3
Driver: MySQL Connector 5 ( i also tried 3.0, 3.1 )
Database: MySQL 5 ( I also tried 4.1 ). Database is on a seperate windows machine.

StdOut:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After the server has booted, your browser should
automatically launch and point to the
BEA WebLogic Server Samples Introduction Page
running on this server. If your browser fails to launch,
point your browser to the following URL:
"http://192.168.1.19:7001/examplesWebApp/index.jsp"
Note: On Unix-based systems, browser defaults to Netscape.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Tue Aug 08 03:58:37 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.InitTradeSub(58) - Poststart
[Tue Aug 08 03:58:37 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.InitTradeSub(266) - Here are the Appenders according to WebLogic Logger:
WLLog4jConsoleAppender:weblogic.logging.log4j.WLLog4jConsoleAppender@1aba2fb
WLLog4jRotatingFileAppender:/data2/bea/weblogic92/samples/domains/wl_server/servers/examplesServer/logs/examplesServer.log
WLLog4jMemoryBufferAppender:weblogic.logging.log4j.WLLog4jMemoryBufferAppender@1ac987f
WLLog4jDomainLogBroadcastAppender:weblogic.logging.log4j.WLLog4jDomainLogBroadcastAppender@1ac98ea
WLLog4jJMXBroadcastAppender:weblogic.logging.log4j.WLLog4jJMXBroadcastAppender@1aca1a0
TradeSubAppenderWL:org.apache.log4j.DailyRollingFileAppender@1267c11
[Tue Aug 08 03:58:37 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.InitTradeSub(278) - Test log message sent to RootLogger
Appenders According to the Root Logger:
[Tue Aug 08 03:58:37 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.InitTradeSub(97) - Initializing TradeSub Enterprise Application...
[Tue Aug 08 03:58:37 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.InitTradeSub(100) - Working Dir is here: /data2/bea/weblogic92/samples/domains/wl_server/.
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(41) - **** CALLED BATCH SERVICES CONSTRUCTOR ****
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(199) - Creating BatchServicesEJB
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(54) - Initializing BatchServicesEJB...
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(148) - Current Timers:
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(162) - Canceling HeadroomService...
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(181) - Couldn't Cancel HeadroomService
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(162) - Canceling MorningService...
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(181) - Couldn't Cancel MorningService
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(162) - Canceling SCEService...
[Tue Aug 08 03:58:41 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO com.vmac.engine.ejb.BatchServicesEJB(181) - Couldn't Cancel SCEService
Hibernate:
select
property0_.id as id5_,
property0_.name as name5_,
property0_.type as type5_,
property0_.description as descript5_5_,
property0_.value as value5_,
property0_.defaultValue as defaultV7_5_,
property0_.requiresRestart as requires8_5_,
property0_.runtime as runtime5_,
property0_.PROPERTY_TYPE as PROPERTY2_5_
from
Property property0_
where
property0_.name=?
[Tue Aug 08 03:58:43 PM EDT 06] [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR com.vmac.engine.ejb.BatchServicesEJB(110) - Problem Initializing Batch Services
java.lang.NullPointerException
at com.vmac.engine.configuration.ServerConfig.getCreditRefreshRate(ServerConfig.java:63)
at com.vmac.engine.ejb.BatchServicesEJB.init(BatchServicesEJB.java:79)
at com.vmac.engine.ejb.BatchServicesEJB_9u4x4m_ELOImpl.init(BatchServicesEJB_9u4x4m_ELOImpl.java:137)
at com.vmac.engine.InitTradeSub.initializeTradeSub(InitTradeSub.java:154)
at com.vmac.engine.InitTradeSub.postStart(InitTradeSub.java:59)
at weblogic.application.internal.flow.BaseLifecycleFlow$PostStartAction.run(BaseLifecycleFlow.java:209)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.application.internal.flow.BaseLifecycleFlow$BaseAction.invoke(BaseLifecycleFlow.java:95)
at weblogic.application.internal.flow.BaseLifecycleFlow.postStart(BaseLifecycleFlow.java:62)
at weblogic.application.internal.flow.TailLifecycleFlow.activate(TailLifecycleFlow.java:33)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:229)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:352)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)


Top
 Profile  
 
 Post subject: Resolved
PostPosted: Thu Aug 17, 2006 2:02 pm 
Newbie

Joined: Wed Mar 01, 2006 4:27 pm
Posts: 3
Not positive which of my tweaks solved this but i think it was moving my hibernate jars from myapp/APP-INF/lib up to domains/wl_server/lib


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.