deploying multiple struts apps in jboss problem - deployment

I m trying to deploy two struts2 projects(ear files) in jboss 4.2.2GA.When i deploy them seperately they work fine, but if i deploy them together i get the following error
Unable to load configuration. - action -file:/C:/jboss.........struts.xml:60:109
however one of the project works fine.For the other one, welcome page is loaded but none of the actions are performed.It shows this error
HTTP Status 404 - There is no Action mapped for namespace / and action name loginAction
I tried changing package name defined in struts.xml, but no luck
what could be th reason?Do i need to change any configuration in jboss or struts.xml

Ok,finally i made it to work. This post helped me.I added jboss-app.xml file in both of my applications with following content
<jboss-app>
<loader-repository>
com.adc.advertiser:loader=application1.ear
</loader-repository>
</jboss-app>
same for application2.ear
Also in jboss-servie.xml present in deploy directory i changed Java2ClassLoadingCompliance and UseJBossWebLoader to false

Related

The absolute uri cannot be resolved : Custom Tag Issue

I am facing one problem when my code goes to publish. I have page in which i used a component with custom tag. It work fine in author, but when i replicate my code from author to publish it gives error like : The absolute uri: http:||www.mysite.com/taglibs cannot be resolved in either web.xml or the jar files deployed with this application . I have correctly replicated the my /apps/mysite folder on publish. But it gives error on publish but not on author.Any troubleshooting steps that can help me?
Thanks
Make sure that bundle with your custom tag library was installed correctly on publish enviroment (via /system/console/bundles).
And, could you describe how you deploy your project on publish enviroment?

WildFly 8.2, after every change in html file I need to perform full publish to see the changes, why?

After every change in HTML(XHTML) page of a web project, either it is JSF or a simple WAR I need to perform a Full Publish to see the changes. After some googling I found the solution to change in Management Console - Publishing settings to Automatically publishing when resources change and set publishing interval to 0, but it doesns't help. What can I do more to resolve this issue?
I'm using WildFly 8.2 on Mac Maverick.
Thank you in advance.
you can deploy exploded war file instead of war archive. Only make sure that folder name has .war in its name e.g myApp.war.
After that you can configure wildfly deployment-scanner to auto deploy exploded content. This can be done in your config file e.g. standalone.xml.
See https://docs.jboss.org/author/display/WFLY8/Deployment+Scanner+configuration
Config example:
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" auto-deploy-zipped="true" auto-deploy-exploded="true"/>
Had the same problem. In standalone.xml i added the attribute
auto-deploy-exploded="true"
and the problem started. After removing the attribute it returned to the same behaviour as before.
There was a bug in JBoss 7 which was about processing this attribute not properly (or at all) but its status is resolved and it should work now. Obviously it doesn't or i am doing something wrong.
After setting auto-deploy-exploded="true" I was't able to deploy application. Deployment copies stuff in "deployment" and then scanner triggers and starts another deployment of the same app witch results in error

WAR doesn't get redeployed in Glassfish from autodeploy

I was able to deploy my WAR the first time I placed it under domains/domain1/autodeploy dir. However, after making some changes and redeploying the WAR to the autodeploy dir, the changes were not picked up. I even deleted domains/domain1/applications/myapp (where myapp corresponds to the myapp.jar being deployed) but the WAR was not redeployed. The server was started and stopped via asadmin:
asadmin start-domain
asadmin stop-domain
What am I doing wrong so that the app does not get redeployed?
UPDATE: I tried manually (re)deploying (also using --force option) the WAR but got the following error in server.log:
[#|2013-03-17T20:47:36.177-0400|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=72;_ThreadName=Thread-2;|Application with name myprojectname is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name|#]
I do not know how to unregister/undeploy an app that's been once deployed. I tried removing all the references to my app in domain.xml but it didn't work. This seems like a very basic bug in the software.
I know this was answered long ago, but in case anyone else gets here via google like I did, I have another possible answer ...
After encountering this same issue, I found the following ... the autodeploy/.autodeploystatus directory still had a file referencing the application I was trying to redeploy by copying the war into the autodeploy directory. I had to delete the file in the autodeploy/.autodeploystatus directory, then my application was deployed when the war was copied into the autodeploy directory.
Hope that helps.
NOTE: Apparently, it is obvious to others who use glassfish that you have to delete all this stuff from the hidden .autodeploystatus directory to get your re-deploys to work. Why is it obvious to them? We may never know.
You can undeploy via asadamin with:
asadmin undeploy yourapplication
You can also visit the glassfish admin console http://localhost:4848 and undeploy via the graphical interface (look at Applications).
In general the re-autodeployment should work, but I would recommend using the normal deploy method or an incremental redeployment by some IDE like NetBeans...
Exactly the same problem reappears for an application running to be deployed in Payara 5.2021.10 (perhaps for other recent versions > 5.193) within a docker container.
The problem happens every time the docker container restarts - the deployment fails with a message:
Application with name {applicationName} is already registered. Either
specify that redeployment must be forced, or redeploy the application.
Or if this is a new deployment, pick a different name
The problem can be fixed by a forced redeploy. Place something like this into a Dockerfile of the application image:
ENV DEPLOY_PROPS="--force=true"
This environment variable allows to set custom parameters to asadmin's deploy command. How exactly is it applied can be seen in the script that generates the deploy commands, that is being run from within the container's entrypoint.

Gwt Tomcat Deploy : Just Does Nothing

if I deploy my project to the Tomcat server which uses just client side code , it works perfectly.
But if my project has a server side code , for example, a button which uses RPC , when i clicked the button, project does nothing at all. No Warnings, no errors etc. Just does nothing at all.
And also, when I deploy "the default GWT example ( greetings project )" to the Tomcat server, it doesn't work.
( I mean my problem is not related with my project's code )
p.s. : My project works perfectly in the Dev Mode.
Could you help me please?
Let us say, wWhen you run on dev mode, your URL was
localhost:port#/page1.
And that the war file name is happy.
Therefore, when you deploy to Tomcat, the server no longer serves it as localhost:port#/page1.
Your app would now be served as
localhost:port#/happy/page1
In your rpc remote service interface file you would have specified the relative path as "/page1".
However, you have to check your web.xml and make sure the servlets are specified in relative paths as well. Check your web.xml to ensure the servlet paths are not hard-coded to
localhost:port#/page1.

tomcat6 application deployment error

I am new to tomcat and servlets and am trying to deploy my first web application in tomcat and the index.jsp page is showing up blank.
It works fine in eclipse. I have the web.xml for the application setup to have the index.jsp as the default page. I am able to run the application and debug it in eclipse but when I export it as a WAR file and deploy it in tomcat and try to access it through a regular browser I get a blank page.
What am I missing here? Any help is greatly appreciated.
Thanks,
- Vas
If you ever get a blank page, the most important information you (and we) need are:
The request URL.
The already sent data -if any- (webbrowser > View Source).
The response headers (Firebug? Webdeveloper Toolbar?).
The server logs (stdout, stderr, webapp).
This usually indicate a wrong URL (to be proven by 1), or an exception halfway a JSP page (to be proven by 2 and 4), or an internal server error without an error page (to be proven by 3 and 4).
You need to configure your server.xml file and declare a context for your web application. You can find the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
But a blank page is kind of weird, because I think if your web application wasn't deploy correctly, you will get a Http 404 error.