Running Maven Spring project in eclipse using Web preview server - java

getting an error while running in web preview server in eclipse but the same projects runs fine in tomcat.
Error
[ERROR ] SRVE0293E: [Servlet Error]-[Failed to load listener: org.springframework.web.context.ContextLoaderListener]: java.lang.ClassNotFoundException: org/springframework/web/context/ContextLoaderListener
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:75)
at com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:110)
at java.beans.Beans.instantiate(Beans.java:216)
at java.beans.Beans.instantiate(Beans.java:80)
at com.ibm.ws.webcontainer.webapp.WebApp.loadListener(WebApp.java:2176)
at [internal classes]
[ERROR ] SRVE0279E: Error occured while processing global listeners for the application {0}: {1}
java.lang.NullPointerException
[ERROR ] SRVE8052E: Logging ClassNotFoundException
org/springframework/web/servlet/DispatcherServlet
[ERROR ] SRVE0276E: Error while initializing Servlet [dispatcher]: javax.servlet.UnavailableException: SRVE0200E: Servlet [org.springframework.web.servlet.DispatcherServlet]: Could not find required class - org/springframework/web/servlet/DispatcherServlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1497)
at [internal classes]
[ERROR ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.UnavailableException: SRVE0200E: Servlet [org.springframework.web.servlet.DispatcherServlet]: Could not find required class - org/springframework/web/servlet/DispatcherServlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
at [internal classes]
Caused by: javax.servlet.UnavailableException: SRVE0200E: Servlet [org.springframework.web.servlet.DispatcherServlet]: Could not find required class - org/springframework/web/servlet/DispatcherServlet
... 3 more

this may cause by either
There is no Spring jars in WEB-INF/lib
or
You need to change WebSphere class load policy to PARENT LAST

Related

Maven throwing SAML Statement error message

I am working on Maven and I get error as shown below. I tried checking deployment assembly and build path but I am not getting any hint on what the system is complaining about. I also made sure I cleaned tomcat directory and cleaned the project. I would appreciate any help on it
Jan 20, 2020 12:11:13 PM org.apache.catalina.core.StandardWrapperValve
invoke SEVERE: Servlet.service() for servlet [cas] in context with
path [/URL] threw exception [Request processing failed; nested
exception is
org.springframework.webflow.execution.ActionExecutionException:
Exception thrown executing
org.springframework.webflow.action.ViewFactoryActionAdapter#2def1006
in state 'viewServiceErrorView' of flow 'login' -- action execution
attributes were 'map[[empty]]'] with root cause
java.lang.ClassNotFoundException: org.opensaml.SAMLStatement at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
at java.lang.Class.getDeclaredConstructors0(Native Method) at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at
java.lang.Class.getConstructor0(Class.java:3075) at
java.lang.Class.getDeclaredConstructor(Class.java:2178) at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.
As the system was complaining I was missing opensaml jar.
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>1.1</version>
</dependency>
System was unable to download the jar from maven repo. I manually updated the jar in my local and it worked fine.

Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger in XPages

In our XPages project now we have to use Quartz Scheduler. I've tried to import all necessary jars which includes the following:
c3p0-0.9.5.2
log4j-1.2.16.jar
quartz-2.3.0-SNAPSHOT.jar
quartz-jobs-2.3.0-SNAPSHOT.jar
slf4j-api-1.7.7.jar
slf4j-log4j12-1.7.7.jar
I've imported all the jars to our project but when loading a page (which doesn't even call quartz or anything) I get the following exception:
Error 500
HTTP Web Server: Command Not Handled Exception
In a log I see:
01.12.19 2:04: Exception Thrown
java.lang.RuntimeException: com.ibm.xsp.FacesExceptionEx: org.apache.commons.logging.LogConfigurationException: java.lang.reflect.InvocationTargetException
at com.ibm.designer.runtime.domino.adapter.ComponentModule.initModule(ComponentModule.java:473)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.initModule(NSFComponentModule.java:498)
at com.ibm.domino.xsp.module.nsf.NSFService.createNSFModule(NSFService.java:752)
at com.ibm.domino.xsp.module.nsf.NSFService.loadModule(NSFService.java:735)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:588)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Caused by: com.ibm.xsp.FacesExceptionEx: org.apache.commons.logging.LogConfigurationException: java.lang.reflect.InvocationTargetException
at com.ibm.xsp.config.CLBootStrap.initContext(CLBootStrap.java:89)
at com.ibm.xsp.config.BootStrap.init(BootStrap.java:82)
at com.ibm.xsp.config.ConfigureCoreListener.contextInitialized(ConfigureCoreListener.java:39)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.initModule(ComponentModule.java:465)
... 8 more
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.reflect.InvocationTargetException
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:414)
at org.apache.commons.digester.Digester.<init>(Digester.java:346)
at com.sun.faces.config.ConfigureListener.digester(ConfigureListener.java:1005)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:383)
at com.ibm.xsp.config.CLBootStrap.initContext(CLBootStrap.java:81)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedConstructorAccessor1791.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:437)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
... 17 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:102)
... 21 more
I suspect that this problem is related to Axis 1.4 log4j-1.2.8.jar incompatible with XPages?
I've tried to follow the advice and added the following to java.policy (section grant codeBase):
permission java.lang.RuntimePermission "setContextClassLoader";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
But still with no luck.
What's the problem?
Thanks in advance
I've resolved the issue by adding all logging libraries:
log4j-1.2.16.jar
slf4j-api-1.7.7.jar
slf4j-log4j12-1.7.7.jar
to lib/ext

