Solved

java spring project stops unexpectedly linux

Posted on 2014-01-27
2
217 Views
Last Modified: 2014-02-06
HI,
I have the following file :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

	<!-- Root Context: defines shared resources accessible to all other web 
		components -->
	<context:component-scan base-package="com.yatra">
		<context:exclude-filter type="annotation"
			expression="org.springframework.stereotype.Controller" />
	</context:component-scan>

	
	<bean id="yatraDB" class="com.yatra.extremesearch.DBTemplate.DBTemplate">
		<constructor-arg index="0" ref="yatraDataSource" />
	</bean>

	<bean id="yatraDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
		destroy-method="close">
		<property name="driverClass" value="${yatra.jdbc.driver}" />
		<property name="jdbcUrl" value="${yatra.jdbc.url}" />
		<property name="user" value="${yatra.jdbc.username}" />
		<property name="password" value="${yatra.jdbc.password}" />
		<property name="acquireIncrement" value="${yatra.acquire.increment}" />
		<property name="minPoolSize" value="${yatra.min.pool.size}" />
		<property name="maxPoolSize" value="${yatra.max.pool.size}" />
		<property name="maxStatementsPerConnection" value="${yatra.max.statements}" />
		<property name="numHelperThreads" value="${yatra.num.helper.threads}" />
		<property name="idleConnectionTestPeriod" value="300" />
		<property name="preferredTestQuery" value="SELECT 0" />
	</bean>
	
	<!-- Define Job beans -->
    <bean id="extremeSearchJob" class="com.yatra.extremesearch.job.ExtremeSearchJob" />
    
     <!-- create the Job -->
    <bean id="extremeSearchJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject" ref="extremeSearchJob" />
        <property name="targetMethod" value="execute" />
    </bean>
    
    <!-- create the Trigger with a Schedule -->
    <bean id="extremeSearchJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
        <property name="jobDetail" ref="extremeSearchJobDetail" />
        <property name="cronExpression" value="0 0 13 1/1 * ? *" />  
    </bean>
    
    <!-- schedule the Job -->
    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    	<property name="triggers">
		    <list>
		    	<ref bean="extremeSearchJobTrigger"/>
		    </list>
		</property>
		<property name="quartzProperties">  
                <props>  
            <prop key="org.quartz.scheduler.skipUpdateCheck">true</prop>  
          </props>  
     </property> 
    </bean>

	<!-- <bean id="searchService" class="com.yatra.extremesearch.service.impl.SearchParamServiceImpl">
	</bean> -->
	
	<bean id="httpConnectionManagerParams" class="org.apache.commons.httpclient.params.HttpConnectionManagerParams">
		<property name="soTimeout" value="1000000" />
		<property name="connectionTimeout" value="1000000" />
	</bean>

	<bean id="multiThreadedHttpConnectionManager" class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager">
		<property name="params" ref="httpConnectionManagerParams" />
	</bean>


	<bean id="httpClient" class="org.apache.commons.httpclient.HttpClient">
		<constructor-arg index="0" ref="multiThreadedHttpConnectionManager" />
	</bean>

	<bean id="httpService" class="com.yatra.platform.http.HttpService">
		<constructor-arg index="0" ref="httpClient" />
	</bean>

	<import resource="properties.xml" />
	<import resource="thread-pool.xml" />

</beans>
	

Open in new window

I executed my project with the following linux command :

nohup java -cp "libs/*:conf" com.yatra.extremesearch.app.ExtremeSearchApp &
on 23rd jan 2013.
This ran perfectly on 23, 24 ,25
It uploads a zip to a machine..
But it didnt upload it after that.

When i do a ps -A| grep java on my linux machine it shows for this process :
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
ytxdist  21368     1 99 1792253 141704 6 Jan23 ?       5-06:02:15 java -cp libs/*:conf -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n com.yatra.e
xtremesearch.app.ExtremeSearchApp


I dont understand this completely.
This means that the process is still running but what could be the issue that it stopped working.

Thanks
0
Comment
Question by:Rohit Bajaj
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 39811651
You should look at the app's log file and/or nohup.out to find out what's wrong.

In the meantime, try running it like this instead:

java -cp 'libs/*:conf' com.yatra.extremesearch.app.ExtremeSearchApp

Open in new window


Once you've verified that it runs without error, you can use nohup and run it in the background
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39838585
:)
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now