[Persistence, JBoss/CMP, Hibernate, Database] - Re: Entity beans not autodeployed : javax.ejb.EJBException:
by ALRubinger
Did you find a solution to this? I'm getting:
11:57:19,156 INFO [Ejb3Configuration] found EJB3 Entity bean: com.ninem.rx.domain.site.Site
Great.
11:57:20,046 INFO [AnnotationBinder] Binding entity from annotated class: com.ninem.rx.domain.site.Site
| 11:57:20,046 INFO [EntityBinder] Bind entity com.ninem.rx.domain.site.Site on table site
Good.
11:57:20,359 INFO [CollectionBinder] Mapping collection: com.ninem.rx.domain.site.Site.users -> user
Expected.
11:57:23,875 WARN [ServiceController] Problem starting service ninem:service=Admin
| javax.ejb.EJBException: java.lang.IllegalArgumentException: Unknown entity: com.ninem.rx.domain.site.Site
...why?
If it matters...I'm injecting my EntityManager via @Resource (It's in JNDI), and this exception occurs in the "start" method of a @Service Bean.
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976070#3976070
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976070
19 years, 7 months
[JBossCache] - Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
by sting_hz
Hi Brian,
Thanks for your info.
There's same jboss-cache.jar both under web-inf/lib and server/all/lib, so I removed the one under web-inf/lib.
Then I got another exception,
java.lang.IllegalArgumentException: interface org.jboss.mx.util.MBeanProxyInstance is not visible from class loader
| at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
| at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
| at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:345)
| at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:308)
| at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:283)
| at com.letu.netprint.util.cache.BaseCacheManager.initCache(BaseCacheManager.java:101)
| at com.letu.netprint.util.cache.BaseCacheManager.getCache(BaseCacheManager.java:120)
| ...
The stack trace is related with this code:
MBeanServer server=MBeanServerLocator.locateJBoss();
| cache_=(PojoCacheMBean)MBeanProxyExt.create(PojoCacheMBean.class, "jboss.cache:service=testPojoCache", server);
Seems it has problem to create the cache object now. Am I moving backward?
Thanks,
Steven
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976068#3976068
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976068
19 years, 7 months
[EJB 3.0] - EJB3 RC9 and BigDecimal/monetary issues
by dhartford
Hey all,
Using EJB3 RC9-FD patch on 4.0.4.GA Jboss AS.
Trying to handle financial calculations and outside of database versions for querying calculations, I'm definately having problems on the POJO side.
| public class SampleBean implements Serializable {
| ...
| @javax.persistence.Column(precision=8, scale=2)
| public BigDecimal getAmountPaid() {
| return amountPaid;
| }
|
After persisting data to the database (with the database fields configured as Decimal(8,2) on both Mysql and Postgresql), the return results are not 'accurate', or as expected.
After setting a value of '58.11' and persisting to the database, then trying to retrieve after a Query (i.e. completely new object as the other has been cleaned up):
| System.out.println(SampleBean.getAmountPaid());
| -->58.1099999999999994315658113919198513031005859375
|
In the database, it stores correctly. Query-level mathimatical calculations are working correctly (assuming the database doesn't use floating point optimizations on Decimal fields, such as Mysql => 5.0.3). But retrieval of the value, EVEN WITH SCALE SET, is not working as expected.
Is there something different I should be doing for handling monetary amounts in EJB3/JPA?
-D
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976067#3976067
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976067
19 years, 7 months