chatterbox nats

2022-02-22 Thread Matthew Broadhead

Hi Jon Gallimore,
The NATS connection keeps closing.  is there some way to make it reopen?
org.apache.tomee.chatterbox.nats.api.NATSException: 
java.lang.IllegalStateException: stan: connection closed
at 
org.apache.tomee.chatterbox.nats.adapter.NATSResourceAdapter.publish(NATSResourceAdapter.java:155)
at 
org.apache.tomee.chatterbox.nats.adapter.out.NATSManagedConnection.publish(NATSManagedConnection.java:139)
at 
org.apache.tomee.chatterbox.nats.adapter.out.NATSConnectionImpl.publish(NATSConnectionImpl.java:39)
at sun.reflect.GeneratedMethodAccessor610.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.openejb.resource.AutoConnectionTracker$ConnectionInvocationHandler.invoke(AutoConnectionTracker.java:311)
at 
org.apache.tomee.chatterbox.nats.adapter.out.NATSConnectionImpl$$Impl.publish(org/apache/tomee/chatterbox/nats/adapter/out/NATSConnectionImpl.java)



Re: Connection not availalable from datasource after some time

2021-11-24 Thread Matthew Broadhead
i always set datasources in tomee.xml so i don't know about 
WEB-INF/resources.xml.  here is an examples of what i use.  i have never 
had any connection issues



    JdbcDriver com.mysql.jdbc.Driver
    JdbcUrl jdbc:mysql://localhost:3306/books
    UserName bookuser
    Password **
    testOnReturn = true
    testWhileIdle = true
    timeBetweenEvictionRunsMillis = 2
    initialSize = 2
    minIdle = 2
    validationQuery = select 1
    

On 24/11/2021 19:06, Mauro Chi wrote:

https://tomee.apache.org/datasource-config.html

please you know what properties i have to set into resource.xml for the
datasouce for have app all times some connection into pool available?

With my simple configuration already setted for username password , driver
and url i get after some time  the web app not respond because connection
from pooli i think is not available.

I have to go into manager app and reload the application for get working.

So i Think i have to set some properties into  declaration of datasource
like explained  from
Tomee datadource configiration .

But i non know what propertie use for have connection available all times
someone connect to my web app

Thank you into Advance.
Mauro





Re: File upload with rest not working

2021-11-05 Thread Matthew Broadhead

here is a gist
https://gist.github.com/chongma/c75c9092a0b7c5fdb36b44b1311945ba

On 04/11/2021 20:50, naciu wrote:

please you can send my the code working- for upload ?

Il 04/11/2021 14:30, Matthew Broadhead ha scritto:

i use org.apache.cxf.jaxrs.ext.multipart.Attachment
and javax.ws.rs.core.MultivaluedMap
and it works fine


On 03/11/2021 19:10, naciu wrote:
https://www.benchresources.net/apache-cxf-jax-rs-restful-web-service-for-uploadingdownloading-text-file-java-client/ 



i read this example.

But this line give me error:

  MultivaluedMap multivaluedMap = 
attachment.getHeaders();


into my ide lament the method attachment.getHeaders(); not exists 
from the

class Attachment.

please how resolve?









Re: File upload with rest not working

2021-11-04 Thread Matthew Broadhead

i use org.apache.cxf.jaxrs.ext.multipart.Attachment
and javax.ws.rs.core.MultivaluedMap
and it works fine


On 03/11/2021 19:10, naciu wrote:

https://www.benchresources.net/apache-cxf-jax-rs-restful-web-service-for-uploadingdownloading-text-file-java-client/

i read this example.

But this line give me error:

  MultivaluedMap multivaluedMap = attachment.getHeaders();

into my ide lament the method attachment.getHeaders(); not exists from the
class Attachment.

please how resolve?





Re: ejb singleton not closing thread

2021-05-31 Thread Matthew Broadhead

following this stackoverflow post seems to have fixed it:
https://stackoverflow.com/questions/39080296/hazelcast-threads-prevent-tomee-from-stopping 



creating a default producer:
@ApplicationScoped
public class NatsConnectionProducer {

    @Resource(name = "baseAddressNats")
    private String baseAddressNats;

    @Produces
    @ApplicationScoped
    public StreamingConnection instance() throws IOException, 
InterruptedException {
        StreamingConnectionFactory cf = new 
StreamingConnectionFactory(new Options.Builder().natsUrl(baseAddressNats)

.clusterId("cluster-id").clientId("client-id").build());
        return cf.createConnection();
    }

    public void destroy(@Disposes final StreamingConnection instance)
            throws IOException, TimeoutException, InterruptedException {
        instance.close();
    }
}

On 28/05/2021 11:35, Matthew Broadhead wrote:
i am trying to subscribe to a nats streaming server in a singleton. 
the idea is that it will listen for any messages from the queue while 
the server is running.


it looks like it might work ok in production but during development if 
i make any code change then it blows up with 
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads 
The web application [api] appears to have started a thread named 
[jnats-streaming ack timeout thread] but has failed to stop it. This 
is very likely to create a memory leak.


i have created a gist 
https://gist.github.com/chongma/2a3ab451f2aeabc98340a9b897394cfe


is there any way to make sure the thread gets shut down when the web 
application is stopped?







ejb singleton not closing thread

2021-05-28 Thread Matthew Broadhead
i am trying to subscribe to a nats streaming server in a singleton. the 
idea is that it will listen for any messages from the queue while the 
server is running.


it looks like it might work ok in production but during development if i 
make any code change then it blows up with 
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads 
The web application [api] appears to have started a thread named 
[jnats-streaming ack timeout thread] but has failed to stop it. This is 
very likely to create a memory leak.


i have created a gist 
https://gist.github.com/chongma/2a3ab451f2aeabc98340a9b897394cfe


is there any way to make sure the thread gets shut down when the web 
application is stopped?





Re: tomee 8.0.0

2020-01-14 Thread Matthew Broadhead

Tomcat 9.0.22.  thanks

On 14/01/2020 10:52, COURTAULT Francois wrote:

Hello Matthew,

Just look at startup log, you have the info .

Best Regards.

-Original Message-
From: Matthew Broadhead [mailto:matthew.broadh...@nbmlaw.co.uk.INVALID]
Sent: mardi 14 janvier 2020 10:50
To: users@tomee.apache.org
Subject: tomee 8.0.0

is TomEE using Tomcat 9.0 or is it still 8.5?  also how do i figure this out 
for myself?

  This message and any attachments are intended solely for the addressees and 
may contain confidential information. Any unauthorized use or disclosure, 
either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the 
message if altered, changed or falsified. If you are not the intended recipient 
of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free 
from viruses, the sender will not be liable for damages caused by a transmitted 
virus.




tomee 8.0.0

2020-01-14 Thread Matthew Broadhead
is TomEE using Tomcat 9.0 or is it still 8.5?  also how do i figure this 
out for myself?


Re: JSON dates

2019-08-21 Thread Matthew Broadhead
it looks fixed if i change my converter to work like this but it is 
annoying to have to annotate every date in the DTOs.  is there a global 
setting?


public class DateConverter implements Converter {

    private static final String iso8601 = "-MM-dd'T'HH:mm:ss";

    @Override
    public String toString(final Date instance) {
        SimpleDateFormat sdf = new SimpleDateFormat(iso8601);
        String string = sdf.format(instance);
        return string;
    }

    @Override
    public Date fromString(final String text) {
        return DatatypeConverter.parseDateTime(text).getTime();
    }
}


On 21/08/2019 11:17, Matthew Broadhead wrote:

Using TomEE 7.1.0 Plus

when using jax-rs endpoint the dates in my objects are getting changed 
presumably using timezone data.


for example the uk is now in summer time so the date 
2019-08-17T00:00:00 becomes 2019-08-16T23:00:00  even when i am not 
using the time part of the date.


i am using momentjs and moment(date).utc() is supposed to bring the 
date back to utc but that does not work as the json doesn't seem to 
include the original date but the recalculated date


i also tried using a date converter like
public class DateConverter implements Converter {
    @Override
    public String toString(final Date instance) {
        final Calendar cal = GregorianCalendar.getInstance();
        cal.setTime(instance);
        return DatatypeConverter.printDateTime(cal);
    }

    @Override
    public Date fromString(final String text) {
        return DatatypeConverter.parseDateTime(text).getTime();
    }
}
but it doesn't make any difference

is there any documentation on this?




JSON dates

2019-08-21 Thread Matthew Broadhead

Using TomEE 7.1.0 Plus

when using jax-rs endpoint the dates in my objects are getting changed 
presumably using timezone data.


for example the uk is now in summer time so the date 2019-08-17T00:00:00 
becomes 2019-08-16T23:00:00  even when i am not using the time part of 
the date.


i am using momentjs and moment(date).utc() is supposed to bring the date 
back to utc but that does not work as the json doesn't seem to include 
the original date but the recalculated date


i also tried using a date converter like
public class DateConverter implements Converter {
    @Override
    public String toString(final Date instance) {
        final Calendar cal = GregorianCalendar.getInstance();
        cal.setTime(instance);
        return DatatypeConverter.printDateTime(cal);
    }

    @Override
    public Date fromString(final String text) {
        return DatatypeConverter.parseDateTime(text).getTime();
    }
}
but it doesn't make any difference

is there any documentation on this?


Re: cxf version change between 7.0.5 to 7.1.0

2019-06-01 Thread Matthew Broadhead

i wonder where it has been changed if the version numbers are the same?

this is the class that is giving me problems:
https://github.com/keycloak/keycloak/blob/master/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java

if you look at the getters and setters for Boolean values enabled and 
emailVerified you will see they use isEnabled and isEmailVerified 
instead of getEnabled and getEmailVerified (as i would expect with a 
Boolean object instead of boolean primitive)


basically my choice is to stay on 7.0.5 or write a wrapper to fix 
Keycloak object.  i have submitted the problem to them but they don't care.


On 01/06/2019 01:50, Kean Erickson wrote:

Something did change relating to Johnzon between these two versions. It
became more strict about getter / setter naming convention, specifically
such that a getter called getID for a prop called id needed to be renamed
with a lowercase D in order to have the property be included in a response.

On Fri, May 31, 2019, 3:54 PM Matthew Broadhead
 wrote:


yes i agree the version numbers look the same.

but there are some big changes somewhere affecting the JSON output
because for example java.util.Date is being converted differently in
7.0.5 and 7.1.0

in moment.js for 7.0.5 i have to use
moment(value.time).format('lll')

whereas in 7.1.0 i can use
moment(value).format('lll')

the handling of booleans must be the same although keycloak are using a
strange format for their getter and setters

On 28/05/2019 17:29, César Hernández Mendoza wrote:

Hi Matthew,
Replying in line:

it seems that the version of cxf in 7.0.5 successfully converts the

boolean fields to true, but the one in 7.1.0 doesn't

As far as I see, TomEE 7.0.5 [1] and  7.1.0 [2] are both using cxf 3.1.15
version and johnzon 1.0.1


it works using 7.0.5 but not with 7.1.0

Can you please share the logs you are getting when the client is not
working on 7.1.0.
An example project would be useful to replicate the scenario locally too.


[1]


https://github.com/apache/tomee/blob/f6d053a6289d7ff5f0bd71ad041ca80831427bf9/pom.xml#L106
https://github.com/apache/tomee/blob/f6d053a6289d7ff5f0bd71ad041ca80831427bf9/pom.xml#L136

[2]


https://github.com/apache/tomee/blob/8c6358cca46e431df78fc9c7d818259a9ba8635b/pom.xml#L107
https://github.com/apache/tomee/blob/8c6358cca46e431df78fc9c7d818259a9ba8635b/pom.xml#L137


El mié., 22 may. 2019 a las 11:31, Matthew Broadhead
() escribió:


actually wouldn't it be johnzon that has changed its behaviour?

On 22/05/2019 17:19, Matthew Broadhead wrote:

i am using keycloak 4.5.0 for my security.  when i post a
org.keycloak.representations.idm.UserRepresentation using cxf
webclient it works using 7.0.5 but not with 7.1.0

e.g.
userRepresentation.setEnabled(true);
userRepresentation.setEmailVerified(true);
Response response =
wc.type(MediaType.APPLICATION_JSON).post(userRepresentation);

it seems that the version of cxf in 7.0.5 successfully converts the
boolean fields to true, but the one in 7.1.0 doesn't

i can post to the cxf list but do you know what the version numbers

are?

also it seems that keycloak have their getters and setters all messed
up, they are using a Boolean object but setting like a primitive e.g.
public Boolean isEnabled() {
  return enabled;
}
public void setEnabled(Boolean enabled) {
  this.enabled = enabled;
}






Re: cxf version change between 7.0.5 to 7.1.0

2019-05-31 Thread Matthew Broadhead

yes i agree the version numbers look the same.

but there are some big changes somewhere affecting the JSON output 
because for example java.util.Date is being converted differently in 
7.0.5 and 7.1.0


in moment.js for 7.0.5 i have to use
moment(value.time).format('lll')

whereas in 7.1.0 i can use
moment(value).format('lll')

the handling of booleans must be the same although keycloak are using a 
strange format for their getter and setters


On 28/05/2019 17:29, César Hernández Mendoza wrote:

Hi Matthew,
Replying in line:

it seems that the version of cxf in 7.0.5 successfully converts the

boolean fields to true, but the one in 7.1.0 doesn't

As far as I see, TomEE 7.0.5 [1] and  7.1.0 [2] are both using cxf 3.1.15
version and johnzon 1.0.1


it works using 7.0.5 but not with 7.1.0

Can you please share the logs you are getting when the client is not
working on 7.1.0.
An example project would be useful to replicate the scenario locally too.


[1]
https://github.com/apache/tomee/blob/f6d053a6289d7ff5f0bd71ad041ca80831427bf9/pom.xml#L106
https://github.com/apache/tomee/blob/f6d053a6289d7ff5f0bd71ad041ca80831427bf9/pom.xml#L136

[2]
https://github.com/apache/tomee/blob/8c6358cca46e431df78fc9c7d818259a9ba8635b/pom.xml#L107
https://github.com/apache/tomee/blob/8c6358cca46e431df78fc9c7d818259a9ba8635b/pom.xml#L137


El mié., 22 may. 2019 a las 11:31, Matthew Broadhead
() escribió:


actually wouldn't it be johnzon that has changed its behaviour?

On 22/05/2019 17:19, Matthew Broadhead wrote:

i am using keycloak 4.5.0 for my security.  when i post a
org.keycloak.representations.idm.UserRepresentation using cxf
webclient it works using 7.0.5 but not with 7.1.0

e.g.
userRepresentation.setEnabled(true);
userRepresentation.setEmailVerified(true);
Response response =
wc.type(MediaType.APPLICATION_JSON).post(userRepresentation);

it seems that the version of cxf in 7.0.5 successfully converts the
boolean fields to true, but the one in 7.1.0 doesn't

i can post to the cxf list but do you know what the version numbers are?

also it seems that keycloak have their getters and setters all messed
up, they are using a Boolean object but setting like a primitive e.g.
public Boolean isEnabled() {
 return enabled;
}
public void setEnabled(Boolean enabled) {
 this.enabled = enabled;
}






Re: cxf version change between 7.0.5 to 7.1.0

2019-05-22 Thread Matthew Broadhead

actually wouldn't it be johnzon that has changed its behaviour?

On 22/05/2019 17:19, Matthew Broadhead wrote:
i am using keycloak 4.5.0 for my security.  when i post a 
org.keycloak.representations.idm.UserRepresentation using cxf 
webclient it works using 7.0.5 but not with 7.1.0


e.g.
userRepresentation.setEnabled(true);
userRepresentation.setEmailVerified(true);
Response response = 
wc.type(MediaType.APPLICATION_JSON).post(userRepresentation);


it seems that the version of cxf in 7.0.5 successfully converts the 
boolean fields to true, but the one in 7.1.0 doesn't


i can post to the cxf list but do you know what the version numbers are?

also it seems that keycloak have their getters and setters all messed 
up, they are using a Boolean object but setting like a primitive e.g.

public Boolean isEnabled() {
    return enabled;
}
public void setEnabled(Boolean enabled) {
    this.enabled = enabled;
}




cxf version change between 7.0.5 to 7.1.0

2019-05-22 Thread Matthew Broadhead
i am using keycloak 4.5.0 for my security.  when i post a 
org.keycloak.representations.idm.UserRepresentation using cxf webclient 
it works using 7.0.5 but not with 7.1.0


e.g.
userRepresentation.setEnabled(true);
userRepresentation.setEmailVerified(true);
Response response = 
wc.type(MediaType.APPLICATION_JSON).post(userRepresentation);


it seems that the version of cxf in 7.0.5 successfully converts the 
boolean fields to true, but the one in 7.1.0 doesn't


i can post to the cxf list but do you know what the version numbers are?

also it seems that keycloak have their getters and setters all messed 
up, they are using a Boolean object but setting like a primitive e.g.

public Boolean isEnabled() {
    return enabled;
}
public void setEnabled(Boolean enabled) {
    this.enabled = enabled;
}


cors filter

2019-04-10 Thread Matthew Broadhead

i cannot seem to get the CORS filter in Tomcat working
http://tomcat.apache.org/tomcat-8.0-doc/config/filter.html#CORS_Filter

i ended up creating a custom filter like the accepted answer in 
https://stackoverflow.com/questions/38354664/enable-cors-on-tomcat-8-0-30


also, every tutorial seems to set cors.allowed.origins to *. doesn't 
this defeat the whole purpose of CORS?  it should be set to list just 
the origins that are allowed to access the resource? otherwise your 
customers can get phished?


json html field

2019-03-25 Thread Matthew Broadhead
is there a way to annotate a jpa entity String field containing html so 
that when the json gets passed from jax-rs interface the field is 
properly escaped?


Re: ManagedServiceExecutor JPA

2019-01-09 Thread Matthew Broadhead
i would be happy to try.  could you point me to a similar test which i 
could base it on?


On 09/01/2019 13:16, Jonathan Gallimore wrote:

Hi Matthew

Are you able to wire up an Arquillian test for us?

Thanks

Jon

On Wed, Jan 9, 2019 at 11:54 AM Matthew Broadhead
 wrote:


hi, i just tried to use a ManagedServiceExecutor for Asynchronous like

@Resource
private ManagedExecutorService managedExecutorService;
...
public void something(MyObject myObject) {
  managedExecutorService.submit(() -> somethingFork(myObject));
}

it seems to be fine with CDI injection but it blows up when trying to
get an entity manager
CriteriaBuilder cb = em.getCriteriaBuilder();

it goes to to (org.apache.openejb.threads.task) CUTask.throwable()





ManagedServiceExecutor JPA

2019-01-09 Thread Matthew Broadhead

hi, i just tried to use a ManagedServiceExecutor for Asynchronous like

@Resource
private ManagedExecutorService managedExecutorService;
...
public void something(MyObject myObject) {
    managedExecutorService.submit(() -> somethingFork(myObject));
}

it seems to be fine with CDI injection but it blows up when trying to 
get an entity manager

CriteriaBuilder cb = em.getCriteriaBuilder();

it goes to to (org.apache.openejb.threads.task) CUTask.throwable()


Re: heap dump bval

2018-12-27 Thread Matthew Broadhead
thank you very much for running an analysis Bruno.  i appreciate the 
time you have put into it


i redeploy the apps but always have to restart the server afterwards as 
some apps get jammed.  i was considering deploying using 
tomee-maven-plugin if possible to start new instance directly from CLI


ok i will consolidate to smaller number of webapps.  i will merge some 
datasources where possible.  it  seems like @ViewScoped beans hold large 
data arrays in memory so i will see where it can use @RequestScoped 
unless there is a trick to release memory after render time?


On 27/12/2018 18:03, Bruno Baptista wrote:

I see 20 org.apache.bval.cdi.BValExtension instances.

This seems consistent with the apps you are deploying in there. Do you 
do redeploys of running apps?


Most of the usage is in cached objects:


Class Name | Objects | Shallow Heap | 
Retained Heap | Percentage
- 

org.apache.bval.cdi.BValExtension  |  27 |    1 080 |   
785 781 368 | 50,38%
|- org.apache.bval.MetaBeanManager |  27 |  648 |   
785 711 816 | 50,38%
|  |- org.apache.bval.MetaBeanCache    |  27 |  648 |   
785 709 008 | 50,38%
|  |  |- org.apache.bval.model.MetaBean|  24 972 |    1 198 656 |   
717 359 744 | 45,99%
- 



A deeper analysis needs to be done of that cache to understand if it's 
large due to the model or if there are any leaks.


Assuming that there are no leaks. Some consolidation around apps that 
use the same datasources or even use more TomEE App Servers can be a 
solution.


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 27/12/18 16:41, Matthew Broadhead wrote:
11 datasources and 21 webapps.  i have been considering merging 
everything into around 5 webapps.  it was useful to split it up at 
one point of the development but now it seems unnecessary.  does 
having lots of webapps have a bad effect on performance?


On 27/12/2018 17:18, Bruno Baptista wrote:

This has all the memory contents.

Yes, will delete afterwards.

Visual VM in useless with this, Eclipse Memory Analyzer works and it 
seems a lot faster.


There is definitely an issue around 
"org.apache.bval.cdi.BValExtension" and 
"org.apache.webbeans.container.BeanManagerImpl".


How many apps and datasources do you have deployed?

Did you try to replicate this with one of the demo apps?

Cheers

Bruno Baptista
https://twitter.com/brunobat_



On 27/12/18 15:27, Matthew Broadhead wrote:
it is just dawning on me how much sensitive information is in these 
heap dumps.  i probably should have asked before but will you keep 
it private?  i thought there was only object sizes and stuff but it 
is all in there...


On 27/12/2018 15:43, German Gonzalez-Morris wrote:

I see a lot of org.apache.bval.MetaBeanCache
that handles org.apache.bval.cdi.BValExtension

With EclipseMAT can show the retained heap.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente 
necesario''

``Before printing think about the Environment''


On Thu, Dec 27, 2018 at 8:45 AM Matthew Broadhead
 wrote:


thanks Bruno.  i have started doing it this end as well as i didn't
realise it was important to compute the retained values. eclipse 
memory

analyser seems to have the retained values after loading but maybe
doesn't drill far enough in

On 27/12/2018 10:23, Bruno Baptista wrote:

Hi Matthew,

I've loaded the heap profile here but its taking hours to 
compute the
retained values. I'm tempted to cancel and try the Java 11 
version to

see if it's faster...

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:17, Matthew Broadhead wrote:
whoops...i sent my localhost version by mistake.  i am 
uploading the

production one now which zipped to 900MB

On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a 
link via

google drive.  let me know if there are any problems

On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your 
own app?


You can zip that file. It will get much smaller. If you could 
share

it, it would be nice indeed.

Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 
262,583,784 -

16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 -
81,369,760 - 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK

Re: heap dump bval

2018-12-27 Thread Matthew Broadhead
11 datasources and 21 webapps.  i have been considering merging 
everything into around 5 webapps.  it was useful to split it up at one 
point of the development but now it seems unnecessary.  does having lots 
of webapps have a bad effect on performance?


On 27/12/2018 17:18, Bruno Baptista wrote:

This has all the memory contents.

Yes, will delete afterwards.

Visual VM in useless with this, Eclipse Memory Analyzer works and it 
seems a lot faster.


There is definitely an issue around 
"org.apache.bval.cdi.BValExtension" and 
"org.apache.webbeans.container.BeanManagerImpl".


