NCLS-DEPLOYMENT-00040 java.lang.NullPointerException - deployment

I am getting the below error at deploying the ear file into the Payara Glassfish server. The version we are using is Payara - 4.1.1.171.1 version.
[2017-11-03T10:32:39.751+0530] [Payara 4.1] [SEVERE] [] [] [tid: _ThreadID=60 _ThreadName=AutoDeployer] [timeMillis: 1509685359751] [levelValue: 1000] [[
NCLS-DEPLOYMENT-00040
java.lang.NullPointerException
at org.glassfish.deployment.autodeploy.AutoDeployDirectoryScanner.getListOfFilesAsSet(AutoDeployDirectoryScanner.java:177)
at org.glassfish.deployment.autodeploy.AutoDeployedFilesManager.getFilesForUndeployment(AutoDeployedFilesManager.java:241)
at org.glassfish.deployment.autodeploy.AutoDeployDirectoryScanner.getAllFilesForUndeployment(AutoDeployDirectoryScanner.java:132)
at org.glassfish.deployment.autodeploy.AutoDeployer.undeployAll(AutoDeployer.java:515)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:413)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)]]
Thanks,

Thanks, OndrejM.
I have found the problem and fixed. The problem is, we have multiple databases and whichever configured in the domain.xml file is not present in the local system. Once I have pointed to the correct database, the application deployed successfully.
Thanks again...

Related

Ojdbc8 jars upgrade to 21.1.0.0 throws Nosuchmethod exception UCPservletContextListener init

Ojdbc8, ons, ucp jars are upgraded to 21.1.0.0 version. When trying to start the app on tomcat server, it's throwing Nosuchmethod exception. Logged in the Tomcat's localhost.log file. Application tries to establish DB connection during startup itself.
01-Jun-2021 15:59:56.641 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log 3 Spring WebApplication Initializers detected on classpath
01-Jun-2021 16:00:05.365 INFO localhost-startStop-1 org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
01-Jun-2021 16:00:19.397 SEVERE localhost-startStop-1 org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [oracle.ucp.jdbc.UCPServletContextListener]
java.lang.NoSuchMethodException: oracle.ucp.jdbc.UCPServletContextListener.init
at java.lang.class.getConstructor(Unknown Source)
This is a known issue with ucp.jar in 21.1. It will be fixed in 21.3 when it's released. In the meantime, you can remove this class from the ucp.jar:
oracle/ucp/jdbc/UCPServletContextListener.class
From my experience, if you put jdbc/ucp jars to Tomcat's lib (which is recommended for productive system) and set provided scope for them in Maven, the problem will disappear.
Another option could be setting metadata-complete="true" in web.xml (read more here and here)
if you are using spring boot then you can use
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
this dependency or update your maven project.

ArrayIndexOutOfBoundsException deploying to GlassFish 4.1.1 with no web.xml Jersey

