w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Run Spring Jobs as jar module packaged in ear and deployed in Jboss
Have you looked at CommandLineJobRunner? Is this what you want? You might also have luck with the Spring Batch.

Categories : Spring

How to change the context path of a Spring MVC application deployed in TOMCAT 6.0
When adding a context.xml to the META-INF directory of the web application you should only need to specify the path, the other fields are deducted from where the application is deployed. The docBase is only needed if you specify the path inside the hosts or server.xml. <?xml version="1.0" encoding="UTF-8"?> <Context path="/DS" reloadable="true" /> So basically the above should be enough, make sure that you don't have any leftovers from your previous attempts as that might influence how this works. (Although I believe this one should take precedence over the others).

Categories : Maven

Spring Logs cannot be viewed in console or log file(Application deployed in WAS)
I believe you're just missing the configuration file parameter you need to set in JVM: Servers > Application servers > [app server name] > Process definition > Java Virtual Machine Than point Log4J configuration file: -Dlog4j.configuration=$POINT_TO_LOG4J_CONFIG_FILE

Categories : Apache

JBoss 7 Spring JPA + Hibernate Application: no transaction is in progress
I managed to find a solution to my problem based on the answer to this Question It's given that to use JTA it is mandatory to a persistence.xml. So that's what I ended up doing. My persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="myPU" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/jboss/datasources/MySqlDS</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-cla

Categories : Hibernate

Spring MVC + Maven + JBoss: can't deploy (The application must supply JDBC connections)
You configured JPA to be initialized by Spring (using LocalContainerEntityManagerFactoryBean), but JBoss also sees your persistence.xml and tries to initialize JPA on its own (as required by JPA Specification for application server environments). Obviously, it fails, because you didn't configure a data source in persistence.xml. To avoid this problem Spring allows you to use different name for persistence.xml: <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> ... <property name = "persistenceXmlLocation" value = "classpath:/META-INF/spring-persistence.xml" /> </bean> Alternatively, since Spring 3.1 you can configure JPA without persistence.xml at all. See also: LocalContainerEntityManage

Categories : Postgresql

Creating a SOAP service which can be deployed as war on JBOSS
If you use Maven, you can specify that during you 'build' phase in you .pom file: <build> <plugins> <plugin> <artifactId>maven-ear-plugin</artifactId> <configuration> <unpackTypes>war</unpackTypes> </configuration> </plugin> </plugins> </build>

Categories : Web Services

Quartz-Job in grails does not work when deployed to JBoss 7
I found the reason and a solution on this site: http://grails.org/plugin/grails-ant Even though ant is part of Grails core, since it's primarily a build tool, it's not included in a Grails war file (1). And you can do that in your own app, without this plugin, by adding ant to your build.config. dependencies { // Workarounds for Grails not shipping ant in WAR compile 'org.apache.ant:ant:1.7.1' //you can also use runtime compile 'org.apache.ant:ant-launcher:1.7.1' } I changed the versions to the most recent ones from here and JBoss starts it. Thanks to tim_yates for the first hint.

Categories : Grails

Just deployed an EAR with a War file to Jboss 6.1 deployments directory. What is the default http port number?
Did you update the http binding port from 8080 to 80 in jboss/server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml? <bean class="org.jboss.services.binding.ServiceBindingMetadata"> <property name="serviceName">jboss.web:service=WebServer</property> <property name="bindingName">HttpConnector</property> <property name="port">8080</property> <property name="description">JBoss Web HTTP connector socket; also drives the values for the HTTPS and AJP sockets</property> </bean>

Categories : Java

How to call a clickonce deployed application from another application in VB.NET?
You could, if your Windows Forms application is deployed from a URL, simply call the URL it is deployed from, in your ribbon add-in, and it'll start it no matter where it's actually installed on your HDD. Like this: System.Diagnostics.Process.Start("http://mydomain.com/myapp.application") Here is a more detailed explanation of setting up a shortcut to a Click-Once deployed application: http://keithelder.net/2009/04/18/how-to-run-a-clickonce-application-on-startup/

Categories : Dotnet

