Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't deploy an EJB module to Glassfish

I am using NetBeans 8.0.2, jdk 1.8 and Glassfish 4. I have also used another config, with NB 7.3.1, jdk 1.7 and GF 3.1.2 and the same result.

I am creating a new Java EE project, only with an EJB module. When i try to deploy the EJB module, i get this error:

java3c7e4\java3c7e4-ejb\nbproject\build-impl.xml:938: The module has not been deployed.
See the server log for details.

And this is the server log:

Launching GlassFish on Felix platform
Jan 07, 2015 10:42:33 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Jan 07, 2015 10:42:33 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Jan 07, 2015 10:42:33 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@2f2c26f0 in service registry.
Found populator: com.sun.enterprise.v3.server.GFDomainXml
Info:   Running GlassFish Version: GlassFish Server Open Source Edition  4.1  (build 13)
Info:   Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info:   Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info:   Authorization Service has successfully initialized.
Info:   Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Info:   visiting unvisited references
Info:   Java security manager is disabled.
Info:   Entering Security Startup Service.
Info:   Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
Info:   Security Service(s) started successfully.
Info:   Grizzly Framework 2.3.15 started in: 212ms - bound to [/0.0.0.0:8080]
Info:   Grizzly Framework 2.3.15 started in: 0ms - bound to [/0.0.0.0:8181]
Info:   Grizzly Framework 2.3.15 started in: 20ms - bound to [/0.0.0.0:4848]
Info:   Grizzly Framework 2.3.15 started in: 17ms - bound to [/0.0.0.0:3700]
Info:   Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
Info:   Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Info:   Created HTTP listener admin-listener on host/port 0.0.0.0:4848
Info:   Created virtual server server
Info:   Created virtual server __asadmin
Info:   Setting JAAS app name glassfish-web
Info:   Virtual server server loaded default web module 
Info:   visiting unvisited references
Info:   visiting unvisited references
Info:   visiting unvisited references
Info:   Initializing Mojarra 2.2.7 ( 20140610-1547 https://svn.java.net/svn/mojarra~svn/tags/2.2.7@13362) for context '/java3c7e2-web'
Info:   HV000001: Hibernate Validator 5.0.0.Final
Info:   Monitoring jndi:/server/java3c7e2-web/WEB-INF/faces-config.xml for modifications
Info:   Loading application [java3c7e2-web] at [/java3c7e2-web]
Info:   Loading application java3c7e2-web done in 5,862 ms
Info:   GlassFish Server Open Source Edition  4.1  (13) startup time : Felix (6,341ms), startup services(7,526ms), total(13,867ms)
Info:   Grizzly Framework 2.3.15 started in: 3ms - bound to [/0.0.0.0:7676]
Info:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@42fcc7e6 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@de88ac6.
Info:   JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://Eddie-PC:8686/jndi/rmi://Eddie-PC:8686/jmxrmi
Info:   Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Info:   Grizzly Framework 2.3.15 started in: 0ms - bound to [/0.0.0.0:8181]
Info:   visiting unvisited references
Severe:   Exception while deploying the app [java3c7e4-ejb]
Severe:   Exception during lifecycle processing
java.lang.IllegalArgumentException: Specified library jar java3c7e4-lib.jar does not exist: D:\Facultate\JAVA%203\Modul%207\java3c7e4-lib\dist\java3c7e4-lib.jar
    at org.glassfish.deployment.common.DeploymentContextImpl.getAppLibs(DeploymentContextImpl.java:458)
    at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:244)
    at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:229)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:365)
    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:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    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: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:561)
    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:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:745)

Severe:   Exception while deploying the app [java3c7e4-ejb] : Specified library jar java3c7e4-lib.jar does not exist: D:\Facultate\JAVA%203\Modul%207\java3c7e4-lib\dist\java3c7e4-lib.jar
Info:   Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
Info:   Grizzly Framework 2.3.15 started in: 30ms - bound to [/0.0.0.0:8080]
Info:   Domain Pinged: release.glassfish.org
Info:   visiting unvisited references
Severe:   Exception while deploying the app [java3c7e4-ejb]
Severe:   Exception during lifecycle processing
java.lang.IllegalArgumentException: Specified library jar java3c7e4-lib.jar does not exist: D:\Facultate\JAVA%203\Modul%207\java3c7e4-lib\dist\java3c7e4-lib.jar
    at org.glassfish.deployment.common.DeploymentContextImpl.getAppLibs(DeploymentContextImpl.java:458)
    at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:244)
    at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:229)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:365)
    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:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    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: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:561)
    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:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:745)

Severe:   Exception while deploying the app [java3c7e4-ejb] : Specified library jar java3c7e4-lib.jar does not exist: D:\Facultate\JAVA%203\Modul%207\java3c7e4-lib\dist\java3c7e4-lib.jar

I have verified and this .jar exists. I have searched everywhere and i didn't find anything similar. What can i do? Is there a problem with Netbeans, Java or Glassfish? Or with my configuration of the project?

Also, this is the line of the build-impl.xml file(line 938):

<nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}"/>

Thank you!

like image 332
eddiePopescu Avatar asked Dec 20 '22 07:12

eddiePopescu


1 Answers

I had the same problem. My computer's user-name contains a space (Ngoc Chien) so when deploying the EJB, the Glassfish found the jar library in C:\Users\Ngoc%20Chien\NetbeanProject... , it was a wrong path , I guessed.

So I copied my NetbeanProject to D:\Data\NetbeanProject (or anywhere you want that have no space and special character in path) and removed the library jar in the project , then added it again with new path. It worked.

In your case , D:\Facultate\JAVA%203\Modul%207.the problem is at %203 %207 , which may be some special UTF-8 characters or spaces .

like image 135
user123 Avatar answered Jan 01 '23 23:01

user123