I got this strange error deploying my Jersey server (with no web.xml) to GlassFish 4.1.1 using Maven glassfish plugin (in fact, I had switched my (Maven) build from embedded Grizzly to GlassFish, updating standard Jersey dependencies from compile to provided):
[ERROR] remote failure: Error occurred during deployment: Exception
while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
org.apache.catalina.LifecycleException:
java.lang.ArrayIndexOutOfBoundsException: 0. Please see server.log for
more details
The deployment was successful when I didn't declare the #ApplicationPath in my ResourceConfig implementation. But then, I got a 404 error when trying to consume the service. According to Jersey documentation, the #ApplicationPath is needed for no web.xml deployment (Example 4.3).
The deployment error log is extracted below:
[2015-12-28T09:33:40.826+0800] [glassfish 4.1] [SEVERE] []
[javax.enterprise.web] [tid: _ThreadID=123
_ThreadName=admin-listener(6)] [timeMillis: 1451266420826] [levelValue: 1000] [[
WebModule[/BBQuay-Entertainment-1.0-SNAPSHOT]StandardWrapper.Throwable
java.lang.ArrayIndexOutOfBoundsException: 0 at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:505)
at
org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:182)
at
org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:348)
at
org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:345)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at
org.glassfish.jersey.internal.Errors.process(Errors.java:297) at
org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
at
org.glassfish.jersey.server.ApplicationHandler.(ApplicationHandler.java:345)
at
org.glassfish.jersey.servlet.WebComponent.(WebComponent.java:390)
at
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
at
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:362)
at javax.servlet.GenericServlet.init(GenericServlet.java:244) at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583)
.....
It turned out to be a Maven configuration. Since I was testing with Grizzly before, when switching to GlassFish, I left the two dependencies jersey-weld2-se and jersey-cdi1x default Maven scope. The latter is fine but the first is provided by GlassFish container. Corrected as following helps solve the problem (though the deployment error was really not helpful..)
<dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-weld2-se</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-cdi1x</artifactId>
</dependency>
The following is sufficient on Glassfish 4.1.1 (without web.xml):
import javax.ws.rs.ApplicationPath;
import org.glassfish.jersey.server.ResourceConfig;
#ApplicationPath("rest")
public class ApplicationConfig extends ResourceConfig {
}
And an example class:
import javax.ws.rs.GET;
import javax.ws.rs.Path;
#Path("info")
public class InfoStub {
#GET
public String getInfo() {
return "hello sir";
}
}
You can access it under http://localhost:8080/YOUR_PROJECT_NAME/rest/info
Make sure that you set your standard Jersey dependencies in your pom.xml to provided.

Webservices in Eclipse using Axis2: ClassNotFoundException