How many apps and datasources do you have deployed?

Did you try to replicate this with one of the demo apps?

Cheers

Bruno Baptista
https://twitter.com/brunobat_



On 27/12/18 15:27, Matthew Broadhead wrote:
it is just dawning on me how much sensitive information is in these 
heap dumps.  i probably should have asked before but will you keep it 
private?  i thought there was only object sizes and stuff but it is 
all in there...


On 27/12/2018 15:43, German Gonzalez-Morris wrote:

I see a lot of org.apache.bval.MetaBeanCache
that handles org.apache.bval.cdi.BValExtension

With EclipseMAT can show the retained heap.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Thu, Dec 27, 2018 at 8:45 AM Matthew Broadhead
 wrote:


thanks Bruno.  i have started doing it this end as well as i didn't
realise it was important to compute the retained values. eclipse 
memory

analyser seems to have the retained values after loading but maybe
doesn't drill far enough in

On 27/12/2018 10:23, Bruno Baptista wrote:

Hi Matthew,

I've loaded the heap profile here but its taking hours to compute the
retained values. I'm tempted to cancel and try the Java 11 version to
see if it's faster...

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:17, Matthew Broadhead wrote:

whoops...i sent my localhost version by mistake.  i am uploading the
production one now which zipped to 900MB

On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via
google drive.  let me know if there are any problems

On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own 
app?


You can zip that file. It will get much smaller. If you could 
share

it, it would be nice indeed.

Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 
262,583,784 -

16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 -
81,369,760 - 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java 



i can make the jvm.hprof available by gogole drive or similar (at
risk of making myself look stupid for having a big memory leak!).
it is 3.2GB

On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained 
list?


This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i 
don't

know which centos repo it is in.  i suppose i could download it
directly...

eclipse memory analyser gives me a retained heap size of
785,781,368 for org.apache.bval.cdi.BValExtension which is
50.38% of everything.

On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and 
activate

the retained column.

That column will calculate the retained (effective) memory
usage by class.

Usually it takes a while to calculate, that's why it's not on
by default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server 
every
couple of days.  so i did a heap dump and solved that 
problem.


then i decided to do another heap dump because the server is
running pretty slowly.  each page is taking a few seconds to
load on a 32GB system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed
with org.apache.bval.cdi.BValExtension. is this fairly 
normal?

using Eclipse Memory Analyser i have dug into shortest routes
to GC root but i don't find a

Re: heap dump bval

2018-12-27 Thread Matthew Broadhead

is there a way to clear sensitive data out of a heap dump?

On 27/12/2018 16:35, German Gonzalez-Morris wrote:

Ok. I understand. I can delete it so there is no misunderstanding about it.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Thu, Dec 27, 2018 at 12:27 PM Matthew Broadhead
 wrote:


it is just dawning on me how much sensitive information is in these heap
dumps.  i probably should have asked before but will you keep it
private?  i thought there was only object sizes and stuff but it is all
in there...

On 27/12/2018 15:43, German Gonzalez-Morris wrote:

I see a lot of org.apache.bval.MetaBeanCache
that handles org.apache.bval.cdi.BValExtension

With EclipseMAT can show the retained heap.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Thu, Dec 27, 2018 at 8:45 AM Matthew Broadhead
 wrote:


thanks Bruno.  i have started doing it this end as well as i didn't
realise it was important to compute the retained values.  eclipse memory
analyser seems to have the retained values after loading but maybe
doesn't drill far enough in

On 27/12/2018 10:23, Bruno Baptista wrote:

Hi Matthew,

I've loaded the heap profile here but its taking hours to compute the
retained values. I'm tempted to cancel and try the Java 11 version to
see if it's faster...

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:17, Matthew Broadhead wrote:

whoops...i sent my localhost version by mistake.  i am uploading the
production one now which zipped to 900MB

On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via
google drive.  let me know if there are any problems

On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share
it, it would be nice indeed.

Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 -
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 -
81,369,760 - 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever


/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java

i can make the jvm.hprof available by gogole drive or similar (at
risk of making myself look stupid for having a big memory leak!).
it is 3.2GB

On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't
know which centos repo it is in.  i suppose i could download it
directly...

eclipse memory analyser gives me a retained heap size of
785,781,368 for org.apache.bval.cdi.BValExtension which is
50.38% of everything.

On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate
the retained column.

That column will calculate the retained (effective) memory
usage by class.

Usually it takes a while to calculate, that's why it's not on
by default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every
couple of days.  so i did a heap dump and solved that problem.

then i decided to do another heap dump because the server is
running pretty slowly.  each page is taking a few seconds to
load on a 32GB system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed
with org.apache.bval.cdi.BValExtension. is this fairly normal?
using Eclipse Memory Analyser i have dug into shortest routes
to GC root but i don't find any of my objects listed there.
mostly BVal stuff.  are there any tips for debugging heap

dumps?

--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @
https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Myn

Re: heap dump bval

2018-12-27 Thread Matthew Broadhead

yes please

On 27/12/2018 16:35, German Gonzalez-Morris wrote:

Ok. I understand. I can delete it so there is no misunderstanding about it.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Thu, Dec 27, 2018 at 12:27 PM Matthew Broadhead
 wrote:


it is just dawning on me how much sensitive information is in these heap
dumps.  i probably should have asked before but will you keep it
private?  i thought there was only object sizes and stuff but it is all
in there...

On 27/12/2018 15:43, German Gonzalez-Morris wrote:

I see a lot of org.apache.bval.MetaBeanCache
that handles org.apache.bval.cdi.BValExtension

With EclipseMAT can show the retained heap.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Thu, Dec 27, 2018 at 8:45 AM Matthew Broadhead
 wrote:


thanks Bruno.  i have started doing it this end as well as i didn't
realise it was important to compute the retained values.  eclipse memory
analyser seems to have the retained values after loading but maybe
doesn't drill far enough in

On 27/12/2018 10:23, Bruno Baptista wrote:

Hi Matthew,

I've loaded the heap profile here but its taking hours to compute the
retained values. I'm tempted to cancel and try the Java 11 version to
see if it's faster...

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:17, Matthew Broadhead wrote:

whoops...i sent my localhost version by mistake.  i am uploading the
production one now which zipped to 900MB

On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via
google drive.  let me know if there are any problems

On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share
it, it would be nice indeed.

Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 -
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 -
81,369,760 - 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever


/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java

i can make the jvm.hprof available by gogole drive or similar (at
risk of making myself look stupid for having a big memory leak!).
it is 3.2GB

On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't
know which centos repo it is in.  i suppose i could download it
directly...

eclipse memory analyser gives me a retained heap size of
785,781,368 for org.apache.bval.cdi.BValExtension which is
50.38% of everything.

On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate
the retained column.

That column will calculate the retained (effective) memory
usage by class.

Usually it takes a while to calculate, that's why it's not on
by default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every
couple of days.  so i did a heap dump and solved that problem.

then i decided to do another heap dump because the server is
running pretty slowly.  each page is taking a few seconds to
load on a 32GB system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed
with org.apache.bval.cdi.BValExtension. is this fairly normal?
using Eclipse Memory Analyser i have dug into shortest routes
to GC root but i don't find any of my objects listed there.
mostly BVal stuff.  are there any tips for debugging heap

dumps?

--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @
https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by

Re: heap dump bval

2018-12-27 Thread Matthew Broadhead
it is just dawning on me how much sensitive information is in these heap 
dumps.  i probably should have asked before but will you keep it 
private?  i thought there was only object sizes and stuff but it is all 
in there...


On 27/12/2018 15:43, German Gonzalez-Morris wrote:

I see a lot of org.apache.bval.MetaBeanCache
that handles org.apache.bval.cdi.BValExtension

With EclipseMAT can show the retained heap.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Thu, Dec 27, 2018 at 8:45 AM Matthew Broadhead
 wrote:


thanks Bruno.  i have started doing it this end as well as i didn't
realise it was important to compute the retained values.  eclipse memory
analyser seems to have the retained values after loading but maybe
doesn't drill far enough in

On 27/12/2018 10:23, Bruno Baptista wrote:

Hi Matthew,

I've loaded the heap profile here but its taking hours to compute the
retained values. I'm tempted to cancel and try the Java 11 version to
see if it's faster...

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:17, Matthew Broadhead wrote:

whoops...i sent my localhost version by mistake.  i am uploading the
production one now which zipped to 900MB

On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via
google drive.  let me know if there are any problems

On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share
it, it would be nice indeed.

Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 -
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 -
81,369,760 - 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever


/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java


i can make the jvm.hprof available by gogole drive or similar (at
risk of making myself look stupid for having a big memory leak!).
it is 3.2GB

On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't
know which centos repo it is in.  i suppose i could download it
directly...

eclipse memory analyser gives me a retained heap size of
785,781,368 for org.apache.bval.cdi.BValExtension which is
50.38% of everything.

On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate
the retained column.

That column will calculate the retained (effective) memory
usage by class.

Usually it takes a while to calculate, that's why it's not on
by default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every
couple of days.  so i did a heap dump and solved that problem.

then i decided to do another heap dump because the server is
running pretty slowly.  each page is taking a few seconds to
load on a 32GB system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed
with org.apache.bval.cdi.BValExtension. is this fairly normal?
using Eclipse Memory Analyser i have dug into shortest routes
to GC root but i don't find any of my objects listed there.
mostly BVal stuff.  are there any tips for debugging heap dumps?

--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @
https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the
Solicitors Regulation Authority. We are also bound by their code of
conduct. Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be
legally privileged. It is intended solely for the recipient to whom it is
addressed. If

Re: heap dump bval

2018-12-27 Thread Matthew Broadhead
i wondered if it was actually doing anything because activity monitor 
wasn't showing visualvm using the processor or memory.  so i checked the 
log file and got this
WARNING [org.netbeans.modules.progress.spi.InternalHandle]: Cannot call 
progress on a task that was never started at 
com.sun.tools.visualvm.heapviewer.HeapFragment$1.stateChanged(HeapFragment.java:72)
WARNING [null]: Last record repeated more than 10 times, further logs of 
this record are ignored until the log record changes.

WARNING [null]: Last record repeated 372 times in total.
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor 
com.sun.tools.visualvm.heapviewer.model.DataType$RetainedSize$1

java.lang.NullPointerException
    at 
org.netbeans.lib.profiler.heap.HprofHeap.computeReferences(HprofHeap.java:639)
    at 
org.netbeans.lib.profiler.heap.NearestGCRoot.computeGCRoots(NearestGCRoot.java:124)
    at 
org.netbeans.lib.profiler.heap.NearestGCRoot.getLeaves(NearestGCRoot.java:401)
    at 
org.netbeans.lib.profiler.heap.HprofHeap.computeRetainedSize(HprofHeap.java:713)
    at 
org.netbeans.lib.profiler.heap.HprofHeap.computeRetainedSizeByClass(HprofHeap.java:776)
    at 
org.netbeans.lib.profiler.heap.ClassDump.getRetainedSizeByClass(ClassDump.java:147)
    at 
com.sun.tools.visualvm.heapviewer.model.DataType$RetainedSize.computeValuesImmediately(DataType.java:214)
    at 
com.sun.tools.visualvm.heapviewer.model.DataType$RetainedSize$1.run(DataType.java:197)
    at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
    at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)

    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)


On 27/12/2018 12:45, Matthew Broadhead wrote:
thanks Bruno.  i have started doing it this end as well as i didn't 
realise it was important to compute the retained values.  eclipse 
memory analyser seems to have the retained values after loading but 
maybe doesn't drill far enough in


On 27/12/2018 10:23, Bruno Baptista wrote:

Hi Matthew,

I've loaded the heap profile here but its taking hours to compute the 
retained values. I'm tempted to cancel and try the Java 11 version to 
see if it's faster...


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:17, Matthew Broadhead wrote:
whoops...i sent my localhost version by mistake.  i am uploading the 
production one now which zipped to 900MB


On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via 
google drive.  let me know if there are any problems


On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could 
share it, it would be nice indeed.


Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 
- 16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 - 
81,369,760 - 5.22%

java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java 



i can make the jvm.hprof available by gogole drive or similar (at 
risk of making myself look stupid for having a big memory leak!). 
it is 3.2GB


On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i 
don't know which centos repo it is in.  i suppose i could 
download it directly...


eclipse memory analyser gives me a retained heap size of 
785,781,368 for org.apache.bval.cdi.BValExtension which is 
50.38% of everything.


On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and 
activate the retained column.


That column will calculate the retained (effective) memory 
usage by class.


Usually it takes a while to calculate, that's why it's not on 
by default.


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server 
every couple of days.  so i did a heap dump and solved that 
problem.


then i decided

Re: heap dump bval

2018-12-27 Thread Matthew Broadhead
thanks Bruno.  i have started doing it this end as well as i didn't 
realise it was important to compute the retained values.  eclipse memory 
analyser seems to have the retained values after loading but maybe 
doesn't drill far enough in


On 27/12/2018 10:23, Bruno Baptista wrote:

Hi Matthew,

I've loaded the heap profile here but its taking hours to compute the 
retained values. I'm tempted to cancel and try the Java 11 version to 
see if it's faster...


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:17, Matthew Broadhead wrote:
whoops...i sent my localhost version by mistake.  i am uploading the 
production one now which zipped to 900MB


On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via 
google drive.  let me know if there are any problems


On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share 
it, it would be nice indeed.


Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 - 
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 - 
81,369,760 - 5.22%

java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java 



i can make the jvm.hprof available by gogole drive or similar (at 
risk of making myself look stupid for having a big memory leak!). 
it is 3.2GB


On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't 
know which centos repo it is in.  i suppose i could download it 
directly...


eclipse memory analyser gives me a retained heap size of 
785,781,368 for org.apache.bval.cdi.BValExtension which is 
50.38% of everything.


On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate 
the retained column.


That column will calculate the retained (effective) memory 
usage by class.


Usually it takes a while to calculate, that's why it's not on 
by default.


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every 
couple of days.  so i did a heap dump and solved that problem.


then i decided to do another heap dump because the server is 
running pretty slowly.  each page is taking a few seconds to 
load on a 32GB system.  (i did clear out work directory)


it turns out that more than half of the memory is consumed 
with org.apache.bval.cdi.BValExtension. is this fairly normal? 
using Eclipse Memory Analyser i have dug into shortest routes 
to GC root but i don't find any of my objects listed there.  
mostly BVal stuff.  are there any tips for debugging heap dumps?










--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding document. No contracts may be 
concluded on behalf of Nigel Broadhead Mynard Solicitors by e-mail 
communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will not 
take responsibility if you transfer money t

Re: heap dump bval

2018-12-26 Thread Matthew Broadhead

thanks Jon

On 26/12/2018 14:28, Jonathan Gallimore wrote:

It would be tomorrow before I can take a look, but feel free to add me to
that share and I'll take a look when  I can.

Jon

On Wed, 26 Dec 2018, 13:27 Matthew Broadhead

thanks German.  i added you to the google drive share.
i have got visualvm working now and it seems i already have a lot of
memory leaks with using @ViewScoped MyFaces managed beans.
uk.me.kissy.database.entities.jpa.extras.Testimonial looks like the
worst offender

On 26/12/2018 13:35, German Gonzalez-Morris wrote:

It would be nice to take a look to that heap dump.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Wed, Dec 26, 2018 at 9:19 AM Bruno Baptista 

wrote:

Thanks Matthew!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via
google drive.  let me know if there are any problems

On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share
it, it would be nice indeed.

Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 -
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 - 81,369,760
- 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever


/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java

i can make the jvm.hprof available by gogole drive or similar (at
risk of making myself look stupid for having a big memory leak!). it
is 3.2GB

On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't
know which centos repo it is in.  i suppose i could download it
directly...

eclipse memory analyser gives me a retained heap size of
785,781,368 for org.apache.bval.cdi.BValExtension which is 50.38%
of everything.

On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate
the retained column.

That column will calculate the retained (effective) memory usage
by class.

Usually it takes a while to calculate, that's why it's not on by
default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every
couple of days.  so i did a heap dump and solved that problem.

then i decided to do another heap dump because the server is
running pretty slowly.  each page is taking a few seconds to
load on a 32GB system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed with
org.apache.bval.cdi.BValExtension.  is this fairly normal? using
Eclipse Memory Analyser i have dug into shortest routes to GC
root but i don't find any of my objects listed there.  mostly
BVal stuff.  are there any tips for debugging heap dumps?

--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @
https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the
Solicitors Regulation Authority. We are also bound by their code of
conduct. Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be
legally privileged. It is intended solely for the recipient to whom it is
addressed. If you receive the message in error, please notify the sender
and immediately destroy all copies.

Security warning: Please note that this e-mail has been created in the
knowledge that e-mail is not a 100% secure communications medium. We advise
you that you understand and observe this lack of security when e-mailing
us. This e-mail does not constitute a legally binding document. No
contracts may be concluded on behalf of Nigel Broadhead 

Re: heap dump bval

2018-12-26 Thread Matthew Broadhead

thanks German.  i added you to the google drive share.
i have got visualvm working now and it seems i already have a lot of 
memory leaks with using @ViewScoped MyFaces managed beans. 
uk.me.kissy.database.entities.jpa.extras.Testimonial looks like the 
worst offender


On 26/12/2018 13:35, German Gonzalez-Morris wrote:

It would be nice to take a look to that heap dump.


Regards,

German Gonzalez-Morris



``Antes de imprimir este e-mail piense bien si es realmente necesario''
``Before printing think about the Environment''


On Wed, Dec 26, 2018 at 9:19 AM Bruno Baptista  wrote:


Thanks Matthew!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 12:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via
google drive.  let me know if there are any problems

On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share
it, it would be nice indeed.

Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 -
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 - 81,369,760
- 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever


/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java


i can make the jvm.hprof available by gogole drive or similar (at
risk of making myself look stupid for having a big memory leak!). it
is 3.2GB

On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't
know which centos repo it is in.  i suppose i could download it
directly...

eclipse memory analyser gives me a retained heap size of
785,781,368 for org.apache.bval.cdi.BValExtension which is 50.38%
of everything.

On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate
the retained column.

That column will calculate the retained (effective) memory usage
by class.

Usually it takes a while to calculate, that's why it's not on by
default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every
couple of days.  so i did a heap dump and solved that problem.

then i decided to do another heap dump because the server is
running pretty slowly.  each page is taking a few seconds to
load on a 32GB system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed with
org.apache.bval.cdi.BValExtension.  is this fairly normal? using
Eclipse Memory Analyser i have dug into shortest routes to GC
root but i don't find any of my objects listed there.  mostly
BVal stuff.  are there any tips for debugging heap dumps?


--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding document. No contracts may be 
concluded on behalf of Nigel Broadhead Mynard Solicitors by e-mail 
communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will not 
take responsibility if you transfer money to a wrong bank account. Please speak 
to your Solicitor befo

Re: heap dump bval

2018-12-26 Thread Matthew Broadhead
whoops...i sent my localhost version by mistake.  i am uploading the 
production one now which zipped to 900MB


On 26/12/2018 13:01, Matthew Broadhead wrote:

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via 
google drive.  let me know if there are any problems


On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share 
it, it would be nice indeed.


Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 - 
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 - 81,369,760 
- 5.22%

java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java 



i can make the jvm.hprof available by gogole drive or similar (at 
risk of making myself look stupid for having a big memory leak!). it 
is 3.2GB


On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't 
know which centos repo it is in.  i suppose i could download it 
directly...


eclipse memory analyser gives me a retained heap size of 
785,781,368 for org.apache.bval.cdi.BValExtension which is 50.38% 
of everything.


On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate 
the retained column.


That column will calculate the retained (effective) memory usage 
by class.


Usually it takes a while to calculate, that's why it's not on by 
default.


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every 
couple of days.  so i did a heap dump and solved that problem.


then i decided to do another heap dump because the server is 
running pretty slowly.  each page is taking a few seconds to 
load on a 32GB system.  (i did clear out work directory)


it turns out that more than half of the memory is consumed with 
org.apache.bval.cdi.BValExtension.  is this fairly normal? using 
Eclipse Memory Analyser i have dug into shortest routes to GC 
root but i don't find any of my objects listed there.  mostly 
BVal stuff.  are there any tips for debugging heap dumps?








--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding document. No contracts may be 
concluded on behalf of Nigel Broadhead Mynard Solicitors by e-mail 
communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will not 
take responsibility if you transfer money to a wrong bank account. Please speak 
to your Solicitor before transferring any money. If you receive an email from 
Nigel Broadhead Mynard requesting your bank details or telling you our bank 
details have changed, please contact your Solicitor immediately to clarify.

PLEASE ALSO NOTE that Nigel Broadhead Mynard only use emails which end with the suffix 
@nbmlaw.co.uk. If you receive any email from an address without that suffix or where that 
suffix does not appear in the address box when you click "Reply" then you 
should not rely on the email being from NBM and 

Re: heap dump bval

2018-12-26 Thread Matthew Broadhead

hi Bruno,
no i am not directly using BVal as far as i am aware
i zipped it to under 600MB.  i shared you and Jean-Louis a link via 
google drive.  let me know if there are any problems


On 26/12/2018 12:31, Bruno Baptista wrote:

Hi Mathew,

Thanks.

Are you including some bval dependency in the code of your own app?

You can zip that file. It will get much smaller. If you could share 
it, it would be nice indeed.


Cheers!

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:27, Matthew Broadhead wrote:

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 - 
16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 - 81,369,760 - 
5.22%

java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java 



i can make the jvm.hprof available by gogole drive or similar (at 
risk of making myself look stupid for having a big memory leak!). it 
is 3.2GB


On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't 
know which centos repo it is in.  i suppose i could download it 
directly...


eclipse memory analyser gives me a retained heap size of 
785,781,368 for org.apache.bval.cdi.BValExtension which is 50.38% 
of everything.


On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate 
the retained column.


That column will calculate the retained (effective) memory usage 
by class.


Usually it takes a while to calculate, that's why it's not on by 
default.


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every 
couple of days.  so i did a heap dump and solved that problem.


then i decided to do another heap dump because the server is 
running pretty slowly.  each page is taking a few seconds to load 
on a 32GB system.  (i did clear out work directory)


it turns out that more than half of the memory is consumed with 
org.apache.bval.cdi.BValExtension.  is this fairly normal? using 
Eclipse Memory Analyser i have dug into shortest routes to GC 
root but i don't find any of my objects listed there.  mostly 
BVal stuff.  are there any tips for debugging heap dumps?






--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding document. No contracts may be 
concluded on behalf of Nigel Broadhead Mynard Solicitors by e-mail 
communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will not 
take responsibility if you transfer money to a wrong bank account. Please speak 
to your Solicitor before transferring any money. If you receive an email from 
Nigel Broadhead Mynard requesting your bank details or telling you our bank 
details have changed, please contact your Solicitor immediately to clarify.

PLEASE ALSO NOTE that Nigel Broadhead Mynard only use emails which end with the suffix 
@nbmlaw.co.uk. If you receive any email from an address without that suffix or where that 
suffix does not appear in the address box when you click "Reply" then you 
should not rely on the email being from NBM and you should immediately contact us on the 
above number or any numbers published on our website to verify the source of the email is 
genuine.

If you hav

Re: heap dump bval

2018-12-26 Thread Matthew Broadhead

the top 4 classes on the dominator table are
class - objects - retained heap - percentage
org.apache.bval.cdi.BValExtension - 27 - 785,781,368 - 50.38%
org.apache.webbeans.container.BeanManagerImpl - 27 - 262,583,784 - 16.84%
org.apache.openjpa.kernel.FinalizingBrokerImpl - 6,643 - 81,369,760 - 5.22%
java.lang.Class - 52,286 - 59,176,176 - 3.79%

i have been using OpenJDK forever
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java

i can make the jvm.hprof available by gogole drive or similar (at risk 
of making myself look stupid for having a big memory leak!). it is 3.2GB


On 26/12/2018 12:19, Bruno Baptista wrote:

Hi Matthew

It comes with the JDK, just type:

$ jvisualvm

But that BValExtension usage is intriguing.

Can you please let us know the top 4 classes in the retained list?

This is on 7.0.5 plus with Oracle JDK 8?

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 11:10, Matthew Broadhead wrote:

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't know 
which centos repo it is in.  i suppose i could download it directly...


eclipse memory analyser gives me a retained heap size of 785,781,368 
for org.apache.bval.cdi.BValExtension which is 50.38% of everything.


On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate the 
retained column.


That column will calculate the retained (effective) memory usage by 
class.


Usually it takes a while to calculate, that's why it's not on by 
default.


Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every 
couple of days.  so i did a heap dump and solved that problem.


then i decided to do another heap dump because the server is 
running pretty slowly.  each page is taking a few seconds to load 
on a 32GB system.  (i did clear out work directory)


it turns out that more than half of the memory is consumed with 
org.apache.bval.cdi.BValExtension.  is this fairly normal? using 
Eclipse Memory Analyser i have dug into shortest routes to GC root 
but i don't find any of my objects listed there.  mostly BVal 
stuff.  are there any tips for debugging heap dumps?




--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding document. No contracts may be 
concluded on behalf of Nigel Broadhead Mynard Solicitors by e-mail 
communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will not 
take responsibility if you transfer money to a wrong bank account. Please speak 
to your Solicitor before transferring any money. If you receive an email from 
Nigel Broadhead Mynard requesting your bank details or telling you our bank 
details have changed, please contact your Solicitor immediately to clarify.

PLEASE ALSO NOTE that Nigel Broadhead Mynard only use emails which end with the suffix 
@nbmlaw.co.uk. If you receive any email from an address without that suffix or where that 
suffix does not appear in the address box when you click "Reply" then you 
should not rely on the email being from NBM and you should immediately contact us on the 
above number or any numbers published on our website to verify the source of the email is 
genuine.

If you have any queries, please contact administra...@nbmlaw.co.uk



Re: heap dump bval

2018-12-26 Thread Matthew Broadhead

it is TomEE plus 7.0.5.  shows BVal 1.1.2 in my maven dependencies
i did wonder if  7.1.0 might have some improvements.

On 26/12/2018 12:14, Jean-Louis Monteiro wrote:

Can you provide us with the version? BVal I mean ...
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com


On Wed, Dec 26, 2018 at 12:10 PM Matthew Broadhead
 wrote:


hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't know
which centos repo it is in.  i suppose i could download it directly...

eclipse memory analyser gives me a retained heap size of 785,781,368 for
org.apache.bval.cdi.BValExtension which is 50.38% of everything.

On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate the
retained column.

That column will calculate the retained (effective) memory usage by
class.

Usually it takes a while to calculate, that's why it's not on by default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every couple
of days.  so i did a heap dump and solved that problem.

then i decided to do another heap dump because the server is running
pretty slowly.  each page is taking a few seconds to load on a 32GB
system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed with
org.apache.bval.cdi.BValExtension.  is this fairly normal? using
Eclipse Memory Analyser i have dug into shortest routes to GC root
but i don't find any of my objects listed there.  mostly BVal stuff.
are there any tips for debugging heap dumps?

--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @
https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the
Solicitors Regulation Authority. We are also bound by their code of
conduct. Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be
legally privileged. It is intended solely for the recipient to whom it is
addressed. If you receive the message in error, please notify the sender
and immediately destroy all copies.

Security warning: Please note that this e-mail has been created in the
knowledge that e-mail is not a 100% secure communications medium. We advise
you that you understand and observe this lack of security when e-mailing
us. This e-mail does not constitute a legally binding document. No
contracts may be concluded on behalf of Nigel Broadhead Mynard Solicitors
by e-mail communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will
not take responsibility if you transfer money to a wrong bank account.
Please speak to your Solicitor before transferring any money. If you
receive an email from Nigel Broadhead Mynard requesting your bank details
or telling you our bank details have changed, please contact your Solicitor
immediately to clarify.

PLEASE ALSO NOTE that Nigel Broadhead Mynard only use emails which end
with the suffix @nbmlaw.co.uk. If you receive any email from an address
without that suffix or where that suffix does not appear in the address box
when you click "Reply" then you should not rely on the email being from NBM
and you should immediately contact us on the above number or any numbers
published on our website to verify the source of the email is genuine.

If you have any queries, please contact administra...@nbmlaw.co.uk




--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding doc

Re: heap dump bval

2018-12-26 Thread Matthew Broadhead

thanks Jean-Louis.

i used gdb to get a jvm.core on the live system as it is much faster.  
then i used jmap to convert it to a jvm.hprof. 
(https://www.atlassian.com/blog/archives/so-you-want-your-jvms-heap)
then i used eclipse memory analyser to get the dominator table, and 
paths to GC root (https://vimeo.com/21356498)


yes visualvm would be much better to show increase in memory consumption 
after gc.  i did have jmx set up on the server and i could view over 
ssh.  but like i say i am still struggling to find visualvm through yum


On 26/12/2018 12:06, Jean-Louis Monteiro wrote:

I'd say probably before going too deep, I would just use the verbose:gc
option piped into a log file so it can be further analyzed.

It should show a memory increase to confirm.
Also when it gets slow, probably a jstack could also help to see where the
threads are.

As for the head dump, I also use jvisualvm.
JMC is now available for free in OpenJDK (I believe) and might be helpful.

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com


On Wed, Dec 26, 2018 at 11:23 AM Bruno Baptista  wrote:


Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate the
retained column.

That column will calculate the retained (effective) memory usage by class.

Usually it takes a while to calculate, that's why it's not on by default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every couple
of days.  so i did a heap dump and solved that problem.

then i decided to do another heap dump because the server is running
pretty slowly.  each page is taking a few seconds to load on a 32GB
system.  (i did clear out work directory)

it turns out that more than half of the memory is consumed with
org.apache.bval.cdi.BValExtension.  is this fairly normal?  using
Eclipse Memory Analyser i have dug into shortest routes to GC root but
i don't find any of my objects listed there.  mostly BVal stuff.  are
there any tips for debugging heap dumps?


--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding document. No contracts may be 
concluded on behalf of Nigel Broadhead Mynard Solicitors by e-mail 
communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will not 
take responsibility if you transfer money to a wrong bank account. Please speak 
to your Solicitor before transferring any money. If you receive an email from 
Nigel Broadhead Mynard requesting your bank details or telling you our bank 
details have changed, please contact your Solicitor immediately to clarify.

PLEASE ALSO NOTE that Nigel Broadhead Mynard only use emails which end with the suffix 
@nbmlaw.co.uk. If you receive any email from an address without that suffix or where that 
suffix does not appear in the address box when you click "Reply" then you 
should not rely on the email being from NBM and you should immediately contact us on the 
above number or any numbers published on our website to verify the source of the email is 
genuine.

If you have any queries, please contact administra...@nbmlaw.co.uk



Re: heap dump bval

2018-12-26 Thread Matthew Broadhead

hi Bruno,

i can't find visualvm in centos.  i had it in ubuntu but i don't know 
which centos repo it is in.  i suppose i could download it directly...


eclipse memory analyser gives me a retained heap size of 785,781,368 for 
org.apache.bval.cdi.BValExtension which is 50.38% of everything.


On 26/12/2018 11:23, Bruno Baptista wrote:

Thant's interesting Matthew.

Usually I open those in jvisualvm. I go to classes and activate the 
retained column.


That column will calculate the retained (effective) memory usage by 
class.


Usually it takes a while to calculate, that's why it's not on by default.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/12/18 09:28, Matthew Broadhead wrote:

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every couple 
of days.  so i did a heap dump and solved that problem.


then i decided to do another heap dump because the server is running 
pretty slowly.  each page is taking a few seconds to load on a 32GB 
system.  (i did clear out work directory)


it turns out that more than half of the memory is consumed with 
org.apache.bval.cdi.BValExtension.  is this fairly normal? using 
Eclipse Memory Analyser i have dug into shortest routes to GC root 
but i don't find any of my objects listed there.  mostly BVal stuff.  
are there any tips for debugging heap dumps?


--
Mr MT Broadhead
Nigel Broadhead Mynard
See the latest jobs available at NBM @ https://nbmlaw.co.uk/recruitment.htm

32 Rainsford Road
Chelmsford Essex CM1 2QG
Tel: 01245 269909 Fax: 01245 261932
https://nbmlaw.co.uk

Partners: WJ Broadhead NP Eason SJ Lacey CR Broadhead D Seepaul T Carley

Nigel Broadhead Mynard Solicitors are authorised and regulated by the 
Solicitors Regulation Authority. We are also bound by their code of conduct. 
Registered no. 00061052

Nigel Broadhead Mynard also provide a will writing service, see 
https://nbmlaw.co.uk/wills.htm for more information

Confidentiality: Information in this message is confidential and may be legally 
privileged. It is intended solely for the recipient to whom it is addressed. If 
you receive the message in error, please notify the sender and immediately 
destroy all copies.

Security warning: Please note that this e-mail has been created in the 
knowledge that e-mail is not a 100% secure communications medium. We advise you 
that you understand and observe this lack of security when e-mailing us. This 
e-mail does not constitute a legally binding document. No contracts may be 
concluded on behalf of Nigel Broadhead Mynard Solicitors by e-mail 
communications.

Disclaimer: Please be aware of cyber crime. Nigel Broadhead Mynard will not 
take responsibility if you transfer money to a wrong bank account. Please speak 
to your Solicitor before transferring any money. If you receive an email from 
Nigel Broadhead Mynard requesting your bank details or telling you our bank 
details have changed, please contact your Solicitor immediately to clarify.

PLEASE ALSO NOTE that Nigel Broadhead Mynard only use emails which end with the suffix 
@nbmlaw.co.uk. If you receive any email from an address without that suffix or where that 
suffix does not appear in the address box when you click "Reply" then you 
should not rely on the email being from NBM and you should immediately contact us on the 
above number or any numbers published on our website to verify the source of the email is 
genuine.

If you have any queries, please contact administra...@nbmlaw.co.uk



heap dump bval

2018-12-26 Thread Matthew Broadhead

TomEE 7.0.5 plus

i had a recent memory leak which was stalling the server every couple of 
days.  so i did a heap dump and solved that problem.


then i decided to do another heap dump because the server is running 
pretty slowly.  each page is taking a few seconds to load on a 32GB 
system.  (i did clear out work directory)


it turns out that more than half of the memory is consumed with 
org.apache.bval.cdi.BValExtension.  is this fairly normal?  using 
Eclipse Memory Analyser i have dug into shortest routes to GC root but i 
don't find any of my objects listed there.  mostly BVal stuff.  are 
there any tips for debugging heap dumps?


Re: wtp ear deployment

2018-12-12 Thread Matthew Broadhead

https://gist.github.com/chongma/d558400763d354d2c2bbd311f4798028

On 12/12/2018 16:55, Jonathan Gallimore wrote:

Can you paste your full deployment output into a gist or similar? I'm happy
to have a go an example towards the end of the week.

Jon

On Wed, Dec 12, 2018 at 3:52 PM Matthew Broadhead
 wrote:


i fixed the first error.  i had put
unzip:org.keycloak:keycloak-tomcat8-adapter:${keycloak.version}:zip


which should have been
unzip:org.keycloak:keycloak-tomcat8-adapter-dist:${keycloak.version}:zip



yes my project structure is the same as your outline

now it seems there is a problem with ejb injection ?  there are loads of
these.

12-Dec-2018 16:41:28.478 SEVERE [main]
org.apache.openejb.assembler.classic.Assembler.destroyApplication
undeployException original cause
   java.lang.Exception: deployment not found: WebApp_ID.Comp1798685061
  at

org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2327)
  at

org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1092)
  at

org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:757)

12-Dec-2018 16:41:28.478 SEVERE [main]
org.apache.openejb.assembler.classic.Assembler.destroyApplication
undeployException original cause
   java.lang.Exception: deployment not found: BillTimer
  at

org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2327)
  at

org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1092)
  at

org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:757)
  at

org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:635)

if you don't know off the top of your head don't worry.  i will stick
with war deployment for now.  not sure how long it would take to put an
example together.  might be nice to have an example project
demonstrating ear somewhere in git repo

On 12/12/2018 11:49, Jonathan Gallimore wrote:

Let us know how you get on with the Maven plugin. If that doesn't work,
resolving any issues there would be amazing. The WTP code is here:


https://svn.apache.org/repos/asf/tomee/openejb-eclipse-plugin/trunk/plugins/org.apache.openejb.wtp.server/

- it is super old, but I'd love an excuse to revive it :)

On Wed, Dec 12, 2018 at 10:42 AM Matthew Broadhead
  wrote:


i am trying to get the EAR running using tomee-maven-plugin first so if
i see some success with that i will come back to you.  out of interest
is the extension available to look at somewhere?

On 12/12/2018 11:19, Jonathan Gallimore wrote:

Are you trying to do it directly in Eclipse? We do have an extension to

WTP

that does enable that, but it hasn't been updated for a while. I'd be

happy

to try and contribute that to Eclipse itself if that's what you're

looking

for.

Jon

On Wed, Dec 12, 2018 at 10:15 AM Matthew Broadhead
  wrote:


i created a maven sub module of type ear and added my jar and war

files

successfully using


https://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html

and



https://maven.apache.org/plugins/maven-ear-plugin/examples/eclipse-and-maven-integration.html

.

but i cannot seem to deploy the ear to a TomEE server.  is any way to

do

this currently?

i uncommented Deployments as in


http://tomee-openejb.979440.n4.nabble.com/Ear-file-deploy-td4673119.html






Re: wtp ear deployment

2018-12-12 Thread Matthew Broadhead

i fixed the first error.  i had put
unzip:org.keycloak:keycloak-tomcat8-adapter:${keycloak.version}:zip 


which should have been
unzip:org.keycloak:keycloak-tomcat8-adapter-dist:${keycloak.version}:zip 



yes my project structure is the same as your outline

now it seems there is a problem with ejb injection ?  there are loads of 
these.


12-Dec-2018 16:41:28.478 SEVERE [main] 
org.apache.openejb.assembler.classic.Assembler.destroyApplication 
undeployException original cause

 java.lang.Exception: deployment not found: WebApp_ID.Comp1798685061
    at 
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2327)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1092)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:757)


12-Dec-2018 16:41:28.478 SEVERE [main] 
org.apache.openejb.assembler.classic.Assembler.destroyApplication 
undeployException original cause

 java.lang.Exception: deployment not found: BillTimer
    at 
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2327)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1092)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:757)
    at 
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:635)


if you don't know off the top of your head don't worry.  i will stick 
with war deployment for now.  not sure how long it would take to put an 
example together.  might be nice to have an example project 
demonstrating ear somewhere in git repo


On 12/12/2018 11:49, Jonathan Gallimore wrote:

Let us know how you get on with the Maven plugin. If that doesn't work,
resolving any issues there would be amazing. The WTP code is here:
https://svn.apache.org/repos/asf/tomee/openejb-eclipse-plugin/trunk/plugins/org.apache.openejb.wtp.server/
- it is super old, but I'd love an excuse to revive it :)

On Wed, Dec 12, 2018 at 10:42 AM Matthew Broadhead
  wrote:


i am trying to get the EAR running using tomee-maven-plugin first so if
i see some success with that i will come back to you.  out of interest
is the extension available to look at somewhere?

On 12/12/2018 11:19, Jonathan Gallimore wrote:

Are you trying to do it directly in Eclipse? We do have an extension to

WTP

that does enable that, but it hasn't been updated for a while. I'd be

happy

to try and contribute that to Eclipse itself if that's what you're

looking

for.

Jon

On Wed, Dec 12, 2018 at 10:15 AM Matthew Broadhead
  wrote:


i created a maven sub module of type ear and added my jar and war files
successfully using


https://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html

and



https://maven.apache.org/plugins/maven-ear-plugin/examples/eclipse-and-maven-integration.html
.

but i cannot seem to deploy the ear to a TomEE server.  is any way to do
this currently?

i uncommented Deployments as in


http://tomee-openejb.979440.n4.nabble.com/Ear-file-deploy-td4673119.html




Re: wtp ear deployment

2018-12-12 Thread Matthew Broadhead

yes my application.xml looks the same. it is auto generated by maven

On 12/12/2018 13:48, Luis Rodríguez Fernández wrote:

Hello there,

That .ear structure worked for me in the past. But I can not tell you at
100% if it was because everything was loaded in the same classloader or
just "classloader-lottery". Regarding this tomee doc [1] I would say that
yes.

My ear/META-INF/application.xml looks like:


   my-app-ear
   
 
   app1.war
   /app1
 
   
   
 
   app2.war
   /app2
 
   
   
 
   main-root-webapp.war
   /
 
   


Hope it helps,

Luis

[1] http://tomee.apache.org/deploying-in-tomee.html

El mié., 12 dic. 2018 a las 12:55, Jonathan Gallimore (<
jonathan.gallim...@gmail.com>) escribió:


Is the structure?

EAR
| -- lib/common.jar
| -- webapp1.war
| -- webapp2.war

The short answer is I'd have to check. If you have a super simple app I can
put on a server and debug, I can definitely help. I'd expect the structure
above to work, although I'd probably have to check specs and do some
debugging.

Jon

On Wed, Dec 12, 2018 at 11:44 AM Matthew Broadhead
 wrote:


when deploying an EAR do the jar files get run in a common classloader?
(i.e. shared between all the WARs but only loaded once)

when deploying the full thing it stalls on the below error.  whereas it
works fine if the wars are all packaged and deployed independently with
their own libs

12-Dec-2018 12:26:29.695 SEVERE [main]
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI Beans
module deployment failed
   org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.external.entities.KeycloakSecurityContextWrapper] is not
found with the qualifiers
Qualifiers: [@uk.me.kissy.external.qualifiers.KeycloakSecurityContext()]
for injection into Field Injection Point, field name :
keycloakSecurityContextWrapper, Bean Owner : [UserBean,
WebBeansType:MANAGED, Name:userBean, API
Types:[java.lang.Object,uk.me

.kissy.fragment.beans.UserBean,java.io.Serializable],




Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any,javax.inject.Named]]

  at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:338)
  at



org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)

  at



org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)

  at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
  at



org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)

On 12/12/2018 11:49, Jonathan Gallimore wrote:

Let us know how you get on with the Maven plugin. If that doesn't work,
resolving any issues there would be amazing. The WTP code is here:


https://svn.apache.org/repos/asf/tomee/openejb-eclipse-plugin/trunk/plugins/org.apache.openejb.wtp.server/

- it is super old, but I'd love an excuse to revive it :)

On Wed, Dec 12, 2018 at 10:42 AM Matthew Broadhead
 wrote:


i am trying to get the EAR running using tomee-maven-plugin first so

if

i see some success with that i will come back to you.  out of interest
is the extension available to look at somewhere?

On 12/12/2018 11:19, Jonathan Gallimore wrote:

Are you trying to do it directly in Eclipse? We do have an extension

to

WTP

that does enable that, but it hasn't been updated for a while. I'd be

happy

to try and contribute that to Eclipse itself if that's what you're

looking

for.

Jon

On Wed, Dec 12, 2018 at 10:15 AM Matthew Broadhead
 wrote:


i created a maven sub module of type ear and added my jar and war

files

successfully using


https://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html

and



https://maven.apache.org/plugins/maven-ear-plugin/examples/eclipse-and-maven-integration.html

.

but i cannot seem to deploy the ear to a TomEE server.  is any way

to

do

this currently?

i uncommented Deployments as in


http://tomee-openejb.979440.n4.nabble.com/Ear-file-deploy-td4673119.html







Re: wtp ear deployment

2018-12-12 Thread Matthew Broadhead
when deploying an EAR do the jar files get run in a common classloader? 
(i.e. shared between all the WARs but only loaded once)


when deploying the full thing it stalls on the below error.  whereas it 
works fine if the wars are all packaged and deployed independently with 
their own libs


12-Dec-2018 12:26:29.695 SEVERE [main] 
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI Beans 
module deployment failed
 org.apache.webbeans.exception.WebBeansDeploymentException: 
javax.enterprise.inject.UnsatisfiedResolutionException: Api type 
[uk.me.kissy.external.entities.KeycloakSecurityContextWrapper] is not 
found with the qualifiers

Qualifiers: [@uk.me.kissy.external.qualifiers.KeycloakSecurityContext()]
for injection into Field Injection Point, field name : 
keycloakSecurityContextWrapper, Bean Owner : [UserBean, 
WebBeansType:MANAGED, Name:userBean, API 
Types:[java.lang.Object,uk.me.kissy.fragment.beans.UserBean,java.io.Serializable], 
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any,javax.inject.Named]]
    at 
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:338)
    at 
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
    at 
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)

    at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)


On 12/12/2018 11:49, Jonathan Gallimore wrote:

Let us know how you get on with the Maven plugin. If that doesn't work,
resolving any issues there would be amazing. The WTP code is here:
https://svn.apache.org/repos/asf/tomee/openejb-eclipse-plugin/trunk/plugins/org.apache.openejb.wtp.server/
- it is super old, but I'd love an excuse to revive it :)

On Wed, Dec 12, 2018 at 10:42 AM Matthew Broadhead
 wrote:


i am trying to get the EAR running using tomee-maven-plugin first so if
i see some success with that i will come back to you.  out of interest
is the extension available to look at somewhere?

On 12/12/2018 11:19, Jonathan Gallimore wrote:

Are you trying to do it directly in Eclipse? We do have an extension to

WTP

that does enable that, but it hasn't been updated for a while. I'd be

happy

to try and contribute that to Eclipse itself if that's what you're

looking

for.

Jon

On Wed, Dec 12, 2018 at 10:15 AM Matthew Broadhead
 wrote:


i created a maven sub module of type ear and added my jar and war files
successfully using


https://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html

and



https://maven.apache.org/plugins/maven-ear-plugin/examples/eclipse-and-maven-integration.html
.

but i cannot seem to deploy the ear to a TomEE server.  is any way to do
this currently?

i uncommented Deployments as in


http://tomee-openejb.979440.n4.nabble.com/Ear-file-deploy-td4673119.html








Re: wtp ear deployment

2018-12-12 Thread Matthew Broadhead
i am trying to get the EAR running using tomee-maven-plugin first so if 
i see some success with that i will come back to you.  out of interest 
is the extension available to look at somewhere?


On 12/12/2018 11:19, Jonathan Gallimore wrote:

Are you trying to do it directly in Eclipse? We do have an extension to WTP
that does enable that, but it hasn't been updated for a while. I'd be happy
to try and contribute that to Eclipse itself if that's what you're looking
for.

Jon

On Wed, Dec 12, 2018 at 10:15 AM Matthew Broadhead
 wrote:


i created a maven sub module of type ear and added my jar and war files
successfully using
https://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html
and

