Re: Common-theme next step

2017-09-26 Thread Swapnil Mane
Thank you Jacques!
Done - https://issues.apache.org/jira/browse/OFBIZ-9794


- Best Regards,
Swapnil M Mane

On Tue, Sep 26, 2017 at 8:40 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Swapnil,
>
> Could you please open a Jira for your case?
>
> I'll double check mine and will add it also
>
> Thanks
>
> Jacques
>
>
>
> Le 26/09/2017 à 10:46, Swapnil Mane a écrit :
>
>> Yes Jacques, thanks for looking into this.
>>
>>
>> - Best Regards,
>> Swapnil M Mane
>>
>> On Tue, Sep 26, 2017 at 2:08 PM, Jacques Le Roux <
>> jacques.le.r...@les7arts.com> wrote:
>>
>> Hi Swapnil, All,
>>>
>>> This is a real problem, I just crossed it also with
>>>
>>> 2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6
>>> |ServiceDispatcher |T| [[ASync service failed...-
>>> total:0.004,since last(ASync service sta...):0.004]] - 'ecommerce /
>>> sendOrderConfirmation'
>>> 2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6
>>> |ServiceDispatcher |E| Service [sendOrderConfirmation] threw
>>> an
>>> unexpected exception/error
>>> org.apache.ofbiz.service.GenericServiceException: Problem serializing
>>> service attributes (Cannot serialize object of class
>>> org.apache.ofbiz.widget.renderer.VisualTheme)
>>>
>>> and
>>>
>>> 2017-09-26 10:03:40,283 |jsse-nio-8443-exec-6
>>> |ScreenFactory |I| Got 2 screens in 0.005s from:
>>> file:/C:/projectsASF/ofbiz/plugins/ecommerce/widget/Shopping
>>> ListScreens.xml
>>> 2017-09-26 10:03:40,578 |jsse-nio-8443-exec-6
>>> |ScriptUtil|W| Error running script at location
>>> [component://ecommerce/groovyScripts/shoppinglist/EditShoppi
>>> ngList.groovy]:
>>> org.codehaus.groov
>>> y.runtime.typehandling.GroovyCastException: Cannot cast object 'USD'
>>> with
>>> class 'java.lang.String' to class 'org.apache.ofbiz.widget.rende
>>> rer.VisualTheme'
>>> org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot
>>> cast
>>> object 'USD' with class 'java.lang.String' to class
>>> 'org.apache.ofbiz.widget.renderer.VisualTheme'
>>>
>>> I have no other ideas yet (working on something else). But I'll have a
>>> look ASAP
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 23/09/2017 à 11:11, Swapnil Mane a écrit :
>>>
>>> Thanks Jacques for your timings and suggestion.
 @SuppressWarnings("serial") doesn't work for me.

 = Console Log start =

 2017-09-23 14:38:25,610 |jsse-nio-8443-exec-8
 |ServiceDispatcher |T| [[ASync service started...-
 total:0.0,since last(Begin):0.0]] - 'manufacturing / executeMrp'
 2017-09-23 14:38:25,630 |jsse-nio-8443-exec-8
 |SequenceUtil  |I| Got bank of sequenced IDs for
 [RuntimeData]; curSeqId=10600, maxSeqId=10700, bankSize=100
 2017-09-23 14:38:25,649 |jsse-nio-8443-exec-8
 |UtilObject|E| null
 java.io.NotSerializableException: org.apache.ofbiz.widget.model.
 ModelTheme$ModelTemplate
   at java.io.ObjectOutputStream.wri
 teObject0(ObjectOutputStream.
 java:1184)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.
 java:348)
 ~[?:1.8.0_66]
   at java.util.HashMap.internalWriteEntries(HashMap.java:1777)
 ~[?:1.8.0_66]
   at java.util.HashMap.writeObject(HashMap.java:1354)
 ~[?:1.8.0_66]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
 ~[?:1.8.0_66]
   at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
   at java.lang.reflect.Method.invoke(Method.java:497)
 ~[?:1.8.0_66]
   at java.io.ObjectStreamClass.invo
 keWriteObject(ObjectStreamClas
 s.java:1028)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.wri
 teSerialData(ObjectOutputStrea
 m.java:1496)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.wri
 teOrdinaryObject(ObjectOutputS
 tream.java:1432)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.wri
 teObject0(ObjectOutputStream.
 java:1178)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.def
 aultWriteFields(ObjectOutputSt
 ream.java:1548)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.wri
 teSerialData(ObjectOutputStrea
 m.java:1509)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.wri
 teOrdinaryObject(ObjectOutputS
 tream.java:1432)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.wri
 teObject0(ObjectOutputStream.
 java:1178)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.def
 aultWriteFields(ObjectOutputSt
 ream.java:1548)
 ~[?:1.8.0_66]
   at java.io.ObjectOutputStream.wri
 teSerialData(ObjectOutputStrea
 m.java:1509)
 