I've been struggling a while now with web services in Eclipse.
Every time I get something working, it merely seems to be based on luck and I've tried everything in numerous ways.
My latest problem involves the following:
I've got a java application which uses a lot of external references (jars).
I've exported this java project to a simple jar file using the Fat-jar plugin (http://fjep.sourceforge.net/) to make sure the exported jar contains all the needed resources.
I then created a dynamic web project and added the jar from before to this project.
When I do some basic tests, everything works fine, i.e. Eclipse finds all the needed references.
However, when I try to create a web service, whose methods use the exact same logic as the tests, I get errors.
I don't understand why I get a ClassNotFoundException because, like i said before, when doing local tests, Eclipse finds all the needed resources.
[INFO] Deploying module: addressing-1.6.1 - file:/C:/Users/Flamant/My master/code/WorkspaceEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps /org.openmarkov.webservice.engine/WEB-INF/modules/addressing-1.6.1.mar
[INFO] Deploying module: metadataExchange-1.6.1 - file:/C:/Users/Flamant/My master/code/WorkspaceEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps /org.openmarkov.webservice.engine/WEB-INF/modules/mex-1.6.1.mar
[INFO] Deploying module: mtompolicy-1.6.1 - file:/C:/Users/Flamant/My master/code/WorkspaceEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps /org.openmarkov.webservice.engine/WEB-INF/modules/mtompolicy-1.6.1.mar
[INFO] Deploying module: ping-1.6.1 - file:/C:/Users/Flamant/My master/code/WorkspaceEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps /org.openmarkov.webservice.engine/WEB-INF/modules/ping-1.6.1.mar
[INFO] Deploying module: script-1.6.1 - file:/C:/Users/Flamant/My master/code/WorkspaceEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps /org.openmarkov.webservice.engine/WEB-INF/modules/scripting-1.6.1.mar
[INFO] Deploying module: soapmonitor-1.6.1 - file:/C:/Users/Flamant/My master/code/WorkspaceEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps /org.openmarkov.webservice.engine/WEB-INF/modules/soapmonitor-1.6.1.mar
[INFO] The Engine service, which is not valid, caused java.lang.NoClassDefFoundError: [Lorg/openmarkov/webservice/Finding;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at org.apache.axis2.description.java2wsdl.bytecode.MethodTable.loadMethods(MethodTable.java:43)
at org.apache.axis2.description.java2wsdl.bytecode.MethodTable.<init>(MethodTable.java:33)
at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.<init>(DefaultSchemaGenerator.java:141)
at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:453)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:389)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:178)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:82)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:370)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:142)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1228)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1147)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1043)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957)
at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284)
at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.openmarkov.webservice.Finding
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
... 34 more
[INFO] org.apache.axis2.deployment.DeploymentException: java.lang.NoClassDefFoundError: [Lorg/openmarkov/webservice/Finding;
[INFO] Deploying Web service: version.aar - file:/C:/Users/Flamant/My master/code/WorkspaceEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/org.openmarkov.webservice.engine/WEB-INF/services/version.aar
[WARN] No transportReceiver for org.apache.axis2.transport.http.AxisServletListener found. An instance for HTTP will be configured automatically. Please update your axis2.xml file!
apr 11, 2012 10:51:45 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]
apr 11, 2012 10:51:45 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8010"]
apr 11, 2012 10:51:45 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1928 ms
If anyone has an idea, I would greatly appreciate it.
Thanks,
Thomas
Actually, you are facing NoClassDefFoundError, which occurs when the required libs are not found at runtime...Check the libs are at your runtime classpath..
Do you mean when in the eclipse environment your web service works fine, but in your dynamic web project does not work? missing jar in your dynamic web project?
Make sure atleast these
activation-1.1.jar,
axiom-api-1.2.8.jar,
axiom-dom-1.2.8.jar,
axiom-impl-1.2.8.jar,
axis2-adb-1.5.1.jar,
axis2-kernel-1.5.1.jar,
axis2-transport-http-1.5.1.jar,
axis2-transport-local-1.5.1.jar,
commons-codec-1.3.jar,
commons-fileupload-1.2.jar,
commons-httpclient-3.1.jar,
commons-logging-1.1.1.jar,
geronimo-stax-api_1.0_spec-1.0.1.jar,
httpcore-4.0.jar,
mail-1.4.jar,
neethi-2.0.4.jar,
woden-api-1.0M8.jar,
woden-impl-dom-1.0M8.jar,
wsdl4j-1.6.2.jar,
wstx-asl-3.2.4.jar,
XmlSchema-1.4.3.jar
I faced this problem too. In my case I haven't followed the steps clearly in [1] article. In step 12, do not change the "Service Project" name.

How to load APR Connector (Native) in JBoss 7

I want to use Atmosphere XMPP but i need to load native connector APR. I am not very familiar as of yet with JBoss 7 so i was wondering if anyone knows how to do this? WIndows x64 or Linux x64 environment. Doesn't matter. Thanks
Assuming Linux x64 here. I am using Ubuntu 11.04 x64.
Download JBoss7 distribution and unzip it to a suitable directory ( from here I am assuming that you have it in your '/home/myname/tools/jboss701/' folder.
Start it using /jboss701/bin/standalone.sh and verify that it started properly ( check localhost:8080 url). Close the jboss for now.
Download the native libraries from here http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-9.html . I have downloaded this one jboss-native-2.0.9-linux2-x64-ssl.tar.gz
Unpack it to the '/home/myname/tools/jboss701/' folder. You should see the contents of the archive in '/home/myname/tools/jboss701/bin' folder. Also, verify that you have 'native' folder under the '/home/myname/tools/jboss701/bin'
IMPORTANT: unfortunately, it doesn't work out of the box. You must make the following change: add the
JAVA_OPTS="$JAVA_OPTS
-Djava.library.path=/home/myname/tools/jboss701/bin/native:$PATH"
string to your 'standalone.conf' file.
Start JBoss with the 'standalone.sh' script. Verify that you have the following line in the console during the JBoss startup: 'org.apache.coyote.http11.Http11AprProtocol'. If you see 'org.apache.coyote.http11.Http11AprProtocol' instead of 'org.apache.coyote.http11.Http11Protocol' then everything is working as expected.
Thanks man, i got it working. I do see these lines now in my startup script. `15:13:09,687 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-7) An older version 1.1.20 of the Apache Tomcat Native li
brary is installed, while Tomcat recommends version greater then 1.1.21
15:13:11,110 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080` Atmosphere unforunately, is still throwing the same error.
java.lang.IllegalStateException: JBoss failed to detect this is a Comet application because the APR Connector is not enabled.
Make sure atmosphere-compat-jboss.jar is not under your WEB-INF/lib and
there is no context.xml under WEB-INF
org.atmosphere.container.JBossWebCometSupport.<clinit>(JBossWebCometSupport.java:66)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
org.atmosphere.cpr.DefaultCometSupportResolver.newCometSupport(DefaultCometSupportResolver.java:178)
org.atmosphere.cpr.DefaultCometSupportResolver.resolveWebSocket(DefaultCometSupportResolver.java:223)
org.atmosphere.cpr.DefaultCometSupportResolver.resolve(DefaultCometSupportResolver.java:217)
org.atmosphere.cpr.AtmosphereServlet.autoDetectContainer(AtmosphereServlet.java:900)
org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:530)
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70)
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)
I've set everything up as in the demos. too

