No provider available for resource-ref 'null' of type 'javax.servlet.http.HttpServletResponse'

2012-09-19 Thread Jeremyau
I'm working on a Spring Application using RESTful on TomEE snapshot. 

If I delete the hadoop-core-1.0.0.jar and the oauth-server-1.8.jar, this
error disappears and the application works well.

I've seen there were some people having this same error on TomEE 1.0 but it
should be fixed on trunk right?

Any idea? Thanks!

Here's the error:

org.apache.openejb.OpenEJBException: No provider available for resource-ref
'null' of type 'javax.servlet.http.HttpServletResponse' for 'localhost/'.
at
org.apache.openejb.config.AutoConfig.autoCreateResource(AutoConfig.java:1751)
at 
org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1744)
at 
org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1695)
at
org.apache.openejb.config.AutoConfig.processJndiRefs(AutoConfig.java:723)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:698)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:191)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:359)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:846)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:794)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:749)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Sep 19, 2012 5:07:26 PM org.apache.catalina.core.ContainerBase removeChild
SEVERE: ContainerBase.removeChild: destroy: 
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
attempted ([before_destroy]) for component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] in
state [STARTING_PREP]
at
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:408)
at 
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:298)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:971)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:950)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:800)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:749)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
j

Re: Next TomEE release date?

2012-09-07 Thread Jeremyau
I'm really interested about this question as well since there is a couple of
issues that have been fixed. (Hibernate, Grails...) Has someone an idea
about that?



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Next-TomEE-release-date-tp4657315p4657331.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Grails on TomEE

2012-08-07 Thread Jeremyau
Is this feature (openejb.bean-validation.provider) in the trunk? Or is it
implemented on TomEE 1.0? Because I only have TomEE 1.0 and I don't want to
use the trunk as I use TomEE for production.



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Grails-on-TomEE-tp4656642p4656697.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Grails on TomEE

2012-08-07 Thread Jeremyau
Where do I set up this property? I tried in conf/system.properties but it
does not work as the lib is in the war and not in /bin.



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Grails-on-TomEE-tp4656642p4656691.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Grails on TomEE

2012-08-03 Thread Jeremyau
I have found the issue. This is the validation-api-1.0.0.GA.jar. It's kind of
weird because if I delete this jar from the war file, it works. If I delete
the bval-jsr303-0.4.jar from ToMEE, it works. Which means that there is a
kind of conflict right?

Thanks again for your help Romain!



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Grails-on-TomEE-tp4656642p4656667.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Grails on TomEE

2012-08-03 Thread Jeremyau
I have found the issue. This is the validation-api-1.0.0.GA.jar. 

I don't know if there is another way to fix that than delete this jar from
the war file.

Thanks again for your help Romain!



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Grails-on-TomEE-tp4656642p465.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Grails on TomEE

2012-08-03 Thread Jeremyau
Sorry I had not understood. Anyway, I tried and it does not work
unfortunately.



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Grails-on-TomEE-tp4656642p4656664.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Grails on TomEE

2012-08-03 Thread Jeremyau
Here's the war file: http://www.speedyshare.com/fjnet/grail.war
http://www.speedyshare.com/fjnet/grail.war 

I just dropped it in webapps and 'catalina.sh run'.



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Grails-on-TomEE-tp4656642p4656662.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: TomEE in Stackato

2012-08-03 Thread Jeremyau
To answer to Z:

*Does Stackato offer DB (Postgres):*
Yes. Stackato can automatically set up PostgreSQL databases (or MySQL, or
Redis, or Mongodb) when you deploy your application.

*and Tomee clustering/failover/load balancing in the cloud?*
You can your app to multiple instances (each in its own Linux container) and
Stackato's router will load balance between instances running in a cluster
of VMs. If one of the instances (or the VM that hosts it) goes down,
Stackato has a Health Manager component that will notify the Cloud
Controller which will launch a new instance on a healthy VM.

*Which providers (Amazon, Rackspace, etc)*
There are images available on Amazon EC2 (v2.0) and HP Cloud Services
(v1.2.6 currently, v2.0 coming soon) plus any cloud hosting provider or
hypervisor that will allow you to import our VM images:
http://www.activestate.com/stackato/download_vm
http://www.activestate.com/stackato/download_vm 