Re: Common-theme next step

2017-09-26 Thread Jacques Le Roux

Hi Swapnil,

Could you please open a Jira for your case?

I'll double check mine and will add it also

Thanks

Jacques


Le 26/09/2017 à 10:46, Swapnil Mane a écrit :

Yes Jacques, thanks for looking into this.


- Best Regards,
Swapnil M Mane

On Tue, Sep 26, 2017 at 2:08 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Hi Swapnil, All,

This is a real problem, I just crossed it also with

2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6
|ServiceDispatcher |T| [[ASync service failed...-
total:0.004,since last(ASync service sta...):0.004]] - 'ecommerce /
sendOrderConfirmation'
2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6
|ServiceDispatcher |E| Service [sendOrderConfirmation] threw an
unexpected exception/error
org.apache.ofbiz.service.GenericServiceException: Problem serializing
service attributes (Cannot serialize object of class
org.apache.ofbiz.widget.renderer.VisualTheme)

and

2017-09-26 10:03:40,283 |jsse-nio-8443-exec-6
|ScreenFactory |I| Got 2 screens in 0.005s from:
file:/C:/projectsASF/ofbiz/plugins/ecommerce/widget/Shopping
ListScreens.xml
2017-09-26 10:03:40,578 |jsse-nio-8443-exec-6
|ScriptUtil|W| Error running script at location
[component://ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy]:
org.codehaus.groov
y.runtime.typehandling.GroovyCastException: Cannot cast object 'USD' with
class 'java.lang.String' to class 'org.apache.ofbiz.widget.rende
rer.VisualTheme'
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast
object 'USD' with class 'java.lang.String' to class
'org.apache.ofbiz.widget.renderer.VisualTheme'

I have no other ideas yet (working on something else). But I'll have a
look ASAP

Jacques



Le 23/09/2017 à 11:11, Swapnil Mane a écrit :


Thanks Jacques for your timings and suggestion.
@SuppressWarnings("serial") doesn't work for me.

= Console Log start =

2017-09-23 14:38:25,610 |jsse-nio-8443-exec-8
|ServiceDispatcher |T| [[ASync service started...-
total:0.0,since last(Begin):0.0]] - 'manufacturing / executeMrp'
2017-09-23 14:38:25,630 |jsse-nio-8443-exec-8
|SequenceUtil  |I| Got bank of sequenced IDs for
[RuntimeData]; curSeqId=10600, maxSeqId=10700, bankSize=100
2017-09-23 14:38:25,649 |jsse-nio-8443-exec-8
|UtilObject|E| null
java.io.NotSerializableException: org.apache.ofbiz.widget.model.
ModelTheme$ModelTemplate
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
java:1184)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.
java:348)
~[?:1.8.0_66]
  at java.util.HashMap.internalWriteEntries(HashMap.java:1777)
~[?:1.8.0_66]
  at java.util.HashMap.writeObject(HashMap.java:1354)
~[?:1.8.0_66]
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_66]
  at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
  at java.lang.reflect.Method.invoke(Method.java:497)
~[?:1.8.0_66]
  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClas
s.java:1028)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
m.java:1496)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
tream.java:1432)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
java:1178)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputSt
ream.java:1548)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
m.java:1509)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
tream.java:1432)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
java:1178)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputSt
ream.java:1548)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
m.java:1509)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
tream.java:1432)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
java:1178)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputSt
ream.java:1548)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
m.java:1509)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
tream.java:1432)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
java:1178)
~[?:1.8.0_66]
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.
java:348)
~[?:1.8.0_66]
  at org.apache.ofbiz.base.util.UtilObject.getBytes(UtilObject.

Re: Common-theme next step

2017-09-26 Thread Jacques Le Roux

Le 26/09/2017 à 10:38, Jacques Le Roux a écrit :
2017-09-26 10:03:40,283 |jsse-nio-8443-exec-6 |ScreenFactory |I| Got 2 screens in 0.005s from: 
file:/C:/projectsASF/ofbiz/plugins/ecommerce/widget/ShoppingListScreens.xml
2017-09-26 10:03:40,578 |jsse-nio-8443-exec-6 |ScriptUtil    |W| Error running script at location 
[component://ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy]: org.codehaus.groov
y.runtime.typehandling.GroovyCastException: Cannot cast object 'USD' with class 'java.lang.String' to class 
'org.apache.ofbiz.widget.renderer.VisualTheme'
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'USD' with class 'java.lang.String' to class 
'org.apache.ofbiz.widget.renderer.VisualTheme'

This one was because I did no update plugins after Deepak fixed it at r1807330

Jacques



Re: [MODERATE EMAIL] Proposal to use Servlet annotations for configuration.

2017-09-26 Thread Jacques Le Roux

Le 26/09/2017 à 16:16, Jacques Le Roux a écrit :

Note that I have already a number of HTTP headers securing in RequestHandler .

This is what happens when I rewrite sentences, I meant:

Note that I have already secured a number of HTTP headers in RequestHandler .

Jacques



Re: [MODERATE EMAIL] Proposal to use Servlet annotations for configuration.

2017-09-26 Thread Jacques Le Roux

Ah Pradhan,

Note that I have already a number of HTTP headers securing in RequestHandler . 
But I'd not be against using stuff we have now in Tomcat 8.5

https://tomcat.apache.org/tomcat-8.5-doc/config/filter.html#HTTP_Header_Security_Filter/Initialisation_parameters

And of course also CORS Filter, CSRF Prevention Filter, etc.

Please refer to

https://issues.apache.org/jira/browse/OFBIZ-6766

https://issues.apache.org/jira/browse/OFBIZ-6759

https://cwiki.apache.org/confluence/display/OFBIZ/How+to+Secure+HTTP+Headers

for a better communication :)

Thanks

Jacques


Le 26/09/2017 à 15:47, Jacques Le Roux a écrit :

Hi Yash,

It's not what I wanted to put there :)

But anyway, since I can't remember, after a quick look I have no real ideas on how you will use @ServletSecurity (I guess with @HttpConstraint 
and@HttpMethodConstrain).


So please feel free to provide patches in Jiras to continue your ideas

Thanks

Jacques


Le 26/09/2017 à 13:42, Yash Sharma a écrit :

Thank you, Jacques.
We can even take it further with @*WebInitParam *annotation to
initialize values once it for all for all webapps and @*ServletSecurity *for
basic servlet security.

On Tue, Sep 26, 2017 at 2:23 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Le 24/09/2017 à 10:27, Jacques Le Roux a écrit :

and certainly more things using @WebInitParam and @WebInitParam

Not sure what I wanted to add there :D

Jacques

--

Thanks,
*Pradhan Yash Sharma*








Re: [MODERATE EMAIL] Proposal to use Servlet annotations for configuration.

2017-09-26 Thread Jacques Le Roux

Hi Yash,

It's not what I wanted to put there :)

But anyway, since I can't remember, after a quick look I have no real ideas on how you will use @ServletSecurity (I guess with @HttpConstraint 
and@HttpMethodConstrain).


So please feel free to provide patches in Jiras to continue your ideas

Thanks

Jacques


Le 26/09/2017 à 13:42, Yash Sharma a écrit :

Thank you, Jacques.
We can even take it further with @*WebInitParam *annotation to
initialize values once it for all for all webapps and @*ServletSecurity *for
basic servlet security.

