Re: JSONB Capabilities Broken in 7.1.1 Plume?

2019-07-29 Thread Cesar Hernandez
Hi, I updated the JIRA ticket with the following:

Hi David Gannon

I did a first swing catching up with this issue.

By looking at the release notes for 7.1.1 (
https://issues.apache.org/jira/projects/TOMEE/versions/12344119) I see two
potential related commits:

Update TomEE with Johnzon 1.0.2
https://issues.apache.org/jira/browse/TOMEE-2276
DateTimeParseException Regression when upgrading to TomEE 7.1.0
https://issues.apache.org/jira/browse/TOMEE-2233,
https://github.com/apache/tomee/pull/162,
https://github.com/apache/tomee/pull/227
Since you provided a finely detailed repro maven project, now the ToDo is
to test the 7.1.1 branch against your project removing one change at the
time.

I'm not familiar with the code from Johnzon but will be happy to start
digging in if the upgrade to Johonzon is the root cause, if not then my
plan is to study and understand the issue solved by Richard Zowalla in
TomEE-2233.

El mié., 10 jul. 2019 a las 13:11, daveg-iwd ()
escribió:

> I went ahead and opened an issue on JIRA.  I included an example project as
> an upload. Hope that's OK.
>
> https://issues.apache.org/jira/browse/TOMEE-2565
> 
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>


-- 
Atentamente:
César Hernández.


Re: New committer Cesar Hernandez

2019-09-05 Thread Cesar Hernandez
Thank you all for your kind word.
It's such a great honor to be part of the Apache TomEE community since day
1 and I want to thank you all for enabling me to grow professionally and
personally along with you.



El jue., 5 sept. 2019 a las 7:56, Jonathan Gallimore (<
jonathan.gallim...@gmail.com>) escribió:

> Congratulations Cesar!
>
> On Thu, Sep 5, 2019 at 8:53 AM Jean-Louis Monteiro <
> jlmonte...@tomitribe.com>
> wrote:
>
> > The Project Management Committee (PMC) for Apache TomEE has invited Cesar
> > to
> > become a committer and we are pleased to announce that he has accepted.
> >
> > Cesar started contributing about a year ago.
> > Aside from examples, he contributed a lot on the documentation which is
> > always something to improve especially in the open source world.
> >
> > When I started 10 years ago, a good friend of mine told me that in open
> > source projects, it's 50% contributor's responsibility to do well, and
> 50%
> > our responsibility committers and PMC to make sure they can.
> >
> > I must say Cesar over performed in this area. In the last 6 months he has
> > been the most active contributor on the mailing list. He also reviewed a
> > large amount of PRs and he's been key to help new contributors
> contribute.
> >
> > We all think he deserves becoming a TomEE committer and we are glad he
> > accepted.
> >
> > Being a committer enables easier contribution to the project since there
> is
> > no need to go via the patch submission process. This should enable better
> > productivity. Being a PMC member enables assistance with the management
> and
> > to guide the direction of the project.
> >
> >
> > Please join me and send him a warm welcome and thank you.
> > --
> > Jean-Louis Monteiro
> > http://twitter.com/jlouismonteiro
> > http://www.tomitribe.com
> >
>


-- 
Atentamente:
César Hernández.


Re: JSONB Capabilities Broken in 7.1.1 Plume?

2019-08-07 Thread Cesar Hernandez
Update,
With the collaboration from Rich Zowalla we concluded that Johnzon update
is not the root cause of the issue.
I'm starting to run a git bisect and will keep you updated with my
progress.

@David Gannon
Do you have any update on your side about this issue?

El mar., 6 ago. 2019 a las 10:13, Cesar Hernandez ()
escribió:

> Hi David Gannon,
>
> I did a second swing to this issue [3] without success. This is what I did:
>
> 1) I pull TomEE 7.1.x branch [1]
> 2) Rolled back johnzon from 1.0.2 to 1.0.1 and built TomEE project locally
> [2]
> 3) Ran the example project you provided in the ticket [3]
> 4) The tests keep failing :(.
>
> I might be already in the path to do a git bisect in the commits from
> TomEE 7.1.1 up to TomEE 7.1.2 but if someone else wants to help on this
> task or have a different idea why this issue is occurring that would be
> great!
>
>
> [1] https://github.com/apache/tomee/tree/tomee-7.1.x
> [2] https://github.com/apache/tomee/pull/292/files
> [3] https://issues.apache.org/jira/browse/TOMEE-2565
>
> El lun., 29 jul. 2019 a las 18:43, Cesar Hernandez ()
> escribió:
>
>> Hi, I updated the JIRA ticket with the following:
>>
>> Hi David Gannon
>>
>> I did a first swing catching up with this issue.
>>
>> By looking at the release notes for 7.1.1 (
>> https://issues.apache.org/jira/projects/TOMEE/versions/12344119) I see
>> two potential related commits:
>>
>> Update TomEE with Johnzon 1.0.2
>> https://issues.apache.org/jira/browse/TOMEE-2276
>> DateTimeParseException Regression when upgrading to TomEE 7.1.0
>> https://issues.apache.org/jira/browse/TOMEE-2233,
>> https://github.com/apache/tomee/pull/162,
>> https://github.com/apache/tomee/pull/227
>> Since you provided a finely detailed repro maven project, now the ToDo is
>> to test the 7.1.1 branch against your project removing one change at the
>> time.
>>
>> I'm not familiar with the code from Johnzon but will be happy to start
>> digging in if the upgrade to Johonzon is the root cause, if not then my
>> plan is to study and understand the issue solved by Richard Zowalla in
>> TomEE-2233.
>>
>> El mié., 10 jul. 2019 a las 13:11, daveg-iwd ()
>> escribió:
>>
>>> I went ahead and opened an issue on JIRA.  I included an example project
>>> as
>>> an upload. Hope that's OK.
>>>
>>> https://issues.apache.org/jira/browse/TOMEE-2565
>>> <https://issues.apache.org/jira/browse/TOMEE-2565>
>>>
>>>
>>>
>>> --
>>> Sent from:
>>> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>>>
>>
>>
>> --
>> Atentamente:
>> César Hernández.
>>
>
>
> --
> Atentamente:
> César Hernández.
>


-- 
Atentamente:
César Hernández.


Re: JSONB Capabilities Broken in 7.1.1 Plume?

2019-08-07 Thread Cesar Hernandez
Hi,

I found the commit that introduces the issue David is having.

This is what I did:
- checkout tomee-7.1.x branch and created a separate branch to do git bisect
- Things didn't ran smoothly since gitbisect keeps checking out the master
branch.
- I manually did a git bisect approach and find the

Want to try by yourseld
- checkout tomee-7.1.x on a new local branch
- git revert 4302acab62
- build tomee: mvn clean install -DskipTests
- update jsontest pom.xml to
use: 7.1.2-SNAPSHOT
- build jsontest: mvn clean package
- the jsontest passes successfully.

I think the next step is to understand what the commit 4302acab62 is doing
since I see that it includes some configuration options. Any help is
appreciated.

El mié., 7 ago. 2019 a las 9:50, Cesar Hernandez ()
escribió:

>
> Update,
> With the collaboration from Rich Zowalla we concluded that Johnzon update
> is not the root cause of the issue.
> I'm starting to run a git bisect and will keep you updated with my
> progress.
>
> @David Gannon
> Do you have any update on your side about this issue?
>
> El mar., 6 ago. 2019 a las 10:13, Cesar Hernandez ()
> escribió:
>
>> Hi David Gannon,
>>
>> I did a second swing to this issue [3] without success. This is what I
>> did:
>>
>> 1) I pull TomEE 7.1.x branch [1]
>> 2) Rolled back johnzon from 1.0.2 to 1.0.1 and built TomEE project
>> locally [2]
>> 3) Ran the example project you provided in the ticket [3]
>> 4) The tests keep failing :(.
>>
>> I might be already in the path to do a git bisect in the commits from
>> TomEE 7.1.1 up to TomEE 7.1.2 but if someone else wants to help on this
>> task or have a different idea why this issue is occurring that would be
>> great!
>>
>>
>> [1] https://github.com/apache/tomee/tree/tomee-7.1.x
>> [2] https://github.com/apache/tomee/pull/292/files
>> [3] https://issues.apache.org/jira/browse/TOMEE-2565
>>
>> El lun., 29 jul. 2019 a las 18:43, Cesar Hernandez ()
>> escribió:
>>
>>> Hi, I updated the JIRA ticket with the following:
>>>
>>> Hi David Gannon
>>>
>>> I did a first swing catching up with this issue.
>>>
>>> By looking at the release notes for 7.1.1 (
>>> https://issues.apache.org/jira/projects/TOMEE/versions/12344119) I see
>>> two potential related commits:
>>>
>>> Update TomEE with Johnzon 1.0.2
>>> https://issues.apache.org/jira/browse/TOMEE-2276
>>> DateTimeParseException Regression when upgrading to TomEE 7.1.0
>>> https://issues.apache.org/jira/browse/TOMEE-2233,
>>> https://github.com/apache/tomee/pull/162,
>>> https://github.com/apache/tomee/pull/227
>>> Since you provided a finely detailed repro maven project, now the ToDo
>>> is to test the 7.1.1 branch against your project removing one change at the
>>> time.
>>>
>>> I'm not familiar with the code from Johnzon but will be happy to start
>>> digging in if the upgrade to Johonzon is the root cause, if not then my
>>> plan is to study and understand the issue solved by Richard Zowalla in
>>> TomEE-2233.
>>>
>>> El mié., 10 jul. 2019 a las 13:11, daveg-iwd ()
>>> escribió:
>>>
>>>> I went ahead and opened an issue on JIRA.  I included an example
>>>> project as
>>>> an upload. Hope that's OK.
>>>>
>>>> https://issues.apache.org/jira/browse/TOMEE-2565
>>>> <https://issues.apache.org/jira/browse/TOMEE-2565>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from:
>>>> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>>>>
>>>
>>>
>>> --
>>> Atentamente:
>>> César Hernández.
>>>
>>
>>
>> --
>> Atentamente:
>> César Hernández.
>>
>
>
> --
> Atentamente:
> César Hernández.
>


-- 
Atentamente:
César Hernández.


Re: Working around johnzon REST implementation

2019-07-29 Thread Cesar Hernandez
With the information you provided, it seems that you configurations it's ok.

To have a point of comparison, you can take a look at the example we have:
https://github.com/apache/tomee/tree/master/examples/jaxrs-json-provider-jettison
and also to this article:
https://www.tomitribe.com/blog/upgrading-tomee-keeping-jettison-as-the-json-provider-in-jax-rs/

El mar., 2 jul. 2019 a las 11:44, Jay Leggett ()
escribió:

> We upgraded from 1.7.4 to 7.1.0, and we’re in the process of testing.  We
> came across a problem (see error below) related to the new johnzon
> implementation.  To work around the problem, we’re attempting to revert
> back to the previous implementation by adding resources.xml and
> openejb-jar.xml.  With the changes, the application now starts fine, but
> we’re now getting 404s when making a POST request.  Any thoughts on what’s
> causing the 404?
>
>
>
> resources.xml
>
> 
>
> 
>
>  class-name="org.apache.cxf.jaxrs.provider.json.JSONProvider">
>
> 
>
> 
>
>
>
> openejb-jar.xml
>
> 
>
> http://www.openejb.org/openejb-jar/1.1;>
>
> 
>
> 
>
> cxf.jaxrs.providers = oldprovider
>
> 
>
> 
>
> 
>
>
>
> *Johnzon error*
>
>  at
> org.apache.johnzon.core.JsonGeneratorImpl.close(JsonGeneratorImpl.java:454)
>
> at org.apache.johnzon.mapper.Mapper.writeObject(Mapper.java:147)
>
> at org.apache.johnzon.mapper.Mapper.writeObject(Mapper.java:182)
>
> at
> org.apache.johnzon.jsonb.JohnzonJsonb.toJson(JohnzonJsonb.java:317)
>
> at
> org.apache.johnzon.jaxrs.jsonb.jaxrs.JsonbJaxrsProvider.writeTo(JsonbJaxrsProvider.java:171)
>
> at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1417)
>
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:245)
>
>
> --
>
> *Jay Leggett*
> Software Engineer
> Lenovo United States
>
> [image: Phone](919) 237-8165
> [image: Email]jlegg...@lenovo.com 
>
>
>
>
>
> [image: RedLogo]
>
>
>
>
>