Maven Wildfly error

I converted my Dynamic Web Project to a Maven Project since I want to run it on a Wildfly on a Raspberry Pi 2.
The problem is that after I converted and tried to Run as Maven build it started to pop up errors and errors..
I spent some time working on them and it seems like stoped, Maven could initiate. The problem now is that when I try to run Wildfly on it it is outputting the following error:
14:02:35,247 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
14:02:35,415 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
14:02:35,475 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
14:02:35,999 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:357)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.weld
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:155)
at org.jboss.as.server.parsing.StandaloneXml$DefaultExtensionHandler.parseExtensions(StandaloneXml.java:126)
at org.jboss.as.server.parsing.StandaloneXml_4.readServerElement(StandaloneXml_4.java:218)
at org.jboss.as.server.parsing.StandaloneXml_4.readElement(StandaloneXml_4.java:141)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:147)
... 11 more
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:196)
at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:69)
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:127)
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:124)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.jboss.modules.ModuleLoadException: Error loading module from C:\Users\jose\Documents\Wildfly\รณ\wildfly-10.1.0.Final\wildfly-10.1.0.Final\modules\system\layers\base\com\sun\xml\messaging\saaj\main\module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:204)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:170)
at org.jboss.modules.LocalModuleFinder.lambda$findModule$0(LocalModuleFinder.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:144)
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
at org.jboss.modules.Module.addExportedPaths(Module.java:1230)
at org.jboss.modules.Module.addPaths(Module.java:1122)
at org.jboss.modules.Module.link(Module.java:1449)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1477)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:178)
... 8 more
Caused by: org.jboss.modules.xml.XmlPullParserException: Unexpected content of type 'element start' named 'path', text is: '<path name="com/sun/xml/messaging/saaj"/>' (position: START_TAG seen ...</properties>\n\t<path name="com/sun/xml/messaging/saaj"/>... #29:43)
at org.jboss.modules.xml.ModuleXmlParser.unexpectedContent(ModuleXmlParser.java:257)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:538)
at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
... 22 more
14:02:36,001 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
14:02:36,018 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) stopped in 9ms
Any help would be really apreciated. I've tried everything I found on google and nothing seemed to work.
Thank you very much!
One of your configuration xml files in your application could have an typo
look at the exception trace
org.jboss.modules.xml.XmlPullParserException: Unexpected content of type 'element start' named 'path', text is: '' (position: START_TAG seen ...\n\t... #29:43) at

How to remove installed app in Wildfly 9

My Wildfly 9 server does not start because it is accessing a link that does not exists anymore.
I fixed the link to point to the latest working link.
My problem is... my wildfly server does not start and I do not know how to replace the WAR file.
I wanted to remove the installed application IyotBihagay so that my wildfly server will start and I can do redeploy again with the corrected wsdl link.
/var/log/wildfly/console.log
Caused by: com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl?wsdl
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:275)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:246)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:209)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:178)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:363)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:321)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:230)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:211)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:207)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:114)
at javax.xml.ws.Service.<init>(Service.java:57) [rt.jar:1.8.0_91]
at com.amadeus.xml.AmadeusWebServices.<init>(AmadeusWebServices.java:47)
at com.iyotbihagay.service.SaksakBilatServiceImpl.<init>(SaksakBilatServiceImpl.java:77)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_91]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_91]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_91]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [rt.jar:1.8.0_91]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 24 more
[0m[31m23:15:46,927 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([("deployment" => "IyotBihagay.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./IyotBihagay" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./IyotBihagay: Failed to start service
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saksakBilatServiceImpl' defined in \"/content/IyotBihagay.war/WEB-INF/classes/com/iyotbihagay/service/SaksakBilatServiceImpl.class\": Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.iyotbihagay.service.SaksakBilatServiceImpl]: Constructor threw exception; nested exception is com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl?wsdl
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saksakBilatServiceImpl' defined in \"/content/IyotBihagay.war/WEB-INF/classes/com/iyotbihagay/service/SaksakBilatServiceImpl.class\": Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.iyotbihagay.service.SaksakBilatServiceImpl]: Constructor threw exception; nested exception is com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl?wsdl
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.iyotbihagay.service.SaksakBilatServiceImpl]: Constructor threw exception; nested exception is com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl?wsdl
Caused by: com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl
java.io.FileNotFoundException: http://iyotbihagay.com/wsdl/saksak_bilat_consume.wsdl?wsdl
"}}
[0m[0m23:15:46,972 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "IyotBihagay.war" (runtime-name : "IyotBihagay.war")
[0m[0m23:15:46,973 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./IyotBihagay: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./IyotBihagay: Failed to start service
[0m[0m23:15:47,143 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://0.0.0.0:9990/management
[0m[0m23:15:47,143 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990
[0m[31m23:15:47,144 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.2.0.Final "Tweek" started (with errors) in 15362ms - Started 782 of 839 services (2 services failed or missing dependencies, 103 services are lazy, passive or on-demand)
[0m
I think my wildfly is configured or installed as stand-alone.
It looks like you've solved your problem, but for others that may want to do this.
In WildFly 9+ CLI has an offline CLI mode. You should be able to use this to undeploy the deployment.
$JBOSS_HOME/bin/jboss-cli.sh
Example CLI commands
embed-server
undeploy IyotBihagay.war
stop-embedded-server
In WildFly 9 you can only use a standalone server. In WildFly 10 the same would also work for a managed domain with the embed-host-controller command.

How to deploy an EJB application to Glassfish server

When I am running a JSP file I am getting this error:
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:310)
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 org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:141)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:573)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:459)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:391)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:376)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:195)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.RuntimeException: Error while binding JNDI name ejbExample.stateful.Account#ejbExample.stateful.Account for EJB : AccountBean
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)
... 20 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:5533)
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1515)
... 23 more
WARNING: [AutoDeploy] Autodeploy failed : C:\glassfishv3\glassfish\domains\domain1\autodeploy\StatefullSessionBeanExample.jar.
How is this caused and how can I solve it?
Try to undeploy the project (clean and build) and redeploy it .

Categories

Resources