Comments (6)
- Issue Imported From: javaee/tutorial#130
- Original Issue Raised By:@deglans
- Original Issue Assigned To: Unassigned
from jakartaee-tutorial.
@deglans Commented
The solutions is at https://stackoverflow.com/questions/46648971/the-javaee-8-tutorial-deploy-failed-on-hello1-project
from jakartaee-tutorial.
@madvargas Commented
Hi, I got the same error and solved it following the solution posted in StackOverflow, but then I got two more errors. I could resolve the first one, but not the other one.
The first one is the following:
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.7.0:redeploy (deploy) on project dukes-payment: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.7.0:redeploy failed: GlassFish admin command with args (--interactive=false --host localhost --port 4848 --user admin --passwordfile F:\Desarrollo\JakartaEE\glassfish5\glassfish\domains\password.properties deploy --force --contextroot dukes-payment F:\Desarrollo\JakartaEE\glassfish5\docs\javaee-tutorial\examples\case-studies\dukes-forest\dukes-payment\target\dukes-payment.war) failed: asadmin exited 1 -> [Help 1]
server.log showed this:
Caused by: javax.naming.NameNotFoundException: ForestDataSource not found
at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 69 more
I had to add to web.xml in "dukes-payment" project the following config:
<data-source>
<name>java:global/ForestDataSource</name>
<class-name>org.apache.derby.jdbc.ClientDataSource</class-name>
<server-name>localhost</server-name>
<port-number>1527</port-number>
<database-name>forest</database-name>
<user>forest</user>
<password>app</password>
<property>
<name>connectionAttributes</name>
<value>;create=true</value>
</property>
</data-source>
After that, "dukes-payment" project finally deployed, but then I got the second error. It is the following:
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.7.0:redeploy (deploy) on project dukes-store: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.7.0:redeploy failed: GlassFish admin command with args (--interactive=false --host localhost --port 4848 --user admin --passwordfile F:\Desarrollo\JakartaEE\glassfish5\glassfish\domains\password.properties deploy --force --contextroot dukes-store F:\Desarrollo\JakartaEE\glassfish5\docs\javaee-tutorial\examples\case-studies\dukes-forest\dukes-store\target\dukes-store.war) failed: asadmin exited 1 -> [Help 1]
server.log shows this:
Grave: enterprise.deployment.util.application.fail
Grave: Exception while deploying the app [dukes-store]
Grave: Exception during lifecycle processing
java.lang.IllegalStateException: Application validation fails for given application [dukes-store] for jndi-name [java:global/jms/OrderQueue]
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:113)
at com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:641)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:235)
at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:197)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:231)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:97)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:378)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:536)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:535)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:566)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:558)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:557)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1465)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:110)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1847)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1723)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:408)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:235)
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.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:377)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:174)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:463)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:168)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:242)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
at java.lang.Thread.run(Thread.java:748)
Grave: Exception while deploying the app [dukes-store] : Application validation fails for given application [dukes-store] for jndi-name [java:global/jms/OrderQueue]
Note: I'm using NetBeans 8.2, GlassFish 5 (included in Java EE 8 download zip) and JDK 1.8.0_191. And I'm trying to deploy Duke's Forest case-study.
from jakartaee-tutorial.
@shadyar Commented
I had the same problem as yours. I solved it. https://stackoverflow.com/questions/50400503/failed-to-execute-goal-org-codehaus-cargocargo-maven2-plugin1-6-4start/53646049#53646049
from jakartaee-tutorial.
Hi,
Glassfish5.x seems to be supported by cargo 1.7.11
My pom.xml config:
<cargo.plugin.version>1.7.11</cargo.plugin.version>
<glassfish.domain.name>domain1</glassfish.domain.name>
<glassfish.home>${glassfish.home.prefix}/dev_java/glassfish5</glassfish.home>
<integration.container.id>glassfish5x</integration.container.id>
from jakartaee-tutorial.
This issue is for the Examples repository but anyway it's solved with https://github.com/eclipse-ee4j/jakartaee-tutorial-examples/pull/25
from jakartaee-tutorial.
Related Issues (20)
- Add a Github workflow to deploy docs automaticially HOT 1
- Idea for the new term reference in the whole doc HOT 2
- Formatting issue on persistance-intro002.adoc in Persistent Properties section
- jakartaee-tutorial-examples in not building throwing error datasource HOT 3
- Ambiguous using of word "resource" in the paragraph "3.1. Resource Creation".
- By my opinion - it's missed one word at the end of the first sentence of the "3.1.3. Creating Resources Administratively" paragraph. HOT 2
- Oracle JPA tutorial contains INCORRECT use of static metamodel
- link of jsp technology should be updated? HOT 1
- Provide multi online version for different Jakarta EE version? HOT 3
- Release 9.1 final at or shortly before 2021-05-17 HOT 11
- Section "Packaging Resource Adapter Archives" contains redundant and repetitive information. HOT 1
- Small correction in "Web Application Lifecycle" section. HOT 2
- Small correction in "Packaging and Deploying the hello1 Web Module" section. HOT 1
- Two more small corrections in "Packaging and Deploying the hello1 Web Module" section. HOT 2
- Porting Jakarta EE Tutotial from release 9.1 to release 10. HOT 5
- A hope for more books in Chinese will introduce JakartaEE technology HOT 1
- Thoughts on revising tutorial, part 1, chapter 1 HOT 3
- The tutorial examples repository doesn't exist anymore. HOT 1
- Fix argument variable's name to follow the document convention
- Description of orphan-removal example looks incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jakartaee-tutorial.