-- 
Atentamente:
César Hernández.


Re: Unable to deploy Java EE war on TomEE 8 M2 - Predeployment of PersistenceUnit failed.

2019-08-06 Thread Cesar Hernandez
Hi Ralph,

Replying inline:

 is there a kind of debugging option so that we can better see where
> exactly the problem comes from.

Logging in TomEE is configured using the conf/logging.properties file, you
can adjust the handlers levels to see if you get more information when the
issue arises.


In all my other setups (Glassfish, OpenLiberty, Wildfy) I also use
> EclipseLink so I don't think that the problem is related to EclipseLink..

Hmm, base on http://tomee.apache.org/comparison.html , the MicroProfile
distribution of TomEE is based on TomEE JAX-RS which doesn't come
with EclipseLink as the distribution TomEE PluME does.

Does your project pom file has EclipseLink dependencies with provided or
compiled (default) scope?

I now you are using MicroProfile but another quick test for you to execute
could be bypassing your MicroProfile related code and try to deploy your
application in TomEE PluME to check that your EclipseLink code is working
as expected.


El mar., 6 ago. 2019 a las 2:09, Ralph Soika ()
escribió:

> Hi Cesar,
>
> thanks for your answer.
>
> 1.) no I have not yet tried it without docker in a plain TomEE installation
>
> 2.) I also think about that the issue could be related with jdk11.
>
> 3.) What my application requires is Java EE7 with Microprofile (incl.
> Health-API). TomEE8-M3 seems the only build so far to fulfill these
> requirements. I personally would prefer JDK8 and maybe its worth to try
> a direct manual installation because the docker images are only
> available with JDK11.
>
> I work a lot with Wildfly and Docker building my own Images. And there I
> noticed that JDK11 did not work as well, but JDK8 or JDK10 worked. So
> maybe there is something with JDK 11
>
> I hoped that you have seen the issue before. I am not familiar with
> TomEE, but is there a kind of debugging option so that we can better see
> where exactly the problem comes form. It is strange because first the
> server notice all EJBs and than it complains during the JPA setup that
> it can not see the package containing the Entities. In all my other
> setups (Glassfish, OpenLiberty, Wildfy) I also use EclipseLink so I
> don't think that the problem is related to EclipseLink..
>
>
>
> Best regards
>
> Ralph
>
>
>
> On 06.08.19 00:04, Cesar Hernandez wrote:
> > Hi Ralph,
> >
> > I haven't seen this exact issue before but I have a couple of questions:
> >
> > 1) Did you try removing docker from the setup to validate if this is
> > related to the docker image? This means deploying your application using
> > tar/zip file TomEE M3 distribution intead of  docker container.
> >
> > 2) Did you try the above step but using Java 8 instead of Java 11 used by
> > the TomEE docker image?
> >
> > 3) When you wrote "TomEE 8.0.0-M2/M3 on Docker official image" does this
> > means TomEE 8.0.0-M1 Docker image works without issues?
> >
> >
> > El vie., 2 ago. 2019 a las 11:52, Ralph Soika ()
> > escribió:
> >
> >> Hi,
> >>
> >> I am running TomEE 8.0.0-M2/M3 on Docker official image. And I try to
> >> deploy my Java EE application with a docker file like this:
> >>
> >> FROM tomee:11-jre-8.0.0-M3-microprofile
> >> COPY ./src/docker/configuration/tomee/eclipselink.jar
> /usr/local/tomee/lib
> >> COPY ./src/docker/configuration/tomee/postgresql-9.4.1212.jar
> >> /usr/local/tomee/lib
> >> COPY ./src/docker/configuration/tomee/tomee.xml /usr/local/tomee/conf
> >> COPY ./target/imixs-jsf-example-*.war /usr/local/tomee/webapps/
> >>
> >> I think the configuration is fine and my DataSource resource is correct
> >> and successful connected.
> >>
> >> But during deployment TomEE throws the following kind of exceptions:
> >>
> >>
> >> .SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> >> Error destroying child
> >> imixssample-app_1  | org.apache.catalina.LifecycleException: An
> >> invalid Lifecycle transition was attempted ([before_destroy]) for
> >> component
> >>
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/imixs-jsf-example-5.0.0]]
> >>
> >> in state [STARTING_PREP]
> >>
> >> ..
> >>
> >> SEVERE [main]
> >> org.apache.openejb.assembler.classic.Assembler.destroyApplication
> >> undeployException original cause
> >> imixssample-app_1  | java.lang.Exception: deployment not found:
> >> ModelService
> >>
> >> .
> >>
> >> .Exception Description: Predeployment of PersistenceUnit
> >> [org

Re: Having search but not found: JMX counter for current EJB SLSB PoolSize

2019-08-05 Thread Cesar Hernandez
Hi Francois,

In jconsole you find the Stateless container configuration [1] maxSize
along with other +30 related attributes in the section: -> MBeans ->
openejb.management -> Pool

Points to consider:
* You need to have at least one EJB deployed in your TomEE instance
* If you use VisualVM, you need to make sure to install MBeans Browser
plugin first.


[1] http://tomee.apache.org/statelesscontainer-config.html


El vie., 26 jul. 2019 a las 5:46, COURTAULT Francois (<
francois.courta...@thalesgroup.com>) escribió:

> Hello everyone,
>
> I was not able to find a JMX counter for EJB SLSB pool size :( Does it
> exists ?
>
> Best Regards.
>
>
>
> 
> 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.
>


-- 
Atentamente:
César Hernández.


Re: Unable to deploy Java EE war on TomEE 8 M2 - Predeployment of PersistenceUnit failed.

2019-08-05 Thread Cesar Hernandez
Hi Ralph,

I haven't seen this exact issue before but I have a couple of questions:

1) Did you try removing docker from the setup to validate if this is
related to the docker image? This means deploying your application using
tar/zip file TomEE M3 distribution intead of  docker container.

2) Did you try the above step but using Java 8 instead of Java 11 used by
the TomEE docker image?

3) When you wrote "TomEE 8.0.0-M2/M3 on Docker official image" does this
means TomEE 8.0.0-M1 Docker image works without issues?


El vie., 2 ago. 2019 a las 11:52, Ralph Soika ()
escribió:

