Build .har, and deployed. This is my hbm.xml file. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "=//Hinernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="com.ssi.listener.bean"> </hibernate-mapping>
Built a .war and in a sevlet, had following code: InitialContext ctx = new InitialContext(); SessionFactory factory = (SessionFactory) ctx.lookup("java:/org/hibernate/SessionFactory"); Session hsession = factory.openSession(); CWsmType wsmtype = new CWsmType(); wsmtype.setTypeId("123"); wsmtype.setWsmDefaultName("myType"); try { Transaction transaction=hsession.beginTransaction(); hsession.save(wsmtype); transaction.commit(); } finally { hsession.close(); } Deployed the .war. At runtime, that is what I see. 14:53:56,312 INFO [STDOUT] org.hibernate.MappingException: Unknown entity: com.ssi.listener.bean.CWsmType at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:555) at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1070) Why doesnt the session see the persistece object? Any ideas, inputs? Thanks. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3887811#3887811 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3887811 ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user