JamesLuoau / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
0 stars 0 forks source link

Failed to create an instance of 'com.gwtent.client.reflection.TypeOracle' via deferred binding java.lang.SecurityException: Prohibited package name: java.math #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. My Pojo has couple of fields of data type java.math.BigDecimal

2. Added  math jars to classpath & inherited module in GWT.xml
(gwt-math.jar & gwt-math-server.jar &  <inherits
name="com.googlecode.gwt.math.Math" />) 
http://code.google.com/p/gwt-math/

3. ClassType classType =
TypeOracle.Instance.getClassType(pojoObject.getClass());

What is the expected output? What do you see instead?
I would like use all the api available via gwtent Reflection instead I am
getting run time exception

[ERROR] Failed to create an instance of
'com.gwtent.client.reflection.TypeOracle' via deferred binding 
java.lang.SecurityException: Prohibited package name: java.math
    at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
    at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.jav
a:629)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at
com.gwtent.client.reflection.TypeOracle_Visitor$java_math_InternalBigDecimal.<in
it>(transient
source for com.gwtent.client.reflection.TypeOracle_Visitor:3442)
    at com.gwtent.client.reflection.TypeOracle_Visitor.<init>(transient source
for com.gwtent.client.reflection.TypeOracle_Visitor:5798)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
mpl.java:39)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
ccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:373)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
    at com.google.gwt.core.client.GWT.create(GWT.java:91)
    at com.gwtent.client.reflection.TypeOracle.<clinit>(TypeOracle.java:25)
    at
com.citi.gdos.vce.client.utils.datasource.GWTRPCDataSource.getValueOfEntityField
(GWTRPCDataSource.java:291)
    at
com.citi.gdos.vce.client.utils.datasource.GWTRPCDataSource.copyEntityRecordToGri
dRecord(GWTRPCDataSource.java:265)

What version of the product are you using? On what operating system?
GWT 1.6,
SMART GWT 1.2
gwt-math-2.1.jar & gwt-math-server-2.1.jar
gwtent.jat (latest verion gwt-ent-0.7)
Windows XP 2002

Please provide any additional information below.

MY POJO

import com.gwtent.client.reflection.Reflection;
import java.math.BigDecimal;
import java.util.Date;

public class DimExecutionCost  implements java.io.Serializable , Reflection 
{

    private static final long   serialVersionUID    = 389980682318637939L;
    private long dwExecCostId;
     private BigDecimal fee;
     private char feeBasis;
     private String venue;

etc ...
}

Original issue reported on code.google.com by yasmeen....@gmail.com on 22 Sep 2009 at 3:09

GoogleCodeExporter commented 9 years ago
Please ignore the above issues, got it fixed by setting the following values

relationTypes=true, superClasses=true

Original comment by yasmeen....@gmail.com on 24 Sep 2009 at 3:12

GoogleCodeExporter commented 9 years ago

Original comment by JamesLuo...@gmail.com on 6 Apr 2010 at 3:49