> Hi,
>
> I am running TomEE 8.0.0-M2/M3 on Docker official image. And I try to
> deploy my Java EE application with a docker file like this:
>
> FROM tomee:11-jre-8.0.0-M3-microprofile
> COPY ./src/docker/configuration/tomee/eclipselink.jar /usr/local/tomee/lib
> COPY ./src/docker/configuration/tomee/postgresql-9.4.1212.jar
> /usr/local/tomee/lib
> COPY ./src/docker/configuration/tomee/tomee.xml /usr/local/tomee/conf
> COPY ./target/imixs-jsf-example-*.war /usr/local/tomee/webapps/
>
> I think the configuration is fine and my DataSource resource is correct
> and successful connected.
>
> But during deployment TomEE throws the following kind of exceptions:
>
>
> .SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> Error destroying child
> imixssample-app_1  | org.apache.catalina.LifecycleException: An
> invalid Lifecycle transition was attempted ([before_destroy]) for
> component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/imixs-jsf-example-5.0.0]]
>
> in state [STARTING_PREP]
>
> ..
>
> SEVERE [main]
> org.apache.openejb.assembler.classic.Assembler.destroyApplication
> undeployException original cause
> imixssample-app_1  | java.lang.Exception: deployment not found:
> ModelService
>
> .
>
> .Exception Description: Predeployment of PersistenceUnit
> [org.imixs.workflow.jpa] failed.
> imixssample-app_1  | Internal Exception: java.lang.RuntimeException:
> java.nio.file.NoSuchFileException:
>
> /usr/local/tomee/webapps/imixs-jsf-example-5.0.0/WEB-INF/classes/lib/imixs-workflow-engine-5.0.3.jar
>
>
> The strange thing which I do not understand is the NoSuchFileException
> in the directory ../WEB-INF/classes/lib/*
>
> All jars containing the JPA Entity Classes are available on
> ../WEB-INF/lib/*
>
> Why does my TomEE try to lookup the jar files under /WEB-INF/classes/lib/
> ??
>
> I think this is the wrong location.
>
> Can any body give me a hint what TomEE tries to do during my deployment.
>
> My Application contains EJBs, JPA and Microprofile Classes. And I am
> using PostgreSQL with EclipseLink
>
>
> Thanks for any help
>
>
> ===
> Ralph
>
>

-- 
Atentamente:
César Hernández.


Re: JSONB Capabilities Broken in 7.1.1 Plume?

2019-08-06 Thread Cesar Hernandez
Hi David Gannon,

I did a second swing to this issue [3] without success. This is what I did:

1) I pull TomEE 7.1.x branch [1]
2) Rolled back johnzon from 1.0.2 to 1.0.1 and built TomEE project locally
[2]
3) Ran the example project you provided in the ticket [3]
4) The tests keep failing :(.

I might be already in the path to do a git bisect in the commits from TomEE
7.1.1 up to TomEE 7.1.2 but if someone else wants to help on this task or
have a different idea why this issue is occurring that would be great!


[1] https://github.com/apache/tomee/tree/tomee-7.1.x
[2] https://github.com/apache/tomee/pull/292/files
[3] https://issues.apache.org/jira/browse/TOMEE-2565

El lun., 29 jul. 2019 a las 18:43, Cesar Hernandez ()
escribió:

> Hi, I updated the JIRA ticket with the following:
>
> Hi David Gannon
>
> I did a first swing catching up with this issue.
>
> By looking at the release notes for 7.1.1 (
> https://issues.apache.org/jira/projects/TOMEE/versions/12344119) I see
> two potential related commits:
>
> Update TomEE with Johnzon 1.0.2
> https://issues.apache.org/jira/browse/TOMEE-2276
> DateTimeParseException Regression when upgrading to TomEE 7.1.0
> https://issues.apache.org/jira/browse/TOMEE-2233,
> https://github.com/apache/tomee/pull/162,
> https://github.com/apache/tomee/pull/227
> Since you provided a finely detailed repro maven project, now the ToDo is
> to test the 7.1.1 branch against your project removing one change at the
> time.
>
> I'm not familiar with the code from Johnzon but will be happy to start
> digging in if the upgrade to Johonzon is the root cause, if not then my
> plan is to study and understand the issue solved by Richard Zowalla in
> TomEE-2233.
>
> El mié., 10 jul. 2019 a las 13:11, daveg-iwd ()
> escribió:
>
>> I went ahead and opened an issue on JIRA.  I included an example project
>> as
>> an upload. Hope that's OK.
>>
>> https://issues.apache.org/jira/browse/TOMEE-2565
>> <https://issues.apache.org/jira/browse/TOMEE-2565>
>>
>>
>>
>> --
>> Sent from:
>> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>>
>
>
> --
> Atentamente:
> César Hernández.
>


-- 
Atentamente:
César Hernández.


Re: Johnzon, TomEE 7 and JSON-B

2019-08-05 Thread Cesar Hernandez
Hi Martin,

In TomEE 7.1.0 thre was some issues related with JSON date format parsing
[1].
Have you tried your code against TomEE 7.1.1 ?


[1] https://issues.apache.org/jira/browse/TOMEE-2233

El mar., 30 jul. 2019 a las 6:18, Berner Martin (<
martin.ber...@qualitasag.ch>) escribió:

> Hello, everybody,
> In TomEE 7.x Johnzon is the standard implementation of JASON-B, if I
> understood it correctly.
> I try to replace Johnzon specific annotations like @JohnzonIgnore and
> @JohnzonConverter with standard annotations of javax.xml.bind.
> @JsonbTransient works as a full replacement to @JohnzonIgnore. Other
> annotations like @JsonbDateFormat and
> @JsonbTypeAdapters are not considered.
> And although there is the
> org.apache.johnzon.jsonb.converter.JsonbLocalDateConverter in the Lybrary
> org.apache.johnzon:johnzon-jsonb:1.0.1, using LocaleDate without
> @JohnzonConverter doesn't work at all.
> Am I doing something wrong or do I have to configure Johnzon in TomEE
> 7.1.0? Or am I assuming wrong?
> With the change from TomEE 7.0.4 to TomEE 7.1.0 I also had the problem
> that @XmlAccessorType(XmlAccessType.FIELD) was no longer considered by
> Johnzon. I was able to solve the problem quite elegantly with @Getter from
> Lombok.
>
> Best regards Martin
>


-- 
Atentamente:
César Hernández.


Re: JSONB Capabilities Broken in 7.1.1 Plume?

2019-08-08 Thread Cesar Hernandez
Hi David Gannon,

The PR I identified yesterday was analyzed by Richard and now we identify
both a workaround for you to apply to 7.1.1 and also a bug for an upcoming
release.

*The workaround:*
Specify "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider" via
"openejb.jaxrs.jsonProviders" in the system properties  until a fix is
available with 7.1.2

On the sample project you shared this will be the steps to apply the
workaround:
1) Keep your pom.xml to use: 7.1.1
2) update the junit test and set this property for the embedded container:
p.setProperty("openejb.jaxrs.jsonProviders",
"org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider")
3) mvn clean package
4) the jsontest passes successfully.

Thank you Richard Zowalla for the help, your detail responses on the Jira
ticket definitely help other contributors to catchup with bisect strategies
and troubleshooting logic in TomEE project.


El mié., 7 ago. 2019 a las 18:20, Cesar Hernandez ()
escribió:

> Hi,
>
> I found the commit that introduces the issue David is having.
>
> This is what I did:
> - checkout tomee-7.1.x branch and created a separate branch to do git
> bisect
> - Things didn't ran smoothly since gitbisect keeps checking out the master
> branch.
> - I manually did a git bisect approach and find the
>
> Want to try by yourseld
> - checkout tomee-7.1.x on a new local branch
> - git revert 4302acab62
> - build tomee: mvn clean install -DskipTests
> - update jsontest pom.xml to
> use: 7.1.2-SNAPSHOT
> - build jsontest: mvn clean package
> - the jsontest passes successfully.
>
> I think the next step is to understand what the commit 4302acab62 is doing
> since I see that it includes some configuration options. Any help is
> appreciated.
>
> El mié., 7 ago. 2019 a las 9:50, Cesar Hernandez ()
> escribió:
>
>>
>> Update,
>> With the collaboration from Rich Zowalla we concluded that Johnzon update
>> is not the root cause of the issue.
>> I'm starting to run a git bisect and will keep you updated with my
>> progress.
>>
>> @David Gannon
>> Do you have any update on your side about this issue?
>>
>> El mar., 6 ago. 2019 a las 10:13, Cesar Hernandez ()
>> escribió:
>>
>>> Hi David Gannon,
>>>
>>> I did a second swing to this issue [3] without success. This is what I
>>> did:
>>>
>>> 1) I pull TomEE 7.1.x branch [1]
>>> 2) Rolled back johnzon from 1.0.2 to 1.0.1 and built TomEE project
>>> locally [2]
>>> 3) Ran the example project you provided in the ticket [3]
>>> 4) The tests keep failing :(.
>>>
>>> I might be already in the path to do a git bisect in the commits from
>>> TomEE 7.1.1 up to TomEE 7.1.2 but if someone else wants to help on this
>>> task or have a different idea why this issue is occurring that would be
>>> great!
>>>
>>>
>>> [1] https://github.com/apache/tomee/tree/tomee-7.1.x
>>> [2] https://github.com/apache/tomee/pull/292/files
>>> [3] https://issues.apache.org/jira/browse/TOMEE-2565
>>>
>>> El lun., 29 jul. 2019 a las 18:43, Cesar Hernandez (<
>>> cesargu...@gmail.com>) escribió:
>>>
>>>> Hi, I updated the JIRA ticket with the following:
>>>>
>>>> Hi David Gannon
>>>>
>>>> I did a first swing catching up with this issue.
>>>>
>>>> By looking at the release notes for 7.1.1 (
>>>> https://issues.apache.org/jira/projects/TOMEE/versions/12344119) I see
>>>> two potential related commits:
>>>>
>>>> Update TomEE with Johnzon 1.0.2
>>>> https://issues.apache.org/jira/browse/TOMEE-2276
>>>> DateTimeParseException Regression when upgrading to TomEE 7.1.0
>>>> https://issues.apache.org/jira/browse/TOMEE-2233,
>>>> https://github.com/apache/tomee/pull/162,
>>>> https://github.com/apache/tomee/pull/227
>>>> Since you provided a finely detailed repro maven project, now the ToDo
>>>> is to test the 7.1.1 branch against your project removing one change at the
>>>> time.
>>>>
>>>> I'm not familiar with the code from Johnzon but will be happy to start
>>>> digging in if the upgrade to Johonzon is the root cause, if not then my
>>>> plan is to study and understand the issue solved by Richard Zowalla in
>>>> TomEE-2233.
>>>>
>>>> El mié., 10 jul. 2019 a las 13:11, daveg-iwd (<
>>>> david.gan...@iwd.iowa.gov>) escribió:
>>>>
>>>>> I went ahead and opened an issue on JIRA.  I included an example
>>>>> project as
>>>>> an upload. Hope that's OK.
>>>>>
>>>>> https://issues.apache.org/jira/browse/TOMEE-2565
>>>>> <https://issues.apache.org/jira/browse/TOMEE-2565>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from:
>>>>> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>>>>>
>>>>
>>>>
>>>> --
>>>> Atentamente:
>>>> César Hernández.
>>>>
>>>
>>>
>>> --
>>> Atentamente:
>>> César Hernández.
>>>
>>
>>
>> --
>> Atentamente:
>> César Hernández.
>>
>
>
> --
> Atentamente:
> César Hernández.
>


-- 
Atentamente:
César Hernández.


Re: Having search but not found: JMX counter for current EJB SLSB PoolSize

2019-08-08 Thread Cesar Hernandez
>
> But I also have discovered that I have a pool by EJB: is it right ?Just to
> be clear enough, if our application has 2 stateless EJBs (EJB-A and EJB-B),
> I will have one pool for EJB-A  and another pool for EJB-B, with for each,
> a default MaxSize set to 10, right ?

Yes, that's right. That's my understanding.

El jue., 8 ago. 2019 a las 1:07, COURTAULT Francois (<
francois.courta...@thalesgroup.com>) escribió:

> Hello Cesar,
>
> Yes you're right, I have found some useful counters :-)
> But I also have discovered that I have a pool by EJB: is it right ?
>
> Just to be clear enough, if our application has 2 stateless EJBs (EJB-A
> and EJB-B), I will have one pool for EJB-A  and another pool for EJB-B,
> with for each, a default MaxSize set to 10, right ?
>
> Best Regards.
>
> -Original Message-
> From: Cesar Hernandez [mailto:cesargu...@gmail.com]
> Sent: lundi 5 août 2019 23:33
> To: users@tomee.apache.org
> Subject: Re: Having search but not found: JMX counter for current EJB SLSB
> PoolSize
>
> Hi Francois,
>
> In jconsole you find the Stateless container configuration [1] maxSize
> along with other +30 related attributes in the section: -> MBeans ->
> openejb.management -> Pool
>
> Points to consider:
> * You need to have at least one EJB deployed in your TomEE instance
> * If you use VisualVM, you need to make sure to install MBeans Browser
> plugin first.
>
>
> [1]
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftomee.apache.org%2Fstatelesscontainer-config.htmldata=02%7C01%7CFrancois.COURTAULT%40gemalto.com%7C7c0e7012f377477a436808d719ec879a%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C0%7C637006375997388354sdata=MSmeV3x%2FcF2Mw1BnrT7OK3Ipzc8hUHwUn91QrANev%2FQ%3Dreserved=0
>
>
> El vie., 26 jul. 2019 a las 5:46, COURTAULT Francois (<
> francois.courta...@thalesgroup.com>) escribió:
>
> > Hello everyone,
> >
> > I was not able to find a JMX counter for EJB SLSB pool size :( Does it
> > exists ?
> >
> > Best Regards.
> >
> >
> >
> > 
> > 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.
> >
>
>
> --
> Atentamente:
> César Hernández.
> 
>  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.
>


-- 
Atentamente:
César Hernández.


Re: How do I disable JAXRS for a single war file

2020-02-25 Thread Cesar Hernandez
Hi,

Can you expand a little bit more what's the issue you are having?

I took a look at the mailing list archives to understand more the context
of your question but I only found an old thread that relates to disable
JAXRS  it [1]

[1]
https://lists.apache.org/thread.html/a6a8d06d3563ccd5190388feab1da5435a715e3ba4f87577c127d213%401358668537%40%3Cusers.tomee.apache.org%3E

El sáb., 22 feb. 2020 a las 2:38, chege () escribió:

> Hi,
>
> Ho do I go about disabling JAXRS auto configuration for a single war
> file deployed in Tomee?
>
>
> Thanks.
>
>

-- 
Atentamente:
César Hernández.


Re: Is there a way to monitor, using JMX (jconsole), MDB pool ?

2020-02-25 Thread Cesar Hernandez
Hi,
Have you checked under --> MBeans -> openejb.management in Jconsole?

El mar., 18 feb. 2020 a las 7:29, COURTAULT Francois (<
francois.courta...@thalesgroup.com>) escribió:

> Hello everyone,
>
> Using the jconsole, I am able to monitor the SLSB pools under the Pool
> folder.
> But I am not able to monitor the MDB pools under the Pool folder.
>
> Is there any other location to look at ?
>
> Best Regards.
>
>
>
>

-- 
Atentamente:
César Hernández.


Re: Ear Deploy error starting in TomEE Plus 7.1.2

2020-04-10 Thread Cesar Hernandez
Hi Tom,

I was looking for the ticket in the TomEE project but I see you opened a
ticket in OPENEJB-2145 instead of a TomEE one[1].
I see that since openejb-core 7.1.1 there has been only JMS, CMP/JPA,
and Jackson updates.

To increase the community visibility on this issue, can you please share in
this email thread a repo with a repro scenario?

[1] https://issues.apache.org/jira/projects/TOMEE/

El mié., 4 mar. 2020 a las 11:05, Tom Molloy ()
escribió:

> After downloading TomEE Plus 7.1.2, our EAR application is no longer
> deploying.   It deploys fine in 7.1.0 and 7.1.1.   When I put the
> openejb-core-7.1.1 in the lib folder of 7.1.2, I do not get an error.   I'm
> wondering if a bug was introduced.   Here is the stacktrace.
>
> 04-Mar-2020 09:41:19.684 INFO [main]
> org.apache.openejb.assembler.classic.Assembler.createApplication Assembling
> app: C:\apps\apache-tomee-plus-7.1.2\apps\ourapp
> 04-Mar-2020 09:41:19.693 INFO [main]
> org.apache.openejb.assembler.classic.Assembler.destroyApplication
> Undeploying app: C:\apps\apache-tomee-plus-7.1.2\apps\ourapp
> 04-Mar-2020 09:41:19.694 SEVERE [main]
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem
> Application could not be deployed:
> C:\apps\apache-tomee-plus-7.1.2\apps\ourapp
> org.apache.openejb.OpenEJBException: Creating application failed:
> C:\apps\apache-tomee-plus-7.1.2\apps\ourapp: null
> at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1101)
> at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:755)
> at
>
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:633)
> at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:485)
> at
> org.apache.openejb.OpenEJB$Instance.(OpenEJB.java:150)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
> at
> org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:247)
> at
>
> org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:168)
> at
>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at
>
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
> at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:137)
> at
> org.apache.catalina.startup.Catalina.load(Catalina.java:639)
> at
> org.apache.catalina.startup.Catalina.load(Catalina.java:662)
> 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.catalina.startup.Bootstrap.load(Bootstrap.java:303)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
> Caused by: java.util.ConcurrentModificationException
> at
> java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
> at
> java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:752)
> at
> java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:750)
> at
> java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
> at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:829)
> ... 18 more
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>


-- 
Atentamente:
César Hernández.


Re: What are best free IDE's for Tomee?

2020-05-01 Thread Cesar Hernandez
Hi Gerald,

This is an interesting question and from my point of view, the answer will
vary from various developer's needs and constraints like current toolset,
development workflow, budget, support needs, organization or company legal
compliance, etc.

In terms of TomEE integration you can check out the IDE category we have on
the website for popular IDE's like IntelliJ, Netbeans, Eclipse:
https://tomee.apache.org/tomee-8.0/docs/
I also found this VS Code extension that works for Tomcat and TomEE:
https://marketplace.visualstudio.com/items?itemName=adashen.vscode-tomcat


El mié., 29 abr. 2020 a las 16:51, Smith, Gerald
() escribió:

> Can anyone recommend the best free IDE to be used with Tomee?
>
> Thanks,
> Jerry
> CONFIDENTIALITY NOTICE: This email message and all attachments transmitted
> with it may contain State of New Jersey legally privileged and confidential
> information intended solely for the use of the addressee only. If the
> reader of this message is not the intended recipient, you are hereby
> notified that any reading, dissemination, distribution, copying, or other
> use of this message or its attachment is prohibited. If you have received
> this message in error, please notify the sender immediately and delete this
> message.
>


-- 
Atentamente:
César Hernández.


Re: doubt about remote deploy using tomee-maven-plugin

2020-06-15 Thread Cesar Hernandez
awesome,
In case your repo is public, feel free to share it, maybe we can build an
example in the project itself :)!

El sáb., 13 jun. 2020 a las 21:58, Daniel Dias Dos Santos (<
daniel.dias.analist...@gmail.com>) escribió:

> Hello Cesar,
>
> I managed to deploy it following your guidance.
>
> in my case I used the docker passing the variables:
>
> docker run --name=tomee -p 8080:8080 -e
> CATALINA_OPTS="-Dtomee.serialization.class.blacklist=-
> -Dtomee.remote.support=true -Dopenejb.system.apps=true
> -Dopenejb.deployer.cache.folder=webapps
> -Dopenejb.deployer.save-deployments=true
> -Dopenejb.deployer.binaries.use=true"
> tomee:8-jre-8.0.1-plus
>
> thanks  :  )
>
> --
>
> *Daniel Dias dos Santos*
> Java Developer
> SouJava & JCP Member
> GitHub: https://github.com/Daniel-Dos
> Linkedin: www.linkedin.com/in/danieldiasjava
> Twitter: http://twitter.com/danieldiasjava
>
>
> Em sex., 12 de jun. de 2020 às 21:03, Cesar Hernandez <
> cesargu...@gmail.com>
> escreveu:
>
> > Hi Daniel,
> >
> > Apart from the pom.xml file you provided, I found also a couple of
> > properties [1] that need to be added into to TomEE systems.properties
> file
> > [2] in order to enable the maven plugin to perform a Deploy/Undeploy
> > action.
> > With this the command from your example to deploy and undeploy it works
> > fine but yes, the location of this deployments is in %TomEE_HOME%/temp
> > folder:
> >  mvn tomee:deploy@deploy-it
> > mvn tomee:undeploy@undeploy-it
> >
> >
> > The property you are looking for is:
> > openejb.deployer.cache.folder = webapps
> >
> > Notice that the example project you shared has some sort of structure
> > inconsistency, when I imported the project into IntelliJ it was not
> > recognized as a maven project, check also your project structure.
> >
> > [1]
> >
> >
> https://lists.apache.org/thread.html/cfaf78016415b2e72ae998785de6492c6c83c15e1c59633f0e25f5c8%40%3Cusers.tomee.apache.org%3E
> > [2]
> > tomee.remote.support = true
> > tomee.serialization.class.blacklist = -
> > openejb.system.apps = true
> > openejb.deployer.binaries.use=true
> > openejb.deployer.save-deployments=true
> >
> > El mié., 10 jun. 2020 a las 20:18, Daniel Dias Dos Santos (<
> > daniel.dias.analist...@gmail.com>) escribió:
> >
> > > Hello,
> > >
> > > follow my pom.xml [1] .
> > >
> > > run project -> mvn clean package tomee:deploy@deploy-it
> > >
> > > [1] https://github.com/Daniel-Dos/Servlet4/blob/master/pom.xml
> > >
> > > thanks
> > > --
> > >
> > > *Daniel Dias dos Santos*
> > > Java Developer
> > > SouJava & JCP Member
> > > GitHub: https://github.com/Daniel-Dos
> > > Linkedin: www.linkedin.com/in/danieldiasjava
> > > Twitter: http://twitter.com/danieldiasjava
> > >
> > >
> > > Em qua., 10 de jun. de 2020 às 22:52, Cesar Hernandez <
> > > cesargu...@gmail.com>
> > > escreveu:
> > >
> > > > Can you please share your pom.xml to check also the plugin
> > configuration
> > > > section the files has?
> > > >
> > > > El mié., 10 jun. 2020 a las 13:30, Daniel Dias Dos Santos (<
> > > > daniel.dias.analist...@gmail.com>) escribió:
> > > >
> > > > > Hi Cesar,
> > > > >
> > > > > I followed what is on this link [1]
> > > > >
> > > > > I use the  command:
> > > > >
> > > > >  mvn tomee:deploy@deploy-it
> > > > > mvn tomee:undeploy@undeploy-it
> > > > >
> > > > > and go to the temp folder.
> > > > >
> > > > > I try follow the link [2]
> > > > >
> > > > > [1]
> > > > >
> > > > >
> > > >
> > >
> >
> https://stackoverflow.com/questions/45586095/how-can-i-specify-the-path-in-tomee-maven-plugin-such-that-both-deploy-and-undep
> > > > > [2] http://tomee.apache.org/tomee-8.0/docs/maven/deploy-mojo.html
> > > > > --
> > > > >
> > > > > *Daniel Dias dos Santos*
> > > > > Java Developer
> > > > > SouJava & JCP Member
> > > > > GitHub: https://github.com/Daniel-Dos
> > > > > Linkedin: www.linkedin.com/in/danieldiasjava
> > > > > Twitter: http://twitter.com/danieldiasjava
> > > >

Re: doubt about remote deploy using tomee-maven-plugin

2020-06-10 Thread Cesar Hernandez
Have you tried the path configurations?
[1]
https://github.com/apache/tomee/blob/master/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/DeployMojo.java#L90

El mié., 10 jun. 2020 a las 12:06, Daniel Dias Dos Santos (<
daniel.dias.analist...@gmail.com>) escribió:

> Hi,
>
> I'm trying the plugin with the deploy tomee: deploy option it works.
> but my doubt is, when I execute the command my .war always goes to the
> TomEE temp folder is that standard? how to switch to deploy to the webapps
> folder?
>
> thank you.
>


-- 
Atentamente:
César Hernández.


Re: doubt about remote deploy using tomee-maven-plugin

2020-06-10 Thread Cesar Hernandez
Can you please share your pom.xml to check also the plugin configuration
section the files has?

El mié., 10 jun. 2020 a las 13:30, Daniel Dias Dos Santos (<
daniel.dias.analist...@gmail.com>) escribió:

> Hi Cesar,
>
> I followed what is on this link [1]
>
> I use the  command:
>
>  mvn tomee:deploy@deploy-it
> mvn tomee:undeploy@undeploy-it
>
> and go to the temp folder.
>
> I try follow the link [2]
>
> [1]
>
> https://stackoverflow.com/questions/45586095/how-can-i-specify-the-path-in-tomee-maven-plugin-such-that-both-deploy-and-undep
> [2] http://tomee.apache.org/tomee-8.0/docs/maven/deploy-mojo.html
> --
>
> *Daniel Dias dos Santos*
> Java Developer
> SouJava & JCP Member
> GitHub: https://github.com/Daniel-Dos
> Linkedin: www.linkedin.com/in/danieldiasjava
> Twitter: http://twitter.com/danieldiasjava
>
>
>
> Em qua., 10 de jun. de 2020 às 15:34, Cesar Hernandez <
> cesargu...@gmail.com>
> escreveu:
>
> > Have you tried the path configurations?
> > [1]
> >
> >
> https://github.com/apache/tomee/blob/master/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/DeployMojo.java#L90
> >
> > El mié., 10 jun. 2020 a las 12:06, Daniel Dias Dos Santos (<
> > daniel.dias.analist...@gmail.com>) escribió:
> >
> > > Hi,
> > >
> > > I'm trying the plugin with the deploy tomee: deploy option it works.
> > > but my doubt is, when I execute the command my .war always goes to the
> > > TomEE temp folder is that standard? how to switch to deploy to the
> > webapps
> > > folder?
> > >
> > > thank you.
> > >
> >
> >
> > --
> > Atentamente:
> > César Hernández.
> >
>


-- 
Atentamente:
César Hernández.


Re: doubt about remote deploy using tomee-maven-plugin

2020-06-12 Thread Cesar Hernandez
Hi Daniel,

Apart from the pom.xml file you provided, I found also a couple of
properties [1] that need to be added into to TomEE systems.properties file
[2] in order to enable the maven plugin to perform a Deploy/Undeploy action.
With this the command from your example to deploy and undeploy it works
fine but yes, the location of this deployments is in %TomEE_HOME%/temp
folder:
 mvn tomee:deploy@deploy-it
mvn tomee:undeploy@undeploy-it


The property you are looking for is:
openejb.deployer.cache.folder = webapps

Notice that the example project you shared has some sort of structure
inconsistency, when I imported the project into IntelliJ it was not
recognized as a maven project, check also your project structure.

[1]
https://lists.apache.org/thread.html/cfaf78016415b2e72ae998785de6492c6c83c15e1c59633f0e25f5c8%40%3Cusers.tomee.apache.org%3E
[2]
tomee.remote.support = true
tomee.serialization.class.blacklist = -
openejb.system.apps = true
openejb.deployer.binaries.use=true
openejb.deployer.save-deployments=true

El mié., 10 jun. 2020 a las 20:18, Daniel Dias Dos Santos (<
daniel.dias.analist...@gmail.com>) escribió:

> Hello,
>
> follow my pom.xml [1] .
>
> run project -> mvn clean package tomee:deploy@deploy-it
>
> [1] https://github.com/Daniel-Dos/Servlet4/blob/master/pom.xml
>
> thanks
> --
>
> *Daniel Dias dos Santos*
> Java Developer
> SouJava & JCP Member
> GitHub: https://github.com/Daniel-Dos
> Linkedin: www.linkedin.com/in/danieldiasjava
> Twitter: http://twitter.com/danieldiasjava
>
>
> Em qua., 10 de jun. de 2020 às 22:52, Cesar Hernandez <
> cesargu...@gmail.com>
> escreveu:
>
> > Can you please share your pom.xml to check also the plugin configuration
> > section the files has?
> >
> > El mié., 10 jun. 2020 a las 13:30, Daniel Dias Dos Santos (<
> > daniel.dias.analist...@gmail.com>) escribió:
> >
> > > Hi Cesar,
> > >
> > > I followed what is on this link [1]
> > >
> > > I use the  command:
> > >
> > >  mvn tomee:deploy@deploy-it
> > > mvn tomee:undeploy@undeploy-it
> > >
> > > and go to the temp folder.
> > >
> > > I try follow the link [2]
> > >
> > > [1]
> > >
> > >
> >
> https://stackoverflow.com/questions/45586095/how-can-i-specify-the-path-in-tomee-maven-plugin-such-that-both-deploy-and-undep
> > > [2] http://tomee.apache.org/tomee-8.0/docs/maven/deploy-mojo.html
> > > --
> > >
> > > *Daniel Dias dos Santos*
> > > Java Developer
> > > SouJava & JCP Member
> > > GitHub: https://github.com/Daniel-Dos
> > > Linkedin: www.linkedin.com/in/danieldiasjava
> > > Twitter: http://twitter.com/danieldiasjava
> > >
> > >
> > >
> > > Em qua., 10 de jun. de 2020 às 15:34, Cesar Hernandez <
> > > cesargu...@gmail.com>
> > > escreveu:
> > >
> > > > Have you tried the path configurations?
> > > > [1]
> > > >
> > > >
> > >
> >
> https://github.com/apache/tomee/blob/master/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/DeployMojo.java#L90
> > > >
> > > > El mié., 10 jun. 2020 a las 12:06, Daniel Dias Dos Santos (<
> > > > daniel.dias.analist...@gmail.com>) escribió:
> > > >
> > > > > Hi,
> > > > >
> > > > > I'm trying the plugin with the deploy tomee: deploy option it
> works.
> > > > > but my doubt is, when I execute the command my .war always goes to
> > the
> > > > > TomEE temp folder is that standard? how to switch to deploy to the
> > > > webapps
> > > > > folder?
> > > > >
> > > > > thank you.
> > > > >
> > > >
> > > >
> > > > --
> > > > Atentamente:
> > > > César Hernández.
> > > >
> > >
> >
> >
> > --
> > Atentamente:
> > César Hernández.
> >
>


-- 
Atentamente:
César Hernández.


Re: Set users and roles in arquillian.xml for TomEE embedded

2021-01-03 Thread Cesar Hernandez
Hi Arturo,

I couldn't find an exact example to cover your particular scenario. The one
I found that uses the Tomcat realm for users, password, and roles
was: Simple Remote Tomcat Users:
https://github.com/apache/tomee/tree/master/examples/simple-remote-tomcatusers

As for the arquillian properties, give it a try to a format similar to the
following,:

admin/user123
user123/secretpassword


El jue, 31 dic 2020 a las 2:40, Arturo Martín Lladó (<
arturo.martin.ll...@gmail.com>) escribió:

> Hi, list -
>
> I've been trying to create a test for a role protected JAX-RS service that
> invokes as well a role protected EJB.
> In order to achieve this goal, I decided to look at the TomEE Arquillian
> examples using the arquillian-tomee-embedded Maven artifact.
> Long story short: I don't see in any arquillian.xml file of the examples
> nothing related with setting user & roles.
> I see this in the documentation for the Arquillian TomEE container (
> http://tomee.apache.org/latest/docs/developer/testing/arquillian/index.html
> ):
>
> users | a map of users (properties syntax)
> roles | user roles (properties syntax)
>
> Is it possible to see any example of this two properties being used in an
> arquillian.xml file?
>
> Happy new year, btw :-)
>
> --
> Arturo Martín Lladó
>


-- 
Atentamente:
César Hernández.


Re: Set users and roles in arquillian.xml for TomEE embedded

2021-01-21 Thread Cesar Hernandez
Hi Arturo,

Sorry for the delay, busy week... :)


Don't worry, Open Source is Asynchronous by nature :)

Thank you for creating the ticket, it helped me to realize why my test with
8.0.5 failed: I was upstanding only tomee.version and
not tomee.javaee-api.version.
I'm pretty sure the context from this thread that now it's reflected in
TOMEE-2961 <https://issues.apache.org/jira/browse/TOMEE-2961> will greatly
help the contributor that will have fun working on TOMEE-2956
<https://issues.apache.org/jira/browse/TOMEE-2956> to build/improve the
current TomEE Example[1] related to this feature.


[1] https://github.com/apache/tomee/tree/master/examples



El jue, 21 ene 2021 a las 15:26, Arturo Martín Lladó (<
arturo.martin.ll...@gmail.com>) escribió:

> Hi, Cesar:
>
> Sorry for the delay, busy week... :)
>
> Ticket created: https://issues.apache.org/jira/browse/TOMEE-2961
> The test code runs fine in TomEE Embedded 8.0.0, 8.0.1, 8.0.4 and 8.0.5, so
> I guess it would be understandable that no correction will be made in this
> case.
>
> Again, thanks a lot for your effort in this project.
> --
> Arturo Martín Lladó
>
>
> El jue, 14 ene 2021 a las 23:18, Cesar Hernandez ()
> escribió:
>
> > Hi Arturo,
> >
> > Thank you for the follow up on this thread.
> >
> > I created https://issues.apache.org/jira/browse/TOMEE-2956, so we can
> > improve the current documentation for TomEE and Arquillian.
> >
> > Do you want me to submit a complete bug report via
> > > http://issues.apache.org/jira/browse/TOMEE? I would be glad to do so,
> > but
> > > it seems I can't create issues.
> > >
> >
> > If you want to create the ticket, sure, go ahead :). Share please your
> Jira
> > username so I can update your role and you will be all set.
> > Feel free to drop in the ticket the example you made. I downloaded and
> test
> > it locally to ended up having the behavior you described.
> > Tomee 8.0.6 will be released soon, I recall seeing on the CI some issue
> > related with
> > "org.jboss.arquillian.container.spi.client.container.DeploymentException:
> > Unable to deploy" .
> > If you want to follow up on this closely, we can move the conversation
> > along with the ticket you are going to create in the dev mailing list for
> > further troubleshooting.
> >
> > As I said before, I hope this can help anyone that has the same problems
> > :-)
> >
> >
> > This conversation definitely is and will help more users in the
> > future along with the upcoming documentation update and patch for the
> > issue.
> >
> >
> >
> > El jue, 14 ene 2021 a las 6:25, Arturo Martín Lladó (<
> > arturo.martin.ll...@gmail.com>) escribió:
> >
> > > Hi again, César:
> > >
> > > So, after a lot of headaches and testing, I think I have an answer that
> > > HIH someone that has the same needs as me.
> > > First of all, after some debugging sessions on
> arquillian-tomee-embedded
> > > and tomee-embedded projects, the syntax in order to specify users and
> > roles
> > > in the arquillian.xml file for TomEE 8 is the following (not -very
> well?-
> > > documented):
> > >
> > > 
> > >  user=userpass
> > >  admin=adminpass
> > > 
> > >
> > > 
> > > user=userrole
> > > admin=adminrole
> > > 
> > >
> > > When I try to test a REST Service protected via web.xml and that also
> > > invokes an EJB object, works fine with the following versions of
> > > tomee-embedded artifact:
> > > - 8.0.0
> > > - 8.0.1
> > >
> > > From 8.0.2 and above, it seems to be broken. This is the error message
> I
> > > get in my POC project when I run mvn test (when invoking the test code
> > via
> > > the Eclipse JUnit launchers, this error message is not shown):
> > >
> > > [INFO] Scanning for projects...
> > > [INFO]
> > > [INFO] -< test:tomee-simple
> > > >--
> > > [INFO] Building tomee-simple 0.0.1-SNAPSHOT
> > > [INFO] [ war
> > > ]-
> > > [INFO]
> > > [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
> > > tomee-simple ---
> > > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > > [INFO] Copying 0 resource
> > > [INFO]
> > > [INFO] --- maven-compiler-plugin:3.1:

Re: Set users and roles in arquillian.xml for TomEE embedded

2021-01-14 Thread Cesar Hernandez
pBuilder.java:1475)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1131)
> at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5052)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> ... 103 more
> Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache
> Software Foundation (ASF) under one or more
> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
> at
> org.apache.tomee.catalina.TomEEWebappClassLoader.loadClass(TomEEWebappClassLoader.java:209)
> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
> at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:145)
> ... 115 more
>
> ene 14, 2021 1:09:01 PM org.apache.coyote.AbstractProtocol stop
> INFORMACI�N: Stopping ProtocolHandler ["http-nio-20002"]
> ene 14, 2021 1:09:01 PM org.apache.coyote.AbstractProtocol pause
> INFORMACI�N: Pausing ProtocolHandler ["http-nio-20002"]
> ene 14, 2021 1:09:01 PM org.apache.catalina.core.StandardService
> stopInternal
> INFORMACI�N: Stopping service [Tomcat]
> ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> destroyApplication
> INFORMACI�N: Undeploying app:
> C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple
> ene 14, 2021 1:09:01 PM org.apache.coyote.AbstractProtocol destroy
> INFORMACI�N: Destroying ProtocolHandler ["http-nio-20002"]
>
> Results :
>
> Tests in error:
>   amllado.arquillian.tomee.test.TestHelloWorldRestController: Unable to
> deploy
>
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
>
> [INFO]
> 
> [INFO] BUILD FAILURE
> [INFO]
> 
> [INFO] Total time:  6.815 s
> [INFO] Finished at: 2021-01-14T13:09:01+01:00
> [INFO]
> 
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)
> on project tomee-simple: There are test failures.
> [ERROR]
> [ERROR] Please refer to
> C:\DESARROLLO\WORKSPACE\amartin\eclipse\tomee-simple\target\surefire-reports
> for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
> I have attached my POC project to this mails if you want to reproduce this
> error.
>
> Do you want me to submit a complete bug report via
> http://issues.apache.org/jira/browse/TOMEE? I would be glad to do so, but
> it seems I can't create issues.
> As I said before, I hope this can help anyone that has the same problems
> :-)
>
>
> Nevertheless, thank you for this project, people :-)
> --
> Arturo Martín Lladó
>
>
> El lun, 4 ene 2021 a las 0:48, Cesar Hernandez ()
> escribió:
>
>> Hi Arturo,
>>
>> I couldn't find an exact example to cover your particular scenario. The
>> one
>> I found that uses the Tomcat realm for users, password, and roles
>> was: Simple Remote Tomcat Users:
>>
>> https://github.com/apache/tomee/tree/master/examples/simple-remote-tomcatusers
>>
>> As for the arquillian properties, give it a try to a format similar to the
>> following,:
>>
>> admin/user123
>> user123/secretpassword
>>
>>
>> El jue, 31 dic 2020 a las 2:40, Arturo Martín Lladó (<
>> arturo.martin.ll...@gmail.com>) escribió:
>>
>> > Hi, list -
>> >
>> > I've been trying to create a test for a role protected JAX-RS service
>> that
>> > invokes as well a role protected EJB.
>> > In order to achieve this goal, I decided to look at the TomEE Arquillian
>> > examples using the arquillian-tomee-embedded Maven artifact.
>> > Long story short: I don't see in any arquillian.xml file of the examples
>> > nothing related with setting user & roles.
>> > I see this in the documentation for the Arquillian TomEE container (
>> >
>> http://tomee.apache.org/latest/docs/developer/testing/arquillian/index.html
>> > ):
>> >
>> > users | a map of users (properties syntax)
>> > roles | user roles (properties syntax)
>> >
>> > Is it possible to see any example of this two properties being used in
>> an
>> > arquillian.xml file?
>> >
>> > Happy new year, btw :-)
>> >
>> > --
>> > Arturo Martín Lladó
>> >
>>
>>
>> --
>> Atentamente:
>> César Hernández.
>>
>

-- 
Atentamente:
César Hernández.


Re: [ANN] Welcome new Apache TomEE Committer Richard Zowalla

2021-01-12 Thread Cesar Hernandez
Congratulations  Richard!
Your hard work is reflected in your contribution, reviews, etc.  We all are
delighted to keep working with you and keep having the fun of learning,
sharing and caring for the TomEE community :)

El mar, 12 ene 2021 a las 18:34, Daniel Dias Dos Santos (<
daniel.dias.analist...@gmail.com>) escribió:

> Congratulations Richard very deserved 
>


-- 
Atentamente:
César Hernández.


Re: Tomee 10.0.21 Class cast Exception when undeploying application with @PostConstruct LifeCycle

2022-09-02 Thread Cesar Hernandez
Hi Rod,

I would assume you are using TomEE 9. x milestone release because you are
using the Jakarta namespace. If this is not the case, you can find the
latest TomEE 9.x.x-M  release here https://tomee.apache.org/download.html

Indeed your app packaging seems to be missing the actual servlet class, a
tree command to the exploited .war does not show the class file for
LoggerServlet.java at all.

ch3-03-slsb-servlet-1.0.0 tree
.
├── META-INF
│   ├── MANIFEST.MF
│   └── maven
│   └── apress.jakarta.persistence.ee10
│   └── ch3-03-slsb-servlet
│   ├── pom.properties
│   └── pom.xml
└── WEB-INF
├── classes
└── lib
├── ch3-02-slsb-model-1.0.0.jar
├── derby-10.14.2.0.jar
├── derbyclient-10.14.2.0.jar
└── derbytools-10.14.2.0.jar

7 directories, 7 files



El vie, 2 sept 2022 a las 15:49, Rob Leland ()
escribió:

> Summary:
>
> I am seeing the Class cast Exception shown at the bottom when stopping the
> container.
> The tomee profile I downloaded seems to have the required EE jars under
> tomee/lib.
>
> I tried the code on GlassFish 6.2.5 and did not see this error.
>
>
> Note:
> The  code I am working  with is 2  classes, see below, is from a Book on
> Jakarta Persistence.
> There may be come issues with the code itself since the Servlet is not
> Displayed , but that may also be due to my setup I am still checking.
>
> The WAR WEB-INF/lib folder only has Derby Jars nothing else.
>
> The Repo with this code is at:
> https://github.com/free2create/pro-jakarta-persistence-jakarta-ee10
>
> It uses maven to build and after building you would want to deploy:
> examples/Chapter3/03-slsbLifecycleExample/servlet/target/ WAR file.
>
> __
> LoggerBean.java:
> __
> package examples.stateless;
>
> import jakarta.annotation.PostConstruct;
> import jakarta.ejb.Stateless;
> import java.util.logging.Logger;
>
> @Stateless
> public class LoggerBean {
> private Logger logger;
>
> @PostConstruct
> private void init() {
> logger = Logger.getLogger("notification");
> }
>
> public void logMessage(String message) {
> logger.info(message);
> }
> }
> _
> LoggerServlet.java
> _
>
> package examples.servlet;
>
> import java.io.IOException;
> import java.io.PrintWriter;
>
> import javax.naming.InitialContext;
> import jakarta.servlet.ServletException;
> import jakarta.servlet.http.HttpServlet;
> import jakarta.servlet.http.HttpServletRequest;
> import jakarta.servlet.http.HttpServletResponse;
> import jakarta.servlet.annotation.WebServlet;
> import jakarta.ejb.EJB;
>
> import examples.stateless.LoggerBean;
>
> @WebServlet(name="LoggerServlet",
> urlPatterns="/LoggerServlet")
> public class LoggerServlet extends HttpServlet {
>
> private final String TITLE =
> "Chapter 3: Stateless Session Bean Lifecycle Example";
>
> private final String DESCRIPTION =
> "This example demonstrates the basic use of lifecycle callbacks to
> initialize a Stateless Session Bean. " +
> "Enter a and click 'Go'.  This will trigger a servlet client that
> talks " +
> "to a Stateless Session Bean to log a message.";
>
> @EJB LoggerBean logger;
>
> public void doGet(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException {
> response.setContentType("text/html");
> PrintWriter out = response.getWriter();
> printHtmlHeader(out);
>
> // if there was a message submitted, log it
> String message = request.getParameter("message");
> if (message != null) {
> // use the logger bean to log a message
> logger.logMessage(message);
> out.println("Message '" + message + "' sent to logger.  " +
> "See the output on the server console or the log file at
> SERVER_ROOT/glassfish/domains/domain1/logs/server.log.");
> }
>
> printHtmlFooter(out);
> }
>
>
> private void printHtmlHeader(PrintWriter out) throws IOException {
> //Code Deleted
> }
>
>
> private void printHtmlFooter(PrintWriter out) throws IOException {
> //Code Deleted
> }
> }
>
> __
> Exception
> __
>
>
>
> 02-Sep-2022 16:38:17.996 WARNING [main]
>
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches
> Failed to clear soft references from ObjectStreamClass$Caches for web
> application [ch3-03-slsb-servlet-1.0.0]
> java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1
> cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1
> and java.util.Map are in module java.base of loader 'bootstrap')
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2374)
> at
>
> 

Re: Tomee 10.0.21 Class cast Exception when undeploying application with @PostConstruct LifeCycle

2022-09-07 Thread Cesar Hernandez
Hi Rod,

I tested your example code
examples/Chapter3/03-slsbLifecycleExample/servlet/, and it's working now
with latest TomEE 9.0.0-M8:)!.

I see Richard already replied and patched the shutdown exception via
TOMEE-4032 [1], thank you for filling the JIRA and Richard for the patch
and overall follow-up.

[1]
https://issues.apache.org/jira/browse/TOMEE-4032?jql=project%20%3D%20TOMEE%20AND%20fixVersion%20%3D%209.0.0-M9

El vie, 2 sept 2022 a las 17:51, Rob Leland ()
escribió:

> Thanks, that was the key to fixing the application which now works!
>
> However: I am still seeing the same exception when stopping tomcat:
>
> java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1
> cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1
> and java.util.Map are in module java.base of loader 'bootstrap
>
>
> I tried this under both Java 11 & 17 with the same result
>
>
>
>
>
>
> On Fri, Sep 2, 2022 at 6:35 PM Cesar Hernandez 
> wrote:
>
> > Hi Rod,
> >
> > I would assume you are using TomEE 9. x milestone release because you are
> > using the Jakarta namespace. If this is not the case, you can find the
> > latest TomEE 9.x.x-M  release here
> https://tomee.apache.org/download.html
> >
> > Indeed your app packaging seems to be missing the actual servlet class, a
> > tree command to the exploited .war does not show the class file for
> > LoggerServlet.java at all.
> >
> > ch3-03-slsb-servlet-1.0.0 tree
> > .
> > ├── META-INF
> > │   ├── MANIFEST.MF
> > │   └── maven
> > │   └── apress.jakarta.persistence.ee10
> > │   └── ch3-03-slsb-servlet
> > │   ├── pom.properties
> > │   └── pom.xml
> > └── WEB-INF
> > ├── classes
> > └── lib
> > ├── ch3-02-slsb-model-1.0.0.jar
> > ├── derby-10.14.2.0.jar
> > ├── derbyclient-10.14.2.0.jar
> > └── derbytools-10.14.2.0.jar
> >
> > 7 directories, 7 files
> >
> >
> >
> > El vie, 2 sept 2022 a las 15:49, Rob Leland ()
> > escribió:
> >
> > > Summary:
> > >
> > > I am seeing the Class cast Exception shown at the bottom when stopping
> > the
> > > container.
> > > The tomee profile I downloaded seems to have the required EE jars under
> > > tomee/lib.
> > >
> > > I tried the code on GlassFish 6.2.5 and did not see this error.
> > >
> > >
> > > Note:
> > > The  code I am working  with is 2  classes, see below, is from a Book
> on
> > > Jakarta Persistence.
> > > There may be come issues with the code itself since the Servlet is not
> > > Displayed , but that may also be due to my setup I am still checking.
> > >
> > > The WAR WEB-INF/lib folder only has Derby Jars nothing else.
> > >
> > > The Repo with this code is at:
> > > https://github.com/free2create/pro-jakarta-persistence-jakarta-ee10
> > >
> > > It uses maven to build and after building you would want to deploy:
> > > examples/Chapter3/03-slsbLifecycleExample/servlet/target/ WAR file.
> > >
> > > __
> > > LoggerBean.java:
> > > __
> > > package examples.stateless;
> > >
> > > import jakarta.annotation.PostConstruct;
> > > import jakarta.ejb.Stateless;
> > > import java.util.logging.Logger;
> > >
> > > @Stateless
> > > public class LoggerBean {
> > > private Logger logger;
> > >
> > > @PostConstruct
> > > private void init() {
> > > logger = Logger.getLogger("notification");
> > > }
> > >
> > > public void logMessage(String message) {
> > > logger.info(message);
> > > }
> > > }
> > > _
> > > LoggerServlet.java
> > > _
> > >
> > > package examples.servlet;
> > >
> > > import java.io.IOException;
> > > import java.io.PrintWriter;
> > >
> > > import javax.naming.InitialContext;
> > > import jakarta.servlet.ServletException;
> > > import jakarta.servlet.http.HttpServlet;
> > > import jakarta.servlet.http.HttpServletRequest;
> > > import jakarta.servlet.http.HttpServletResponse;
> > > import jakarta.servlet.annotation.WebServlet;
> > > import jakarta.ejb.EJB;
> > >
> > > import examples.stateless.LoggerBean;
> > >
> > > @WebServlet(name="LoggerS

Re: WebService not created with Apache Tomee Webprofile 7.1.4

2022-08-17 Thread Cesar Hernandez
Hello,

Assuming your war file name is my-app.war and that your JAX-WS resource
class is called MyWebService.java, the following should be the URL that you
can use to access the WSDL file:

http://localhost:8080/my-app/webservices/MyWebService?WSDL

If this doesn't work, please share your project so we can have a look at it.

El mié, 17 ago 2022 a las 6:00,  escribió:

> Hi guys,
>
> I set up the Simple Webservice as explained here:
> https://github.com/apache/tomee/tree/tomee-7.1.x/examples/simple-webservice[https://deref-web.de/mail/client/JqF-rJJLg5c/dereferrer/?redirectUrl=https%3A%2F%2Fgithub.com%2Fapache%2Ftomee%2Ftree%2Ftomee-7.1.x%2Fexamples%2Fsimple-webservice]
> 
>
> Now I found out that the CalculatorTest works as expected:
>
> Aug 17, 2022 10:58:20 AM
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service {
> http://superbiz.org/wsdl[https://deref-web.de/mail/client/z9_APtea-dU/dereferrer/?redirectUrl=http%3A%2F%2Fsuperbiz.org%2Fwsdl][http://superbiz.org/wsdl[https://deref-web.de/mail/client/z9_APtea-dU/dereferrer/?redirectUrl=http%3A%2F%2Fsuperbiz.org%2Fwsdl]]}CalculatorService
> 
> from WSDL: http://localhost:46405/main/Calculator?wsdl
> Aug 17, 2022 10:58:20 AM
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service {
> http://superbiz.org/wsdl[https://deref-web.de/mail/client/z9_APtea-dU/dereferrer/?redirectUrl=http%3A%2F%2Fsuperbiz.org%2Fwsdl][http://superbiz.org/wsdl[https://deref-web.de/mail/client/z9_APtea-dU/dereferrer/?redirectUrl=http%3A%2F%2Fsuperbiz.org%2Fwsdl]]}CalculatorService
> 
> from WSDL: http://localhost:46405/main/Calculator?wsdl
>
> The war is deployed to an TomEE 7.1.4 but I can't see that a WSDL is
> created?
>
>
> 17-Aug-2022 11:01:13.128 INFO [localhost-startStop-1]
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Deploying web
> application archive
> [/opt/tomee/apache-tomee-webprofile-7.1.4/webapps/tomeeresearch.war]
> 17-Aug-2022 11:01:13.136 INFO [localhost-startStop-1]
> org.apache.tomee.catalina.TomcatWebAppBuilder.init
> - localhost -> /tomeeresearch
> 17-Aug-2022 11:01:13.249 INFO [localhost-startStop-1]
> org.apache.openejb.config.ConfigurationFactory.configureApplication
> Configuring enterprise application:
> /opt/tomee/apache-tomee-webprofile-7.1.4/webapps/tomeeresearch
> 17-Aug-2022 11:01:13.330 INFO [localhost-startStop-1]
> org.apache.openejb.config.AutoConfig.createContainer Auto-creating a
> container for bean tomeeresearch.Comp169922: Container(type=MANAGED,
> id=Default Managed Container)
> 17-Aug-2022 11:01:13.358 INFO [localhost-startStop-1]
> org.apache.openejb.config.AppInfoBuilder.build Enterprise application
> "/opt/tomee/apache-tomee-webprofile-7.1.4/webapps/tomeeresearch" loaded.
> 17-Aug-2022 11:01:13.361 INFO [localhost-startStop-1]
> org.apache.openejb.assembler.classic.Assembler.createApplication Assembling
> app: /opt/tomee/apache-tomee-webprofile-7.1.4/webapps/tomeeresearch
> 17-Aug-2022 11:01:13.399 INFO [localhost-startStop-1]
> org.apache.openejb.assembler.classic.JndiBuilder.bind
> Jndi(name=global/tomeeresearch/Calculator!org.superbiz.calculator.ws.CalculatorWs)
> --> Ejb(deployment-id=Calculator)
> 17-Aug-2022 11:01:13.399 INFO [localhost-startStop-1]
> org.apache.openejb.assembler.classic.JndiBuilder.bind
> Jndi(name=global/tomeeresearch/Calculator) --> Ejb(deployment-id=Calculator)
> 17-Aug-2022 11:01:13.487 INFO [localhost-startStop-1]
> org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for
> file:/opt/tomee/apache-tomee-webprofile-7.1.4/webapps/tomeeresearch/WEB-INF/classes/
> looking all classes to find CDI beans, maybe think to add a beans.xml if
> not there or add the jar to exclusions.list
> 17-Aug-2022 11:01:13.720 INFO [localhost-startStop-1]
> org.apache.openejb.assembler.classic.Assembler.createApplication Deployed
> Application(path=/opt/tomee/apache-tomee-webprofile-7.1.4/webapps/tomeeresearch)
> 17-Aug-2022 11:01:13.891 INFO [localhost-startStop-1]
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Deployment of web
> application archive
> 

Re: CVE-2016-3088

2023-01-30 Thread Cesar Hernandez
@Francois
What vulnerability scan are you using? maybe you can file this as a false
positive in the scanner project.




El vie, 27 ene 2023 a las 13:34, Richard Zowalla ()
escribió:

> TomEE relies on activemq 5.16.5.
>
> According to [1], the fileserver was removed with 5.14.0.
>
> Gruß
> Richard
>
> [1]
>
> https://activemq.apache.org/security-advisories.data/CVE-2016-3088-announcement.txt
>
> Am Freitag, dem 27.01.2023 um 18:05 + schrieb COURTAULT Francois:
> > Hello everyone,
> >
> > We scan the vulnerabilities in TomEE Plus 8.0.14 and we have
> > discovered the following CVE: CVE-2016-3088 which prevent us to use
> > this version :(
> > It seems it is due to activemq-protobuf-1.1.jar.
> >
> > The question: Is the ActiveMQ Fileserver web application deployed in
> > TomEE 8.0.14 and TomEE 9.0.0 ?
> > If not the CVE-2016-3088 doesn't affect TomEE 8.0.14 and 9.0.0, right
> > ?
> >
> > Best Regards.
> >
> >
> >
>
>

-- 
Atentamente:
César Hernández.


Re: NullPointerException at startup

2023-04-20 Thread Cesar Hernandez
Hi Kevin,

The error you are getting seems to come from the ROOT application, a couple
of questions:

- how did you deploy your application?
- Is you application an a ear, jar or war file?
- You can attach the rest of the Catalina log to enable further
troubleshooting on the deployment issue you are having.

As a reference, the TomEE examples can serve as a good starting point to
know how to package and build your application(s):
You can download individual example code from here:
https://github.com/apache/tomee/tree/a5bd7f916eff5f6b942dc8bbf7fdcab194055949/examples
The Overall documentation for each example:
https://tomee.apache.org/tomee-8.0/examples/


[1]
directory [/opt/Apache/tomcat/apache-tomee-plus-8.0.14/webapps/ROOT]

El mié, 19 abr 2023 a las 13:03, Kevin Huntly ()
escribió:

> Hi Everyone,
>
> I'm new to TomEE, I just downloaded and installed 8.0.14 (I know 9 is out,
> but I need to develop for a 1.8 JDK). I'm seeing this exception on start:
>
> 19-Apr-2023 14:56:35.080 SEVERE [main]
> sun.reflect.NativeMethodAccessorImpl.invoke Error deploying web application
> directory [/opt/Apache/tomcat/apache-tomee-plus-8.0.14/webapps/ROOT]
> java.lang.IllegalStateException: Error starting child
> at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)
> at
>
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1184)
> at
>
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1932)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
>
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
>
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
> at
>
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1094)
> at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476)
> at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1617)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
> at
>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at
>
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
> at
> org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
> at
>
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
>
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
> at
>
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
>
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
>
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
> at
>
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
> at
>
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:265)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
>
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:430)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
>
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.startup.Catalina.start(Catalina.java:772)
> 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.catalina.startup.Bootstrap.start(Bootstrap.java:347)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
> Caused by: 

Re: Eclipse EJB and TomEE

2023-05-23 Thread Cesar Hernandez
Hello,

The project type needs to be Dynamic Web Project as described in
https://tomee.apache.org/tomee-9.0/docs/tomee-and-eclipse.html
I did a quick test using Eclipse Version: 2023-03 (4.27.0), TomEE plume
9.0.0 and Java 17, and I was able to set up TomEE as a runtime for a
Dynamic Web Project and add an EJB as described in the previous
documentation.
TomEE is a platform that is developed using Tomcat as its foundation, and
Tomcat, as far as I recall, doesn't appear as part of the EJB project
runtimes since it's not an EJB runtime out of the box.

El mar, 23 may 2023 a las 8:01, Devashis Jana ()
escribió:

> Hi, I am an individual learning EJB using Eclipse (2023-03) and TomEE
> (9.0). I have Glassfish 7 and TomEE 9 installed within eclipse, the
> latter using the Tomcat 10.0 server adapter. When I do File > New >
> Dynamic Web Project, then TomEE shows up in the Target Runtime listbox.
> I have used it to create JSF and backing bean with a JNDI database
> resource and everything works fine.
>
> Now I want to try an EJB project, but when I do File > New > EJB
> Project, TomEE does not show up in the Target Runtime listbox. Only
> Glassfish does. How do I get TomEE to show up in the listbox? Can anyone
> point me to the documentation where I could find out more about this - I
> couldn't find anything. Thank you.
>
>

-- 
Atentamente:
César Hernández.


Re: Error when starting up TomEE Plus 9.1.2

2024-02-16 Thread Cesar Hernandez
Hello,

It seems the name changed [1] around Tomcat 10.0.0-M2 milestones.
https://tomcat.apache.org/tomcat-10.0-doc/changelog.html

[1]
Rename org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
to org.apache.tomcat.util.digester.EnvironmentPropertySource. Patch
provided by Bernd Bohmann. (markt)

El vie, 16 feb 2024 a las 10:59, COURTAULT Francois
() escribió:

> THALES GROUP LIMITED DISTRIBUTION to email recipients
>
> Hello everyone,
>
> A person who has left the company add this line in the catalina.properties
> file:
>
> org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
>
> Reading at Tomcat 8.5 doc, I found this
> org.apache.tomcat.util.digester.PROPERTY_SOURCE : Set this to a comma
> separated list of fully qualified name of classes that implement
> org.apache.tomcat.util.IntrospectionUtils.PropertySource.
> Required to have a public constructor with no arguments.
>
> Possible value: org.apache.tomcat.util.digester.EnvironmentPropertySource
> and not org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
> as the person set it.
>
> org.apache.tomcat.util.digester.EnvironmentPropertySource can be used to
> replace parameters from the process' environment variables, e.g. injected
> ConfigMaps or Secret objects in container based systems like OpenShift or
> Kubernetes.
>
> Do you think that this person has made a mistake?
>
> The funny thing is that with TomEE Plus 8.0.16, the last sections of
> catalina.properties looks like below
> # String cache configuration.
> tomcat.util.buf.StringCache.byte.enabled=true
> #tomcat.util.buf.StringCache.char.enabled=true
> #tomcat.util.buf.StringCache.trainThreshold=50
> #tomcat.util.buf.StringCache.cacheSize=5000
>
> # Disable use of some privilege blocks Tomcat doesn't need since calls to
> the
> # code in question are always already inside a privilege block
> org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED=false
>
> org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
> and I got no error 
>
> With TomEEFull 9.1.2, the last section looks like below:
> # String cache configuration.
> tomcat.util.buf.StringCache.byte.enabled=true
> #tomcat.util.buf.StringCache.char.enabled=true
> #tomcat.util.buf.StringCache.trainThreshold=50
> #tomcat.util.buf.StringCache.cacheSize=5000
>
> org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
>
> This time I got some errors like
>
>   *   16-Feb-2024 08:35:34.848 SEVERE [main]
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke Error loading property
> source [org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource]
> java.lang.ClassNotFoundException:
> org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
>
> I don’t understand why I got no error with TomEE Plus 8.0.16 because in
> each case the class
> org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
> doesn’t exist. I was not able to find it (it should be in the
> tomcat-util-scan.jar).
>
> So my guess is that this guy did a mistake by setting the property
> org.apache.tomcat.util.digester.PROPERTY_SOURCE to
> org.apache.tomcat.util.digester.Digester$EnvironmentPropertySource
> instead of org.apache.tomcat.util.digester.EnvironmentPropertySource.
> Do you agree ?
>
> Best Regards.
>
>
>
>

-- 
Atentamente:
César Hernández.