I created a helloworld eclipse RAP project and run it eclipse itself.It is working fine.
After that I exported the RAP project to war file by using the eclipse war product configuration.
It created the war file.I deployed the war file in tomcat. After that when I try to access
the war deployed helloworld application, I am getting status 404 error.
http://127.0.0.1:8080/helloworld
I searched in internet and checked for troubleshooting and they mentioned to check in web.xml
all the entries are available or not. I confirmed it is available. Also I checked application structure.
It is fine as it is suggested. Could any one help me how to access the deployed application in tomcat?
Or is there any other server I can use in order to make it work quickly?
I suppose that the war file is named helloworld.war and http://127.0.0.1:8080/helloworld is the URL of your application.
If your entrypoint is not registered at the root path, you have to add the entrypoint name to the URL, e.g. http://127.0.0.1:8080/helloworld/entrypoint.
Alternatively, you can register the application at the root path in your ApplicationConfiguration:
application.addEntryPoint("/", YourEntryPoint.class, properties);
Then you should be able to access it at http://127.0.0.1:8080/helloworld.
Update:
If you use extension points, configure the path in your entrypoint extension, for example:
<extension
point="org.eclipse.rap.ui.entrypoint">
<entrypoint
class="example.MyEntrypoint"
path="/" />
</extension>
Related
In TeamCity I have created build step that is running MSBuild with target Package(not my script just MSBuild runner from TC pointing to csproj), then this package is deployed through web deploy to iis.
Problem is that deployment is creating new application under Default Web Site and I would like to deploy it to one already existing.
So I added parameter to build DeployIISAppPath=Default Web Site\ MySite and I have checked that in generated SetParameters file it actually is Default Web Site\ MySite but still this value is ignored and app is deployed to XXX_deploy virtual directory created by deploy.
Any idea why?
My setup includes a weblogic 12c server which hosts several applications. The application which i am writing has log4j configuration property with appenders that are specific to this application. I have packaged the property in app EAR and deployed it to weblogic.
I want the log4j setup in weblogic to pull configuration from this property file. Will i still need a global configuration file put in inside the domain root folder? . The thing that confuses me is, why do i need to have log4j configuration in domain root if i already have it inside the application ( while i load using PropertyConfigurator) .
I did copy the log4j and wllog jars to domain/lib but i am not happy with copying anything to server directories since i want this to be driven by the deployed EAR.
I am new to Weblogic so might be something obvious. Tried several links on the web but none of them answers my question. I have been referring to this thread for the setup. https://community.oracle.com/thread/1063248
Make sure log4j jar is in APP-INF/lib
Make sure your log4j config file is in the root classpath for the ear (APP-INF/classes)
If you don't have one already, add a weblogic-application.xml (see http://docs.oracle.com/cd/E24329_01/web.1211/e24368/app_xml.htm#WLPRG389) to your META-INF directory at the EAR level, and in there include a prefer-application-packages element with package-name of org.apache.log4j
How do you make a war file auto deploy?
The server component is glassfish and the database is created in MySQL. Do I need to create an executable file that will extract the war file? and how to do it so?
It should be sufficient to copy/move your WAR file to the following folder:
$GLASSFISH_HOME/glassfish/domains/domain1/autodeploy
(You may change the domain name if you are using a different one.)
See also:
How to to autodeploy war file with GlassFish
WAR doesn't get redeployed in Glassfish from autodeploy
Oracle GlassFish Server 3.0.1 Quick Start Guide - Deploying and Undeploying Applications
I created a JAX-WS Web Service and an EJB skeleton from a WSDL file by following a Tutorial in the Rational Application Developer for WebSphere 8.0.4 help.
It created an EJB project to contain my EJB code.
It created an EJBEar project to build an ear file.
It created a RouterWebProject to create a war file.
The RouterWebProject provides servlet information so that I can post an HTTP soap request to the servlet to be routed to my web service code in the EJB.
The EJB service code calls a class in the same EJB project that uses a ResourceBundle to read a property file with the name AppSDKExamples.properties
static {
ResourceBundle props = ResourceBundle.getBundle("AppSDKExamples", Locale.getDefault());
brokerPartnerId = props.getString("broker.partner.id");
buyPartnerId = props.getString("svc.dealer.partner.id");
sellPartnerId = props.getString("platform.partner.id");
sellPartnerId2 = props.getString("platform.partner.id2");
accountNumber = props.getString("account.number");
}
I have tried placing the AppSDKExamples.properties file everywhere I can think of but I always get a java.util.MissingResourceException.
How do I make this property file available to the EJB code?
Currently the EJB ear looks like this:
lib/AppSDKExamples.properties
lib/AppSDKExamples_en_US.properties
lib/other jar files
META-INF/MANIFEST.MF (this does not contain a class path I can't figure out how to set it.)
EJB.jar
WebProject.war
The EJB.jar looks like this:
com/activant/web/services/examples/class files that look for the property file
com/activant/web/services/iaptest/class files for the web service
META-INF/MANIFEST.MF (this has the AppSDKExamples.properties and AppSDKExamples_en_US.properties in the classpath)
AppSDKExamples.properties
AppSDKExamples_en_US.properties
The war file looks like this:
lib contains same jar files as the EJB.jar files has
META-INF (Class-Path: /lib EJB.jar)
WEB-INF/classes this folder contains both the propertie files.
WEB-INF/lib this folder contains both the properties files.
WEB-INF/ibm-web-bnd.xml
WEB-INF/ibm-web-ext.xml
WEB-INF/web.xml
Any help on this would be greatly appreciated.
Thanks.
If the properties files are at the root of the EJB, then the EJB class should be able to find the properties files. If you're running with Java 2 security enabled, then you'll need to grant FilePermission; see PROFILE_HOME/config/cells/CELL/nodes/NODE/app.policy for ${webComponent} and ${ejbComponent}.
Simply placing the properties files in EAR/lib won't work because the EAR/lib/ directory is not on the classpath, only the .jar files within it are on the classpath. It might work to add Class-Path: lib/ to the EJB jar MANIFEST.MF, but directory class paths are not required by the JavaEE spec, so I do not know if they are supported by WebSphere Application Server.
Referencing the properties files directly in the MANIFEST.MF Class-Path also doesn't work because only JARs and directories are supported (see above for JavaEE caveat regarding directories).
In general, it's probably best to remove the leading slash from /lib. It's unclear from the JavaEE platform specification whether this should refer to the lib directory in the EAR or to a directory in the root of the machine file system.
I finally have my application in IntelliJ and deploying to JBoss. I'd like to get hot deploy working but it looks like I need to understand how IntelliJ and JBoss interact.
When I build my project in IntelliJ and then start JBoss, the ear file does not appear in the deploy directory so I assume that there is some magic that IntelliJ does so that JBoss reads from a different folder. What is happening during this step?
Thanks :)
I know this is an old and apparently answered question, but unfortunately the links provided in the accepted answer didn't give me the simple details I was looking for. For anyone also trying to understand how IntelliJ IDEA deploys your exploded war to JBoss without copying files to the deployments folder, here's what I've found while deploying locally from IDEA 14 (EAP) to JBoss 7.1.1.Final:
After you've created an "exploded war" artifact for your project (or it has automatically been created for you), IDEA will build your provided sources and place the output in the directory set in the artifact options (you can change this setting to place the output inside the deployments folder inside your jboss installation).
IDEA will update your JBoss configuration file (/standalone/configuration/standalone.xml) and add a "deployment" node inside the deployments section. This entry simply defines a name, a runtime name and the exploded war root folder for your project, which will point to the output directory of your artifact set in IDEA.
When JBoss is started (either manually or from your run/debug configuration in IDEA), it will automatically deploy your artifact. Be warned that if your files are in the output directory of your project and you clean it, JBoss will still try to find the directory, thus encountering errors in your next attempt to start it: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to mount deployment content, Failed to process phase STRUCTURE of deployment and java.io.FileNotFoundException to name a few.
Please refer to the documentation.
Basically, you need an exploded Artifact configuration with the directory name ending with .ear.
Build | Make performs hot deployment as well as Update action (which is configurable and can update only resources, resources and classes, optionally redeploy or restart the server).
Instead of copying your application to JBoss, IDEA runs it with appropriate parameters so that it uses Artifact directory instead. Configuration is very flexible and you can just change the artifact directory location to reside under JBoss directory.