On Tue, Sep 26, 2017 at 2:23 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Le 24/09/2017 à 10:27, Jacques Le Roux a écrit :

and certainly more things using @WebInitParam and @WebInitParam

Not sure what I wanted to add there :D

Jacques

--

Thanks,
*Pradhan Yash Sharma*





buildbot success in on ofbiz-trunk-framework-plugins

2017-09-26 Thread buildbot
The Buildbot has detected a restored build on builder 
ofbiz-trunk-framework-plugins while building . Full details are available at:
https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/484

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-plugins-commit' 
triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-plugins/trunk] 1809747
Blamelist: jleroux

Build succeeded!

Sincerely,
 -The Buildbot





buildbot success in on ofbiz-trunk-framework

2017-09-26 Thread buildbot
The Buildbot has detected a restored build on builder ofbiz-trunk-framework 
while building . Full details are available at:
https://ci.apache.org/builders/ofbiz-trunk-framework/builds/493

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 
'on-ofbiz-framework-commit' triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1809747
Blamelist: jleroux

Build succeeded!

Sincerely,
 -The Buildbot





Re: [MODERATE EMAIL] Proposal to use Servlet annotations for configuration.

2017-09-26 Thread Yash Sharma
Thank you, Jacques.
We can even take it further with @*WebInitParam *annotation to
initialize values once it for all for all webapps and @*ServletSecurity *for
basic servlet security.

On Tue, Sep 26, 2017 at 2:23 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Le 24/09/2017 à 10:27, Jacques Le Roux a écrit :
> > and certainly more things using @WebInitParam and @WebInitParam
> Not sure what I wanted to add there :D
>
> Jacques
>
> --
Thanks,
*Pradhan Yash Sharma*


Re: [MODERATE EMAIL] Proposal to use Servlet annotations for configuration.

2017-09-26 Thread Jacques Le Roux

Le 24/09/2017 à 10:27, Jacques Le Roux a écrit :
and certainly more things using @WebInitParam and @WebInitParam 

Not sure what I wanted to add there :D

Jacques



Re: Common-theme next step

2017-09-26 Thread Swapnil Mane
Yes Jacques, thanks for looking into this.


- Best Regards,
Swapnil M Mane

On Tue, Sep 26, 2017 at 2:08 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Swapnil, All,
>
> This is a real problem, I just crossed it also with
>
> 2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6
> |ServiceDispatcher |T| [[ASync service failed...-
> total:0.004,since last(ASync service sta...):0.004]] - 'ecommerce /
> sendOrderConfirmation'
> 2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6
> |ServiceDispatcher |E| Service [sendOrderConfirmation] threw an
> unexpected exception/error
> org.apache.ofbiz.service.GenericServiceException: Problem serializing
> service attributes (Cannot serialize object of class
> org.apache.ofbiz.widget.renderer.VisualTheme)
>
> and
>
> 2017-09-26 10:03:40,283 |jsse-nio-8443-exec-6
> |ScreenFactory |I| Got 2 screens in 0.005s from:
> file:/C:/projectsASF/ofbiz/plugins/ecommerce/widget/Shopping
> ListScreens.xml
> 2017-09-26 10:03:40,578 |jsse-nio-8443-exec-6
> |ScriptUtil|W| Error running script at location
> [component://ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy]:
> org.codehaus.groov
> y.runtime.typehandling.GroovyCastException: Cannot cast object 'USD' with
> class 'java.lang.String' to class 'org.apache.ofbiz.widget.rende
> rer.VisualTheme'
> org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast
> object 'USD' with class 'java.lang.String' to class
> 'org.apache.ofbiz.widget.renderer.VisualTheme'
>
> I have no other ideas yet (working on something else). But I'll have a
> look ASAP
>
> Jacques
>
>
>
> Le 23/09/2017 à 11:11, Swapnil Mane a écrit :
>
>> Thanks Jacques for your timings and suggestion.
>> @SuppressWarnings("serial") doesn't work for me.
>>
>> = Console Log start =
>>
>> 2017-09-23 14:38:25,610 |jsse-nio-8443-exec-8
>> |ServiceDispatcher |T| [[ASync service started...-
>> total:0.0,since last(Begin):0.0]] - 'manufacturing / executeMrp'
>> 2017-09-23 14:38:25,630 |jsse-nio-8443-exec-8
>> |SequenceUtil  |I| Got bank of sequenced IDs for
>> [RuntimeData]; curSeqId=10600, maxSeqId=10700, bankSize=100
>> 2017-09-23 14:38:25,649 |jsse-nio-8443-exec-8
>> |UtilObject|E| null
>> java.io.NotSerializableException: org.apache.ofbiz.widget.model.
>> ModelTheme$ModelTemplate
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
>> java:1184)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.
>> java:348)
>> ~[?:1.8.0_66]
>>  at java.util.HashMap.internalWriteEntries(HashMap.java:1777)
>> ~[?:1.8.0_66]
>>  at java.util.HashMap.writeObject(HashMap.java:1354)
>> ~[?:1.8.0_66]
>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> ~[?:1.8.0_66]
>>  at sun.reflect.NativeMethodAccessorImpl.invoke(
>> NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
>>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
>>  at java.lang.reflect.Method.invoke(Method.java:497)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClas
>> s.java:1028)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
>> m.java:1496)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
>> tream.java:1432)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
>> java:1178)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputSt
>> ream.java:1548)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
>> m.java:1509)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
>> tream.java:1432)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
>> java:1178)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputSt
>> ream.java:1548)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
>> m.java:1509)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
>> tream.java:1432)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
>> java:1178)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputSt
>> ream.java:1548)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStrea
>> m.java:1509)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputS
>> tream.java:1432)
>> ~[?:1.8.0_66]
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.
>> java:1178)
>> ~[?:1.8.0_66]
>>  at 

