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

  • plz help

    hi

    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.

    Comment


    • #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.

      Comment


      • #4
        We use the maven standard directory layout:

        http://maven.apache.org/guides/intro...ry-layout.html

        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?

        Comment


        • #5
          pls help

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

          Comment


          • #6
            Plz help

            Hi

            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?

            Comment


            • #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

              Comment


              • #8
                Hi

                Thanks

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

                Comment


                • #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
                  found
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.verifyPlugin(Defa
                  ultLifecycleExecutor.java:1286)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.getMojoDescriptor
                  (DefaultLifecycleExecutor.java:1522)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.bindLifecycleForP
                  ackaging(DefaultLifecycleExecutor.java:1016)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.constructLifecycl
                  eMappings(DefaultLifecycleExecutor.java:980)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(Defau
                  ltLifecycleExecutor.java:458)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHan
                  dleFailures(DefaultLifecycleExecutor.java:311)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegmen
                  ts(DefaultLifecycleExecutor.java:278)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(DefaultLi
                  fecycleExecutor.java:143)
                  at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:333)
                  at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:126)
                  at org.apache.maven.cli.MavenCli.main(MavenCli.java:2 82)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.codehaus.classworlds.Launcher.launchEnhanced(L auncher.java:315)
                  at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
                  at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)

                  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
                  uginVersion(DefaultPluginVersionManager.java:229)
                  at org.apache.maven.plugin.version.DefaultPluginVersi onManager.resolvePl
                  uginVersion(DefaultPluginVersionManager.java:91)
                  at org.apache.maven.plugin.DefaultPluginManager.verif yPlugin(DefaultPlug
                  inManager.java:167)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.verifyPlugin(Defa
                  ultLifecycleExecutor.java:1257)
                  ... 18 more

                  Please help me

                  Comment


                  • #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?

                    Comment


                    • #11
                      Thanks

                      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.

                      Comment


                      • #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.

                        Comment


                        • #13
                          Thanks

                          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.

                          Comment

                          Working...
                          X