NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Unable to deploy a EJB project

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
stibo



Joined: 19 Sep 2015
Posts: 7

PostPosted: Thu Apr 07, 2016 3:00 pm    Post subject: Unable to deploy a EJB project Reply with quote

Hi all,

I'm unable to deploy an EJB project in Netbeans.

Here are my configurations info:
iMac: 27 inches, end of 2009
Processor: 3.06 GHz Intel Core 2 Duo
OS: OSX 10.11.4 (El Capitan)
Netbeans version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
GlassFish: GlassFish Server 4.1.1
MySql: 5.5.45

Context:
I'm new to JavaEE programming, so here is how I see things: I have 3 associated projects or 1 project with 3 associated files:
1. JavaEE Enterprise Application
2. An EJB project
3. A war project.

I'm following a example on YouTube. The JavaEE Enterprise Application part of the project can be builded correctly with no error. Then, when I try to deploy what I thing is the EJB part of the project, the first thing that popup is a dialog saying:
"The project EJBandHibernate-ejb uses build.properties from another NetBeans installation."
There are 3 buttons under this message:
1. Use this installation
2. Update
3. Build Anyway

Whatever the button I click, the deploy process end with the following errors:
1. EJBandHibernate-ejb (run) output file:
Quote:
ant -f /Users/stibo/NetBeansProjects/JavaEE_Project/EJBandHibernate/EJBandHibernate-ejb -Dnb.internal.action.name=redeploy -Ddirectory.deployment.supported=true -DforceRedeploy=true -Dnb.wait.for.caches=true run
init:
deps-jar:
compile:
library-inclusion-in-archive:
dist-directory-deploy:
pre-run-deploy:
In-place deployment at /Users/stibo/NetBeansProjects/JavaEE_Project/EJBandHibernate/EJBandHibernate-ejb/build/classes
GlassFish Server 4.1.1, deploy, null, false
/Users/stibo/NetBeansProjects/JavaEE_Project/EJBandHibernate/EJBandHibernate-ejb/nbproject/build-impl.xml:919: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 1 second)


2. GlassFish Server 4.1.1 output file
Quote:
Infos: visiting unvisited references
Grave: Exception while deploying the app [EJBandHibernate-ejb]
Grave: Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: Failue while processing glassfish-resources.xml(s) in the archive -- Resource [ java:module/Books_store ] is not allowed to specify the scope [ java:module/ ]. Acceptable scope for this resource is [ java:app/ ]
at org.glassfish.resources.admin.cli.ResourcesXMLParser.getScopedName(ResourcesXMLParser.java:529)
at org.glassfish.resources.admin.cli.ResourcesXMLParser.generateJDBCResource(ResourcesXMLParser.java:663)
at org.glassfish.resources.admin.cli.ResourcesXMLParser.generateResourceObjects(ResourcesXMLParser.java:330)
at org.glassfish.resources.admin.cli.ResourcesXMLParser.<init>(ResourcesXMLParser.java:153)
at org.glassfish.resources.module.ResourcesDeployer.processArchive(ResourcesDeployer.java:274)
at org.glassfish.resources.module.ResourcesDeployer.processResources(ResourcesDeployer.java:766)
at org.glassfish.resources.module.ResourcesDeployer.event(ResourcesDeployer.java:715)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:419)
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:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
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:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
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:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
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:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)

Grave: Exception while deploying the app [EJBandHibernate-ejb] : Failue while processing glassfish-resources.xml(s) in the archive -- Resource [ java:module/Books_store ] is not allowed to specify the scope [ java:module/ ]. Acceptable scope for this resource is [ java:app/ ]


Because of the dialog, I uninstalled Netbeans completely. I did it twice, but I'm still getting this message saying that my project is using "build.properties from another NetBeans installation".

So does someone have had the same problem or know this problem? Does someone know how to fix it?

Best Regards,

Serge Thibault
Back to top
Bombisz



Joined: 20 Sep 2016
Posts: 5

PostPosted: Tue Sep 20, 2016 11:41 pm    Post subject: Reply with quote

Hi, I have the same problem. Do you fix it? Can you deploy and run your ejb project finally?
MB
Back to top
stibo



Joined: 19 Sep 2015
Posts: 7

PostPosted: Tue Sep 20, 2016 11:54 pm    Post subject: Reply with quote

No, I didn't.
Back to top
Bombisz



Joined: 20 Sep 2016
Posts: 5

PostPosted: Wed Sep 21, 2016 9:34 am    Post subject: Reply with quote

so, did you change ide?
Back to top
stibo



Joined: 19 Sep 2015
Posts: 7

PostPosted: Wed Sep 21, 2016 10:43 pm    Post subject: Reply with quote

No, I don't need to use any ide anymore.

Best Regards
Back to top
Bombisz



Joined: 20 Sep 2016
Posts: 5

PostPosted: Thu Sep 22, 2016 10:51 pm    Post subject: Reply with quote

If you like to know i fix the problem, In one tutorial I found they suggest using jdbc/sample database wchich should be bundled with instalation of netbeans, but I don't know why this jdbc/sample database is incomplete and is wrong to use it. So I decided to create new, my own database, so I do it with xampp and phpmyadmin and I use it, my won database and after that I finished tutorial and I don't see any problem, it works perfectly.
Back to top
stibo



Joined: 19 Sep 2015
Posts: 7

PostPosted: Thu Sep 22, 2016 11:43 pm    Post subject: Reply with quote

Thanks Bombisz. I hope this answer will help someone else.

Best Regards
Back to top
priya465



Joined: 17 Aug 2017
Posts: 28

PostPosted: Sat Sep 16, 2017 6:37 am    Post subject: Reply with quote

You need to do some more troubleshooting. Have a look at the logs in glassfish3/glassfish/domains/domain1/logs. Or if you have standalone or cluster nodes look in glassfish3/glassfish/nodes/<nodename>/<instancename>/logs.

Also, log into the admin page "http://localhost:4848", default username is admin, default password is adminadmin. On the left there is a tree, find Applications, then your Ear should be listed there. Click it and you'll see a list of modules and components. If your web service is listed there you can click View Endpoint. There is a built-in tester, and you can get the wsdl URL there too.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo