failed loading form class

4 views
Skip to first unread message

Jean Madson

unread,
Jul 21, 2010, 10:46:41 AM7/21/10
to gxtforms
Hello everybody,

I have an issue with form building. Does someone have any suggestion?

http://code.google.com/p/gxtforms/issues/detail?id=3

Thanx,

Jean Madson

David Durham

unread,
Jul 21, 2010, 11:21:54 AM7/21/10
to gxtf...@googlegroups.com

Do you know the root cause, or is this stack trace all you have?  If so, try running under the debugger and setting an exception breakpoint for formconfigurationexception

Jean Madson

unread,
Jul 21, 2010, 2:01:41 PM7/21/10
to gxtf...@googlegroups.com
Looking for the source, I get the point:

public class FormServiceImpl ...
    public FormConfiguration getFormConfiguration(String className) throws FormConfigurationException {
        FormConfiguration config;
        
        if ((config = cache.get(className)) == null) {
            config = new FormConfiguration();
            try {
                Class<?> target = Class.forName(className);
                FormBean formBean = FormBeanUtils.initFormBean(target);
                config.setFieldConfigurations(formBean.getFields());
                config.setFormPanelConfiguration(formBean.getFormConfiguration());
                cache.put(className, config);
            } catch (Exception e) {
                throw new FormConfigurationException("failed loading form class " + className, e);
            }
        }
        
        return config;
        
    }

... but there are many points that can trigger the catched exception, generating FormConfigurationException...

Jean Madson




On Wed, Jul 21, 2010 at 2:55 PM, Jean Madson <jeanm...@gmail.com> wrote:
That stack trace is all I can get from log, nothing else is print out... :(

Jean Madson

David Durham

unread,
Jul 21, 2010, 2:28:44 PM7/21/10
to gxtf...@googlegroups.com
Right. I need the 'e' part of:

throw new FormConfigurationException("failed loading form class " +
className, e);

In order to move forward.

Jean Madson

unread,
Jul 21, 2010, 3:14:20 PM7/21/10
to gxtf...@googlegroups.com
What comes to me as a Throwable in onFailure() method is just that log I sent.
But I've tracked this log below by putting an e.printStackTrace() above 
throw new FormConfigurationException():

SEVERE: java.lang.ClassNotFoundException: br.com.daisho.client.financeiro.dto.DTOColaborador
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.googlecode.gxtforms.server.FormServiceImpl.getFormConfiguration(FormServiceImpl.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
        at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)

I don't know why GXTForm doesn't find DTOColaborador, once that class is in the application classpath 
(WEB-INF/classes/br/com/daisho/client/financeiro/dto/DTOColaborador.class).

Jean Madson

charlie

unread,
Jul 21, 2010, 3:19:34 PM7/21/10
to gxtf...@googlegroups.com
Is this using GAE ?
--
<charlie/>

David Durham

unread,
Jul 21, 2010, 3:20:58 PM7/21/10
to gxtf...@googlegroups.com
I'll make a note to provide more information in the exception thrown
to the client.

If the class is really available to service, it should be found. What
sometimes happens is the "shared" classes don't make it to both the
client compilation and the server side compilation.

Jean Madson

unread,
Jul 21, 2010, 3:45:33 PM7/21/10
to gxtf...@googlegroups.com
No, just GWT with GXT.

Jean Madson

Jean Madson

unread,
Jul 25, 2010, 3:37:12 AM7/25/10
to gxtf...@googlegroups.com
I've catched the error. 

My application consists of an EAR. The EAR is packaged with an EJB-JAR 
and a WAR file for the web interface. All dependencies are located in 
EAR!/lib. So the Web App in WAR file can see the dependencies in 
EAR!/lib, but its dependencies can't see .class files from my web app 
through reflection, which is needed to get the form configuration by 
GXTForms. And although I could run the formService, the formService 
itself couldn't do its job cause it couldn't see DTOColaborador.class 
through Class.forName(). Moving gxtforms-0.2.jar from EAR!/lib to 
WAR!/WEB-INF/lib ends the problem. 


Thanks.

Jean Madson





On Wed, Jul 21, 2010 at 4:53 PM, Jean Madson <jeanm...@gmail.com> wrote:
>> I'll make a note to provide more information in the exception thrown
>> to the client.
OK

>> If the class is really available to service, it should be found.  What
>> sometimes happens is the "shared" classes don't make it to both the
>> client compilation and the server side compilation.
I think about and decide to check, but that specific shared class (DTOColaborador) can
be found by the client and by the server - I have tried to get a simple
populated instance through an async call to another service and it functions.
The object from DTOColaborador class was correctly instanciated on the server side by a 
service and sent to the client as the response result parameter for an async call back.

I'm gonna playing around with GXTForms to try to find out something else.

Thanx for your attention guys,
Reply all
Reply to author
Forward
0 new messages