We are developing a software that runs on a client pc and is loaded via webstart (JNLP) from an app server. As app server our customers have the choice between weblogic and jboss ( wildfly). All the jars, the webstart client loads via webstart, are packed within a WAR file deployed in the app server.
The war file does not contain any other things than the jars.
We currently encounter the following issue:
Every time we reboot the jboss, the webstart clients load all the jar files again afterwards although they did not change.
With weblogic we do not have this issue.
Any idea what causes that and how to stop that behaviour?
I'm not sure why it would be different between Weblogic and JBoss but you should do the following in your JNLP file:
Specify a version for every jar like:
<jar href="my.jar" main="true" version="1.0"/>
Specify JNLP version enabled
<property name="jnlp.versionEnabled" value="true"/>
This should ensure that the versions are checked and only downloaded as needed. You can see more in the Oracle docs here.
Check to see if your server returns the correct HTTP code.
Webstart (and browsers) send HTTP request to see if a resource is modified. If it is not modified the server should return code "304 Not Modified".
You can use this chrome plugin to monitor HTTP requests and responses:
https://chrome.google.com/webstore/detail/live-http-headers/iaiioopjkcekapmldfgbebdclcnpgnlo?utm_source=chrome-app-launcher-info-dialog
Related
Application is a EAR file
Shared Library where the third party jar are bundled and deployed to managed server as shared library.
weblogic-application.xml file where library ref to shared library is made and present in EAR file(META-INF folder).
Shared libraries are deployed to managed server as target and is successful.
while deploying the EAR file, the selection of EAR from console deployment results in ClassNotFoundException of the class present in shared library even though the reference is made in weblogic-application.xml.
Note that if the Library deployment is targeted to Admin Server and Managed Server the deployment of EAR file is successful without any exception.
Single Admin Server deployment is working fine without any issues for the same setup.
Deployment is expecting the JAR is classpath of admin server while deploying to managed server. is this an intended behavior ?
Is there any setup configuration we are missing here ? Correct me if there is any steps gone wrong.
Update : we did the same deployment with ant script using wldeploy and no errors are encountered and application is deployed successfully.
This was a known issue in a previous version of weblogic. Maybe it is still not fixed.
CR282367
While using the WebLogic Administration Console with applications or EJBs deployed on a Managed Server that depend on a deployed library, you may encounter a java.lang.NoClassDefFoundError
Workaround:
The WebLogic Server Administration Console needs access to any shared library deployments so that Java data types and annotations can be processed. Therefore, all shared library deployments should always be targeted to the Administration Server in addition to any Managed Servers or clusters.
https://docs.oracle.com/cd/E11035_01/wls100/issues/known_resolved.html
I am currently working on a project which has a GWT frontend and a seperate Java module with servlets and a REST interface on the backend. The project when deployed runs on a single JBoss server.
I am running into difficulties though as when I run the GWT app in hosted mode (in eclipse) the jetty server does not have a deployed Java module to interact with.
My idea was to setup a JBoss server which eclipse could deploy into for development purposes, the problem with this is that the installer for the product sets up a JBoss server with a GWT app already embedded in it, so redeploying into this JBoss instance might cause problems?
My other idea would be to create a second JBoss server to host the GWT app, with some sort of url redirect for the rest calls which would redirect to the first JBoss instance. Is this possible?
EDIT: Can I do this with the built in jetty server in eclipse and not have to worry about using a seperate JBoss server. In other words can I somehow get the jetty server in eclipse to redirect particular requests to a different URL?
I've installed IBM Worklight v6.0 Consumer Edition with WAS Liberty Profile 8.5.5 on a linux server and an oracle database.
I've built a .war with IBM Worklight Studio v6.0 and deployed it in my Liberty apps' directory /worklightServer/apps.
Then I changed server.xml with the following:
<!-- Configuration for Test app -->
<application id="TestApp" name="TestApp" location="TestProjectWL6.war" type="war">
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${shared.resource.dir}/lib" includes="worklight-jee-library.jar"/>
</commonLibrary>
</classloader>
</application>
The .war file does not get deployed because of following errors in messages.log:
[7/5/13 14:42:47:289 CEST] 00000012
m.ibm.ws.app.manager.internal.statemachine.ResolveFileAction E
CWWKZ0021E: Application TestApp at location TestProjectWL6.war is
invalid.
How to make the .war valid? I followed the IBM Worklight and WebSphere Information Centers on how to deploy, but it's not working.
The error identifier CWWKZ0021E suggests a problem with the "archive or directory at the specified location". I would make sure that
The file usr/servers/worklightServer/apps/TestProjectWL6.war exists (file name case being significant),
It is really a file, not a directory.
Its access rights don't prevent the Liberty server process from reading it. Use ls -l .../usr/servers/worklightServer/apps/TestProjectWL6.war to check it.
It is not truncated (i.e. unzip -l .../usr/servers/worklightServer/apps/TestProjectWL6.war gives a reasonable listing of its contents).
The server.xml you modified is really the one in usr/servers/worklightServer/ and not the one belonging to a different server.
This all sounds stupid, but these kinds of things occasionally are wrong when manual application server configuration is performed. Configuration through the Ant task <configureApplicationServer> is more reliable.
How did you install IBM Worklight v6.0?
How did you deploy your project's .war file?
Did you use the supplied Ant scripts that are copied to disk when using the IBM Worklight Installation Manager?
The process of installing Worklight Server as well as deploying a .war file in IBM Worklight v6.0 is much different than it was in v5.
Make sure you follow the updated documentation:
Installing Worklight Server
Deploying an IBM Worklight project
I am willing to bet you did not use the Ant scripts to deploy the .war file; Most likely you are pointing to the wrong location of the Worklight JEE .jar file. You will need to correct the path.
I suggest using the supplied Ant scripts.
i've cleaned all my environment: remove all applications config in server.xml (including application center console installed with worklight server installation), remove every war from apps & dropins directory.
then i built with ant task, and now it's ok.
I am using the cargo-maven2-plugin:1.2.0 to do redeployments of my GWT 2.4.0 based web application to Apache Tomcat 7.0.25 1.6.0_30-b12 Sun Microsystems Inc. Windows Server 2008 R2 6.1 amd64).
The initial deployment works fine. I immediately try to undeploy the application using the tomcat manager when I receive the following error message:
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Unable to delete [C:\apache-tomcat7\webapps\mywebapp]. The continued presence of this file may cause problems.
From tomcat the war file and most of the unzipped web application files have been successfully removed. But it fails to delete two libraries from mywebapp\WEB-INF\lib:
gwt-user-2.4.0
servlet-api-2.3
When I now wait half a minute and trigger the undeploy again, it works.
Did anybody experience the same or a similar behavior?
I already tried to debug using PSI Probe for Tomcat but that didn't really give me any insights. What could I try next?
Both files shouldn't be deployed in the first palce. First gwt-user-2.4.0 is the complete gwt jar file. For deployment only the server specific version needs to be deployed: gwt-servlet-2.4.0.jar. The servlet-api-2.3 is already available in the tomcat lib directory. So you should set both files to provided and if you not yet have the gwt-servlet jar file, add that file to you dependencies.
When I develop an Axis2 web service on Eclipse, I noticed that Eclipse is automatically copying the classes from the lib folder of Axis2 to the lib folder of the new project. However, not all classes from the lib folder of Axis2 are being copied. Interestingly, the web service runs without any problem when deployed to Tomcat via Eclipse even if some the jars from Axis2 were not copied. Also, when I viewed the temp file of Tomcat, Tomcat seems to generate the jars for the listed modules on modules.list of the web service.
Can someone enlighten me regarding what is happening on this? Why Eclipse doesn't copy all the jars from Axis2? Why can the web service run on Tomcat even without the other jars from Axis2? What are those temp files for? When and why is it being generated?
I tried to run the same project on WebSphere and I am encountering a ClassDefNotFound exception because of the missing jars. My problem was solved when I copied all the Axis2 jars that was not copied by Eclipse to my project. But I'm not comfortable with my solution because Tomcat can run my project even without those jars. Is my solution really the right solution? Or am I missing a configuration setting?
This is just for clarification:
My web service is already running in Axis2. My class loading policy is set to PARENT_LAST. I know that since WebSphere has its own Axis2 configuration, the class loading policy must be set to PARENT_LAST so that WebSphere will use the Axis2 from the project itself. Aside from setting the class loading policy, I did something to make my web service run on WebSphere. I describe what I did above. My question is why such method must be taken?
WebSphere has it's own axis2 configuration as part of its Java EE server spec for JAX-WS. Change your class loading policy to PARENT_LAST and check if that solves your problem.
Edit:
As the original post already states: WebSphere is a Java EE server depending on version it supports its the standard Java JAX-WS web services. Actually web services became part of the standard jdk.
If you use JAX-WS like mentioned in Introduction to JAX-WS or building web services then you don't have to add any 3rd party library for getting your web services running. As soon as you use the non JDK implementation like axis2 you have to package it with your application.
IBM didn't just pack the axis2 into their WAS/JDK, they modified it. I'm not sure what Tomcat delivers, however as long as you use JAX-WS it shouldn't matter. With JAX-WS you don't have any direct import of the org.apache.axis packages. If you use these imports you have to supply the libraries and make sure that yours are loaded.