*What does Stackato offer over just using cloud services from Amazon?*
Lots. A Stackato system (be it a single instance, or a cluster) is Platform
as a Service software. It does all of application setup for you.
http://www.activestate.com/stackato/features
http://www.activestate.com/stackato/features 

*Why is not there any pricing info no the site?*
There are some variables with the pricing model, including the scale of the
deployment. Contact stackato-sa...@activestate.com They’d be pleased to
speak with you regarding your objectives, your scenario in terms of #/type
of applications you plan to deploy, and they can provide insight into the
pricing model and variables.

If you have questions about Stackato, I think it would be better if you pm
me or if you contact sa...@activestate.com as this forum/mailing list is
about TomEE. :)

Jeremy



--
View this message in context: 
http://openejb.979440.n4.nabble.com/TomEE-in-Stackato-tp4656636p4656661.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Grails on TomEE

2012-08-03 Thread Jeremyau
Oh I'm not talking about my war file. I deleted the bval-jsr303-0.4.jar file
of TomEE and it did work! If I leave this jar in tomee/lib, it does not
work.



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Grails-on-TomEE-tp4656642p4656659.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Grails on TomEE

2012-08-02 Thread Jeremyau
Hi,

I tried to deploy a simple grails application on TomEE and it seems there is
an issue with the bean validation librarie. 

What I did is:
grails create-app
grails war (to create the war file)

When I delete the bval-jsr303-0.4.jar, it works.

Here are my logs:

Using CATALINA_BASE:   /home/jeremya/Documents/tomee_FP
Using CATALINA_HOME:   /home/jeremya/Documents/tomee_FP
Using CATALINA_TMPDIR: /home/jeremya/Documents/tomee_FP/temp
Using JRE_HOME:/usr/lib/jvm/java-7-openjdk-amd64/
Using CLASSPATH:  
/home/jeremya/Documents/tomee_FP/bin/bootstrap.jar:/home/jeremya/Documents/tomee_FP/bin/tomcat-juli.jar
Aug 02, 2012 5:00:28 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Aug 02, 2012 5:00:28 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 02, 2012 5:00:28 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 02, 2012 5:00:29 PM org.apache.openejb.server.ServiceLogger 
INFO: can't find log4j MDC class
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO:

Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: OpenEJB http://openejb.apache.org/
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: Startup: Thu Aug 02 17:00:29 PDT 2012
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: Copyright 1999-2012 (C) Apache OpenEJB Project, All Rights Reserved.
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: Version: 4.0.0
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: Build date: 20120426
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: Build time: 08:49
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO:

Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: openejb.home = /home/jeremya/Documents/tomee_FP
Aug 02, 2012 5:00:29 PM org.apache.openejb.OpenEJB$Instance 
INFO: openejb.base = /home/jeremya/Documents/tomee_FP
Aug 02, 2012 5:00:29 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
INFO: Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@1ea57c18
Aug 02, 2012 5:00:29 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
INFO: succeeded in installing singleton service
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory init
INFO: openejb configuration file is
'/home/jeremya/Documents/tomee_FP/conf/tomee.xml'
Aug 02, 2012 5:00:29 PM org.apache.openejb.util.OptionsLog info
INFO: Using 'openejb.provider.default=org.apache.tomee'
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=Tomcat Security Service, type=SecurityService,
provider-id=Tomcat Security Service)
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=My DataSource, type=Resource,
provider-id=Default JDBC Database)
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=My Unmanaged DataSource, type=Resource,
provider-id=Default JDBC Database)
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=My Singleton Container, type=Container,
provider-id=Default Singleton Container)
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=My Stateful Container, type=Container,
provider-id=Default Stateful Container)
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=My Stateless Container, type=Container,
provider-id=Default Stateless Container)
Aug 02, 2012 5:00:29 PM org.apache.openejb.util.OptionsLog info
INFO: Using 'openejb.system.apps=true'
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.ConfigurationFactory
configureApplication
INFO: Configuring enterprise application: null
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.InitEjbDeployments deploy
INFO: Using openejb.deploymentId.format '{ejbName}'
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.InitEjbDeployments deploy
INFO: Auto-deploying ejb openejb/Deployer:
EjbDeployment(deployment-id=openejb/Deployer)
Aug 02, 2012 5:00:29 PM org.apache.openejb.config.InitEjbDeployments deploy
INF

TomEE in Stackato

2012-08-02 Thread Jeremyau
Hi! 

I work for ActiveState company. We've choosed to integrate TomEE in our PaaS
Stackato and it rocks! Thanks for your great work and your help when I
needed. 

http://www.activestate.com/blog/2012/08/stackato-20-and-apache-tomee
http://www.activestate.com/blog/2012/08/stackato-20-and-apache-tomee 

Cheers, 
Jeremy



--
View this message in context: 
http://openejb.979440.n4.nabble.com/TomEE-in-Stackato-tp4656636.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


TomEE on Stackato

2012-08-02 Thread Jeremyau
Hi!

I work for ActiveState company. We've choosed to integrate TomEE in our PaaS
Stackato and it rocks! Thanks for your great work and your help when I
needed. 

http://www.activestate.com/blog/2012/08/stackato-20-and-apache-tomee
http://www.activestate.com/blog/2012/08/stackato-20-and-apache-tomee 

Cheers,
Jeremy



--
View this message in context: 
http://openejb.979440.n4.nabble.com/TomEE-on-Stackato-tp4656634.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: MovieFun

2012-07-17 Thread Jeremyau
It's actually here:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webapps/moviefun/app/src/main/resources/META-INF/

But I guess I can't commit on the repo?

--
View this message in context: 
http://openejb.979440.n4.nabble.com/MovieFun-tp4656353p4656356.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


MovieFun

2012-07-17 Thread Jeremyau
Hi,

I've tried the movieFun example but the JSF part did not work. So I've just
added a beans.xml in moviefun/app/src/main/resources/META-INF and it worked!

Hope it'll help!

Jeremy

--
View this message in context: 
http://openejb.979440.n4.nabble.com/MovieFun-tp4656353.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Tomee Runner (Deploy on ROOT)

2012-07-05 Thread Jeremyau
Sweet! It works well now. Again and again, thanks for you quick response and
great work!

I've committed my work here:  https://github.com/Stackato-Apps/Numberguess
https://github.com/Stackato-Apps/Numberguess . If you want to run it:

mvn clean package
java -jar lib/tomee-embedded-1.1.0-SNAPSHOT-uber.jar --path target/*.war
--context /

I have uploaded the tomee-runner in the lib directory for now. But I'll add
a dependency in the future.

Jeremy

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Tomee-Runner-Deploy-as-root-tp4656034p4656071.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Tomee Runner (Deploy on ROOT)

2012-07-04 Thread Jeremyau
Hi!

So, I'm currently working with a basic application which I want to deploy on
Tomee Runner. 

To do that, I use tomee-embedded-1.1.0-SNAPSHOT-uber.jar which works pretty
well!

The thing is I want to deploy my application as ROOT. What I mean is I want
to see my application at 'localhost:8080'. And not
'localhost:8080/applicationName'. I tried to rename my war ROOT.war but it
does not work. (localhost:8080/ROOT)

Any idea?

Thanks,
Jeremy

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Tomee-Runner-Deploy-on-ROOT-tp4656034.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Difference between Tomee and JBoss

2012-07-04 Thread Jeremyau
Thanks for your answers. 

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Difference-between-Tomee-and-JBoss-tp4655990p4656024.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Difference between Tomee and JBoss

2012-07-03 Thread Jeremyau
Hi,

I just read a interesting interview David Blevins did :
http://jaxenter.com/tomee-be-small-be-certified-be-tomcat-38434.html.

In this interview, he said that Tomee is really close to JBoss. 

Before Tomee, I knew that JBoss could support JEE application. Tomcat could
not. So what about now? What is different between these two servers? Why
would I choose one instead of the other one?

Thanks.
Jeremy

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Difference-between-Tomee-and-JBoss-tp4655990.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-27 Thread Jeremyau
You're more than welcome!

Thanks for your help (especially Romain) and your great work! 

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655858.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-26 Thread Jeremyau
Hi,

Here is the source updated of the pet-catalog application for Tomee if some
people are interested:
https://github.com/Stackato-Apps/pet-catalog/tree/stackato

Jeremy

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655815.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-13 Thread Jeremyau
Ok it works well! I did some small changes. (Annotation, JTA...)

Thanks Romain!

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655597.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


RE: Deploying Pet-catalog

2012-06-08 Thread Jeremyau
Ok so after several tests, it actually seems the problem comes from my
managedBean. 

I've got a managedBean named catalog:
@ManagedBean
@SessionScoped
public class Catalog

And I call it in my view:
...action="#{catalog.prev}"...

But it's null. I've added a trace in my Catalog.java:
public String prev() {
System.out.println("Call of prev function");
reset(false);
getPagingInfo().previousPage();
return "list";
}

But nothing appears in the catalina.out.

Also, you told me that there is a bug fixed on the trunk. I've tried, same
issue.

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655527.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-07 Thread Jeremyau
Here, it is:

Jun 07, 2012 3:56:55 PM org.apache.openejb.config.ConfigurationFactory
configureApplication
INFO: Configuring enterprise application:
/home/jeremya/Documents/Tomcat/apache-tomee-plus-1.0.0/webapps/ROOT
Jun 07, 2012 3:56:55 PM org.apache.openejb.config.AutoConfig deploy
INFO: Configuring PersistenceUnit(name=catalogPU)
Jun 07, 2012 3:56:55 PM org.apache.openejb.config.AutoConfig
logAutoCreateResource
INFO: Auto-creating a Resource with id 'jdbc/petcatalogNonJta' of type
'DataSource for 'catalogPU'.
Jun 07, 2012 3:56:55 PM org.apache.openejb.config.AutoConfig deploy
INFO: Configuring Service(id=jdbc/petcatalogNonJta, type=Resource,
provider-id=jdbc/petcatalog)
Jun 07, 2012 3:56:55 PM org.apache.openejb.assembler.classic.Assembler
createRecipe
INFO: Creating Resource(id=jdbc/petcatalogNonJta)
Jun 07, 2012 3:56:55 PM org.apache.openejb.config.AutoConfig
setNonJtaDataSource
INFO: Adjusting PersistenceUnit catalogPU  to Resource
ID 'jdbc/petcatalogNonJta' from 'null'
Jun 07, 2012 3:56:55 PM org.apache.openejb.config.AppInfoBuilder build
INFO: Enterprise application
"/home/jeremya/Documents/Tomcat/apache-tomee-plus-1.0.0/webapps/ROOT"
loaded.
Jun 07, 2012 3:56:55 PM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Assembling app:
/home/jeremya/Documents/Tomcat/apache-tomee-plus-1.0.0/webapps/ROOT
Jun 07, 2012 3:56:55 PM org.apache.bval.jsr303.ConfigurationImpl
parseValidationXml
INFO: ignoreXmlConfiguration == true

Let me know if it's not enough.

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655494.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-07 Thread Jeremyau
Ok, I'm still trying to make it work. Now I'm working on the persistence
side.

So I've defined a resource in tomee.xml. I've added the mysql-connectors.jar
in the tomee lib directory.
...

  JdbcDriver com.mysql.jdbc.Driver
  JdbcUrl jdbc:mysql://localhost:3306/test?autoReconnect=true 
  UserName root
  Password root
  JtaManaged true

...
*First question*: Is it possible to define the tomee.xml in my project?
Therefore, I could add mysql-connectors dependency to my project instead of
adding it in the tomee server.

Then, I've also defined the persistence.xml
...
  
jdbc/petcatalog
model.Item

  
...
And finally, my entity manager:
...
@PersistenceContext(unitName = "catalogPU")
private EntityManager em;
...
Unfortunately, nothing happens... It seems my application does not access to
the database for some reason.  The application is started but it is just
empty.

Where am I wrong?

Thanks.

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655492.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-06 Thread Jeremyau
It works ! You were right. I missed metadata-complete="true" in
web.xml.

Thanks so much Romain. That's awesome!

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655468.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-06 Thread Jeremyau
Thank you for your answer.

I did the same and I still have the same issue...

I just changed:

  
jdbc/petcatalog

 
  

And I got :

"user lacks privilege or object not found"

I guess I forgot something but I can't figure out what. As the error is
about privilege, maybe it's about tomcat-user.xml?

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655467.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-06 Thread Jeremyau
Ok so I git co the tomee trunk and build it with maven. Everything is ok,
I've got my zip file with tomee plus.

I repeat the same step:
1. Delete the ROOT folder in webapp
2. Deploy my application (I've deployed 2 wars: ROOT.war and catalog.war
which both contain pet-catalog application)
3. I run the tomee server

localhost:8080/catalog => OK
localhost:8080 => Error

javax.servlet.ServletException: javax.el.ELException: Error reading 'items'
on type controller.Catalog
javax.faces.webapp.FacesServlet.service(FacesServlet.java:229)

root cause

org.apache.myfaces.view.facelets.el.ContextAwareELException:
javax.el.ELException: Error reading 'items' on type controller.Catalog

org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:104)
javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:246)

...

javax.ejb.EJBException: The bean encountered a non-application exception;
nested exception is: 

org.apache.openjpa.persistence.PersistenceException: user lacks privilege or
object not found: ITEM {SELECT t0.id, t0.address_id, t0.description,
t0.imagethumburl, t0.imageurl, t0.name, t0.price, t0.product_id FROM item t0
ORDER BY 1 LIMIT ?} [code=-5501, state=42501]
FailedObject: select object(o) from Item as o [java.lang.String]

org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:368)

org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:288)

controller.ItemFacade$LocalBeanProxy.findRange(controller/ItemFacade.java)


So it's so weird. Why does it work only if the application name is different
than ROOT? It seems the tomee behaviour is different for the ROOT folder.

Any idea? I have also tried with the tomee plugin  (maven tomee:run) and it
works well. So, according to me, the problem does not come from the
application. Do you think so?

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655460.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-05 Thread Jeremyau
Oh I see. So how can I proceed to patch my Tomee server?

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655437.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-05 Thread Jeremyau
Yes, you're right. This is what I did but unfortunately, there is still the
same issue. 

I delete the ROOT folder.
I copy paste my ROOT.war.
I start the server.
TomEE deploy my ROOT.war and create a ROOT folder.
Still the same error.

I'm not familiar with EJB and JEE6 but it seems the error comes from
Catalog.java:
@EJB
private ItemFacade itemFacade;

itemFacade is null.

Any idea? Thanks for your help!
Jeremy
PS: If i deploy the war with a different name than 'ROOT' (like test.war,
catalog.war or whatever), then it works.

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655428.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-05 Thread Jeremyau
Thanks for your quick response Romain!

Well, it's really weird because 

I just downloaded 
http://mirror.csclub.uwaterloo.ca/apache/openejb/openejb-4.0.0/apache-tomee-1.0.0-plus.tar.gz
Apache TomEE Plus  1.0. 
I git clone  https://github.com/tikalk/jee6-pet-catalog-sample pet-catalog
project . 
I "mvn clean package'. (I just changed the version of the maven-war-plugin
to 2.2)
I renamed the war to "ROOT.war".
I deleted the default ROOT folder in the webapp folder.
I copied past my ROOT.war.
I ./bin/catalina.sh start.
And finally, localhost:8080 and I still got this error.

Did I do something wrong? Did you do the same? Please, let me know.

Thank you,
Jeremy

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655424.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Deploying Pet-catalog

2012-06-05 Thread Jeremyau
I copied pasted my ROOT.war to the webapp folder.* (Sorry)

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655425.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Deploying Pet-catalog

2012-06-05 Thread Jeremyau
Hi,

I'm trying to deploy the JEE6
https://github.com/tikalk/jee6-pet-catalog-sample pet-catalog example  on
TomEE plus. 
So I create the war file with maven and I deploy it on webapps. Everything
is ok, it works well.

But, when I change the name of the war file to "ROOT" and deploy it to TomEE
plus server, I've got an weird error:

SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path
[] threw exception [javax.el.ELException: Error reading 'pagingInfo' on type
controller.Catalog] with root cause
java.lang.NullPointerException
at controller.Catalog.getItemCount(Catalog.java:77)
at controller.Catalog.getPagingInfo(Catalog.java:37)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
...

I looked for the reason of this error but nothing found... I guess there is
something to change in the web.xml file but I can't figure out what.

Any help is welcome!

Thanks


--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421.html
Sent from the OpenEJB User mailing list archive at Nabble.com.