JavaEE in netbeans giving BUILD FAILED error upon deployment

When I try to run my Java EE program in Netbeans consisting of servlets (java pages), JSP's, beans(java pages) and HTML pages I get this error in the output:
In-place deployment at C:\Users\Derek\Documents\NetBeansProjects\EJBProject\EJBProject-war\build\web
Initializing...
deploy?path=C:\Users\Derek\Documents\NetBeansProjects\EJBProject\EJBProject-war\build\web&name=EJBProject-war&force=true failed on Personal GlassFish v3 Domain
C:\Users\Derek\Documents\NetBeansProjects\EJBProject\EJBProject-war\nbproject\build-impl.xml:611: The module has not been deployed.
BUILD FAILED (total time: 1 second)
And then in the command prompt when I run asant run in the appropriate directory, I get:
C:\Users\Derek\Documents\NetBeansProjects\EJBProject\nbproject\build-impl.xml:19: Class org.apache.tools.ant.taskdefs.condition.Not doesn't support the nested "antversion" element.
Do you know why this would be? Why won't netbeans deploy my application so I can run and test it?
EDIT:
ant version is actually came up with...
Apache Ant version 1.6.5 compiled on June 2 2005
The glassfish output logs say:
SEVERE: Exception while loading the app
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:219)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Error while binding JNDI name x.results#x.results for EJB : resultsBean
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1530)
at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:214)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:161)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
... 32 more
Caused by: javax.naming.NameAlreadyBoundException: Use rebind to override
at com.sun.enterprise.naming.impl.TransientContext.doBindOrRebind(TransientContext.java:275)
at com.sun.enterprise.naming.impl.TransientContext.bind(TransientContext.java:214)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.bind(SerialContextProviderImpl.java:79)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.bind(LocalSerialContextProviderImpl.java:81)
at com.sun.enterprise.naming.impl.SerialContext.bind(SerialContext.java:586)
at com.sun.enterprise.naming.impl.SerialContext.bind(SerialContext.java:602)
at javax.naming.InitialContext.bind(InitialContext.java:404)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:206)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:187)
at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.java:5484)
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1515)
EDIT:
It seems to be regarding my 'stateful' session bean, as when I delete it, it runs perfectly.
My best guess is that you downloaded and installed the 'Web Profile' of GlassFish Server 3 OR you have created a web app that has a deployment descriptor that forces the server to treat it as a Java EE 5 (or even J2EE 1.4) and then created an EJB in that web app... which would probably lead to these sorts of errors.
It seems you have some fields on your Stateful session bean that may have the same name of another Stateful Session bean fields. It just a guess. There is no much info about your EJBS to make a deep analysis. Hope it helps