https://maven.apache.org/plugins/maven-ear-plugin/examples/eclipse-and-maven-integration.html.

but i cannot seem to deploy the ear to a TomEE server.  is any way to do
this currently?

i uncommented Deployments as in
http://tomee-openejb.979440.n4.nabble.com/Ear-file-deploy-td4673119.html






wtp ear deployment

2018-12-12 Thread Matthew Broadhead
i created a maven sub module of type ear and added my jar and war files 
successfully using 
https://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html 
and 
https://maven.apache.org/plugins/maven-ear-plugin/examples/eclipse-and-maven-integration.html. 
but i cannot seem to deploy the ear to a TomEE server.  is any way to do 
this currently?


i uncommented Deployments as in 
http://tomee-openejb.979440.n4.nabble.com/Ear-file-deploy-td4673119.html




Re: which TomEE to download?

2018-12-12 Thread Matthew Broadhead
i use TomEE plus as it is full apache stack (MyFaces, OpenJPA). TomEE 
plume has glassfish stack (Mojarra, EclipseLink).  you should get better 
support here with plus as everything is developed here. you would get 
support for Mojarra and Eclipselink over where they are developed if you 
choose that stack.  it is up to you what your requirements are.


i also use eclipse with WTP.  it can deploy WAR but not EAR at the moment.

can you provide some code for how you are trying to create the 
relationships in the db?  are you using JPA?


On 12/12/2018 06:11, Karen Goh wrote:

Hi,

I have been struggling with this one-to-many and many-to-one relationship in 
JEE web application for the longest time in history.

Recently, I came to think that it might have to do with the server cos I am 
using Tomcat Server.

Correct me if I am wrong.

But, now I intend to use Java EE with CDI to work with a server that can handle 
the insertion of one entity to another entity to MYSQL database.

However, at the download page, I saw that there is plume version, TomEE plus 
version.

Which version should I use ?

I am running using maven Web, Java 8, Java EE 4, with MYSQL 8 and Eclipse in 
Windows 10.

Tks & regards,
Karen





Re: OpenJPA debugging

2018-12-09 Thread Matthew Broadhead

don't worry.  it turned out that I had set
@Version
private long version

changing it to
@Version
private Long version

fixed the problem.

On 09/12/2018 19:27, Matthew Broadhead wrote:
i am using TomEE 7.0.5 with OpenJPA 2.4.2.  i am defining multiple 
persistence units in persistence.xml


i am getting an error about casting which doesn't help me track it down
openjpa-2.4.3-r422266:1833086 nonfatal general error> 
org.apache.openjpa.persistence.PersistenceException: java.lang.Integer 
cannot be cast to java.lang.Long
FailedObject: uk.me.kissy.database.entities.jpa.file.File-727648 
[java.lang.String]

    at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3521)
...
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be 
cast to java.lang.Long
    at 
org.apache.openjpa.meta.JavaTypes.isPrimitiveDefault(JavaTypes.java:503)
    at 
org.apache.openjpa.kernel.VersionAttachStrategy.compareVersion(VersionAttachStrategy.java:185)


if i try to add the following to my persistence unit i can't start the 
container



it fails with this kind of thing
09-Dec-2018 19:22:07.261 SEVERE [localhost-startStop-1] 
org.apache.openejb.assembler.classic.Assembler.destroyApplication 
undeployException original cause
 java.lang.Exception: persistence-unit: sales 145860742localhost: Name 
"openejb/PersistenceUnit/sales 145860742localhost" not found.
    at 
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2490)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1092)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:757)


there may root cause above this but i would have to write log to file 
rather than console and wondered first if you had any ideas






OpenJPA debugging

2018-12-09 Thread Matthew Broadhead
i am using TomEE 7.0.5 with OpenJPA 2.4.2.  i am defining multiple 
persistence units in persistence.xml


i am getting an error about casting which doesn't help me track it down
openjpa-2.4.3-r422266:1833086 nonfatal general error> 
org.apache.openjpa.persistence.PersistenceException: java.lang.Integer 
cannot be cast to java.lang.Long
FailedObject: uk.me.kissy.database.entities.jpa.file.File-727648 
[java.lang.String]

    at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3521)
...
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be 
cast to java.lang.Long
    at 
org.apache.openjpa.meta.JavaTypes.isPrimitiveDefault(JavaTypes.java:503)
    at 
org.apache.openjpa.kernel.VersionAttachStrategy.compareVersion(VersionAttachStrategy.java:185)


if i try to add the following to my persistence unit i can't start the 
container



it fails with this kind of thing
09-Dec-2018 19:22:07.261 SEVERE [localhost-startStop-1] 
org.apache.openejb.assembler.classic.Assembler.destroyApplication 
undeployException original cause
 java.lang.Exception: persistence-unit: sales 145860742localhost: Name 
"openejb/PersistenceUnit/sales 145860742localhost" not found.
    at 
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2490)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1092)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:757)


there may root cause above this but i would have to write log to file 
rather than console and wondered first if you had any ideas




Re: Simple EJB causes permissions errors

2018-11-01 Thread Matthew Broadhead
do you need the security manager in production or have you solved the 
problem?


On 01/11/2018 18:11, ross.cohen wrote:

I can make this problem go away by removing the Security Manager.As I
said, the security policy is set to be permissive as possible, so I don't
really understand how I would be getting security exception.




--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html




Re: jpa jar

2018-10-31 Thread Matthew Broadhead

Thank Luis,

I will try following your 2nd method.

I found this link to skinny wars for maven-ear-plugin
https://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html

It seems very similar to your weblogic example with the MANIFEST.MF 
configuration


It should work in my case if I change my virtual host setup

On 31/10/2018 17:44, Luis Rodríguez Fernández wrote:

Hello Matthew,

mmm, yes every jar that you drop in the common classloader will be visible
to all webapps.

- "meta in the jar": mmm, yes, e.g. in our weblogic servers we have exactly
that case...
   -In the META-INF/MANIFEST.MF of the shared jar:
Extension-Name: commonFilters
Specification-Version: 1.0
Implementation-Version: 1.8
- In the webapps:
   Extension-List: ssoFilters
   ssoFilters-Extension-Name: commonFilters
   ssoFilters-Specification-Version: 1.0
   ssoFilters-Implementation-Version: 1.8

... and in weblogic we deploy the jar as a library. You can have a look at
https://docs.oracle.com/javase/6/docs/technotes/guides/extensions/versioning.html

For me the simplest would be to copy your jar to $CATALINA_BASE/lib.

Hope it helps,

Luis













El mié., 31 oct. 2018 a las 14:28, Matthew Broadhead
() escribió:


Hi Luis,

When using method [1] does the jar have to be manually dropped into a
common folder defined in the config?  That would be a pain.

What would be great if i could add some meta in the jar which means it
gets picked up by the common loader when scanned by future wars

i have lookeds into EARs but I need some time to get my head around it.
At the moment I use Tomcat virtual hosts in production although I want
to change it so that httpd is doing the proxying

On 31/10/2018 14:06, Luis Rodríguez Fernández wrote:

Hello Matthew,

Probably the common classloader is the place for your jar, see [1]

Otherwise you could also packed all your apps in an .ear file and add

your

.jar there. In tomee you can deploy .ear files as well [2]. For this
approach you have to declare the apps folder in conf/tomee.xml









Hope it helps,

Luis

[1] https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
[2] http://tomee.apache.org/deploying-in-tomee.html

El mié., 31 oct. 2018 a las 13:54, Matthew Broadhead
() escribió:


seems like this must have been asked before...i have been moving some
common database code into a jar file and it works great.  but it is
included in several wars and those projects load the jar individually
each time.  i wondered if there is a way to load a jar only once into
TomEE and have it commonly accessed across all webapps?







Re: jpa jar

2018-10-31 Thread Matthew Broadhead

Hi Luis,

When using method [1] does the jar have to be manually dropped into a 
common folder defined in the config?  That would be a pain.


What would be great if i could add some meta in the jar which means it 
gets picked up by the common loader when scanned by future wars


i have lookeds into EARs but I need some time to get my head around it. 
At the moment I use Tomcat virtual hosts in production although I want 
to change it so that httpd is doing the proxying


On 31/10/2018 14:06, Luis Rodríguez Fernández wrote:

Hello Matthew,

Probably the common classloader is the place for your jar, see [1]

Otherwise you could also packed all your apps in an .ear file and add your
.jar there. In tomee you can deploy .ear files as well [2]. For this
approach you have to declare the apps folder in conf/tomee.xml


   

   
   



Hope it helps,

Luis

[1] https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
[2] http://tomee.apache.org/deploying-in-tomee.html

El mié., 31 oct. 2018 a las 13:54, Matthew Broadhead
() escribió:


seems like this must have been asked before...i have been moving some
common database code into a jar file and it works great.  but it is
included in several wars and those projects load the jar individually
each time.  i wondered if there is a way to load a jar only once into
TomEE and have it commonly accessed across all webapps?







jpa jar

2018-10-31 Thread Matthew Broadhead
seems like this must have been asked before...i have been moving some 
common database code into a jar file and it works great.  but it is 
included in several wars and those projects load the jar individually 
each time.  i wondered if there is a way to load a jar only once into 
TomEE and have it commonly accessed across all webapps?


Re: Heap Memory / boot Tomee

2018-10-29 Thread Matthew Broadhead

 just tried using scan.xml but i get:

29-Oct-2018 16:15:16.495 SEVERE [localhost-startStop-1] 
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI Beans 
module deployment failed
 org.apache.webbeans.exception.WebBeansDeploymentException: 
javax.enterprise.inject.UnsatisfiedResolutionException: Api type 
[org.apache.deltaspike.core.spi.future.FutureableStrategy] is not found 
with the qualifiers

Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : 
futureableStrategy, Bean Owner : [FutureableInterceptor, 
WebBeansType:INTERCEPTOR, Name:null, API 
Types:[org.apache.deltaspike.core.impl.future.FutureableInterceptor,java.lang.Object,java.io.Serializable], 
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
    at 
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:338)
    at 
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
    at 
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)

    at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:757)
    at 
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1303)
    at 
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125)
    at 
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
    at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
    at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)

    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

    at java.lang.Thread.run(Thread.java:748)

am i supposed to scan deltaspike library?

On 29/10/2018 15:02, Romain Manni-Bucau wrote:

Hello,

it depends the scanning coverage for your app, normally you can tune it
using scan.xml (in WEB-INF) to only scan the EE classes (CDI/EJB) and not
all others which will reduce it at the minimum.
  See http://tomee.apache.org/refcard/refcard.html for more details

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le lun. 29 oct. 2018 à 14:53, cedr29  a écrit :


Hi,

I would like to know if increase of heap memory is normal just after
booting
tomee.
I ran GC and analysed hprof in "Memory Analyser"

It tells me that I have :
- 17,3Mo of "org.apache.bval.cdi.BValExtension".
Next ones are
-"java.net.URLClassLoader" with 5.1Mo
- TomEEWebappClassLoader with 5Mo
webbeans.container.BeanManagerImpl with 3.7Mo

Those values are coherent?

By default I have 192Mo max for Heap size.
I expose more and more REST APIs et SOAP WS and i d like to know if its
normal heap size takes 150Mo just after boot.

Thank You



--
Sent from:
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html





Could not load resource bundle SAXMessages

2018-10-25 Thread Matthew Broadhead

TomEE 7.0.5 , CentOS 7

Server runs for days without any problem but this morning XSLT isn't working 
with this error:

java.util.MissingResourceException: Could not load any resource bundle by 
com.sun.org.apache.xerces.internal.impl.msg.SAXMessages
at 
com.sun.org.apache.xerces.internal.utils.SecuritySupport$7.run(SecuritySupport.java:174)
at 
com.sun.org.apache.xerces.internal.utils.SecuritySupport$7.run(SecuritySupport.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at 
com.sun.org.apache.xerces.internal.utils.SecuritySupport.getResourceBundle(SecuritySupport.java:166)
at 
com.sun.org.apache.xerces.internal.util.SAXMessageFormatter.formatMessage(SAXMessageFormatter.java:58)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.setProperty(AbstractSAXParser.java:1949)
at 
com.sun.org.apache.xerces.internal.parsers.SAXParser.setProperty(SAXParser.java:175)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:476)
at 
uk.me.kissy.document.dao.DocumentBuilderDao.fo2PdfRaw(DocumentBuilderDao.java:113)
at 
uk.me.kissy.document.dao.DocumentBuilderDao.fo2Pdf(DocumentBuilderDao.java:81)

code in question is

StreamSource xml = new StreamSource(new StringReader(fopjuice));
FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI());
ByteArrayOutputStream out = new ByteArrayOutputStream();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(xml, res);  // <-- BLOWS UP HERE
return out.toByteArray();

i hadn't reloaded any resources since startup



Re: openjpa multiple persistence units

2018-10-22 Thread Matthew Broadhead

i found it
true

On 22/10/2018 19:14, Matthew Broadhead wrote:
eclipse IDE is complaining if i have multiple persistence units and 
they contain classes with the same name.  e.g.

http://java.sun.com/xml/ns/persistence";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";

    version="2.0">
    
        db1
db1Unmanaged
        com.test.entities.jpa.db1.Test
        
            
        
    
    
        db2
db2Unmanaged
        com.test.entities.jpa.db2.Test
        
            
        
    

is eclipse right or can i ignore the error?




openjpa multiple persistence units

2018-10-22 Thread Matthew Broadhead
eclipse IDE is complaining if i have multiple persistence units and they 
contain classes with the same name.  e.g.

http://java.sun.com/xml/ns/persistence";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";

    version="2.0">
    
        db1
db1Unmanaged
        com.test.entities.jpa.db1.Test
        
            
        
    
    
        db2
db2Unmanaged
        com.test.entities.jpa.db2.Test
        
            
        
    

is eclipse right or can i ignore the error?


Re: Problem with OpenEJB configuration

2018-10-19 Thread Matthew Broadhead

which package is it getting com.ibm.websphere.cache.DistributedMap from?

On 18/10/2018 18:09, Przemysław Furmańczyk wrote:

Good afternoon,
I have troubles with configuring OpenEJB with our application. My 
project contains multiple modules. Let's say it looks like that:


  * MyApp – enterprise application to be used as deployable unit,

  * MyApp-B – EJB module with service facade implementations and
resource access components to integrate external resources,
  * MyApp-BC – EJB client module containing all service facade
interfaces and the domain model,
  * MyApp-UI – web application providing the user interface,
  * MyApp-WS – web application exposing web services endpoints for
service facades,
  * MyApp-D – module storing DAOs,
  * MyApp-RWS – module storing REST web services.

I wanted to start with module B as a main place for configuration 
(module MyApp-BC will be probably the main one). And what I did here is:


 1. I put in *pom.xml* these extra dependencies:


com.myapp
MyApp-BC
${project.version}


junit
junit
4.12


org.assertj
assertj-core
1.7.1


org.apache.openejb
openejb-junit
4.7.5
    

slf4j-jdk14
org.slf4j

    


org.apache.openejb
openejb-jee
4.7.5


 2. Inside of root folder for this module, I've created /conf/ folder
with *openejb.xml*, where I defined as a Resource my DB connection.
 3. Created a file *application-client.xml** in
/src/test/resources/META-INF/ with content:




 4. And under /src/main/test/ directory created new test:

@ContextConfig(properties = {
@Property("java.naming.factory.initial=org.apache.openejb.core.LocalInitialContextFactory"),
@Property("openejb.deployments.classpath.exclude=.*\\.jar"),
    // @Property("openejb.tempclassloader.skip=annotations"),
    // @Property("openejb.altdd.prefix=test-"),
@Property("openejb.deployments.classpath.filter.descriptors=true") })
@RunTestAs("Authenticated")
@RunWith(OpenEjbRunner.class)
@LocalClient
public class MyTestClassImplIntegrationTest {
    @EJB
    private MyTestClassImpl myTestClassImpl;
    @Test
    public void testMethod() {
    // some code for test method
    }
}

 5. The multiple /@Property/ annotations I took from our inside
guideline. The commented one, I get from trying to find solution
on internet. For @Property("openejb.altdd.prefix=test-")I've
created duplicated file of mine *ejb-jar.xml*. In both /ejb-jar/
files I have something like that:


CacheManager
com.myapp.cache.CacheManager

MyApp/Cache
com.ibm.websphere.cache.DistributedMap
Container
Shareable


The /CacheManager/ class is located in MyApp-BC module.
When I try to run the test in Eclipse I get the error from 
*Console_output.txt* and *JUnit_logs.txt*
So I tried to remove 
com.myapp.cache.CacheManagerfrom both /ejb-jar/ 
files, but then I receive this error: *Console_output_2.txt*


Am I missing something or OpenEJB just doesn’t work with 
DistributedMap from IBM?

I would really appreciate your help.

Best regards,
Przemek




bval emailvalidator

2018-10-14 Thread Matthew Broadhead
i just noticed that apache commons validator is not included in TomEE.  
i wanted to use EmailValidator.  i noticed that BVal has an 
EmailValidator.  can that be used instead?


Re: Performance issue in cxf-rt-rs-client-3.1.15.jar

2018-10-12 Thread Matthew Broadhead
there is an RC2 available although a classloader bug has been found in 
BVal integration.  i think they are trying to get it released before 
CodeOne


On 12/10/18 16:53, COURTAULT Francois wrote:

Hello,

Glad to hear that.
Any release date for TomEE  8 ? Oracle Code announcement ? ;-)

Best Regards.

-Original Message-
From: Matthew Broadhead [mailto:matthew.broadh...@nbmlaw.co.uk.INVALID]
Sent: jeudi 11 octobre 2018 19:00
To: users@tomee.apache.org
Subject: Re: Performance issue in cxf-rt-rs-client-3.1.15.jar

tomee 8 is going to have 3.2.6

On 11/10/18 18:25, COURTAULT Francois wrote:

Hello,

Just to keep you informed.
During some performance/stress tests using TomEE 7.1.0 we have found  an issue 
with REST client.

After re-analyzing thread dumps, we found several threads with this pattern:
  java.lang.Thread.State: RUNNABLE
  at java.util.WeakHashMap.put(WeakHashMap.java:453)
  at java.util.Collections$SetFromMap.add(Collections.java:5461)
  at
org.apache.cxf.jaxrs.client.spec.ClientImpl$WebTargetImpl.initTargetCl
ientIfNeeded(ClientImpl.java:358) Some people already have this kind
of issue:
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
adam-bien.com%2Froller%2Fabien%2Fentry%2Fendless_loops_in_unsychronize
d_weakhashmap&data=02%7C01%7CFrancois.COURTAULT%40gemalto.com%7C67
c96e552a0748b0a2bd08d62f9b0f40%7C37d0a9db7c464096bfe31add5b495d6d%7C1%
7C0%7C636748740352217094&sdata=3n%2Fq7SI9r1YFAKlf0xEwxNmtasQ5jZmrs
0X9eys6oyY%3D&reserved=0

I got some feedback from cxf guys and it seems that they will fix it on 3.2.7 
and 3.1.18 I guess.
I have created an issue in JIRA you can monitor: CXF-7869 Infinite
loop in rest
client<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2
F%2Fissues.apache.org%2Fjira%2Fprojects%2FCXF%2Fissues%2FCXF-7869&
data=02%7C01%7CFrancois.COURTAULT%40gemalto.com%7C67c96e552a0748b0a2bd
08d62f9b0f40%7C37d0a9db7c464096bfe31add5b495d6d%7C1%7C0%7C636748740352
217094&sdata=oOLiFlKmb3b1%2B%2Bve5MDM6wbHXBDV%2BPDcAdYco6%2BD4pE%3
D&reserved=0>

Could you please include the cxf fix in future TomEE version please ?

BTW, I have another question: why TomEE embeds cxf 3.1.x instead of cxf 3.2.x ?

Could you please


This message and any attachments are intended solely for the addressees and may 
contain confidential information. Any unauthorized use or disclosure, either 
whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the 
message if altered, changed or falsified. If you are not the intended recipient 
of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free 
from viruses, the sender will not be liable for damages caused by a transmitted 
virus.



  This message and any attachments are intended solely for the addressees and 
may contain confidential information. Any unauthorized use or disclosure, 
either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the 
message if altered, changed or falsified. If you are not the intended recipient 
of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free 
from viruses, the sender will not be liable for damages caused by a transmitted 
virus.




Re: Performance issue in cxf-rt-rs-client-3.1.15.jar

2018-10-11 Thread Matthew Broadhead

tomee 8 is going to have 3.2.6

On 11/10/18 18:25, COURTAULT Francois wrote:

Hello,

Just to keep you informed.
During some performance/stress tests using TomEE 7.1.0 we have found  an issue 
with REST client.

After re-analyzing thread dumps, we found several threads with this pattern:
 java.lang.Thread.State: RUNNABLE
 at java.util.WeakHashMap.put(WeakHashMap.java:453)
 at java.util.Collections$SetFromMap.add(Collections.java:5461)
 at 
org.apache.cxf.jaxrs.client.spec.ClientImpl$WebTargetImpl.initTargetClientIfNeeded(ClientImpl.java:358)
Some people already have this kind of issue:
http://www.adam-bien.com/roller/abien/entry/endless_loops_in_unsychronized_weakhashmap

I got some feedback from cxf guys and it seems that they will fix it on 3.2.7 
and 3.1.18 I guess.
I have created an issue in JIRA you can monitor: CXF-7869 Infinite loop in rest 
client

Could you please include the cxf fix in future TomEE version please ?

BTW, I have another question: why TomEE embeds cxf 3.1.x instead of cxf 3.2.x ?

Could you please


This message and any attachments are intended solely for the addressees and may 
contain confidential information. Any unauthorized use or disclosure, either 
whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the 
message if altered, changed or falsified. If you are not the intended recipient 
of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free 
from viruses, the sender will not be liable for damages caused by a transmitted 
virus.





Re: protect endpoint with basic auth

2018-08-22 Thread Matthew Broadhead

Hi Romain,

Thanks.  that was the conclusion was coming to.  I am glad it is a valid 
solution.  I found this example also 
https://gist.github.com/neolitec/8953607.


I guess i will define a filter mapping in web.xml

Matthew

On 22/08/18 16:01, Romain Manni-Bucau wrote:

Hi Matthew,

tomcat does that because the spec does (even if several people ask to break
that limitation it is not yet done at servlet spec level)
that said to secure a rest endpoint you just need a filter in your app and
implement the security login in there. you can delegate to the container
(request.login()/request.logout())  or not depending what you want to do.
MP JWT Auth uses that typically:
https://github.com/apache/geronimo-jwt-auth/blob/master/src/main/java/org/apache/geronimo/microprofile/impl/jwtauth/servlet/GeronimoJwtAuthFilter.java

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le mer. 22 août 2018 à 15:55, Matthew Broadhead
 a écrit :


my webapp already has a login-config set to keycloak in web.xml so AFAIK
i cannot define any other security configs there.  why doesn't tomcat
allow multiple security methods?

  KEYCLOAK
  secure


is there another way to protect a jax-rs endpoint using basic auth
without having to create another webapp?  i read something about valves...






protect endpoint with basic auth

2018-08-22 Thread Matthew Broadhead
my webapp already has a login-config set to keycloak in web.xml so AFAIK 
i cannot define any other security configs there.  why doesn't tomcat 
allow multiple security methods?


    KEYCLOAK
    secure


is there another way to protect a jax-rs endpoint using basic auth 
without having to create another webapp?  i read something about valves...




Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-08-17 Thread Matthew Broadhead
is there an annotation which will tell johnzon to return only the id of 
the jpa object and not the whole thing?


On 17/08/18 22:05, Matthew Broadhead wrote:

no. i will add those and try again.

i also changed the entry in system.properties to 
org.apache.johnzon.deduplicateObjects = true to match 
org.apache.johnzon.max-string-length = 8192



On 17/08/18 21:56, Romain Manni-Bucau wrote:

Do you have a valid equals/hashcode?

Le ven. 17 août 2018 21:28, chongma  a
écrit :


i was trying to output some JPA objects to json today.  after adding
johnzon.deduplicateObjects = true to system.properties and 
restarting TomEE

i still get
javax.json.stream.JsonGenerationException: Invalid json
 at
org.apache.johnzon.core.JsonGeneratorImpl.close(JsonGeneratorImpl.java:454) 

 at 
org.apache.johnzon.mapper.Mapper.writeObject(Mapper.java:147)

 at
uk.me.kissy.sales.dao.LeadScriptDao.marshall(LeadScriptDao.java:435)
is there any way to get a deeped debug?



--
Sent from:
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html







Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-08-17 Thread Matthew Broadhead

no.  i will add those and try again.

i also changed the entry in system.properties to 
org.apache.johnzon.deduplicateObjects = true to match 
org.apache.johnzon.max-string-length = 8192



On 17/08/18 21:56, Romain Manni-Bucau wrote:

Do you have a valid equals/hashcode?

Le ven. 17 août 2018 21:28, chongma  a
écrit :


i was trying to output some JPA objects to json today.  after adding
johnzon.deduplicateObjects = true to system.properties and restarting TomEE
i still get
javax.json.stream.JsonGenerationException: Invalid json
 at
org.apache.johnzon.core.JsonGeneratorImpl.close(JsonGeneratorImpl.java:454)
 at org.apache.johnzon.mapper.Mapper.writeObject(Mapper.java:147)
 at
uk.me.kissy.sales.dao.LeadScriptDao.marshall(LeadScriptDao.java:435)
is there any way to get a deeped debug?



--
Sent from:
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html





Re: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-22 Thread Matthew Broadhead

ok it seems i can pass a ResourceBundle into the Transformer using
ResourceBundle resourceBundle = ResourceBundle.getBundle("test.messages");
Map parameters = new HashMap();
TransformerFactory transformerfactory = TransformerFactory.newInstance();
...
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
...
transformer.setParameter("resources", resourceBundle);

and declare it in xslt using


this was broken back in 2016 but seems to work now.   the reproducer 
still demonstrates the overall problem.


On 21/07/18 19:50, Matthew Broadhead wrote:

i have created a reproducer at
https://github.com/chongma/xsltProblem

there are 2 directories
xslt704excluded
xslt704included

if you run from each
mvn clean package tomee:run

then navigate to
http://localhost:8080/rest/open/test1
http://localhost:8080/rest/open/test2

you can see in the output when it fails like
file:/home/matthew/git/xsltProblem/xslt704excluded/target/apache-tomee/webapps/ROOT/WEB-INF/classes/xslt/test2.xsl; 
Line #7; Column #66; java.util.MissingResourceException: Can't find 
bundle for base name test.messages, locale en_GB


it only fails when excluding xalan and xml-apis

On 21/07/18 11:52, Matthew Broadhead wrote:

hmmm...actually i have realised what the problem is now.

before excluding xalan and xml-apis in XSLT i can load a bundle from 
the classpath without problem.  for example

select="java:util.ResourceBundle.getBundle('uk.me.kissy.document.messages')" 
/>



after excluding them from the classpath i get these errors
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #6; Column #82; java.util.MissingResourceException: Can't find 
bundle for base name uk.me.kissy.document.messages, locale en_GB
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #122; Column #61; Unknown error in XPath.
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #54; Column #54; java.lang.NullPointerException


i have tried manually setting the classLoader without any success
TransformerFactory transformerfactory = TransformerFactory.newInstance(
"org.apache.xalan.processor.TransformerFactoryImpl",
                        this.getClass().getClassLoader());

On 19/07/18 13:47, Jean-Louis Monteiro wrote:

Great!
Thanks for the follow up

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Wed, Jul 18, 2018 at 1:44 PM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:


ok i fixed that.  it was just a null attribute causing the problem. so
everything looks ok for now.  thanks for your help


On 18/07/18 11:49, Matthew Broadhead wrote:

i have the problem now.  this is the exception i get if i exclude 
xalan

from fop.  i have no idea what might cause this

javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException:

0 >= 0
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
.transform(TransformerImpl.java:737)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
.transform(TransformerImpl.java:343)
 at uk.me.kissy.external.entityBeans.UtilityDao.getXMLParse(
UtilityDao.java:191)
 at uk.me.kissy.external.entityBeans.UtilityDao$$OwbNormalScopeP
roxy0.getXMLParse(uk/me/kissy/external/entityBeans/UtilityDao.java)
 at uk.me.kissy.document.dao.DocumentElementDao.getBodyPDF(Docum
entElementDao.java:395)

On 17/07/18 19:35, Matthew Broadhead wrote:


i have upgraded from fop 2.2 to 2.3 and excluded xalan and xml-apis
again.  it seems to be working ok at the moment on my development 
machine.

i will try again on production


org.apache.xmlgraphics
 fop
${fop.version}
 
 
xalan
xalan
 
 
xml-apis
xml-apis-ext
 
 
xml-apis
xml-apis
 
 
 

 org.docx4j
 docx4j
${docx4j.version}
 
 
xalan
xalan
 
 
 

On 17/07/18 12:46, Jean-Louis Monteiro wrote:

This usually indicates you have the same class loaded into 2 
different

classloaders which makes them different.
In this scenario, I would check if you don't have duplicate 
xalan jars

in
tomee/lib and in the WEB-INF/lib of your application.

Hope it helps

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Tue, Jul 17, 2018 at 2:06 AM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:

i have a couple of 

Re: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-21 Thread Matthew Broadhead

i have created a reproducer at
https://github.com/chongma/xsltProblem

there are 2 directories
xslt704excluded
xslt704included

if you run from each
mvn clean package tomee:run

then navigate to
http://localhost:8080/rest/open/test1
http://localhost:8080/rest/open/test2

you can see in the output when it fails like
file:/home/matthew/git/xsltProblem/xslt704excluded/target/apache-tomee/webapps/ROOT/WEB-INF/classes/xslt/test2.xsl; 
Line #7; Column #66; java.util.MissingResourceException: Can't find 
bundle for base name test.messages, locale en_GB


it only fails when excluding xalan and xml-apis

On 21/07/18 11:52, Matthew Broadhead wrote:

hmmm...actually i have realised what the problem is now.

before excluding xalan and xml-apis in XSLT i can load a bundle from 
the classpath without problem.  for example

select="java:util.ResourceBundle.getBundle('uk.me.kissy.document.messages')" 
/>



after excluding them from the classpath i get these errors
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #6; Column #82; java.util.MissingResourceException: Can't find 
bundle for base name uk.me.kissy.document.messages, locale en_GB
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #122; Column #61; Unknown error in XPath.
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #54; Column #54; java.lang.NullPointerException


i have tried manually setting the classLoader without any success
TransformerFactory transformerfactory = TransformerFactory.newInstance(
"org.apache.xalan.processor.TransformerFactoryImpl",
                        this.getClass().getClassLoader());

On 19/07/18 13:47, Jean-Louis Monteiro wrote:

Great!
Thanks for the follow up

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Wed, Jul 18, 2018 at 1:44 PM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:


ok i fixed that.  it was just a null attribute causing the problem. so
everything looks ok for now.  thanks for your help


On 18/07/18 11:49, Matthew Broadhead wrote:

i have the problem now.  this is the exception i get if i exclude 
xalan

from fop.  i have no idea what might cause this

javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException:

0 >= 0
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
.transform(TransformerImpl.java:737)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
.transform(TransformerImpl.java:343)
 at uk.me.kissy.external.entityBeans.UtilityDao.getXMLParse(
UtilityDao.java:191)
 at uk.me.kissy.external.entityBeans.UtilityDao$$OwbNormalScopeP
roxy0.getXMLParse(uk/me/kissy/external/entityBeans/UtilityDao.java)
 at uk.me.kissy.document.dao.DocumentElementDao.getBodyPDF(Docum
entElementDao.java:395)

On 17/07/18 19:35, Matthew Broadhead wrote:


i have upgraded from fop 2.2 to 2.3 and excluded xalan and xml-apis
again.  it seems to be working ok at the moment on my development 
machine.

i will try again on production


org.apache.xmlgraphics
 fop
 ${fop.version}
 
 
 xalan
xalan
 
 
xml-apis
xml-apis-ext
 
 
xml-apis
xml-apis
 
 
 

 org.docx4j
 docx4j
${docx4j.version}
 
 
 xalan
xalan
 
 
 

On 17/07/18 12:46, Jean-Louis Monteiro wrote:

This usually indicates you have the same class loaded into 2 
different

classloaders which makes them different.
In this scenario, I would check if you don't have duplicate xalan 
jars

in
tomee/lib and in the WEB-INF/lib of your application.

Hope it helps

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Tue, Jul 17, 2018 at 2:06 AM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:

i have a couple of problems...
i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 
7.0.5 due

to
the error (it works fine in 7.0.3)
java.lang.ClassCastException: 
org.apache.xml.dtm.ref.DTMManagerDefault

cannot be cast to org.apache.xml.dtm.DTMManager

which occurs when i run the following code for Apache FOP
ClassLoader classLoader = Thread.currentThread().getCont
extClassLoader();
URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = 
TransformerFactory.newInstance

();

Re: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-21 Thread Matthew Broadhead

hmmm...actually i have realised what the problem is now.

before excluding xalan and xml-apis in XSLT i can load a bundle from the 
classpath without problem.  for example

select="java:util.ResourceBundle.getBundle('uk.me.kissy.document.messages')" 
/>



after excluding them from the classpath i get these errors
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #6; Column #82; java.util.MissingResourceException: Can't find 
bundle for base name uk.me.kissy.document.messages, locale en_GB
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #122; Column #61; Unknown error in XPath.
file:/home/matthew/eclipse-workspaces/case-management/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/document/WEB-INF/classes/documentXslt/documentBuilder.xsl; 
Line #54; Column #54; java.lang.NullPointerException


i have tried manually setting the classLoader without any success
TransformerFactory transformerfactory = TransformerFactory.newInstance(
"org.apache.xalan.processor.TransformerFactoryImpl",
                        this.getClass().getClassLoader());

On 19/07/18 13:47, Jean-Louis Monteiro wrote:

Great!
Thanks for the follow up

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Wed, Jul 18, 2018 at 1:44 PM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:


ok i fixed that.  it was just a null attribute causing the problem. so
everything looks ok for now.  thanks for your help


On 18/07/18 11:49, Matthew Broadhead wrote:


i have the problem now.  this is the exception i get if i exclude xalan
from fop.  i have no idea what might cause this

javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException:
0 >= 0
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
.transform(TransformerImpl.java:737)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
.transform(TransformerImpl.java:343)
 at uk.me.kissy.external.entityBeans.UtilityDao.getXMLParse(
UtilityDao.java:191)
 at uk.me.kissy.external.entityBeans.UtilityDao$$OwbNormalScopeP
roxy0.getXMLParse(uk/me/kissy/external/entityBeans/UtilityDao.java)
 at uk.me.kissy.document.dao.DocumentElementDao.getBodyPDF(Docum
entElementDao.java:395)

On 17/07/18 19:35, Matthew Broadhead wrote:


i have upgraded from fop 2.2 to 2.3 and excluded xalan and xml-apis
again.  it seems to be working ok at the moment on my development machine.
i will try again on production


org.apache.xmlgraphics
 fop
 ${fop.version}
 
 
 xalan
 xalan
 
 
 xml-apis
xml-apis-ext
 
 
 xml-apis
xml-apis
 
 
 

 org.docx4j
 docx4j
 ${docx4j.version}
 
 
 xalan
 xalan
 
 
 

On 17/07/18 12:46, Jean-Louis Monteiro wrote:


This usually indicates you have the same class loaded into 2 different
classloaders which makes them different.
In this scenario, I would check if you don't have duplicate xalan jars
in
tomee/lib and in the WEB-INF/lib of your application.

Hope it helps

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Tue, Jul 17, 2018 at 2:06 AM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:

i have a couple of problems...

i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 due
to
the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager

which occurs when i run the following code for Apache FOP
ClassLoader classLoader = Thread.currentThread().getCont
extClassLoader();
URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = TransformerFactory.newInstance
();
StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new
StreamResult(writer));
out = writer.toString();
writer.close();
reader.close();

My new problem is that I am using 7.0.5 in development and this code
(using a CXF webClient) works perfectly.
Collection leadids = webClient.accept(MediaType.APP
LICATION_JSON).getCollection(Integer.cla

Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-07-19 Thread Matthew Broadhead
JAXB used to use @XmlInverseReference annotation.  is there no such 
johnzon annotation?  @JohnzonIgnore is more like @Transient?


On 19/07/18 17:10, Romain Manni-Bucau wrote:

Hi Sudhakar,

Ensure you have a @JohnzonIgnore on one side to avoid a loop.

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le jeu. 19 juil. 2018 à 16:46, sudhakarvm  a écrit :


I am facing problem while json is generated from my JPA model object using
default JSON provider Johnzon.
This JPA entity class B has @ManyToOne relationship with other entity A.
Since A also includes B as @OneToMany member with List datatype. Because of
this Johnzon is going in infinite loop to prepare the json and I am getting
following exception:

/Caused by: javax.json.stream.JsonGenerationException: Invalid json
 at

org.apache.johnzon.core.JsonGeneratorImpl.close(JsonGeneratorImpl.java:437)/

JPA (using eclipselink) is returning correct results. Any suggestions for
this issue please.

Thanks in advance
Sudhakar



--
Sent from:
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html





Re: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-18 Thread Matthew Broadhead
ok i fixed that.  it was just a null attribute causing the problem. so 
everything looks ok for now.  thanks for your help


On 18/07/18 11:49, Matthew Broadhead wrote:
i have the problem now.  this is the exception i get if i exclude 
xalan from fop.  i have no idea what might cause this


javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
    at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:737)
    at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
    at 
uk.me.kissy.external.entityBeans.UtilityDao.getXMLParse(UtilityDao.java:191)
    at 
uk.me.kissy.external.entityBeans.UtilityDao$$OwbNormalScopeProxy0.getXMLParse(uk/me/kissy/external/entityBeans/UtilityDao.java)
    at 
uk.me.kissy.document.dao.DocumentElementDao.getBodyPDF(DocumentElementDao.java:395)


On 17/07/18 19:35, Matthew Broadhead wrote:
i have upgraded from fop 2.2 to 2.3 and excluded xalan and xml-apis 
again.  it seems to be working ok at the moment on my development 
machine.  i will try again on production



org.apache.xmlgraphics
            fop
            ${fop.version}
            
                
                    xalan
                    xalan
                
                
                    xml-apis
xml-apis-ext
                
                
                    xml-apis
xml-apis
                
            
        

            org.docx4j
            docx4j
            ${docx4j.version}
            
                
                    xalan
                    xalan
                
            
        

On 17/07/18 12:46, Jean-Louis Monteiro wrote:

This usually indicates you have the same class loaded into 2 different
classloaders which makes them different.
In this scenario, I would check if you don't have duplicate xalan 
jars in

tomee/lib and in the WEB-INF/lib of your application.

Hope it helps

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Tue, Jul 17, 2018 at 2:06 AM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:


i have a couple of problems...

i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 
due to

the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager

which occurs when i run the following code for Apache FOP
ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();

URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = 
TransformerFactory.newInstance();

StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new 
StreamResult(writer));

out = writer.toString();
writer.close();
reader.close();

My new problem is that I am using 7.0.5 in development and this code
(using a CXF webClient) works perfectly.
Collection leadids = webClient.accept(MediaType.APP
LICATION_JSON).getCollection(Integer.class);
List leadids_ = new ArrayList<>(leadids);

But when I deployed it to 7.0.3 it does not work.  Is there any way to
slurp some JSON formatted like this
[1,2,3,4]

I tried creating a wrapper like below but it didn't match
public class listWrapper {
 private List list;
 // ...
}









Re: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-18 Thread Matthew Broadhead
i have the problem now.  this is the exception i get if i exclude xalan 
from fop.  i have no idea what might cause this


javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
    at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:737)
    at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
    at 
uk.me.kissy.external.entityBeans.UtilityDao.getXMLParse(UtilityDao.java:191)
    at 
uk.me.kissy.external.entityBeans.UtilityDao$$OwbNormalScopeProxy0.getXMLParse(uk/me/kissy/external/entityBeans/UtilityDao.java)
    at 
uk.me.kissy.document.dao.DocumentElementDao.getBodyPDF(DocumentElementDao.java:395)


On 17/07/18 19:35, Matthew Broadhead wrote:
i have upgraded from fop 2.2 to 2.3 and excluded xalan and xml-apis 
again.  it seems to be working ok at the moment on my development 
machine.  i will try again on production



            org.apache.xmlgraphics
            fop
            ${fop.version}
            
                
                    xalan
                    xalan
                
                
                    xml-apis
xml-apis-ext
                
                
                    xml-apis
                    xml-apis
                
            
        

            org.docx4j
            docx4j
            ${docx4j.version}
            
                
                    xalan
                    xalan
                
            
        

On 17/07/18 12:46, Jean-Louis Monteiro wrote:

This usually indicates you have the same class loaded into 2 different
classloaders which makes them different.
In this scenario, I would check if you don't have duplicate xalan 
jars in

tomee/lib and in the WEB-INF/lib of your application.

Hope it helps

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Tue, Jul 17, 2018 at 2:06 AM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:


i have a couple of problems...

i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 
due to

the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager

which occurs when i run the following code for Apache FOP
ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();

URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = 
TransformerFactory.newInstance();

StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new 
StreamResult(writer));

out = writer.toString();
writer.close();
reader.close();

My new problem is that I am using 7.0.5 in development and this code
(using a CXF webClient) works perfectly.
Collection leadids = webClient.accept(MediaType.APP
LICATION_JSON).getCollection(Integer.class);
List leadids_ = new ArrayList<>(leadids);

But when I deployed it to 7.0.3 it does not work.  Is there any way to
slurp some JSON formatted like this
[1,2,3,4]

I tried creating a wrapper like below but it didn't match
public class listWrapper {
 private List list;
 // ...
}







Re: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-17 Thread Matthew Broadhead
i have upgraded from fop 2.2 to 2.3 and excluded xalan and xml-apis 
again.  it seems to be working ok at the moment on my development 
machine.  i will try again on production



            org.apache.xmlgraphics
            fop
            ${fop.version}
            
                
                    xalan
                    xalan
                
                
                    xml-apis
xml-apis-ext
                
                
                    xml-apis
                    xml-apis
                
            
        

            org.docx4j
            docx4j
            ${docx4j.version}
            
                
                    xalan
                    xalan
                
            
        

On 17/07/18 12:46, Jean-Louis Monteiro wrote:

This usually indicates you have the same class loaded into 2 different
classloaders which makes them different.
In this scenario, I would check if you don't have duplicate xalan jars in
tomee/lib and in the WEB-INF/lib of your application.

Hope it helps

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Tue, Jul 17, 2018 at 2:06 AM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:


i have a couple of problems...

i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 due to
the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager

which occurs when i run the following code for Apache FOP
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = TransformerFactory.newInstance();
StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new StreamResult(writer));
out = writer.toString();
writer.close();
reader.close();

My new problem is that I am using 7.0.5 in development and this code
(using a CXF webClient) works perfectly.
Collection leadids = webClient.accept(MediaType.APP
LICATION_JSON).getCollection(Integer.class);
List leadids_ = new ArrayList<>(leadids);

But when I deployed it to 7.0.3 it does not work.  Is there any way to
slurp some JSON formatted like this
[1,2,3,4]

I tried creating a wrapper like below but it didn't match
public class listWrapper {
 private List list;
 // ...
}





Re: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-17 Thread Matthew Broadhead
thanks Jean-Louis.  i tried excluding xalan maven artifact from the pom 
but then FOP doesn't work.  i might try to create a reproducer using 
tomee webapp archetype if possible


On 17/07/18 12:46, Jean-Louis Monteiro wrote:

This usually indicates you have the same class loaded into 2 different
classloaders which makes them different.
In this scenario, I would check if you don't have duplicate xalan jars in
tomee/lib and in the WEB-INF/lib of your application.

Hope it helps

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Tue, Jul 17, 2018 at 2:06 AM, Matthew Broadhead <
matthew.broadh...@nbmlaw.co.uk.invalid> wrote:


i have a couple of problems...

i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 due to
the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager

which occurs when i run the following code for Apache FOP
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = TransformerFactory.newInstance();
StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new StreamResult(writer));
out = writer.toString();
writer.close();
reader.close();

My new problem is that I am using 7.0.5 in development and this code
(using a CXF webClient) works perfectly.
Collection leadids = webClient.accept(MediaType.APP
LICATION_JSON).getCollection(Integer.class);
List leadids_ = new ArrayList<>(leadids);

But when I deployed it to 7.0.3 it does not work.  Is there any way to
slurp some JSON formatted like this
[1,2,3,4]

I tried creating a wrapper like below but it didn't match
public class listWrapper {
 private List list;
 // ...
}





java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager

2018-07-16 Thread Matthew Broadhead

i have a couple of problems...

i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 due 
to the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault 
cannot be cast to org.apache.xml.dtm.DTMManager


which occurs when i run the following code for Apache FOP
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = TransformerFactory.newInstance();
StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new StreamResult(writer));
out = writer.toString();
writer.close();
reader.close();

My new problem is that I am using 7.0.5 in development and this code 
(using a CXF webClient) works perfectly.
Collection leadids = 
webClient.accept(MediaType.APPLICATION_JSON).getCollection(Integer.class);

List leadids_ = new ArrayList<>(leadids);

But when I deployed it to 7.0.3 it does not work.  Is there any way to 
slurp some JSON formatted like this

[1,2,3,4]

I tried creating a wrapper like below but it didn't match
public class listWrapper {
    private List list;
    // ...
}


Re: java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

2018-07-10 Thread Matthew Broadhead

sorry i should have come back to you on this one.
turns out during testing i added the mysql connector to the pom as 
runtime.  using your advice i changed it to test scope and the problem 
has gone away.  error must have been because it was in tomee/lib and in 
the project pom


On 02/07/18 14:28, Romain Manni-Bucau wrote:

Would be interesting to have the full stack and probably some logs around
this issue. But sounds more related to the dev setup than anything which
can happen in prod.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le lun. 2 juil. 2018 à 13:34, Matthew Broadhead
 a écrit :


yes it normally happens after some code changes.
library is in tomee lib.  i am on 7.0.3

On 02/07/18 13:23, Romain Manni-Bucau wrote:

Hi

Does it happen after some redeployment?
Is mysql in tomee lib or the app lib folder?


Le lun. 2 juil. 2018 13:07, Matthew Broadhead
 a écrit :


recently i have been getting this exception during development.
restarting the container allows me to proceed.  i am worried it might
start happening in production.

java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
   at



com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)

   at
com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)
   at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
   at



sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

   at java.lang.reflect.Method.invoke(Method.java:498)
   at



org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)

   at



org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)

   at



org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)

   at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
   at



