-->
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.  [ 11 posts ] 
Author Message
 Post subject: Cannot use Hibernate in WSAD 5
PostPosted: Sun Dec 19, 2004 8:18 am 
Newbie

Joined: Sun Dec 19, 2004 8:11 am
Posts: 7
Hibernate version: 2.1.7

Full stack trace of any exception that occurs:
[12/19/04 20:01:26:484 CST] 4e91ebce EJBContainerI E WSVR0040E: addEjbModule failed for TEST_EJB.jar [class com.ibm.ws.runtime.component.DeployedModuleImpl]
java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java(Compiled Code))
at com.ibm.ejs.container.EJSContainer.loadBeanMetaData(EJSContainer.java:1321)
at com.ibm.ejs.container.EJSContainer.getHomeWrapperCommon(EJSContainer.java:984)
at com.ibm.ejs.container.EJSContainer.getHomeInstance(EJSContainer.java:907)
at com.ibm.ejs.container.EJSContainer.startBean(EJSContainer.java:886)
at com.ibm.ws.runtime.component.EJBContainerImpl.startBean(EJBContainerImpl.java:1255)
at com.ibm.ws.runtime.component.EJBContainerImpl.install(EJBContainerImpl.java:988)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:1462)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:415)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:351)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:268)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:246)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:126)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)

Name and version of the database you are using: Oracle 10g

I follow the post to setup my envirnoment:
http://forum.hibernate.org/viewtopic.ph ... ad+example

I am using WSAD Integration edition 5.1.2, SLSB 2.0, and portal toolkit 5.0.2.3

Classloader of EAR setted to "PARENT_FIRST", and get the above error

if I set the classloader of EAR to "PARENT_LAST" the logger inside hibernate cannot be initialize.

Can anyone figure out the problem? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 8:36 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
i remember there is a tuto on ibm site talking about hibernate, do you know it?
It could help you

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 8:46 am 
Newbie

Joined: Sun Dec 19, 2004 8:11 am
Posts: 7
mm.....I just read this one before, but not related to EJB at all.....

http://www-106.ibm.com/developerworks/l ... index.html


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 8:51 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
maybe this one?
http://www-106.ibm.com/developerworks/w ... patil.html

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 9:45 am 
Newbie

Joined: Sun Dec 19, 2004 8:11 am
Posts: 7
Thx and I found this one also...
http://www-128.ibm.com/developerworks/d ... hogal.html

but both not related to EJB project at all.....


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 10:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well, shouldn't you be able to get some IBM support for this or something?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 10:57 am 
Newbie

Joined: Sun Dec 19, 2004 8:11 am
Posts: 7
mm.....i think no........i changed the way to include hibernate into project, come up with these errors:

Exceptions:
[12/19/04 22:45:41:578 CST] e97d43 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use scrollable result sets: true
[12/19/04 22:45:41:578 CST] e97d43 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use JDBC3 getGeneratedKeys(): false
[12/19/04 22:45:41:578 CST] e97d43 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Optimize cache for minimal puts: false
[12/19/04 22:45:41:578 CST] e97d43 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory echoing all SQL to stdout
[12/19/04 22:45:41:578 CST] e97d43 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Query language substitutions: {}
[12/19/04 22:45:41:578 CST] e97d43 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory cache provider: net.sf.hibernate.cache.EhCacheProvider
[12/19/04 22:45:41:578 CST] e97d43 Configuration I net.sf.hibernate.cfg.Configuration instantiating and configuring caches
[12/19/04 22:45:41:734 CST] e97d43 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl building session factory
[12/19/04 22:45:42:375 CST] e97d43 SessionFactor I net.sf.hibernate.impl.SessionFactoryObjectFactory Factory name: hibernate/SessionFactory
[12/19/04 22:45:42:375 CST] e97d43 NamingHelper I net.sf.hibernate.util.NamingHelper JNDI InitialContext properties:{}
[12/19/04 22:45:43:484 CST] e97d43 NamingHelper I net.sf.hibernate.util.NamingHelper Creating subcontext: hibernate
[12/19/04 22:45:43:484 CST] e97d43 SessionFactor I net.sf.hibernate.impl.SessionFactoryObjectFactory Bound factory to JNDI name: hibernate/SessionFactory
[12/19/04 22:45:43:484 CST] e97d43 SessionFactor W net.sf.hibernate.impl.SessionFactoryObjectFactory InitialContext did not implement EventContext
[12/19/04 22:45:43:594 CST] e97d43 SystemOut O net.sf.hibernate.QueryException: unexpected token: as [select c from Member as c where c.memberid = :member]


Mapping xml
<class name="test.vo.MemberVO" table="MEMBER">

<id name="memberid" type="integer" column="MemberID"
unsaved-value="0">
<generator class="sequence">
<param name="sequence">seq_member_key</param>
</generator>
</id>

<property name="password">
<column name="password" length="8" not-null="true" />
</property>

<property name="mem_nickname" >
<column name="mem_nickname" length="8" not-null="false" />
</property>

</class>

hibernate.cfg.xml

<session-factory name="hibernate/SessionFactory">

<property name="connection.datasource">java:comp/env/jdbc/portalDB</property>

<property name="show_sql">true</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>


<!-- Mapping files -->
<mapping resource="Member.hbm.xml" />

</session-factory>

any idea why the exception was throw? Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 10:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You have no class named Member to query. It is MemberVO.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 11:07 am 
Newbie

Joined: Sun Dec 19, 2004 8:11 am
Posts: 7
sorry, I'm new to HSQL.....do you mean this is wrong?

select c from Member as c where c.memberid = :member]

should be this instead?

select c from MemberVO as c where c.memberid = :member]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2004 11:16 am 
Newbie

Joined: Sun Dec 19, 2004 8:11 am
Posts: 7
I got it works, but I'm just wondering:

[12/19/04 22:45:43:484 CST] e97d43 SessionFactor W net.sf.hibernate.impl.SessionFactoryObjectFactory InitialContext did not implement EventContext

Is this Warning serious??

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 9:36 pm 
Newbie

Joined: Wed Nov 02, 2005 5:33 am
Posts: 12
Did you succeed in deploying your Hibernate app onto WAS v5.1.2 ? if yes, could you spare time to share your experience with the community ?thank you! the deadline for my project is comming.... :(

thanh.hoc@gmail.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 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.