Re: [MODERATE EMAIL] Proposal to use Servlet annotations for configuration.

2017-09-26 Thread Jacques Le Roux

Hi Yash, All,

I also tried to factorise as much things as possible in the past regarding HTTP 
headers and cookies for security.

It worked for most part but at r1719762 I failed with  in  and we finally ended with OFBIZ-6655 which is good, but 
duplicates things everywhere in web.xml files


I have created 2 patches (trunk and plugin) for that in OFBIZ-6655. It programmatically replaces the web.xml declarations and uses the @WebListener 
annotation to start the process.


Jacques

Le 24/09/2017 à 10:27, Jacques Le Roux a écrit :

Thanks Yash,

For me it's interesting only if we can factorise things.
I mean the web.xml files are easy to read but if we can centralise repeating 
things it's better.
And then the web.xml files will be even easier to read (less stuff).

Fortunately we can factorise

org.apache.ofbiz.webapp.control.ControlFilter

and

org.apache.ofbiz.webapp.control.ContextFilter

and certainly more things using @WebInitParam and @WebInitParam

So this would make the web.xml files much simpler and I agree it's a good thing!

Jacques


Le 23/09/2017 à 14:31, Yash Sharma a écrit :

Hello Jacques,

First of all, thank you for your response, while we declare Servlet
definition in web.xml file we can also do it the java file itself.
Here is an example of declaring a Servlet through annotation:

@WebServlet(name = "/mypluginweb/WelcomeServlet", urlPatterns =
"/mypluginweb/WelcomeServlet", loadOnStartup = 1, description = "Welcome
Servlet")

and for Filters:

@WebFilter(filterName = "MyFilter", displayName = "MyFilter", initParams =
@WebInitParam(name = "allowedPaths", value =
"/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images"),
@WebInitParam(name = "redirectPath", value = "/control/main"))

Web components are configurable through annotations it reduces ceremony of
1) Writing XML files
2) Validating and storing Document
3) And finally converting them into Java objects.
4) Annotations based configuration is concise in comparison to XML based
configuration.



On Mon, Sep 18, 2017 at 12:27 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Hi Pradhan,

Could you give us a quick example of what you want to do with it exactly?

Actually more to the point, what advantages this gives to us?

TIA

Jacques


Le 18/09/2017 à 07:19, Deepak Dixit a écrit :

Hi Yash,

Your email has been moderated,
Please subscribe to mailing list

http://ofbiz.apache.org/mailing-lists.html


Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
www.hotwax.co