org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)





Re: Configuring data source using secured ports

2018-07-10 Thread Matthew Broadhead

https://stackoverflow.com/questions/16523595/specify-ssl-to-be-used-for-jdbc-in-context-xml

On 10/07/18 01:12, skrishnamk wrote:

We are running an application on TomEE v1.7. I've configured datasource
connection using non-secured ports on context.xml and it works fine. Now, we
have a need to change them to secured ports. I'm having trouble finding a
good way of doing that!! Has anyone in this forum done such configuration?
Please share steps or any information that can help me with this
configurations.

Thanks, Krishna.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html




Re: java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

2018-07-02 Thread Matthew Broadhead

yes it normally happens after some code changes.
library is in tomee lib.  i am on 7.0.3

On 02/07/18 13:23, Romain Manni-Bucau wrote:

Hi

Does it happen after some redeployment?
Is mysql in tomee lib or the app lib folder?


Le lun. 2 juil. 2018 13:07, Matthew Broadhead
 a écrit :


recently i have been getting this exception during development.
restarting the container allows me to proceed.  i am worried it might
start happening in production.

java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
  at

com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)
  at
com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)
  at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
  at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at

org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
  at

org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
  at

org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)
  at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
  at

org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)





java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

2018-07-02 Thread Matthew Broadhead
recently i have been getting this exception during development. 
restarting the container allows me to proceed.  i am worried it might 
start happening in production.


java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
    at 
com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)
    at 
com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)

    at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:498)
    at 
org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
    at 
org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
    at 
org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)

    at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
    at 
org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)


Re: tomee testing

2018-06-24 Thread Matthew Broadhead

if i comment out fetch then it works! hooray!
        Root quoteType = cq.from(QuoteType.class);
//        quoteType.fetch("quoteTypeCategories", JoinType.LEFT);

is there any way to make fetch work or do you think i have a mapping 
error somewhere?  i have never had any problems so far


On 24/06/18 13:58, Matthew Broadhead wrote:

i am loading the PU with a producer like
@ApplicationScoped
public class EntityManagerProducer {

    @PersistenceUnit(unitName = "sales")
    private EntityManagerFactory entityManagerFactory;

    @Produces
    @Default
    @RequestScoped
    public EntityManager create() {
        return this.entityManagerFactory.createEntityManager();
    }

    public void dispose(@Disposes @Default EntityManager entityManager) {
        if (entityManager.isOpen()) {
            entityManager.close();
        }
    }
}

On 24/06/18 13:46, Matthew Broadhead wrote:

i changed
@Descriptors(@Descriptor(name = "persistence.xml", path = 
META-INF/persistence.xml"))

to
@Descriptors(@Descriptor(name = "persistence.xml", path = 
"src/main/resources/META-INF/persistence.xml"))

and now it is loading the persistence.xml

i still get the same error.  if i turn logging up to TRACE i get the 
below.  is there any way to find the particular mapping might be 
causing the problem?


org.apache.openejb.OpenEJBException: Creating application failed: 
/home/matthew/git/case-management/sales/QuoteGeneratorTest: 
org.apache.openejb.OpenEJBRuntimeException: 
 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named 
factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See 
the nested exception for details.: fatal general error> 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named 
factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See 
the nested exception for details.
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1042)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:718)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:714)
    at 
org.apache.openejb.testing.ApplicationComposers.deployApp(ApplicationComposers.java:724)
    at 
org.apache.openejb.testing.ApplicationComposers.before(ApplicationComposers.java:386)
    at 
org.apache.openejb.testing.ApplicationComposers.evaluate(ApplicationComposers.java:1068)
    at 
org.apache.openejb.junit.DeployApplication.evaluate(DeployApplication.java:40)

    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Caused by: org.apache.openejb.OpenEJBException: 
org.apache.openejb.OpenEJBRuntimeException: 
 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named 
factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See 
the nested exception for details.: fatal general error> 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named 
factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See 
the nested exception for details.
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:873)

    ... 21 more
Caused by: org.apache.openejb.OpenEJBRuntimeException: 
 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named 
factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See 
the nested exception for details.
    at 
org.apa

Re: tomee testing

2018-06-24 Thread Matthew Broadhead

i am loading the PU with a producer like
@ApplicationScoped
public class EntityManagerProducer {

    @PersistenceUnit(unitName = "sales")
    private EntityManagerFactory entityManagerFactory;

    @Produces
    @Default
    @RequestScoped
    public EntityManager create() {
        return this.entityManagerFactory.createEntityManager();
    }

    public void dispose(@Disposes @Default EntityManager entityManager) {
        if (entityManager.isOpen()) {
            entityManager.close();
        }
    }
}

On 24/06/18 13:46, Matthew Broadhead wrote:

i changed
@Descriptors(@Descriptor(name = "persistence.xml", path = 
META-INF/persistence.xml"))

to
@Descriptors(@Descriptor(name = "persistence.xml", path = 
"src/main/resources/META-INF/persistence.xml"))

and now it is loading the persistence.xml

i still get the same error.  if i turn logging up to TRACE i get the 
below.  is there any way to find the particular mapping might be 
causing the problem?


org.apache.openejb.OpenEJBException: Creating application failed: 
/home/matthew/git/case-management/sales/QuoteGeneratorTest: 
org.apache.openejb.OpenEJBRuntimeException: 
 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named factory 
class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the 
nested exception for details.: general error> org.apache.openjpa.persistence.PersistenceException: 
There was an error when invoking the static newInstance method on the 
named factory class 
"org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested 
exception for details.
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1042)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:718)
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:714)
    at 
org.apache.openejb.testing.ApplicationComposers.deployApp(ApplicationComposers.java:724)
    at 
org.apache.openejb.testing.ApplicationComposers.before(ApplicationComposers.java:386)
    at 
org.apache.openejb.testing.ApplicationComposers.evaluate(ApplicationComposers.java:1068)
    at 
org.apache.openejb.junit.DeployApplication.evaluate(DeployApplication.java:40)

    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Caused by: org.apache.openejb.OpenEJBException: 
org.apache.openejb.OpenEJBRuntimeException: 
 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named factory 
class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the 
nested exception for details.: general error> org.apache.openjpa.persistence.PersistenceException: 
There was an error when invoking the static newInstance method on the 
named factory class 
"org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested 
exception for details.
    at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:873)

    ... 21 more
Caused by: org.apache.openejb.OpenEJBRuntimeException: 
 
org.apache.openjpa.persistence.PersistenceException: There was an 
error when invoking the static newInstance method on the named factory 
class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the 
nested exception for details.
    at 
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:136)
    at 
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.(ReloadableEntityManagerFactory.java:105)
    at 
org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:157)
   

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:191)
    at 
org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:63)
    at 
org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:109)
    at 
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:134)

    ... 24 more
Caused by: java.lang.IllegalStateException: On a thread without an 
initialized context nor a classloader mapping a deployed app
    at 
org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:287)
    at 
org.apache.openejb.cdi.ThreadSingletonServiceImpl.getContext(ThreadSingletonServiceImpl.java:263)
    at 
org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:298)
    at 
org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:60)
    at 
org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:51)
    at 
org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:185)
    at 
org.apache.webbeans.config.WebBeansContext.currentInstance(WebBeansContext.java:203)
    at 
org.apache.openejb.assembler.classic.EntityManagerFactoryCallable$BmHandler.findBm(EntityManagerFactoryCallable.java:170)
    at 
org.apache.openejb.assembler.classic.EntityManagerFactoryCallable$BmHandler.invoke(EntityManagerFactoryCallable.java:158)

    at com.sun.proxy.$Proxy38.toString(Unknown Source)
    at java.lang.String.valueOf(String.java:2994)
    at java.lang.StringBuilder.append(StringBuilder.java:131)
    at java.util.AbstractMap.toString(AbstractMap.java:559)
    at java.text.MessageFormat.subformat(MessageFormat.java:1280)
    at java.text.MessageFormat.format(MessageFormat.java:865)
    at java.text.Format.format(Format.java:157)
    at java.text.MessageFormat.format(MessageFormat.java:841)
    at 
org.apache.openjpa.lib.util.Localizer$Message.getMessage(Localizer.java:282)
    at 
org.apache.openjpa.lib.util.Localizer$Message.toString(Localizer.java:309)
    at 
org.apache.openjpa.lib.log.AbstractLog.toString(AbstractLog.java:138)

    at org.apache.openjpa.lib.log.AbstractLog.trace(AbstractLog.java:72)
    at org.apache.openjpa.lib.log.AbstractLog.trace(AbstractLog.java:67)
    at 
org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationProviderImpl.setInto(PersistenceProductDerivation.java:764)
    at 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newInstance(JDBCBrokerFactory.java:60)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:498)
    at 
org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java:131)
    at 
org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:65)

    ... 29 more

On 24/06/18 13:02, Romain Manni-Bucau wrote:

mapping error in your model it seems or bad persistence unit definition if
you dont use scanning.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le dim. 24 juin 2018 à 12:52, Matthew Broadhead
 a écrit :


thanks.  removing the @Jars helped.  it is now injecting CDI bean fine.
but now i get OpenJPA NPE on
List quoteTypeList = query.getResultList();


org.apache.openjpa.persistence.PersistenceException: null
  at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1029)
  at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:928)
  at

org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1032)
  at
org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)
  at

org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2382)
  at
org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:274)
  at

org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:59)
  at

org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.getResultObject(QueryImpl.java:2080)
  at
org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:35)
  at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1257)
  at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1013)
  at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:869)
  at org.apache.openjpa.k

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
means "grab the jars
matching this prefix and scan them to include them in the deployed app".

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le dim. 24 juin 2018 à 12:15, Matthew Broadhead
 a écrit :


i tried adding test scope to pom.xml

  mysql
mysql-connector-java
${mysql.connector.version}
  test
  

also added mysql-connector-java-5.1.33.jar to the root of
src/test/resources but i still get
java.lang.IllegalArgumentException: mysql not found in classpath
  at

org.apache.openejb.testing.ApplicationComposers.findFiles(ApplicationComposers.java:1020)
  at

org.apache.openejb.testing.ApplicationComposers.addWebApp(ApplicationComposers.java:899)
  at

org.apache.openejb.testing.ApplicationComposers.deployApp(ApplicationComposers.java:651)


On 24/06/18 12:01, Romain Manni-Bucau wrote:

Appcopposer loads classes in the classpath so add it as a test

dependency.

Le dim. 24 juin 2018 11:37, Matthew Broadhead
 a écrit :


not much luck with arquillian.  i am trying ApplicationComposer again.
now i understand the properties format
@ContainerProperties({ @ContainerProperties.Property(name = "sales",
value = "new://Resource?type=DataSource"),
   @ContainerProperties.Property(name = "sales.JdbcDriver", value
= "com.mysql.jdbc.Driver"),
   @ContainerProperties.Property(name = "sales.JdbcUrl", value =
"jdbc:mysql://localhost:3306/sales"),
   @ContainerProperties.Property(name = "sales.Username", value =
"admin"),
   @ContainerProperties.Property(name = "sales.Password", value =
"blahblah") })

but now i get
org.apache.xbean.propertyeditor.PropertyEditorException: Unable to
resolve class com.mysql.jdbc.Driver
   at



org.apache.xbean.propertyeditor.ClassEditor.toObjectImpl(ClassEditor.java:43)

   at



org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)

how to bundle the mysql driver?  i tried
@Jars("mysql")

On 23/06/18 21:58, Romain Manni-Bucau wrote:

You need all your tested app needs (this is why classpath deploypent
solutions are easier to maintain).

Maybe import our ziplock lib and use Mvn.Builder class if you are maven
based. It can help.

Le sam. 23 juin 2018 20:09, Matthew Broadhead
 a écrit :


ah ok.  i found
.addAsManifestResource(new

ClassLoaderAsset("META-INF/persistence.xml"),

"persistence.xml")

in



http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/arquillian-jpa/src/test/java/org/superbiz/arquillian/test/persistence/PersistenceTest.java

but now i am back to
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API


Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]

at


org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)

so i must have missed a required class somewhere

On 23/06/18 18:53, Matthew Broadhead wrote:

do i need to copy the persistence.xml to src/test/resources/META-INF?
or can i specify its location somewhere in config?

SEVERE - FAIL ... sales:Missing required persistence.xml for
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid EjbModule(name=sales,


path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)

SEVERE - FAIL ... sales:Missing required persistence.xml for
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid WebModule(name=sales,


path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)

INFO - Set the 'openejb.validation.output.level' system property to
VERBOSE for increased validation details.
SEVERE - Unable to deploy collapsed ear in war


StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sales]

org.apache.openejb.config.ValidationFailedException: Module failed
validation. AppModule(name=sales)
   at


org.apache.openejb.config.ReportValidationResults.deploy(ReportValidationResults.java:88)

   at


org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:322)

On 23/06/18 13:30, Romain Manni-Bucau wrote:


Re: tomee testing

2018-06-24 Thread Matthew Broadhead

i tried adding test scope to pom.xml

            mysql
mysql-connector-java
${mysql.connector.version}
            test
        

also added mysql-connector-java-5.1.33.jar to the root of 
src/test/resources but i still get

java.lang.IllegalArgumentException: mysql not found in classpath
    at 
org.apache.openejb.testing.ApplicationComposers.findFiles(ApplicationComposers.java:1020)
    at 
org.apache.openejb.testing.ApplicationComposers.addWebApp(ApplicationComposers.java:899)
    at 
org.apache.openejb.testing.ApplicationComposers.deployApp(ApplicationComposers.java:651)



On 24/06/18 12:01, Romain Manni-Bucau wrote:

Appcopposer loads classes in the classpath so add it as a test dependency.

Le dim. 24 juin 2018 11:37, Matthew Broadhead
 a écrit :


not much luck with arquillian.  i am trying ApplicationComposer again.
now i understand the properties format
@ContainerProperties({ @ContainerProperties.Property(name = "sales",
value = "new://Resource?type=DataSource"),
  @ContainerProperties.Property(name = "sales.JdbcDriver", value
= "com.mysql.jdbc.Driver"),
  @ContainerProperties.Property(name = "sales.JdbcUrl", value =
"jdbc:mysql://localhost:3306/sales"),
  @ContainerProperties.Property(name = "sales.Username", value =
"admin"),
  @ContainerProperties.Property(name = "sales.Password", value =
"blahblah") })

but now i get
org.apache.xbean.propertyeditor.PropertyEditorException: Unable to
resolve class com.mysql.jdbc.Driver
  at

org.apache.xbean.propertyeditor.ClassEditor.toObjectImpl(ClassEditor.java:43)
  at

org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)

how to bundle the mysql driver?  i tried
@Jars("mysql")

On 23/06/18 21:58, Romain Manni-Bucau wrote:

You need all your tested app needs (this is why classpath deploypent
solutions are easier to maintain).

Maybe import our ziplock lib and use Mvn.Builder class if you are maven
based. It can help.

Le sam. 23 juin 2018 20:09, Matthew Broadhead
 a écrit :


ah ok.  i found
.addAsManifestResource(new ClassLoaderAsset("META-INF/persistence.xml"),
"persistence.xml")

in



http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/arquillian-jpa/src/test/java/org/superbiz/arquillian/test/persistence/PersistenceTest.java

but now i am back to
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API


Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]

   at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)

so i must have missed a required class somewhere

On 23/06/18 18:53, Matthew Broadhead wrote:

do i need to copy the persistence.xml to src/test/resources/META-INF?
or can i specify its location somewhere in config?

SEVERE - FAIL ... sales:Missing required persistence.xml for
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid EjbModule(name=sales,


path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)

SEVERE - FAIL ... sales:Missing required persistence.xml for
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid WebModule(name=sales,


path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)

INFO - Set the 'openejb.validation.output.level' system property to
VERBOSE for increased validation details.
SEVERE - Unable to deploy collapsed ear in war


StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sales]

org.apache.openejb.config.ValidationFailedException: Module failed
validation. AppModule(name=sales)
  at


org.apache.openejb.config.ReportValidationResults.deploy(ReportValidationResults.java:88)

  at
org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:322)

On 23/06/18 13:30, Romain Manni-Bucau wrote:

You can but you need to add all the object graph in the archive. Here
you
miss an injection it seems (in your dao?).

Side note: operatesondeployment and naming your archive is not needed
here.
It is useful when you deploy N > 1 archives.

Le sam. 23 juin 2018 12:54, Matthew Broadhead
 a écrit :


i got the sample configuration from
http://tomee.apache.org/developer/testing/arquillian/index.html

under

remote section.

now my problem is that i can't inject the CDI bean
SEVERE - CDI Beans module deployment failed
org.apache.webbe

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
not much luck with arquillian.  i am trying ApplicationComposer again.  
now i understand the properties format
@ContainerProperties({ @ContainerProperties.Property(name = "sales", 
value = "new://Resource?type=DataSource"),
        @ContainerProperties.Property(name = "sales.JdbcDriver", value 
= "com.mysql.jdbc.Driver"),
        @ContainerProperties.Property(name = "sales.JdbcUrl", value = 
"jdbc:mysql://localhost:3306/sales"),
        @ContainerProperties.Property(name = "sales.Username", value = 
"admin"),
        @ContainerProperties.Property(name = "sales.Password", value = 
"blahblah") })


but now i get
org.apache.xbean.propertyeditor.PropertyEditorException: Unable to 
resolve class com.mysql.jdbc.Driver
    at 
org.apache.xbean.propertyeditor.ClassEditor.toObjectImpl(ClassEditor.java:43)
    at 
org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)


how to bundle the mysql driver?  i tried
@Jars("mysql")

On 23/06/18 21:58, Romain Manni-Bucau wrote:

You need all your tested app needs (this is why classpath deploypent
solutions are easier to maintain).

Maybe import our ziplock lib and use Mvn.Builder class if you are maven
based. It can help.

Le sam. 23 juin 2018 20:09, Matthew Broadhead
 a écrit :


ah ok.  i found
.addAsManifestResource(new ClassLoaderAsset("META-INF/persistence.xml"),
"persistence.xml")

in

http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/arquillian-jpa/src/test/java/org/superbiz/arquillian/test/persistence/PersistenceTest.java

but now i am back to
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API
Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
  at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)

so i must have missed a required class somewhere

On 23/06/18 18:53, Matthew Broadhead wrote:

do i need to copy the persistence.xml to src/test/resources/META-INF?
or can i specify its location somewhere in config?

SEVERE - FAIL ... sales:Missing required persistence.xml for
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid EjbModule(name=sales,
path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)
SEVERE - FAIL ... sales:Missing required persistence.xml for
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid WebModule(name=sales,
path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)
INFO - Set the 'openejb.validation.output.level' system property to
VERBOSE for increased validation details.
SEVERE - Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sales]
org.apache.openejb.config.ValidationFailedException: Module failed
validation. AppModule(name=sales)
 at


org.apache.openejb.config.ReportValidationResults.deploy(ReportValidationResults.java:88)

 at
org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:322)

On 23/06/18 13:30, Romain Manni-Bucau wrote:

You can but you need to add all the object graph in the archive. Here
you
miss an injection it seems (in your dao?).

Side note: operatesondeployment and naming your archive is not needed
here.
It is useful when you deploy N > 1 archives.

Le sam. 23 juin 2018 12:54, Matthew Broadhead
 a écrit :


i got the sample configuration from
http://tomee.apache.org/developer/testing/arquillian/index.html under
remote section.

now my problem is that i can't inject the CDI bean
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API


Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object],



Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]

   at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
   at



org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)



i created the @Deployment using
@Inject
   private QuoteTypeDao quoteTypeDao;

  

Re: tomee testing

2018-06-23 Thread Matthew Broadhead

ah ok.  i found
.addAsManifestResource(new ClassLoaderAsset("META-INF/persistence.xml"), 
"persistence.xml")


in
http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/arquillian-jpa/src/test/java/org/superbiz/arquillian/test/persistence/PersistenceTest.java

but now i am back to
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException: 
javax.enterprise.inject.UnsatisfiedResolutionException: Api type 
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers

Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao, 
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE, 
Name:null, API 
Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object], 
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
    at 
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)


so i must have missed a required class somewhere

On 23/06/18 18:53, Matthew Broadhead wrote:
do i need to copy the persistence.xml to src/test/resources/META-INF? 
or can i specify its location somewhere in config?


SEVERE - FAIL ... sales:    Missing required persistence.xml for 
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid EjbModule(name=sales, 
path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)
SEVERE - FAIL ... sales:    Missing required persistence.xml for 
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid WebModule(name=sales, 
path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)
INFO - Set the 'openejb.validation.output.level' system property to 
VERBOSE for increased validation details.
SEVERE - Unable to deploy collapsed ear in war 
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sales]
org.apache.openejb.config.ValidationFailedException: Module failed 
validation. AppModule(name=sales)
    at 
org.apache.openejb.config.ReportValidationResults.deploy(ReportValidationResults.java:88)
    at 
org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:322)


On 23/06/18 13:30, Romain Manni-Bucau wrote:
You can but you need to add all the object graph in the archive. Here 
you

miss an injection it seems (in your dao?).

Side note: operatesondeployment and naming your archive is not needed 
here.

It is useful when you deploy N > 1 archives.

Le sam. 23 juin 2018 12:54, Matthew Broadhead
 a écrit :


i got the sample configuration from
http://tomee.apache.org/developer/testing/arquillian/index.html under
remote section.

now my problem is that i can't inject the CDI bean
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API
Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object], 

Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]] 


  at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
  at

org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196) 



i created the @Deployment using
@Inject
  private QuoteTypeDao quoteTypeDao;

  @Deployment(name = "archive")
  public static WebArchive war() {
  return ShrinkWrap.create(WebArchive.class,
"test.war").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
  .addClasses(QuoteTypeDao.class);
  }

  @Test
  @OperateOnDeployment("archive")
  public void test1() {
  Quote quote = new Quote();
  Promotion promotion = null;
  List quoteTypeList =
quoteTypeDao.selectQuoteTypes(promotion, true);
  System.out.println("Quote type list size: " +
quoteTypeList.size());
  for (QuoteType quoteType : quoteTypeList) {
  System.out.println(quoteType.getName());
  // quoteGeneratorDao.generateQuote(quote, promotion,
  // quoteType.getQuoteTypeCategories(), quoteQuestions,
  // quoteInit, true);
  assertEquals(0, 1);
  }
  assertEquals(0, 1);
  }

can i not inject a CDI bean into the test using 
arquillian-tomee-remote?


On 23/06/18 10:17, Romain Manni-Bucau wrote:

It is not needed at all bit it appears in your stack. If it is a copy

paste

just drop it ;)

Le sam. 23 juin 2018 10:05, Matthew Broadhead
 a écrit :


hi, i checked http://incubator.apache.org/projects/sirona.html but i
couldn't find any documentation.  is sirona a r

Re: tomee testing

2018-06-23 Thread Matthew Broadhead
do i need to copy the persistence.xml to src/test/resources/META-INF?  
or can i specify its location somewhere in config?


SEVERE - FAIL ... sales:    Missing required persistence.xml for 
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid EjbModule(name=sales, 
path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)
SEVERE - FAIL ... sales:    Missing required persistence.xml for 
@PersistenceUnit ref "entityManagerFactory" to unit "sales"
SEVERE - Invalid WebModule(name=sales, 
path=/home/matthew/git/case-management/sales/target/working-dir/0/sales)
INFO - Set the 'openejb.validation.output.level' system property to 
VERBOSE for increased validation details.
SEVERE - Unable to deploy collapsed ear in war 
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sales]
org.apache.openejb.config.ValidationFailedException: Module failed 
validation. AppModule(name=sales)
    at 
