deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: DeltaSpike x Payara App Server
Date Mon, 11 Jul 2016 20:44:39 GMT
hi edilmar,

in that case you should contact the payara-community.

regards,
gerhard



2016-07-11 20:15 GMT+02:00 Edilmar LISTAS <edilista@intersite.com.br>:

> Hi,
>
> I dropped @FacesConverter. Same error:
>
>
> javax.faces.FacesException: Não é possível criar instância para·a classe:
> SubMacroWeb.convert.LookupStrConverter.
>         at
> com.sun.faces.application.ApplicationImpl.newConverter(ApplicationImpl.java:1815)
>         at
> com.sun.faces.application.ApplicationImpl.createConverterBasedOnClass(ApplicationImpl.java:1420)
>         at
> com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:1399)
>         at
> javax.faces.application.ApplicationWrapper.createConverter(ApplicationWrapper.java:403)
>         at
> javax.faces.application.ApplicationWrapper.createConverter(ApplicationWrapper.java:403)
>         at
> org.apache.deltaspike.jsf.impl.injection.InjectionAwareApplicationWrapper.createConverter(InjectionAwareApplicationWrapper.java:60)
>         at
> com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.hasStringConverter(HtmlBasicInputRenderer.java:241)
>         at
> com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:112)
>         at
> javax.faces.component.UIInput.getConvertedValue(UIInput.java:1045)
>         at javax.faces.component.UIInput.validate(UIInput.java:975)
>         at javax.faces.component.UIInput.executeValidate(UIInput.java:1248)
>         at
> javax.faces.component.UIInput.processValidators(UIInput.java:712)
>         at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
>         at javax.faces.component.UIForm.processValidators(UIForm.java:253)
>         at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
>         at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
>         at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
>         at
> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
>         at
> com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
>         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
>         at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
>         at
> org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeLifecycleWrapper.execute(DeltaSpikeLifecycleWrapper.java:89)
>         at
> javax.faces.lifecycle.LifecycleWrapper.execute(LifecycleWrapper.java:77)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
>         at
> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
>         at
> util.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:50)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
>         at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
>         at
> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
>         at
> com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
>         at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
>         at
> org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
>         at
> org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
>         at
> org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
>         at
> org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
>         at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
>         at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
>         at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
>         at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
>         at
> org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
>         at
> org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
>         at
> org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
>         at
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
>         at
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
>         at
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
>         at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
>         at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.InstantiationException
>         at
> sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>         at java.lang.Class.newInstance(Class.java:442)
>         at
> com.sun.faces.application.ApplicationImpl.newConverter(ApplicationImpl.java:1808)
>         ... 56 more
>
>
>
>
>
> Em 08-07-2016 17:04, Gerhard Petracek escreveu:
>
>> hi edilmar,
>>
>> if you are using it as base-class, please drop @FacesConverter
>>
>> regards,
>> gerhard
>>
>>
>>
>> 2016-07-08 22:40 GMT+02:00 Edilmar LISTAS <edilista@intersite.com.br>:
>>
>> I have this abstract converter with generic code, but I never use this
>>> converter for JSF, I create children classes for JSF using. But it is
>>> possible that JEE7 appservers don't like this.
>>>
>>>
>>> Em 08-07-2016 15:26, Gerhard Petracek escreveu:
>>>
>>> hi edilmar,
>>>>
>>>> please don't try to use abstract-classes as converters.
>>>> we don't have all details of your application, so it isn't possible to
>>>> answer why gf3 ~ignores it.
>>>>
>>>> regards,
>>>> gerhard
>>>>
>>>>
>>>>
>>>> 2016-07-08 21:14 GMT+02:00 Edilmar LISTAS <edilista@intersite.com.br>:
>>>>
>>>> But why does webapp run fine in GF 3.1.2.2/Mojarra 2.1.29 and doesn't
>>>> in
>>>>
>>>>> Payara/GF 4.1.1/Mojarra 2.2.13? My converter is very simple:
>>>>>
>>>>> package SubMacroWeb.convert;
>>>>>
>>>>> import SubMacroUtils.Geral;
>>>>> import SubMacroUtils.HTMLProducerTab;
>>>>> import SubMacroWeb.util.JsfUtil;
>>>>> import entity.GenericEntity;
>>>>> import javax.faces.component.UIComponent;
>>>>> import javax.faces.context.FacesContext;
>>>>> import javax.faces.convert.Converter;
>>>>> import javax.faces.convert.FacesConverter;
>>>>> import javax.persistence.EntityManager;
>>>>>
>>>>> @FacesConverter
>>>>> public abstract class LookupStrConverter<T> implements Converter
{
>>>>>   private Class<T> persistentClass;
>>>>>   private EntityManager em;
>>>>>
>>>>>   public LookupStrConverter() {
>>>>>   }
>>>>>   protected void init(Class<T> persistentClass) {
>>>>>     setPersistentClass(persistentClass);
>>>>>     setEm(JsfUtil.getAttributeEntityManager());
>>>>>   }
>>>>>
>>>>>   public Class<T> getPersistentClass() {
>>>>>     return persistentClass;
>>>>>   }
>>>>>
>>>>>   public void setPersistentClass(Class<T> persistentClass) {
>>>>>     this.persistentClass = persistentClass;
>>>>>   }
>>>>>
>>>>>   public EntityManager getEm() {
>>>>>     return em;
>>>>>   }
>>>>>
>>>>>   public void setEm(EntityManager em) {
>>>>>     this.em = em;
>>>>>   }
>>>>>
>>>>>   @Override
>>>>>   public T getAsObject(FacesContext facesContext, UIComponent
>>>>> uiComponent,
>>>>> String string) {
>>>>>     if (Geral.StrEmpty(string)) {
>>>>>       return null;
>>>>>     }
>>>>>     try {
>>>>>       if (string.indexOf(HTMLProducerTab.XMLSEPARADORCOMBO) > -1)
>>>>>         string = Geral.getItemComboBoxCod(string);
>>>>>       T object;
>>>>>       if (em != null)
>>>>>         object = em.find(persistentClass, string);
>>>>>       else
>>>>>         object = null;
>>>>>       return object;
>>>>>     } catch (Exception e) {
>>>>>       e.printStackTrace();
>>>>>       return null;
>>>>>     }
>>>>>   }
>>>>>
>>>>>   @Override
>>>>>   public String getAsString(FacesContext facesContext, UIComponent
>>>>> uIComponent, Object object) {
>>>>>     if (object == null) {
>>>>>       return null;
>>>>>     }
>>>>>     if (object instanceof Long) {
>>>>>       return object.toString();
>>>>>     } else {
>>>>>       try {
>>>>>         GenericEntity o = (GenericEntity) object;
>>>>>         return Geral.LimpaDescricao(o.getDescricao()) +
>>>>> HTMLProducerTab.XMLSEPARADORCOMBO + o.getCodigo().toString();
>>>>>       } catch (Exception e) {
>>>>>         e.printStackTrace();
>>>>>         return null;
>>>>>       }
>>>>>     }
>>>>>   }
>>>>> }
>>>>>
>>>>>
>>>>> Em 07-07-2016 12:33, Gerhard Petracek escreveu:
>>>>>
>>>>> hi edilmar,
>>>>>
>>>>>>
>>>>>> looks like mojarra has an issue with your converter - see:
>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>> sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48)
>>>>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>>>>>> at java.lang.Class.newInstance(Class.java:442)
>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>> com.sun.faces.application.ApplicationImpl.newConverter(ApplicationImpl.java:1808)
>>>>>>
>>>>>> -> that isn't related to deltaspike.
>>>>>>
>>>>>> regards,
>>>>>> gerhard
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message