-- Forwarded message --
From: Pradhan Yash Sharma 
To: dev@ofbiz.apache.org
Cc: Yash Sharma 
Bcc:
Date: Sun, 17 Sep 2017 15:52:51 +0530
Subject: Proposal to use Servlet annotations for configuration.
Hello All,

I would like to propose to use annotations for configuring Servlets. We
have declared web.xml file in every webapp to modularize code. I would

like

to use Web Servlet annotations
<

http://docs.oracle.com/javaee/6/api/javax/servlet/annotation/package-summary.html

to
configure:

1) context params
2) filters
3) listeners
4) servlet
5) session configurations

Please let me know your thoughts.


--

Thanks,
*Pradhan Yash Sharma*








Re: Common-theme next step

2017-09-26 Thread Jacques Le Roux

Hi Swapnil, All,

This is a real problem, I just crossed it also with

2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6 |ServiceDispatcher |T| [[ASync service failed...- total:0.004,since last(ASync service 
sta...):0.004]] - 'ecommerce / sendOrderConfirmation'

2017-09-26 10:03:34,730 |jsse-nio-8443-exec-6 |ServiceDispatcher 
|E| Service [sendOrderConfirmation] threw an unexpected exception/error
org.apache.ofbiz.service.GenericServiceException: Problem serializing service attributes (Cannot serialize object of class 
org.apache.ofbiz.widget.renderer.VisualTheme)


and

2017-09-26 10:03:40,283 |jsse-nio-8443-exec-6 |ScreenFactory |I| Got 2 screens in 0.005s from: 
file:/C:/projectsASF/ofbiz/plugins/ecommerce/widget/ShoppingListScreens.xml
2017-09-26 10:03:40,578 |jsse-nio-8443-exec-6 |ScriptUtil    |W| Error running script at location 
[component://ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy]: org.codehaus.groov

y.runtime.typehandling.GroovyCastException: Cannot cast object 'USD' with class 
'java.lang.String' to class 'org.apache.ofbiz.widget.renderer.VisualTheme'
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'USD' with class 'java.lang.String' to class 
'org.apache.ofbiz.widget.renderer.VisualTheme'


I have no other ideas yet (working on something else). But I'll have a look ASAP

Jacques


Le 23/09/2017 à 11:11, Swapnil Mane a écrit :

Thanks Jacques for your timings and suggestion.
@SuppressWarnings("serial") doesn't work for me.

= Console Log start =

2017-09-23 14:38:25,610 |jsse-nio-8443-exec-8
|ServiceDispatcher |T| [[ASync service started...-
total:0.0,since last(Begin):0.0]] - 'manufacturing / executeMrp'
2017-09-23 14:38:25,630 |jsse-nio-8443-exec-8
|SequenceUtil  |I| Got bank of sequenced IDs for
[RuntimeData]; curSeqId=10600, maxSeqId=10700, bankSize=100
2017-09-23 14:38:25,649 |jsse-nio-8443-exec-8
|UtilObject|E| null
java.io.NotSerializableException: org.apache.ofbiz.widget.model.
ModelTheme$ModelTemplate
 at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
~[?:1.8.0_66]
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
~[?:1.8.0_66]
 at java.util.HashMap.internalWriteEntries(HashMap.java:1777)
~[?:1.8.0_66]
 at java.util.HashMap.writeObject(HashMap.java:1354) ~[?:1.8.0_66]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_66]
 at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
 at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
 at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
~[?:1.8.0_66]
 at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
~[?:1.8.0_66]
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
~[?:1.8.0_66]
 at org.apache.ofbiz.base.util.UtilObject.getBytes(UtilObject.java:82)
[ofbiz.jar:?]
 at org.apache.ofbiz.entity.serialize.XmlSerializer.
serializeCustom(XmlSerializer.java:262) [ofbiz.jar:?]
 at org.apache.ofbiz.entity.serialize.XmlSerializer.
serializeSingle(XmlSerializer.java:257) [ofbiz.jar:?]
 at org.apache.ofbiz.entity.serialize.XmlSerializer.
serializeSingle(XmlSerializer.java:252)