org.apache.openejb.config.ReportValidationResults.deploy(ReportValidationResults.java:88)
    at 
org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:322)


On 23/06/18 13:30, Romain Manni-Bucau wrote:

You can but you need to add all the object graph in the archive. Here you
miss an injection it seems (in your dao?).

Side note: operatesondeployment and naming your archive is not needed here.
It is useful when you deploy N > 1 archives.

Le sam. 23 juin 2018 12:54, Matthew Broadhead
 a écrit :


i got the sample configuration from
http://tomee.apache.org/developer/testing/arquillian/index.html under
remote section.

now my problem is that i can't inject the CDI bean
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API
Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
  at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
  at

org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)

i created the @Deployment using
@Inject
  private QuoteTypeDao quoteTypeDao;

  @Deployment(name = "archive")
  public static WebArchive war() {
  return ShrinkWrap.create(WebArchive.class,
"test.war").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
  .addClasses(QuoteTypeDao.class);
  }

  @Test
  @OperateOnDeployment("archive")
  public void test1() {
  Quote quote = new Quote();
  Promotion promotion = null;
  List quoteTypeList =
quoteTypeDao.selectQuoteTypes(promotion, true);
  System.out.println("Quote type list size: " +
quoteTypeList.size());
  for (QuoteType quoteType : quoteTypeList) {
  System.out.println(quoteType.getName());
  // quoteGeneratorDao.generateQuote(quote, promotion,
  // quoteType.getQuoteTypeCategories(), quoteQuestions,
  // quoteInit, true);
  assertEquals(0, 1);
  }
  assertEquals(0, 1);
  }

can i not inject a CDI bean into the test using arquillian-tomee-remote?

On 23/06/18 10:17, Romain Manni-Bucau wrote:

It is not needed at all bit it appears in your stack. If it is a copy

paste

just drop it ;)

Le sam. 23 juin 2018 10:05, Matthew Broadhead
 a écrit :


hi, i checked http://incubator.apache.org/projects/sirona.html but i
couldn't find any documentation.  is sirona a requirement for
arquillian-tomee-remote?  i.e. is it necessary to monitor tests? if so,
then how do i exclude the mysql lib from the configuration?


mvn:org.apache.sirona:sirona-javaagent:0.2-incubating:jar:shaded


On 23/06/18 08:15, Romain Manni-Bucau wrote:

Exclude mysql from sirona instrumentation. Its bytecode is not safe.

Le sam. 23 juin 2018 01:03, Matthew Broadhead
 a écrit :


thanks i added it using
mvn:mysql:mysql-connector-java:5.1.33

but i get these errors (which don't seem to stop execution)

fail to transform

class:com/mysql/jdbc/AbandonedConnectionCleanupThread,

JSR/RET are not supported with computeFrames
optionjava.lang.RuntimeException: JSR/RET are not supported with
computeFrames option
at org.apache.sirona.asm.Frame.a(Unknown Source)
at org.apache.sirona.asm.MethodWriter.visitJumpInsn(Unknown

Source)

SEVERE - Can't create DataSource
java.lang.LinkageError: loader (instance of java/net/URLClassLoader):
attempted  duplicate class definition for name:
"com/mysql/jdbc/ConnectionImpl&qu

Re: tomee testing

2018-06-23 Thread Matthew Broadhead
i got the sample configuration from 
http://tomee.apache.org/developer/testing/arquillian/index.html under 
remote section.


now my problem is that i can't inject the CDI bean
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException: 
javax.enterprise.inject.UnsatisfiedResolutionException: Api type 
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers

Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao, 
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE, 
Name:null, API 
Types:[uk.me.kissy.sales.test.QuoteGeneratorArquillian,java.lang.Object], 
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
    at 
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
    at 
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)


i created the @Deployment using
@Inject
    private QuoteTypeDao quoteTypeDao;

    @Deployment(name = "archive")
    public static WebArchive war() {
        return ShrinkWrap.create(WebArchive.class, 
"test.war").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")

                .addClasses(QuoteTypeDao.class);
    }

    @Test
    @OperateOnDeployment("archive")
    public void test1() {
        Quote quote = new Quote();
        Promotion promotion = null;
        List quoteTypeList = 
quoteTypeDao.selectQuoteTypes(promotion, true);
        System.out.println("Quote type list size: " + 
quoteTypeList.size());

        for (QuoteType quoteType : quoteTypeList) {
            System.out.println(quoteType.getName());
            // quoteGeneratorDao.generateQuote(quote, promotion,
            // quoteType.getQuoteTypeCategories(), quoteQuestions,
            // quoteInit, true);
            assertEquals(0, 1);
        }
        assertEquals(0, 1);
    }

can i not inject a CDI bean into the test using arquillian-tomee-remote?

On 23/06/18 10:17, Romain Manni-Bucau wrote:

It is not needed at all bit it appears in your stack. If it is a copy paste
just drop it ;)

Le sam. 23 juin 2018 10:05, Matthew Broadhead
 a écrit :


hi, i checked http://incubator.apache.org/projects/sirona.html but i
couldn't find any documentation.  is sirona a requirement for
arquillian-tomee-remote?  i.e. is it necessary to monitor tests? if so,
then how do i exclude the mysql lib from the configuration?


mvn:org.apache.sirona:sirona-javaagent:0.2-incubating:jar:shaded


On 23/06/18 08:15, Romain Manni-Bucau wrote:

Exclude mysql from sirona instrumentation. Its bytecode is not safe.

Le sam. 23 juin 2018 01:03, Matthew Broadhead
 a écrit :


thanks i added it using
mvn:mysql:mysql-connector-java:5.1.33

but i get these errors (which don't seem to stop execution)

fail to transform class:com/mysql/jdbc/AbandonedConnectionCleanupThread,
JSR/RET are not supported with computeFrames
optionjava.lang.RuntimeException: JSR/RET are not supported with
computeFrames option
   at org.apache.sirona.asm.Frame.a(Unknown Source)
   at org.apache.sirona.asm.MethodWriter.visitJumpInsn(Unknown

Source)

SEVERE - Can't create DataSource
java.lang.LinkageError: loader (instance of java/net/URLClassLoader):
attempted  duplicate class definition for name:
"com/mysql/jdbc/ConnectionImpl"

but this one is a stopper

SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API
Types:[java.lang.Object,uk.me

.kissy.sales.test.QuoteGeneratorArquillian],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]

i tried enabling remote support as i am trying remote not embedded
tomee.remote.support = true
# tomee.serialization.class.blacklist = *
tomee.serialization.class.whitelist = *

On 22/06/18 18:44, Romain Manni-Bucau wrote:

You can add it in libs property of arquillian container config. Just

prefix

the coords with mvn:.

Ex: mvn:mysql:mysql-connector-jav:version

It is a multiline property so you can add N libs to tomee lib this way

Le ven. 22 juin 2018 18:13, Matthew Broadhead
 a écrit :


INFO: Downloading org.apache.tomee:apache-tomee:7.0.3:zip:plus please
wait...

i have an arquillian test running up ok but it is complaining
SEVERE - FATAL ERROR: Unknown error in Assembler.  Please send the
following stack trace and this message to users@tomee.apache.org :
 org.apache.xbean.propertyeditor.PropertyEditorException: Unable to
resolve class com.mysql.jdbc.Driver

is there any way to directly bring in the mysql driver from maven
central?  or do 

Re: tomee testing

2018-06-23 Thread Matthew Broadhead
hi, i checked http://incubator.apache.org/projects/sirona.html but i 
couldn't find any documentation.  is sirona a requirement for 
arquillian-tomee-remote?  i.e. is it necessary to monitor tests? if so, 
then how do i exclude the mysql lib from the configuration?



mvn:org.apache.sirona:sirona-javaagent:0.2-incubating:jar:shaded


On 23/06/18 08:15, Romain Manni-Bucau wrote:

Exclude mysql from sirona instrumentation. Its bytecode is not safe.

Le sam. 23 juin 2018 01:03, Matthew Broadhead
 a écrit :


thanks i added it using
mvn:mysql:mysql-connector-java:5.1.33

but i get these errors (which don't seem to stop execution)

fail to transform class:com/mysql/jdbc/AbandonedConnectionCleanupThread,
JSR/RET are not supported with computeFrames
optionjava.lang.RuntimeException: JSR/RET are not supported with
computeFrames option
  at org.apache.sirona.asm.Frame.a(Unknown Source)
  at org.apache.sirona.asm.MethodWriter.visitJumpInsn(Unknown Source)

SEVERE - Can't create DataSource
java.lang.LinkageError: loader (instance of java/net/URLClassLoader):
attempted  duplicate class definition for name:
"com/mysql/jdbc/ConnectionImpl"

but this one is a stopper

SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao,
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE,
Name:null, API
Types:[java.lang.Object,uk.me.kissy.sales.test.QuoteGeneratorArquillian],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]

i tried enabling remote support as i am trying remote not embedded
tomee.remote.support = true
# tomee.serialization.class.blacklist = *
tomee.serialization.class.whitelist = *

On 22/06/18 18:44, Romain Manni-Bucau wrote:

You can add it in libs property of arquillian container config. Just

prefix

the coords with mvn:.

Ex: mvn:mysql:mysql-connector-jav:version

It is a multiline property so you can add N libs to tomee lib this way

Le ven. 22 juin 2018 18:13, Matthew Broadhead
 a écrit :


INFO: Downloading org.apache.tomee:apache-tomee:7.0.3:zip:plus please
wait...

i have an arquillian test running up ok but it is complaining
SEVERE - FATAL ERROR: Unknown error in Assembler.  Please send the
following stack trace and this message to users@tomee.apache.org :
org.apache.xbean.propertyeditor.PropertyEditorException: Unable to
resolve class com.mysql.jdbc.Driver

is there any way to directly bring in the mysql driver from maven
central?  or do i need to download manually and put it into
src/test/tomee/lib?


On 22/06/18 10:03, Romain Manni-Bucau wrote:

You can theorically but I'd recommand you to write it in the final

module

instead of trying to use the parent which will be executed before any

other

modules.

If A depends on B which depends on C then write your tests in A for the
complete app tests and write unit tests in B and C (potentially using
arquillian, appcomposer or even other solutions).

For reference:
http://tomee.apache.org/developer/testing/arquillian/index.html and
http://tomee.apache.org/developer/testing/index.html

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <

https://github.com/rmannibucau> |

LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<

https://www.packtpub.com/application-development/java-ee-8-high-performance


Le ven. 22 juin 2018 à 09:42, Matthew Broadhead
 a écrit :


it sounds like Arquillian might be the best fit in my case.  can the
tests inject CDI beans from the webapps or does everything need to be
done through http?  looking at
https://tomee.apache.org/refcard/refcard.html "Simple Arquilian Test"

it

looks as if beans can be injected...

is it possible to create the tests (or at least TomEE instance) in a
parent pom?  i need to run several webapps at once which are all

modules

of the parent.  i think code is discouraged in parent project.


On 22/06/18 09:18, Romain Manni-Bucau wrote:

You can set the property openejb.location (or the other ones we have)

to

point to an openejb.xml if you want. The advantage of the properties

is

that it is filtered during the test and doesnt require a maven build

but

it

is up to you and depends the project setup.

Arquillian is great to test complete application*s* in a real server,
ApplicationComposer is good to test small parts of applications or
frameworks, TomEE,
TomEEEmbeddedSingleRunner is great to test a real app (single

deployment

from the classpath + single test setup) and will save a lot of time.

Romain Manni-Bucau
@rmannibucau <https://twitter.c

Re: tomee testing

2018-06-22 Thread Matthew Broadhead

thanks i added it using
name="additionalLibs">mvn:mysql:mysql-connector-java:5.1.33


but i get these errors (which don't seem to stop execution)

fail to transform class:com/mysql/jdbc/AbandonedConnectionCleanupThread, 
JSR/RET are not supported with computeFrames 
optionjava.lang.RuntimeException: JSR/RET are not supported with 
computeFrames option

    at org.apache.sirona.asm.Frame.a(Unknown Source)
    at org.apache.sirona.asm.MethodWriter.visitJumpInsn(Unknown Source)

SEVERE - Can't create DataSource
java.lang.LinkageError: loader (instance of java/net/URLClassLoader): 
attempted  duplicate class definition for name: 
"com/mysql/jdbc/ConnectionImpl"


but this one is a stopper

SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException: 
javax.enterprise.inject.UnsatisfiedResolutionException: Api type 
[uk.me.kissy.sales.dao.QuoteTypeDao] is not found with the qualifiers

Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name : quoteTypeDao, 
Bean Owner : [QuoteGeneratorArquillian, WebBeansType:ENTERPRISE, 
Name:null, API 
Types:[java.lang.Object,uk.me.kissy.sales.test.QuoteGeneratorArquillian], 
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]


i tried enabling remote support as i am trying remote not embedded
tomee.remote.support = true
# tomee.serialization.class.blacklist = *
tomee.serialization.class.whitelist = *

On 22/06/18 18:44, Romain Manni-Bucau wrote:

You can add it in libs property of arquillian container config. Just prefix
the coords with mvn:.

Ex: mvn:mysql:mysql-connector-jav:version

It is a multiline property so you can add N libs to tomee lib this way

Le ven. 22 juin 2018 18:13, Matthew Broadhead
 a écrit :


INFO: Downloading org.apache.tomee:apache-tomee:7.0.3:zip:plus please
wait...

i have an arquillian test running up ok but it is complaining
SEVERE - FATAL ERROR: Unknown error in Assembler.  Please send the
following stack trace and this message to users@tomee.apache.org :
   org.apache.xbean.propertyeditor.PropertyEditorException: Unable to
resolve class com.mysql.jdbc.Driver

is there any way to directly bring in the mysql driver from maven
central?  or do i need to download manually and put it into
src/test/tomee/lib?


On 22/06/18 10:03, Romain Manni-Bucau wrote:

You can theorically but I'd recommand you to write it in the final module
instead of trying to use the parent which will be executed before any

other

modules.

If A depends on B which depends on C then write your tests in A for the
complete app tests and write unit tests in B and C (potentially using
arquillian, appcomposer or even other solutions).

For reference:
http://tomee.apache.org/developer/testing/arquillian/index.html and
http://tomee.apache.org/developer/testing/index.html

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <

https://github.com/rmannibucau> |

LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<

https://www.packtpub.com/application-development/java-ee-8-high-performance



Le ven. 22 juin 2018 à 09:42, Matthew Broadhead
 a écrit :


it sounds like Arquillian might be the best fit in my case.  can the
tests inject CDI beans from the webapps or does everything need to be
done through http?  looking at
https://tomee.apache.org/refcard/refcard.html "Simple Arquilian Test"

it

looks as if beans can be injected...

is it possible to create the tests (or at least TomEE instance) in a
parent pom?  i need to run several webapps at once which are all modules
of the parent.  i think code is discouraged in parent project.


On 22/06/18 09:18, Romain Manni-Bucau wrote:

You can set the property openejb.location (or the other ones we have)

to

point to an openejb.xml if you want. The advantage of the properties is
that it is filtered during the test and doesnt require a maven build

but

it

is up to you and depends the project setup.

Arquillian is great to test complete application*s* in a real server,
ApplicationComposer is good to test small parts of applications or
frameworks, TomEE,
TomEEEmbeddedSingleRunner is great to test a real app (single

deployment

from the classpath + single test setup) and will save a lot of time.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <

https://github.com/rmannibucau> |

LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<

https://www.packtpub.com/application-development/java-ee-8-high-performance


Le ven. 22 juin 2018 à 09:03, Matthew Broadhead
 a écrit :


i am trying to use ApplicationComposer to create some tests.  CDI is
scanning the classes correctly but i am a lit

Re: tomee testing

2018-06-22 Thread Matthew Broadhead
INFO: Downloading org.apache.tomee:apache-tomee:7.0.3:zip:plus please 
wait...


i have an arquillian test running up ok but it is complaining
SEVERE - FATAL ERROR: Unknown error in Assembler.  Please send the 
following stack trace and this message to users@tomee.apache.org :
 org.apache.xbean.propertyeditor.PropertyEditorException: Unable to 
resolve class com.mysql.jdbc.Driver


is there any way to directly bring in the mysql driver from maven 
central?  or do i need to download manually and put it into 
src/test/tomee/lib?



On 22/06/18 10:03, Romain Manni-Bucau wrote:

You can theorically but I'd recommand you to write it in the final module
instead of trying to use the parent which will be executed before any other
modules.

If A depends on B which depends on C then write your tests in A for the
complete app tests and write unit tests in B and C (potentially using
arquillian, appcomposer or even other solutions).

For reference:
http://tomee.apache.org/developer/testing/arquillian/index.html and
http://tomee.apache.org/developer/testing/index.html

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 22 juin 2018 à 09:42, Matthew Broadhead
 a écrit :


it sounds like Arquillian might be the best fit in my case.  can the
tests inject CDI beans from the webapps or does everything need to be
done through http?  looking at
https://tomee.apache.org/refcard/refcard.html "Simple Arquilian Test" it
looks as if beans can be injected...

is it possible to create the tests (or at least TomEE instance) in a
parent pom?  i need to run several webapps at once which are all modules
of the parent.  i think code is discouraged in parent project.


On 22/06/18 09:18, Romain Manni-Bucau wrote:

You can set the property openejb.location (or the other ones we have) to
point to an openejb.xml if you want. The advantage of the properties is
that it is filtered during the test and doesnt require a maven build but

it

is up to you and depends the project setup.

Arquillian is great to test complete application*s* in a real server,
ApplicationComposer is good to test small parts of applications or
frameworks, TomEE,
TomEEEmbeddedSingleRunner is great to test a real app (single deployment
from the classpath + single test setup) and will save a lot of time.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <

https://github.com/rmannibucau> |

LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<

https://www.packtpub.com/application-development/java-ee-8-high-performance



Le ven. 22 juin 2018 à 09:03, Matthew Broadhead
 a écrit :


i am trying to use ApplicationComposer to create some tests.  CDI is
scanning the classes correctly but i am a little uncertain about how to
load a test database.

i was going to start by just loading the database as normal as it is a
copy of production database.  but how do i specify the username and
password or any other properties that are needed to connect to the db?

@ContainerProperties(@ContainerProperties.Property(name = "mydb", value
= "jdbc:mysql://localhost:3306/mydb"))

is there a way to specify the resource in an xml file?

another question...is it better to start with Arquillian or
ApplicationComposer?







Re: tomee testing

2018-06-22 Thread Matthew Broadhead
it sounds like Arquillian might be the best fit in my case.  can the 
tests inject CDI beans from the webapps or does everything need to be 
done through http?  looking at 
https://tomee.apache.org/refcard/refcard.html "Simple Arquilian Test" it 
looks as if beans can be injected...


is it possible to create the tests (or at least TomEE instance) in a 
parent pom?  i need to run several webapps at once which are all modules 
of the parent.  i think code is discouraged in parent project.



On 22/06/18 09:18, Romain Manni-Bucau wrote:

You can set the property openejb.location (or the other ones we have) to
point to an openejb.xml if you want. The advantage of the properties is
that it is filtered during the test and doesnt require a maven build but it
is up to you and depends the project setup.

Arquillian is great to test complete application*s* in a real server,
ApplicationComposer is good to test small parts of applications or
frameworks, TomEE,
TomEEEmbeddedSingleRunner is great to test a real app (single deployment
from the classpath + single test setup) and will save a lot of time.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 22 juin 2018 à 09:03, Matthew Broadhead
 a écrit :


i am trying to use ApplicationComposer to create some tests.  CDI is
scanning the classes correctly but i am a little uncertain about how to
load a test database.

i was going to start by just loading the database as normal as it is a
copy of production database.  but how do i specify the username and
password or any other properties that are needed to connect to the db?

@ContainerProperties(@ContainerProperties.Property(name = "mydb", value
= "jdbc:mysql://localhost:3306/mydb"))

is there a way to specify the resource in an xml file?

another question...is it better to start with Arquillian or
ApplicationComposer?





tomee testing

2018-06-22 Thread Matthew Broadhead
i am trying to use ApplicationComposer to create some tests.  CDI is 
scanning the classes correctly but i am a little uncertain about how to 
load a test database.


i was going to start by just loading the database as normal as it is a 
copy of production database.  but how do i specify the username and 
password or any other properties that are needed to connect to the db?


@ContainerProperties(@ContainerProperties.Property(name = "mydb", value 
= "jdbc:mysql://localhost:3306/mydb"))


is there a way to specify the resource in an xml file?

another question...is it better to start with Arquillian or 
ApplicationComposer?


Re: Interceptors discovery

2018-06-13 Thread Matthew Broadhead
sorry i am not too sure about interceptors.  also there are a lot of 
conferences at the moment so the main people that can help you are 
probably busy for a few days.  i am sure you will get an answer when 
they return


On 12/06/18 08:45, vranac wrote:

Did I asked difficult questions or what? I think few of them could be answer
just with yes/no.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html




GraalVM

2018-06-10 Thread Matthew Broadhead
out of interest has anyone tried to create a native image of TomEE using 
GraalVM?


Re: Basic EJB sample not working if I don't start package name with "org"

2018-05-24 Thread Matthew Broadhead

did you clean your tomee?


On 24/05/18 18:24, Sudhakar Vankamamidi wrote:

  Hi,

I am trying EJB basic sample given here
http://openejb.apache.org/hello-world.html
only difference is I have changed EJB package structure to not to start
with "org". Now after deployment tomEE is not recognizing the class as EJB
and I don't see following log

03-Oct-2017 15:56:51.945 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.openejb.assembler.classic.JndiBuilder.bind
Jndi(name=HelloBeanRemote) --> Ejb(deployment-id=HelloBean)
03-Oct-2017 15:56:51.945 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.openejb.assembler.classic.JndiBuilder.bind
Jndi(name=global/hello/HelloBean!org.acme.Hello) -->
Ejb(deployment-id=HelloBean)
03-Oct-2017 15:56:51.945 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.openejb.assembler.classic.JndiBuilder.bind
Jndi(name=global/hello/HelloBean) --> Ejb(deployment-id=HelloBean)
03-Oct-2017 15:56:51.969 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.openejb.assembler.classic.Assembler.startEjbs Created
Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=Default
Stateless Container)
03-Oct-2017 15:56:51.987 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.openejb.assembler.classic.Assembler.startEjbs Started
Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=Default
Stateless Container)

I am using TomEE Plume 7.0.3

Please guide me to make this work.

Thanks in advance.
Sudhakar





Could not load any resource bundle by com.sun.org.apache.xerces.internal.impl.msg.SAXMessages

2018-05-23 Thread Matthew Broadhead

After TomEE 7.0.3 has been running for a long time, maybe weeks, it starts 
producing these messages when users try to transform XML using XSLT (usually to 
generate PDF using FOP).  The container has to be restarted in order for it to 
start working again.  Is this related to the Xalan problem?

java.util.MissingResourceException: Could not load any resource bundle by 
com.sun.org.apache.xerces.internal.impl.msg.SAXMessages
at 
com.sun.org.apache.xerces.internal.utils.SecuritySupport$7.run(SecuritySupport.java:174)
at 
com.sun.org.apache.xerces.internal.utils.SecuritySupport$7.run(SecuritySupport.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at 
com.sun.org.apache.xerces.internal.utils.SecuritySupport.getResourceBundle(SecuritySupport.java:166)
at 
com.sun.org.apache.xerces.internal.util.SAXMessageFormatter.formatMessage(SAXMessageFormatter.java:58)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.setProperty(AbstractSAXParser.java:1949)
at 
com.sun.org.apache.xerces.internal.parsers.SAXParser.setProperty(SAXParser.java:175)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:476)



