Unable in running Project from Tomcat to Glassfish server in Netbeans - java

I made a Java web project using Tomcat server.Now I am opening the same project in another PC where only Glassfish is installed(Due to some reasons I don't wanna run the project using Tomcat anymore).But it gives this exception now.
Exception during lifecycle processing
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unable to add listener of type: com.chat.listeners.ChatAppListener, because it does not implement any of the required ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener interfaces

Is there any warning when you opening the project in netbeans.Right click on the project , select resolve server missing problem.Choose Glassfish server.Run once again.

You have apache specific relations in your web.xml file (like file handler servlets).
That is why glassfish can't start your application.

Related

glassfish 4.1 class org.springframework.beans.factory.BeanCreationException

please help, this is very confusing, I can't deploy my war file in glassfish (where previously it could) with an error message like this
"https://localhost:4848/management/domain/applications/application/myApp"
created successfully. Warning: Command _deploy did not complete
successfully on server instance instance1: remote failure: Failed to
load the application on instance instance1. The application will not
run properly. Please fix your application and redeploy. Exception
while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
java.lang.NoClassDefFoundError: Could not initialize class
org.springframework.beans.factory.BeanCreationException. Please see
server.log for more details. Warning: Command _deploy did not complete
successfully on server instance instance1: remote failure: Failed to
load the application on instance instance1. The application will not
run properly. Please fix your application and redeploy. Exception
while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.Lifecycle ....
msg.seeServerLog
glassfish : 4.1
java version : 1.7.0_121
os : ubuntu server 12
I also could not find meaningful information in the server.log
but my war file can work well on my local tomcat
I'm sure there is no duplicates lib, because it was previously running well and indeed there was no change in my lib

Error when running WAR file on Tomcat server

I built the WAR file of my application https://github.com/JonkiPro/REST-Web-Services. I put it on the Tomcat server and clicked START. Then he threw the error https://zapodaj.net/44f410f8abc74.png.html
FAIL - Application at context path [/WebApplication] could not be started
FAIL - Encountered exception [org.apache.catalina.LifecycleException: start: ]
java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:h2:mem:database
and wrote in the logs https://pastebin.com/7rWhPFLt.
I will mention that the application after compilation in IntelliJ works without a problem.
My application works on port 8443. I do not know if it matters. It seems to me that Tomcat has a database problem?

Could not load any resource bundle by com.sun.org.apache.xerces.internal.impl.msg.XMLSchemaMessages

I have a web application and using jenkins for build and deployment to glassfish 3+ server. But now I am facing a problem. The jenkins is building the application successfully but when it tries to deploy the application to the target server then it failed with following error
Deploying /var/lib/jenkins/workspace/Gordon Converter Dev/target/gordons-dev-deployment.war to container GlassFish 3.x Remote
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.util.CargoException: Deployment has failed: Action failed Deploying application to target server failed; Error occurred during deployment: Exception while deploying the app [gordons-dev-deployment] : Could not load any resource bundle by com.sun.org.apache.xerces.internal.impl.msg.XMLSchemaMessages. Please see server.log for more details.
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:220)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:76)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:142)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
at hudson.FilePath.act(FilePath.java:920)
at hudson.FilePath.act(FilePath.java:893)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1040)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
at hudson.model.Run.execute(Run.java:1735)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Finished: FAILURE
I just got this error too and I noticed that Java had auto updated itself to the latest version. So I was compiling the application with Java 1.7.0_131, but Glassfish3 was still running under Java 1.7.0_121. My solution was to restart Glassfish so that it was running under the new version of Java 1.7.0_131. I guess I could have also downgraded my Java back to 1.7.0_121 and compiled my application with that... Bottom line here is to make sure that you are compiling with the same version of Java that Glassfish is running.

Glassfish Java error when deploying WAR

I have two Java SDKs installed. How do I find out which one Glassfishv3 is using? I am getting several Java EE errors when I try to deploy WAR files.
Below is an example of an error when I try deploying a WAR:
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.spring.aop.ServiceBeanAutoProxyCreator#0' defined in class path resource [META-INF/base-spring.xml]:
Try putting this in your application somewhere, log (or otherwise get access to) the result:
System.out.println(System.getProperty("java.version"));

Deploying webservice using virtualbox sdk 4.0 in glassfish3.1

After plenty of attempts and research I can't figure out where this exception comes from:
SEVERE: Exception in thread "Thread-31"
SEVERE: java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [vboxwebService_4_0.wsdl], because it has not yet been started, or was already stopped
at org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2074)
at org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1034)
at org.glassfish.web.loader.WebappClassLoader.getResource(WebappClassLoader.java:1169)
at org.glassfish.web.loader.WebappClassLoader.getResource(WebappClassLoader.java:1135)
at org.virtualbox_4_0.PortPool.getPort(VirtualBoxManager.java:105)
at org.virtualbox_4_0.PortPool.preinit(VirtualBoxManager.java:82)
at org.virtualbox_4_0.PortPool.access$200(VirtualBoxManager.java:36)
at org.virtualbox_4_0.PortPool$1.run(VirtualBoxManager.java:62)
at java.lang.Thread.run(Thread.java:662)
The idea was to create a webservice that uses the virtualbox 4.0 sdk.
I tried this within:
- eclipse helios service pack2
- glassfish 3.1
The service contains the vboxjws.jar in WEB-INF/lib now whenever I try to start it upon the server I get the exception from above.
Am I missing something essential that could solve this issue?
Thanks in advance,
Giriel

Categories