Announcement Announcement Module
No announcement yet.
plz help Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • plz help


    Can u help to start spring batch first application. I am a newbie. I dont know how the folder path would for my sample. I ran samples. Can u give me simple steps to create sample. I have seen helloworld sample docs but it doesnt looks helpful. I would be grateful to you

    Thanks in advance.

  • #2
    I dont know how the folder path would for my sample.
    I'm a little confused by this question. What kind of folder path? If you wanted to reuse the current samples project, you could just create a new application context for your job in src/main/resources/jobs/, copying an existing sample jobs configuration for a starting point. From there you would only need a simple Junit test case to launch.


    • #3
      Help plz

      Sorry I mean folder structure(src/main/java, src/main/resource ... ). I dont know how to start own sample. While compiling JAVA files compiler is not recognizing interfaces( like ItemReader, Tasklet etc) and classes. Should I do anything here?

      Thanks in advance.


      • #4
        We use the maven standard directory layout:

        It seems like it would be hard to create a file in eclipse outside of a source directory though. It sounds like there is some kind of classpath issue if ItemReader isn't being recognizes, how have you set up your projects?


        • #5
          pls help

          I am doing in notepad so I have planned to import that to eclipse. Can I do like that?


          • #6
            Plz help


            I want to run only trade job from samples. I am doing this on eclipse. I created the directory path for that. I am picking up the trade specific files and including them to this new sample proj. Now here how should I import Referenced Libraries. ... Please help me. I am new to this thing. But I should learn all this at earliest. I dont know How could I manage?


            • #7
              you can run "mvn eclipse:eclipse" and let maven generate the eclipse project for you. Or you can use one of the available eclipse maven plugins to setup the classpath


              • #8


                So should I compile all JAVA files(Tasklet, Advice etc., etc., ).


                • #9
                  how should

                  how should I start my project I have copied every java files and xml files related to trade sample to my folder then while I am running using mvn test command.

                  [INFO] Trace
                  org.apache.maven.lifecycle.LifecycleExecutionExcep tion: The plugin 'org.apache.m
                  aven.plugins:maven-resources-plugin' does not exist or no valid version could be
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.verifyPlugin(Defa
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.getMojoDescriptor
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.bindLifecycleForP
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.constructLifecycl
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(Defau
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHan
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegmen
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(DefaultLi
                  at org.apache.maven.DefaultMaven.doExecute(DefaultMav
                  at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:126)
                  at org.apache.maven.cli.MavenCli.main( 82)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
                  at java.lang.reflect.Method.invoke(
                  at org.codehaus.classworlds.Launcher.launchEnhanced(L
                  at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
                  at org.codehaus.classworlds.Launcher.mainWithExitCode (

                  at org.codehaus.classworlds.Launcher.main(Launcher.ja va:375)
                  Caused by: org.apache.maven.plugin.version.PluginVersionNotFo undException: The p
                  lugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no val
                  id version could be found
                  at org.apache.maven.plugin.version.DefaultPluginVersi onManager.resolvePl
                  at org.apache.maven.plugin.version.DefaultPluginVersi onManager.resolvePl
                  at org.apache.maven.plugin.DefaultPluginManager.verif yPlugin(DefaultPlug
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.verifyPlugin(Defa
                  ... 18 more

                  Please help me


                  • #10
                    This isn't really a Spring Batch related question - more a basic IDE / development environment question. There are too many ways for people to want to set up their own project, so we aren't going to be much help here I'm afraid.

                    If you are new to Java and/or Eclipse, Maven etc, you could try copying the whole spring-batch-samples project and removing stuff you don't need instead of the other way round?


                    • #11

                      Yes Dave,

                      I did samples were running fine. I want to run each and individual job at a time. As you said I am new to maven so can you help me on this. I did hello world sample written all java files and configuration file. Then I tried to compile java file but it was unsuccessful.

                      I will tell u the steps so u can tell me I am doing right or not

                      1.After writing java/xml files. I should compile java files
                      2.then mvn test
                      3.mvn eclipse:eclipse
                      4.import that folder to eclipse
                      5. Junit test

                      If any above step is wrong pls forgive me.


                      • #12
                        Broadly speaking those steps are OK. You don't need to compile separately - "mvn test" will do that for you. Also "mvn eclipse:eclipse" is not compulsory, but is one way to get an Eclipse project quickly from a Maven one.


                        • #13

                          Thank you so much

                          That is what I tried earlier(without compiling java file I just did mvn test) but the exception was some plugin error (as I asked in my previous post). I am trying to get rid of the exception.

                          thank you Once again for your help.