Ok, I found it’s going better when the file is ending with « .war ». With
“.jar” it stop (why?).
But now it could not start (Tomee 7.0.0-SNAPSHOT) because of this stack
strace :
INFO - using default host: localhost
INFO - ------------------------- localhost -> /
INFO - Using
'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager'
SEVERE - ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:629)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:575)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:976)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:693)
at
org.apache.tomee.embedded.Container.deployPathsAsWebapp(Container.java:266)
at
org.apache.tomee.embedded.Container.deployClasspathAsWebApp(Container.java:167)
at
org.apache.tomee.embedded.Container.deployClasspathAsWebApp(Container.java:148)
at org.apache.tomee.embedded.Main.main(Main.java:86)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize
component [org.apache.catalina.webresources.StandardRoot@7a7471ce]
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4845)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4975)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize
component [org.apache.catalina.webresources.FileResourceSet@267f474e]
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at
org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:669)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 15 more
Caused by: java.lang.IllegalArgumentException: The file specified by base
and internal path
[c:\devdata\projects\experimental\testtomee_001\target\testtomee_001-1.0-snapshot.war]\[/META-INF/resources]
does not exist.
at
org.apache.catalina.webresources.FileResourceSet.checkType(FileResourceSet.java:172)
at
org.apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.java:145)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 17 more
NFO - Undeploying app:
But this directory exists.
---------- Message transféré ----------
De : "yann Blazart" <[email protected]>
Date : 13 août 2015 16:24
Objet : Fwd: FW: Autonomus jar
À : <[email protected]>
Cc :
---------- Message transféré ----------
De : "Yann BLAZART" <[email protected]>
Date : 13 août 2015 16:23
Objet : FW: Autonomus jar
À : "[email protected]" <[email protected]>
Cc :
*From:* Yann BLAZART
*Sent:* jeudi 13 août 2015 15:45
*To:* '[email protected]'
*Subject:* Autonomus jar
Ok, I found it’s going better when the file is ending with « .war ». With
“.jar” it stop (why?).
But now it could not start (Tomee 7.0.0-SNAPSHOT) because of this stack
strace :
INFO - using default host: localhost
INFO - ------------------------- localhost -> /
INFO - Using
'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager'
SEVERE - ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:629)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:575)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:976)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:693)
at
org.apache.tomee.embedded.Container.deployPathsAsWebapp(Container.java:266)
at
org.apache.tomee.embedded.Container.deployClasspathAsWebApp(Container.java:167)
at
org.apache.tomee.embedded.Container.deployClasspathAsWebApp(Container.java:148)
at org.apache.tomee.embedded.Main.main(Main.java:86)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize
component [org.apache.catalina.webresources.StandardRoot@7a7471ce]
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4845)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4975)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize
component [org.apache.catalina.webresources.FileResourceSet@267f474e]
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at
org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:669)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 15 more
*Caused by: java.lang.IllegalArgumentException: The file specified by base
and internal path
[c:\devdata\projects\experimental\testtomee_001\target\testtomee_001-1.0-snapshot.war]\[/META-INF/resources]
does not exist.*
at
org.apache.catalina.webresources.FileResourceSet.checkType(FileResourceSet.java:172)
at
org.apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.java:145)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 17 more
INFO - Undeploying app:
But this directory exists.
*From:* Yann BLAZART
*Sent:* jeudi 13 août 2015 11:28
*To:* '[email protected]'
*Subject:* Autonomus jar
Hello.
I’m currently trying to use TomEE for my customer.
The goal is to deliver applications as standalone jar.
I successed to do this with tome:exec. But as it launch two process and as
it embedded a full tome, I want to try to do it with tome embedded.
So I followed the post 50 shades of TomEE from Tomitribe blog.
<dependencies>
<dependency>
<groupId>myAppGroup</groupId>
<artifactId>myWar</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>tomee-embedded</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-ra</artifactId>
<version>5.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.components</groupId>
<artifactId>geronimo-connector</artifactId>
<version>3.1.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter> <!-- we don't want JSF to be
activated -->
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/faces-config.xml</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.apache.tomee.embedded.Main</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/cxf/bus-extensions.txt</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/openwebbeans/openwebbeans.properties</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
But it doesn’t work.
By doing java –jar xxx.jar , it stop here :
INFO - Starting TomEE from: xxxx
INFO - Initializing ProtocolHandler ["http-bio-8080"]
INFO - Starting service Tomcat
INFO - Starting Servlet Engine: Apache Tomcat/8.0.24
INFO - Starting ProtocolHandler ["http-bio-8080"]
INFO - Using
'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
INFO -
********************************************************************************
INFO - OpenEJB http://tomee.apache.org/
INFO - Startup: Thu Aug 13 11:25:05 CEST 2015
INFO - Copyright 1999-2015 (C) Apache OpenEJB Project, All Rights Reserved.
INFO - Version: 7.0.0-SNAPSHOT
INFO - Build date: 20150813
INFO - Build time: 04:07
INFO -
********************************************************************************
INFO - openejb.home = xxxx
INFO - openejb.base xxxxx
INFO - Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@701fc37a
INFO - Succeeded in installing singleton service
INFO - openejb configuration file is xxxxx
INFO - Configuring Service(id=Tomcat Security Service,
type=SecurityService, provider-id=Tomcat Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Using 'openejb.system.apps=false'
INFO - Using 'openejb.deployments.classpath=false'
INFO - Creating TransactionManager(id=Default Transaction Manager)
INFO - Creating SecurityService(id=Tomcat Security Service)
INFO - Using 'openejb.servicemanager.enabled=false'
If I do java –jar xxx.jar –as-war , it stop here :
INFO - Creating TransactionManager(id=Default Transaction Manager)
INFO - Creating SecurityService(id=Tomcat Security Service)
INFO - Using 'openejb.servicemanager.enabled=false'
INFO - Using 'openejb.deployments.classpath.filter.systemapps=false'
INFO - Configuring enterprise application:
INFO - Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
INFO - Auto-creating a container for bean .Comp1440738283:
Container(type=MANAGED, id=Default Managed Container)
INFO - Creating Container(id=Default Managed Container)
INFO - Using directory C:\Users\a41192\AppData\Local\Temp for stateful
session passivation
INFO - Configuring Service(id=comp/DefaultManagedExecutorService,
type=Resource, provider-id=Default Executor Service)
INFO - Auto-creating a Resource with id
'comp/DefaultManagedExecutorService' of type
'javax.enterprise.concurrent.ManagedExecutorService for '.Comp1440738283'.
INFO - Auto-linking resource-env-ref
'java:comp/DefaultManagedExecutorService' in bean .Comp1440738283 to
Resource(id=comp/DefaultManagedExecutorService)
INFO - Configuring Service(id=comp/DefaultManagedScheduledExecutorService,
type=Resource, provider-id=Default Scheduled Executor Service)
INFO - Auto-creating a Resource with id
'comp/DefaultManagedScheduledExecutorService' of type
'javax.enterprise.concurrent.ManagedScheduledExecutorService for
'.Comp1440738283'.
INFO - Auto-linking resource-env-ref
'java:comp/DefaultManagedScheduledExecutorService' in bean .Comp1440738283
to Resource(id=comp/DefaultManagedScheduledExecutorService)
INFO - Configuring Service(id=comp/DefaultManagedThreadFactory,
type=Resource, provider-id=Default Managed Thread Factory)
INFO - Auto-creating a Resource with id 'comp/DefaultManagedThreadFactory'
of type 'javax.enterprise.concurrent.ManagedThreadFactory for
'.Comp1440738283'.
INFO - Auto-linking resource-env-ref
'java:comp/DefaultManagedThreadFactory' in bean .Comp1440738283 to
Resource(id=comp/DefaultManagedThreadFactory)
INFO - Auto-linking resource-env-ref
'java:comp/DefaultManagedExecutorService' in bean
EjbModule1823409783.Comp1849015357 to
Resource(id=comp/DefaultManagedExecutorService)
INFO - Auto-linking resource-env-ref
'java:comp/DefaultManagedScheduledExecutorService' in bean
EjbModule1823409783.Comp1849015357 to
Resource(id=comp/DefaultManagedScheduledExecutorService)
INFO - Auto-linking resource-env-ref
'java:comp/DefaultManagedThreadFactory' in bean
EjbModule1823409783.Comp1849015357 to
Resource(id=comp/DefaultManagedThreadFactory)
INFO - Enterprise application "" loaded.
INFO - Assembling app:
INFO - Existing thread singleton service in SystemInstance():
org.apache.openejb.cdi.ThreadSingletonServiceImpl@282003e1
INFO - OpenWebBeans Container is starting...
INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
INFO - Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
INFO - Skipping deployment of Class class
org.apache.commons.pool2.proxy.CglibProxySourcedue to a
NoClassDefFoundError: net/sf/cglib/proxy/Callback
INFO - All injection points were validated successfully.
INFO - OpenWebBeans Container has started, it took 426 ms.
INFO - using default host: localhost
INFO - ------------------------- localhost -> /
INFO - Using
'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager'
INFO - The start() method was called on component
[org.apache.catalina.webresources.JarResourceSet@322e49ee] after start()
had already been called. The second call will be ignored.
INFO - Deployed Application(path=)
Is anybody could help ?
This message and any attachments (the "message") is
intended solely for the intended addressees and is confidential.
If you receive this message in error,or are not the intended recipient(s),
please delete it and any copies from your systems and immediately notify
the sender. Any unauthorized view, use that does not comply with its
purpose,
dissemination or disclosure, either whole or partial, is prohibited. Since
the internet
cannot guarantee the integrity of this message which may not be reliable,
BNP PARIBAS
(and its subsidiaries) shall not be liable for the message if modified,
changed or falsified.
Do not print this message unless it is necessary,consider the environment.
----------------------------------------------------------------------------------------------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le "message")
sont etablis a l'intention exclusive de ses destinataires et sont
confidentiels.
Si vous recevez ce message par erreur ou s'il ne vous est pas destine,
merci de le detruire ainsi que toute copie de votre systeme et d'en avertir
immediatement l'expediteur. Toute lecture non autorisee, toute utilisation
de
ce message qui n'est pas conforme a sa destination, toute diffusion ou
toute
publication, totale ou partielle, est interdite. L'Internet ne permettant
pas d'assurer
l'integrite de ce message electronique susceptible d'alteration, BNP
Paribas
(et ses filiales) decline(nt) toute responsabilite au titre de ce message
dans l'hypothese
ou il aurait ete modifie, deforme ou falsifie.
N'imprimez ce message que si necessaire, pensez a l'environnement.