[Persistence, JBoss/CMP, Hibernate, Database] - error with hibbernate - entity class not found
by vlad2005
Work to an project based on adobe flex on client side, and java with hibernate at server side.
Anyway, am not an expert on java or jboss.
So i have installed on my windows desktop, eclipse with java 1.6, and jboss 4.2.3 GA. In my project i have hibernate with class mapping to table into an database. Everything work well.
Now i want to move my application to my server that is freebsd 7.0
So i installed jboss 4.2.2 GA and java 1.5 (that is in ports collection).
Jboss start without any problem, so next i move my application into deploy directory. When i start jboss, i receive these errors:
| 22:34:23,700 ERROR [[/flex]] StandardWrapper.Throwable
| java.lang.ExceptionInInitializerError
| at flex.data.assemblers.HibernateManager.createSessionFactory(HibernateManager.java:67)
| at flex.data.assemblers.HibernateManager.<init>(HibernateManager.java:45)
| at flex.data.assemblers.HibernateAssembler.setHibernateManager(HibernateAssembler.java:414)
| ....................................................
| Caused by: org.hibernate.MappingException: entity class not found: spa.Service.vo.Marcatb
| at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:99)
| at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:168)
| at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
| at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:123)
| at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
| at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
| at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
| at flex.data.assemblers.HibernateManager.createSessionFactory(HibernateManager.java:52)
| ... 149 more
| Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: spa.Service.vo.Marcatb
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:164)
| at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
| at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:96)
| ... 158 more
| 22:34:23,748 ERROR [[/flex]] Servlet /flex threw load() exception
| java.lang.ClassNotFoundException: No ClassLoaders found for: spa.Service.vo.Marcatb
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:164)
| at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
| at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:96)
| .............................................
|
|
There, "spa.Service.vo.Marcatb", is my custom class.
My classes are simple, with variable declaration, setter and getter methods. I have tables created into mysql database.
Where is the problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193137#4193137
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193137
16 years, 5 months
[JCA/JBoss] - how to add connection properties to XA datasources?
by mazz
If I had a local-tx-datasource defined, I can set connection properties like this:
<local-tx-datasource>
| ...
| <!-- You can include connection properties that will get passed in
| the DriverManager.getConnection(props) call;
| look at your Driver docs to see what these might be. -->
| <connection-property name="char.encoding">UTF-8</connection-property>
| <!-- Tells an Oracle 10g driver to properly implement clobs. -->
| <connection-property name="SetBigStringTryClob">true</connection-property>
| ...
But, if I were to convert this to an xa-datasource, I see no way of telling it to set those connection properties. "BigStringTryClob" is not an attribute on Oracle's XADataSource so I can't use:
<xa-datasource-property name="BigStringTryClob">true</xa-datasource-property>
How can I set connection properties on XA data sources? And specifically, how to I set that big-string-try-clob configuration?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193136#4193136
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193136
16 years, 5 months