vinoth sathi

Greenhorn
+ Follow
since Sep 29, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vinoth sathi

Hi,

After tried all. I used to start the Tomcat service (tomcat.exe) instead of tomcatw.exe gui tool to start. After that wscript.exe was getting called. Still wonder why this was not working with tomcat gui service.
Is there any log on to use full administrative account to access system files?

Any idea?
2 months ago
HI,

I have tried with ProcessBuilder class to check.

List<String> args1 = new ArrayList<String>();
 args1.add ("D:\\test.bat"); // command name
 ProcessBuilder pb = new ProcessBuilder (args1);
 Process p = pb.start();
         System.out.println("starting");
 p.waitFor();
System.out.println("started");

After pb.start() no response. not getting p.waitfor() method response.


Later i checked is there any blockage and found "Interactive services detection " is blocking. how to resolve this?

I checked with sys admin. no blockage.
2 months ago
Hi,

Its not giving any error. simply waiting for long time to get the response from wscript. Is there any way to check ?
2 months ago
Hi,

I have checked my code. Runtime.getRuntime().exec("daily.bat"); is calling

but not executing inside task.

Inside daily.bat has

wscript D:\daily.vbs


Its not calling wscript.exe

anything blocked to call wscript from tomcat ?

Please assist.
2 months ago
Hi,

Iam developing one spring boot application. I need to execute batch file for one process.

when i try to execute in eclipse. it is working. but i create a war and deploy into the tomcat. its not working.

What is the issue? anything i need to add before execution of Runtime.getRuntime().exec("daily.bat"); ?


Please clarify.


Thanks.
Vinoth
2 months ago
Great Paul.

This solution is perfect. We did the same thing in our as400 server. Its worked.


Thank you.
Hi,

I am using SFTP connection using JSCH library. It connected to IBM as400 server and able to transfer the files.

There is some problem in encoding the char. File contains the vietnam characters. As400 team asked me to set CCSID 1208 before transferring the file from source to destination.

I am not sure where i can set char set for CCSID in jsch.

Appreciate if anyone help on this.

My Code:
Hi,

Iam building the spring batch application.

I currently developing with tasklet step with quartz scheduler.

Quartz is trying to call every two mins, but it executing only one time. next  time it shows  as below:

o.s.batch.core.job.SimpleStepHandler     : Step already complete or not restartable, so no action to execute: StepExecution: id=5, version=3, name=Layer5Tr, status=COMPLETED, exitStatus=COMPLETED, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=1, rollbackCount=0, exitDescription=

How can we set to repeat(restart) in tasklet step.


Thanks in advance.
1 year ago

Rob Spoor wrote:You don't have a bean implementation of Job in your project, so when Spring Boot tries to inject the autowired Job it can't find anything to inject.



I have put the main java file into parent spring folder(src/main/java) and worked fine.

Dont know what is the problem. wonder how it referenced if i put into parent location.

1 year ago
Hi,

Iam facing issue in spring boot application.

Iam calling spring batch application in spring boot.  When i try to run the main application. iam getting below exception


***************************
APPLICATION FAILED TO START
***************************

Description:

Field job in com.boraji.tutorial.springboot.controller.HelloController required a bean of type 'org.springframework.batch.core.Job' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.batch.core.Job' in your configuration



I have enabled @EnableBatchProcessing in my main class


Controller class :

@Controller
public class HelloController {
 @Autowired
  JobLauncher jobLauncher;

   @Autowired
   Job job;
   
@RequestMapping("/launchjob")
   public String handle() throws Exception {

       Logger logger = LoggerFactory.getLogger(this.getClass());
       try {
           JobParameters jobParameters = new JobParametersBuilder().addLong("time", System.currentTimeMillis())
                   .toJobParameters();
           jobLauncher.run(job, jobParameters);
       } catch (Exception e) {
           logger.info(e.getMessage());
       }

       return "Done";
   }
}


Please clarify what i missed here?


1 year ago

Atul More wrote:HI,

You need to mention spring mvc ralated mapping in web.xml and create the mvc xml file which contains the required bean definitions.

Atul



Thanks for response. As per spring community said, No admin control for latest version.

https://docs.spring.io/spring-batch-admin/trunk/


Is there any tutorial available for example? Iam not using xml based configuration. all jobs are configured in java only. how to achieve this?


Thank you.
1 year ago
Hi,

I am developing spring batch version 4 application.

Its working fine with jar package.

Now i want to use web based application. I want to see spring batch admin page. I have tried below dependency in pom.xml.

dependency>
   <groupId>org.springframework.batch</groupId>
   <artifactId>spring-batch-admin-manager</artifactId>
   <version>1.3.1.RELEASE</version>
</dependency>


but not succeeded . any configuration in web.xml is mandatory to display admin page? What i need to specify in web.xml.


Please clarify.

1 year ago

Knute Snortum wrote:We need some additional details from you.  What is the full stack trace? (the entire error message).  What line of Java code is the error occurring at?  Please post the surrounding code (like the method the line is in).



Hi,

I have create the  SQL Agent job and called from java. working fine now.

Stephan van Hulst wrote:Apparently GO is not a valid keyword in your SQL flavor. You might have to execute your CREATE FUNCTION statement separately.




Thanks for response.


May i know i how to achieve this through jdbc connectivity?.

Otherwords i try to use SQL agent job and created the script and access from java. but not succeeded . getting below exception:


com.microsoft.sqlserver.jdbc.SQLServerException: Database 'msdn' does not exist. Make sure that the name is entered correctly.

exec msdn.dbo.sp_start_job N'test exe';


Please advice.