Run code once Spring app is succesfully deployed
You can use @PostConstruct annotation or a ApplicationListener that get triggered by the ContextStartedEvent (but take care if you have a typical web application you have two contexts and so two ContextStartedEvents.

Categories : Spring

JBoss AS7 JMS cluster with Spring app
Note, that the backup server is a passive HornetQ Messaging Server and can not have any producers or consumers before failover. HornetQ Docs (Live - Backup Groups): http://docs.jboss.org/hornetq/2.3.0.Final/docs/user-manual/html_single/#d0e11266

Categories : Spring

Get URL of deployed playframework application
If I understood your intention correctly you want just to use an absolute url, so similar question (and answer) should be your solution: How to reverse generate a URL from a route on Play 2 Java? (just note, that you can also use absolute routes in the views).

Categories : Scala

Ext deployed application: ext.js vs ext-all.js - what's a better option?
These 2 files serve different purposes. ext.js contains the core functionality needed to run an application, while ext-all.js contains all of the framework code. The first one will require your components to correctly use the requires and uses config properties to organize your code dependencies properly. Then, when you run Sencha Command to build the app, all of your classes will be combined with the core from ext.js, and all your other dependencies from the ExtJS library that you included, and put into that app-all.js file. If you are trying to use the Sencha SDK to build your app, I would strongly recommend upgrading to the latest version (Sencha Command version 3, available here: http://www.sencha.com/products/sencha-cmd/download) - they have fixed many, many bugs, and it works ver

Categories : Extjs

Deployed application not launching
You donot have the launcher activity. Add the following in one of the Activity Declaration <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>

Categories : Android

How to print in pdf after deployed application
java.awt.Desktop.getDesktop().open(new File("src/images/facture.pdf")); I think the problem is here. When you deploy as jar file your resources can't be accessed like that. You should use getResource. Reference You can try like String path =Yourclass.class.getResource("/images/facture.pdf").getPath(); java.awt.Desktop.getDesktop().open(new File(path));

Categories : Java

Spring can not load properties when webapp is deployed on Maven embedded Tomcat
/WEB-INF/conf is not in the CLASSPATH; /WEB-INF/classes is. Try putting your .properties file there and see if you do better. If that doesn't work, I'd wonder if it's a class loader hierarchy problem. Java EE containers have a hierarchy of class loaders: first is the bootstrap, second is the app server, last is the application. It might be that you have the .properties file in the application loader when it's needed at the app server level.

Categories : Maven

Deployed to Tomcat 7 OK but cannot access application
OK, well this is strange. It was all down to the name of the WAR file, and thus the URL of the site. I renamed the war file to just system4.war, and tried to deploy that, and I could navigate to the URL just fine. I say it's strange, because I ran the wicket quickstart project some months ago on the very same server, and the war file was named very similarly (ie wickettestproject-1.0-SNAPSHOT.war) and this worked ok, although after redeploying this project now, that no longer works either. I'm at a loss as to why, because AFAIK dots and dashes are ok in a URL - maybe it's a tomcat quirk or something. To fix the problem: In the pom.xml I use to generate the WAR, I've included this line under the build tags: <finalName>system4</finalName> Now the war is renamed, it's bu

Categories : Java

How to find out the version of deployed jsf application?
Bundle-Version must be added in any JSF jars. If you couldn't find that in your jars, you may downloaded wrong one. If your project is maven built, you can find everything in pom.xml. Here is a JSF download link Oracle Mojarra JavaServer Faces.

Categories : JSF

Unique id/code of every deployed application
There are two methods to get GUID, Fristly, you can get GUID in Assembly Information. //Gets the assembly that contains the code that is currently executing. Assembly asm = Assembly.GetExecutingAssembly(); Guid id= asm.GetType().GUID; Secondly, It is not taken from the Assembly Information.Stored as a real custom attribute. var attribute = (GuidAttribute)asm.GetCustomAttributes(typeof(GuidAttribute),true)[0].; var id = attribute.Value; More info you can see Assembly.GetCustomAttributes Method (Type, Boolean) http://msdn.microsoft.com/en-us/library/88d17d13.aspx Assembly.GetExecutingAssembly Method http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getexecutingassembly.aspx

Categories : Visual Studio 2010

How to load images in deployed application?
By the time of deployment, those resources will likely become an embedded-resource. That being the case, the resource must be accessed by URL instead of File. See the info page for the tag, for a way to form an URL.

Categories : Java

Configure spring security ldap-server attribute to use different url based on deployed environment
I've done that with Spring profiles: In your spring.*.xml config file use this at the end of your file: <beans profile="production"> ... </beans> <beans profile="local"> ... </beans> As VM Arguments the used profile must be provided: -Dspring.profiles.active=production Regards

Categories : Spring

How to read jBoss configuration files in Spring?
A ResourceBundleMessageSource uses the basenames provided to (and the locale) to build a resource name (ex. message.properties) which is eventually (in the call stack) used by java.util.ResourceBundle.Control#newBundle(...). This resource name is then looked for on the classpath starting at its root (ex. /message.properties). If you're on an IDE like Eclipse, your classpath very likely starts at src. If jboss/standalone/configuration/... is on your classpath as well and the properties file are in there, you can change the basenames to <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basenames" value="jboss/standalone/configuration/messages,jboss/standalone/configuration/local" /> <property name=

Categories : Java

Turnaround Time in Spring JBoss Eclispe
Try JRebel. You can get it free if you spread some social media love for them. http://zeroturnaround.com/software/jrebel/

Categories : Eclipse

Context path for tomcat deployed web application
The context path of your application will be the name of the war file. If you want to override it, you can follow Tomcat's documentation (https://tomcat.apache.org/tomcat-7.0-doc/config/context.html). Edit the server.xml in the conf folder of the tomcat installation and make the following changes. <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="/yoururl" docBase="YourApp" useHttpOnly="false"> <Manager pathname="" /> </Context> </Host>

Categories : Java

Part of my MVC application is not working when deployed live
Your code is not very defensive.. hence your issue. There is a null object in your AccountController's Register() method.. what could that be? Any of these: _appellationRepository.GetAppellationByDescription("Mr") _countryRepository.GetCountryByName("United Kingdom") _corporationRepository.GetCorporationByName("Samsung") Check your data, and check that your repositories are actually returning data. You can't check a property on a null object (which you are doing by having .Id after each one of the above calls). As I said in the comments.. it is probably because your live database does not contain all of the data that your local database contains. Make sure they match 1-to-1 and while you're there... put some defence mechanisms in place! E.g: var country = _countryRepository.GetCountr

Categories : C#

Same diskstore for the same application deployed on different clustered servers
You cannot share EhCache diskstore between 2 server. You have to go with one of the ways to distrubute EhCache. You can try with RMI that does not require you to deploy another piece of software. It's documented here: http://ehcache.org/documentation/user-guide/rmi-replicated-caching. A more scalable way is to use Terracotta Server Array but it's not anymore supported by Terracotta. They are now pushing for BigMemory (that is free for up to 4 nodes). It's not hard to set up, it connects your EhCache so they will always be synchronized across all your servers. It's a great piece of software but support and documentation is scarce. Start from here: http://terracotta.org/documentation/4.0/bigmemorymax/configuration/configuration

Categories : Tomcat

session varables losing value in deployed application
When are you setting the session? Also, is this hosted? Some 3rd party hosts recycle worker processes/application pools constantly and it kills your session. Make sure you have your own application pool as well. Also, cookieless could be a problem for you.

Categories : Asp Net

Service in Silverlight application does not work when deployed
For sure you can change the web project's URL in project properties, but this is not a good solution because you'll get the same problems when accessing the SL application from a remote computer. You need to set the service URL programmatically, like above: ServiceReference1.Service1Client svc = new ServiceReference1.Service1Client(); Uri serviceUri = new Uri(System.Windows.Browser.HtmlPage.Document.DocumentUri, "Service1.svc"); svc.Endpoint.Address = new System.ServiceModel.EndpointAddress(serviceUri); This solution uses the same URL that you are using to access the Silverlight Application.

Categories : Visual Studio

Deploying Spring Web Applicaiton To JBoss WebApplicationContext Exceptions
Usually, the ContextLoaderListener from Spring is good to go. If you don't have any specific requirements, just use that one. All-in-all, it should look like this: <listener> <!-- Loads your Configuration Files--> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> If you need to have a listener that uses the Spring context, you could consider extending this class. Make sure that the contextInitialized() method calls the super implementation first (so that it can initialize the Spring context for you). Afterwards, it will be available through (WebApplicationContext) servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE). Your contextDestroyed() method, however, shoul

Categories : Java

Jboss No Spring WebApplicationInitializer types detected on classpath
In a typical servlet application, you would have a web.xml descriptor file to declare your serlvets, filters, listeners, context params, security configuration, etc. for your application. Since servlet 3.0 you can do most of that programmatically. Servlet 3.0 offers the interface ServletContainerInitializer, which you can implement. Your servlet container will look for your implementation of that class in META-INF/services/javax.servlet.ServletContainerInitializer file, instantiate it, and call its onStartup() method. Spring has built WebApplicationInitializer on top of that interface, as an adapter/helper. You need either the web.xml descriptor or a class that implements WebApplicationInitializer to setup and run your application.

Categories : Java

Reverse routing on an application deployed in a Tomcat context
I have found the solution myself - Play includes the jsAction tag which generates a function that builds the correct URL: var companyURL = #{jsAction @Employees.getForCompany(':companyID') /} $.ajax({ url : companyURL({companyID:companyID}), ... }); Like that I can maintain the preferred routes mapping: GET /companies/{companyID}/employees Employees.getForCompany

Categories : Rest

How to change MVC3+ Views after application has been deployed (without redeploying)
Razor views are compiled dynamically at runtime when they are requested by the ASP.NET runtime. You could replace your .cshtml/.vbhtml files directly on your webserver and the changes will be automatically picked up.

Categories : Asp Net Mvc

Application works on local dev enviroment but not when deployed on server?
Try using curl. You should check if curl is installed on the remote server: $url = $request . $method . $sign . $apiKey . $sign . 'text=' . urlencode($input) . $sign . $per_page . $sign . $page . $i . $sign . $format; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $resultObj = unserialize($result);

Categories : PHP

Get the location of a deployed Matlab application at runtime for Mac and Linux
Any progress on this? What you need to do (for both platforms) is to access the 0th argument passed by the shell to the executable. One way of doing this could be to wrap the call to the executable in scripts and pass the location explicitly: myapp.bat: set scriptpath=%~d0%~p0 "%scriptpath%%~n0%.exe" --ExecutablePath="%scriptpath%" %* Or, if you don't want the CMD window to stay around myapp.bat: set scriptpath=%~d0%~p0 start "%~n0" "%scriptpath%%~n0%.exe" --ExecutablePath="%scriptpath%" %* Bash is actually harder (see this question), but something like this might work: myapp.sh #!/bin/bash SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" "${SCRIPTPATH}/myapp.o" --ExecutablePath="${SCRIPTPATH}" $*

Categories : Matlab

screen saver application when deployed in C:WindowsSystem32 throws exception
The problem is that the screensaver was compiled for 32bit cpu. Only 64bit exes are allowed in the %WINDIR%System32 folder on a 64bit OS. Which in fact, i was using Windows7 64bit. The correct place to put 32bit screensavers is in %WINDIR%SysWOW64 or compile using 'AnyCPU' option in Visual Studio then you can install into the %WINDIR%System32 for all.

Categories : Wcf

.htaccess redirect to subdirectory for Ruby application deployed by passenger
I had the same problem with justhost and I solved it without adding any redirect. I set my rails app public folder to be the main site public folder. I renamed the original "public_html" to "public_html_backup", just in case. Added a symlink ln -s ~/myRailsApp/public ~/public_html in my htaccess I changed RailsBaseURI /myRailsApp to RailsBaseURI /, resulting in: <IfModule mod_passenger.c> Options -MultiViews PassengerResolveSymlinksInDocumentRoot on RailsEnv production RackBaseURI / SetEnv GEM_HOME /yourUserPath.../ruby/gems </IfModule> I hope this can help you. Cheers

Categories : Ruby

Returning errors back to development team from deployed iOS application
Depends on what kind of errors you're talking about... Exceptions are automatically reported back by Apple. But, they don't give all exceptions back and there is a lag. There are several 3rd party services which you can use where you add their framework and it will detect the exception and send it back to their server for you to analyse. For non-exception errors there is nothing standard. I would suggest adding analytics to your app and using part of the analytics to track these occurrences.

Categories : IOS

Appengine application not working when deployed - TemplateNotFound. It works on localhost
Your problem is that the templates your are trying to load are residing in your static directive html . There is no need to deploy templates as static resources - in fact you probably shouldn't. When you deploy static resources they are not normally readable by your application. Recently an app.yaml directive was added to allow you to read these resources. Unless there is html files you wish to statically serve, just drop the /html static directive, or move your templates somewhere else. or add the directive. application_readable to the /html static handler see the docs for static handlers https://developers.google.com/appengine/docs/python/config/appconfig#Static_Directory_Handlers Personally I would recommend against being able to statically serve jinja templates as well use them

Categories : Google App Engine

New missing/unsatisfied dependencies: service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/MyDB]
Your module.xml should be like this: <module xmlns="urn:jboss:module:1.0" name="com.mysql" slot="main"> <resources> <resource-root path="mysql-connector-java-5.1.24-bin.jar"/> </resources> <dependencies> <module name="javax.api"/> </dependencies> </module> And make sure you have mysql-connector-java-5.1.24-bin.jar and mysql-connector-java-5.1.24-bin.jar.index in same folder where you have module.xml.

Categories : Java

Distributing business logic across different servers(like JBoss/Glassfish) using Spring and still under one transaction
Spring has support for RMI or provides its own remoting mechamism HttpInvoker but according to the doc they don't provide any remote transaction propagation. Similar questions: Spring Distributed Transaction Involving RMI calls possible? Transaction propagation in multiple servlet context with multiple data source

Categories : Spring



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.