Re: Own SecurityService ignored migrating from TomEE Plus 1.7.1 to 1.7.5

2018-05-21 Thread Matthew Broadhead

i can't see your stack traces


On 21/05/18 15:50, renz wrote:

Hi,

I'm having trouble migrating from TomEE 1.7.1 to 1.7.5.
I'm using Remote Stateless EJB over HTTPS (TomEE apps) for years with 1.7.1.
On the server side, I use my own on JAAS Module (Realm and LoginModule) and
SecurityService.

The purpose of my JassRealm and SecurityService was to propagate
LoginException throw by my LoginModule (see.
http://tomee-openejb.979440.n4.nabble.com/Remote-EJB-Client-Authentication-JAAS-td4666734.html#a4666784).

Now, with version 1.7.5 I'm having trouble and I'm suspecting that my
SecurityService is not used anymore, since I don't see it in the stacktrace.

Stacktrace with TomEE 1.7.1 :



Stacktrace with TomEE 1.7.5 :


As you can see, in first case
"com.bar.foo.security.securityservice.FooBarSecurityService.login" is called
where as "org.apache.tomee.catalina.TomcatSecurityService.login" in second
one.

Configuration seems to be the same with both versions :
- Security Service is declared in tomee.xml and loaded at startup according
to catalina.out
- JaasRealm is declared using  in server.xml
- I also add a login.conf to declare my LoginModule.

In both case, JaasRealm and LoginModule are called as expected.
Only the SecurityService is not.

Is there any difference using SecurityService between TomEE 1.7.1 and 1.7.5
?

Thank you very much.




--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html




Re: cdi execute code on session start

2018-05-08 Thread Matthew Broadhead

@WebListener works fine

public void processSessionScopedInit(@Observes 
@Initialized(SessionScoped.class) HttpSession payload) {} caused an 
infinite loop in the code.  i can send you a stack trace but it grows so 
long it is hard to find the initial cause


however i have not fixed my problem because 
KeycloakPrincipal is not available at session 
start.  The session starts before the redirect to the login page.


is there any way to execute code just after a user signs in?  i am just 
trying to log username and ip for security purposes



On 07/05/18 18:18, Romain Manni-Bucau wrote:

@WebListener on a HttpSessionListener?

otherwise @Observes @Initialiazed(SessionScoped.class) in the cdi bean


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>

2018-05-07 17:10 GMT+02:00 Matthew Broadhead 
:
what is the best way to run code when a session is first created?  i
thought maybe a @PostConstruct inside a @Named @SessionScoped but it
doesn't trigger.





cdi execute code on session start

2018-05-07 Thread Matthew Broadhead
what is the best way to run code when a session is first created?  i 
thought maybe a @PostConstruct inside a @Named @SessionScoped but it 
doesn't trigger.


Re: TomEE Stable and OpenJDK

2018-05-06 Thread Matthew Broadhead
i also use OpenJDK on CentOS without problem.  I thought OpenJDK was 
blessed by Oracle.  I also remember reading that OpenJDK code is used 
inside Oracle JDK, Oracle one just has some extra stuff like JavaFX etc



On 06/05/18 12:10, Fredrik Jonson wrote:

Mark Struberg wrote:
  

I think what the download page fails to communicate is which EE level
it addresses.

TomEE-1.7.x adresses the JavaEE 6 specifications, with minimum requirement
Java7 (up to Java8)
TomEE-7.0.x adresses JavaEE 7, with minimum Java7, soon up to Java11
(7.0.5 in preparation right now)
TomEE-7.1.x (wip) will address JavaEE7 + MicroProfile 1.3 with minimum Java8
TomEE-8.0.x (wip) will address JavaEE8 + MicroProfile 1.0 with minimum Java8

Thanks for that clarification. It may seem obvious to people in the know, but
it is interesting to see a statement on the upper bound of supported JDK/JRE
version, as well as the lower bound. In addition to the supported Java EE
version range, for the major Tomee versions.

Now, just to be explicit here: Apart from EE certification, does the Tomee
community consider OpenJDK on equal footing to OracleJDK when it comes to Tomee
deployment? Is there any important reason not to recommend OpenJDK over, or at
least on par with, OracleJDK?

I'm asking because I still encounter a bit of hesitation towards migrating from
OracleJDK to OpenJDK. It would be helpful if open source projects such as Tomee
made a clear stance on OpenJDK.

BTW, I also run Tomee 7.x on OpenJDK 8, and have not found any issues compared
to OracleJDK. So, now we know there are more than one application deployed on
Tomee and OpenJDK. :)





Re: [openjpa] multiple persistence units

2018-03-19 Thread Matthew Broadhead

thanks Romain, that works

1. wouldn't both units need buildschema if you wanted to build them 
automatically?  or is it only necessary to declare on one?  if so 
shouldn't it be a child of persistence not persistence-unit?


2. i never defined non jta before.  why do you need a jta and non jta?  
yes it would be better if it defaults to create them automatically for 
multiple PU


3. again i assumed exclude-unlisted-classes to be the default because 
eclipse requires that entities are listed in persistence.xml, although 
it seems that really may not be the case and they are scanned


On 18/03/2018 18:50, Romain Manni-Bucau wrote:

Not sure I get the reproducer logic:

1. both units have buildSchema
2. both units don't define a non jta datasource so openejb will create one
copying the first datasource and reuse the auto created non jta datasource
for the second one leading to use the same connection for both ("as
expected" even if i agree this is not the best default we picked)
3. you dont deactivate jpa scanning so you find all tables anyway

here is how to fix it:
https://gist.github.com/rmannibucau/57fd014e30ca003d62700348355dc647




Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>

2018-03-17 18:44 GMT+01:00 Matthew Broadhead 
:
i made a reproducer here https://github.com/chongma/openjpa-reproducer.
it might be enough to show the problem but if not let me know.

it worked fine at the beginning using the standard archetype.

adding the second pu seems to stop it from "view books present" (not
persisting?)

bookshelfDatabase
openJpaReproducer.entities.Bookshelf
 
 
 
 

logs show second table being created.  presumably in the book-pu because
nothing has triggered bookshelf-pu?
/*C1*/SET SCHEMA SYSTEM_LOBS
INSERT INTO BLOCKS VALUES(0,2147483647,0)
COMMIT
/*C21*/SET SCHEMA PUBLIC
CREATE TABLE Book (bookId INTEGER NOT NULL, bookTitle VARCHAR(255),
PRIMARY KEY (bookId))
CREATE TABLE Bookshelf (bookshelfId INTEGER NOT NULL, bookshelfTitle
VARCHAR(255), PRIMARY KEY (bookshelfId))
CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE
BIGINT, PRIMARY KEY (ID))
INSERT INTO OPENJPA_SEQUENCE_TABLE VALUES(0,1)
COMMIT
DELETE FROM OPENJPA_SEQUENCE_TABLE WHERE ID=0
INSERT INTO OPENJPA_SEQUENCE_TABLE VALUES(0,51)
COMMIT
/*C11*/SET SCHEMA PUBLIC
INSERT INTO BOOK VALUES(1,'asasas')
COMMIT
INSERT INTO BOOK VALUES(2,'dfdfd')
COMMIT
INSERT INTO BOOK VALUES(3,'lplplp')
COMMIT



On 17/03/2018 09:31, Matthew Broadhead wrote:


ok will do

On 17/03/2018 09:28, Romain Manni-Bucau wrote:


Can you prepare a sample on github re1dy to compile/run (with hsqldb
maybe)?

Le 17 mars 2018 09:18, "Matthew Broadhead" <
matthew.broadh...@nbmlaw.co.uk>
a écrit :

it is exactly the same.  still creating the tables in first db. here is

section from catalina

17-Mar-2018 09:10:51.900 INFO [localhost-startStop-1]
org.apache.tomee.catalina.TomcatWebAppBuilder.init
- localhost -> /file
...
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean FileTimer to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean file.Comp582347742 to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=file)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=operator)
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.config.AppInfoBuilder.build Enterprise application
"/Users/matthewbroadhead/eclipseWS/case-management/.metadata
/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/file" loaded.
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.Assembler.createApplication
Assembling app: /Users/matthewbroadhead/eclips
eWS/case-management/.metadata/.plugins/org.eclipse.wst.
server.core/tmp0/wtpwebapps/file
17-Mar-2018 09:10:53.551 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate

PersistenceUnit(name=file, provider=org.apache.openjpa.pe
rsistence.PersistenceProviderImpl) - provider time 49ms
17-Mar-2018 09:10:53.589 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFac

Re: archetype

2018-03-17 Thread Matthew Broadhead

oh yeah of course

On 17/03/2018 19:22, Romain Manni-Bucau wrote:

Tomee uses tomee instead of openejb in its group for v7.

Le 17 mars 2018 17:44, "Matthew Broadhead" 
a écrit :


i just tried to create archetype using mvn archetype:generate
-DarchetypeGroupId=org.apache.openejb.maven 
-DarchetypeArtifactId=tomee-webapp-archetype
-DarchetypeVersion=1.7.1
but using 7.0.3, 7.0.4 etc but it doesn't exist.  do we need to create
some new archetypes?
the 1.7.1 uses EJB but it would be good if it was updated to use CDI?
i created the project openjpa-reproducer and it didn't warn me that the
"-" symbol wouldn't work in package names so i had to start again as the
classes were all messed up






Re: [openjpa] multiple persistence units

2018-03-17 Thread Matthew Broadhead
i made a reproducer here https://github.com/chongma/openjpa-reproducer.  
it might be enough to show the problem but if not let me know.


it worked fine at the beginning using the standard archetype.

adding the second pu seems to stop it from "view books present" (not 
persisting?)


bookshelfDatabase
openJpaReproducer.entities.Bookshelf
    
    value="buildSchema(ForeignKeys=true)"/>

    
    

logs show second table being created.  presumably in the book-pu because 
nothing has triggered bookshelf-pu?

/*C1*/SET SCHEMA SYSTEM_LOBS
INSERT INTO BLOCKS VALUES(0,2147483647,0)
COMMIT
/*C21*/SET SCHEMA PUBLIC
CREATE TABLE Book (bookId INTEGER NOT NULL, bookTitle VARCHAR(255), 
PRIMARY KEY (bookId))
CREATE TABLE Bookshelf (bookshelfId INTEGER NOT NULL, bookshelfTitle 
VARCHAR(255), PRIMARY KEY (bookshelfId))
CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE 
BIGINT, PRIMARY KEY (ID))

INSERT INTO OPENJPA_SEQUENCE_TABLE VALUES(0,1)
COMMIT
DELETE FROM OPENJPA_SEQUENCE_TABLE WHERE ID=0
INSERT INTO OPENJPA_SEQUENCE_TABLE VALUES(0,51)
COMMIT
/*C11*/SET SCHEMA PUBLIC
INSERT INTO BOOK VALUES(1,'asasas')
COMMIT
INSERT INTO BOOK VALUES(2,'dfdfd')
COMMIT
INSERT INTO BOOK VALUES(3,'lplplp')
COMMIT


On 17/03/2018 09:31, Matthew Broadhead wrote:

ok will do

On 17/03/2018 09:28, Romain Manni-Bucau wrote:
Can you prepare a sample on github re1dy to compile/run (with hsqldb 
maybe)?


Le 17 mars 2018 09:18, "Matthew Broadhead" 


a écrit :


it is exactly the same.  still creating the tables in first db. here is
section from catalina

17-Mar-2018 09:10:51.900 INFO [localhost-startStop-1]
org.apache.tomee.catalina.TomcatWebAppBuilder.init
- localhost -> /file
...
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean FileTimer to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean file.Comp582347742 to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=file)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=operator)
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.config.AppInfoBuilder.build Enterprise application
"/Users/matthewbroadhead/eclipseWS/case-management/.metadata
/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/file" loaded.
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.Assembler.createApplication
Assembling app: /Users/matthewbroadhead/eclips
eWS/case-management/.metadata/.plugins/org.eclipse.wst.
server.core/tmp0/wtpwebapps/file
17-Mar-2018 09:10:53.551 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate 


PersistenceUnit(name=file, provider=org.apache.openjpa.pe
rsistence.PersistenceProviderImpl) - provider time 49ms
17-Mar-2018 09:10:53.589 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate 


PersistenceUnit(name=operator, provider=org.apache.openjpa.pe
rsistence.PersistenceProviderImpl) - provider time 38ms
17-Mar-2018 09:10:53.637 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.JndiBuilder.bind
Jndi(name=FileTimerLocalBean) --> Ejb(deployment-id=FileTimer)
...

On 16/03/2018 22:36, Romain Manni-Bucau wrote:

Can you try setting non jta datasources? Duplicate the jta 
definition and
just set jtamanaged to false and size to solthing small. Guess it 
is the

issue

Le 16 mars 2018 19:49, "Matthew Broadhead" 

k>
a écrit :

this is the bit just after all the webapp deployment, and the relevant

webapp deployment is in this gist https://gist.github.com/chongm
a/948a4a369c1f9eae9406a99b60f0472e
16-Mar-2018 15:41:29.068 INFO [main] sun.reflect.DelegatingMethodAc
cessorImpl.invoke
Server startup in 104519 ms
16-Mar-2018 15:43:19.844 INFO [http-nio-8080-exec-1]
org.apache.myfaces.el.unified.ResolverBuilderBase.sortELResolvers 
Chain

of EL resolvers for JSP sorted with: org.apache.myfaces.el.unified.
OpenWebBeansELResolverComparator@43bde3b9 and the result order is
[org.apache.myfaces.el.unified.resolver.implicitobject.Impli
citObjectResolver@e6ec1ab, org.apache.myfaces.el.FlashELR
esolver@420a4ab9,
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6b7fda40,
org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@47f35cbd, 


org.apache.myfaces.el.unified.resolver.ResourceResolver@3f68ae71,
org.apache.webbeans.el22.WebBeansELResolver@2fa764a7,
org.apache.myfaces.el.convert.Va

archetype

2018-03-17 Thread Matthew Broadhead
i just tried to create archetype using mvn archetype:generate 
-DarchetypeGroupId=org.apache.openejb.maven 
-DarchetypeArtifactId=tomee-webapp-archetype -DarchetypeVersion=1.7.1
but using 7.0.3, 7.0.4 etc but it doesn't exist.  do we need to create 
some new archetypes?

the 1.7.1 uses EJB but it would be good if it was updated to use CDI?
i created the project openjpa-reproducer and it didn't warn me that the 
"-" symbol wouldn't work in package names so i had to start again as the 
classes were all messed up




Re: [openjpa] multiple persistence units

2018-03-17 Thread Matthew Broadhead

Hi! This is the ezmlm program. I'm managing the
users@tomee.apache.org  mailing list.

I'm working for my owner, who can be reached
atusers-ow...@tomee.apache.org.

No information has been provided for this list.

--- Administrative commands for the users list ---

I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:

To subscribe to the list, send a message to:
   

To remove your address from the list, send a message to:
   

Send mail to the following for info and FAQ for this list:
   
   

Similar addresses exist for the digest list:
   
   

To get messages 123 through 145 (a maximum of 100 per request), mail:
   

To get an index with subject and author for messages 123-456 , mail:
   

They are always returned as sets of 100, max 2000 per request,
so you'll actually get 100-499.

To receive all messages with the same subject as message 12345,
send a short message to:
   

The messages should contain one line or word of text to avoid being
treated as sp@m, but I will ignore their content.
Only the ADDRESS you send to is important.

You can start a subscription for an alternate address,
for example"john@host.domain", just add a hyphen and your
address (with '=' instead of '@') after the command word:


To stop subscription for this address, mail:


In both cases, I'll send a confirmation message to that address. When
you receive it, simply reply to it to complete your subscription.

If despite following these instructions, you do not get the
desired results, please contact my owner at
users-ow...@tomee.apache.org. Please be patient, my owner is a
lot slower than I am



On 17/03/2018 10:55, A Z wrote:

Could someone please reply to me with the email address

to unsubscribe from the email list, please?



From: Romain Manni-Bucau 
Sent: Saturday, 17 March 2018 7:28 PM
To: users@tomee.apache.org
Subject: Re: [openjpa] multiple persistence units

Can you prepare a sample on github re1dy to compile/run (with hsqldb maybe)?

Le 17 mars 2018 09:18, "Matthew Broadhead" 
a écrit :


it is exactly the same.  still creating the tables in first db. here is
section from catalina

17-Mar-2018 09:10:51.900 INFO [localhost-startStop-1]
org.apache.tomee.catalina.TomcatWebAppBuilder.init
- localhost -> /file
...
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean FileTimer to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean file.Comp582347742 to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=file)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=operator)
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.config.AppInfoBuilder.build Enterprise application
"/Users/matthewbroadhead/eclipseWS/case-management/.metadata
/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/file" loaded.
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.Assembler.createApplication
Assembling app: /Users/matthewbroadhead/eclips
eWS/case-management/.metadata/.plugins/org.eclipse.wst.
server.core/tmp0/wtpwebapps/file
17-Mar-2018 09:10:53.551 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate
PersistenceUnit(name=file, provider=org.apache.openjpa.pe
rsistence.PersistenceProviderImpl) - provider time 49ms
17-Mar-2018 09:10:53.589 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate
PersistenceUnit(name=operator, provider=org.apache.openjpa.pe
rsistence.PersistenceProviderImpl) - provider time 38ms
17-Mar-2018 09:10:53.637 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.JndiBuilder.bind
Jndi(name=FileTimerLocalBean) --> Ejb(deployment-id=FileTimer)
...

On 16/03/2018 22:36, Romain Manni-Bucau wrote:


Can you try setting non jta datasources? Duplicate the jta definition and
just set jtamanaged to false and size to solthing small. Guess it is the
issue

Le 16 mars 2018 19:49, "Matthew Broadhead" 
a écrit :

this is the bit just after all the webapp deployment, and the relevant

webapp deployment is in this gist https://gist.github.com/chongm
a/948a4a369c1f9eae9406a99b60f0472e
16-Mar-2018 15:41:29.068 INFO [main] sun.reflect.DelegatingMethodAc
cessorImpl.invoke
Server startup in 104519 ms
16-Mar-2018 15:43:19.844 INFO [http-nio-8080-exec-1]
o

Re: [openjpa] multiple persistence units

2018-03-17 Thread Matthew Broadhead

ok will do

On 17/03/2018 09:28, Romain Manni-Bucau wrote:

Can you prepare a sample on github re1dy to compile/run (with hsqldb maybe)?

Le 17 mars 2018 09:18, "Matthew Broadhead" 
a écrit :


it is exactly the same.  still creating the tables in first db. here is
section from catalina

17-Mar-2018 09:10:51.900 INFO [localhost-startStop-1]
org.apache.tomee.catalina.TomcatWebAppBuilder.init
- localhost -> /file
...
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean FileTimer to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.494 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking
resource-ref 'java:comp/env/jdbc/MySQL' in bean file.Comp582347742 to
Resource(id=jdbc/MySQL)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=file)
17-Mar-2018 09:10:53.495 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.deploy Configuring
PersistenceUnit(name=operator)
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.config.AppInfoBuilder.build Enterprise application
"/Users/matthewbroadhead/eclipseWS/case-management/.metadata
/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/file" loaded.
17-Mar-2018 09:10:53.498 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.Assembler.createApplication
Assembling app: /Users/matthewbroadhead/eclips
eWS/case-management/.metadata/.plugins/org.eclipse.wst.
server.core/tmp0/wtpwebapps/file
17-Mar-2018 09:10:53.551 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate
PersistenceUnit(name=file, provider=org.apache.openjpa.pe
rsistence.PersistenceProviderImpl) - provider time 49ms
17-Mar-2018 09:10:53.589 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate
PersistenceUnit(name=operator, provider=org.apache.openjpa.pe
rsistence.PersistenceProviderImpl) - provider time 38ms
17-Mar-2018 09:10:53.637 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.JndiBuilder.bind
Jndi(name=FileTimerLocalBean) --> Ejb(deployment-id=FileTimer)
...

On 16/03/2018 22:36, Romain Manni-Bucau wrote:


Can you try setting non jta datasources? Duplicate the jta definition and
just set jtamanaged to false and size to solthing small. Guess it is the
issue

Le 16 mars 2018 19:49, "Matthew Broadhead" 
a écrit :

this is the bit just after all the webapp deployment, and the relevant

webapp deployment is in this gist https://gist.github.com/chongm
a/948a4a369c1f9eae9406a99b60f0472e
16-Mar-2018 15:41:29.068 INFO [main] sun.reflect.DelegatingMethodAc
cessorImpl.invoke
Server startup in 104519 ms
16-Mar-2018 15:43:19.844 INFO [http-nio-8080-exec-1]
org.apache.myfaces.el.unified.ResolverBuilderBase.sortELResolvers Chain
of EL resolvers for JSP sorted with: org.apache.myfaces.el.unified.
OpenWebBeansELResolverComparator@43bde3b9 and the result order is
[org.apache.myfaces.el.unified.resolver.implicitobject.Impli
citObjectResolver@e6ec1ab, org.apache.myfaces.el.FlashELR
esolver@420a4ab9,
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6b7fda40,
org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@47f35cbd,
org.apache.myfaces.el.unified.resolver.ResourceResolver@3f68ae71,
org.apache.webbeans.el22.WebBeansELResolver@2fa764a7,
org.apache.myfaces.el.convert.VariableResolverToELResolver@3a9f16c9,
org.apache.myfaces.el.convert.PropertyResolverToELResolver@6754a393]
16-Mar-2018 15:43:20.168 INFO [http-nio-8080-exec-1]
org.apache.myfaces.el.unified.ResolverBuilderBase.sortELResolvers Chain
of EL resolvers for Faces sorted with: org.apache.myfaces.el.unified.
OpenWebBeansELResolverComparator@43bde3b9 and the result order is
[org.apache.myfaces.el.unified.resolver.implicitobject.Impli
citObjectResolver@1db5922e, org.apache.myfaces.el.unified.
resolver.CompositeComponentELResolver@9235f63,
org.apache.webbeans.el22.WebBeansELResolver@2fa764a7,
org.apache.myfaces.el.convert.VariableResolverToELResolver@4b4839d0,
org.apache.myfaces.el.convert.PropertyResolverToELResolver@9c25311,
org.apache.myfaces.el.FlashELResolver@38d794e5,
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@2b9c0cdb,
org.apache.myfaces.el.unified.resolver.ResourceResolver@219026c1,
javax.el.ResourceBundleELResolver@3ad1a339,
org.apache.myfaces.el.unified.
resolver.ResourceBundleResolver@3e25683a, org.apache.el.stream.StreamELR
esolverImpl@759451f1, javax.el.StaticFieldELResolver@5592c7ac,
javax.el.MapELResolver@62ed6e4c, javax.el.ListELResolver@771cae93,
javax.el.ArrayELResolver@20506258, javax.el.BeanELResolver@633c6e59]
16-Mar-2018 15:43:20.326 INFO [http-nio-8080-exec-1]
javax.faces.component._ExternalSpecifications.isBeanValidation

  1   2   >