Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By Tolls

Thread: How do I correctly populate database from json?

  1. #1
    rain13 is offline Member
    Join Date
    Mar 2017
    Posts
    5
    Rep Power
    0

    Default How do I correctly populate database from json?

    How do I correctly populate database from json? I have some error and I dont know how to solve it. Could anyone help me please?

    ApplicationRunner.java
    Java Code:
    package thesis;
    
    import com.fasterxml.jackson.databind.DeserializationFeature;
    import com.fasterxml.jackson.databind.ObjectMapper;
    import com.fasterxml.jackson.databind.SerializationFeature;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.beans.factory.annotation.Qualifier;
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.boot.orm.jpa.EntityScan;
    import org.springframework.context.ConfigurableApplicationContext;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;
    import org.springframework.context.annotation.PropertySource;
    import org.springframework.context.annotation.PropertySources;
    import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
    import org.springframework.hateoas.config.EnableHypermediaSupport;
    import org.springframework.http.converter.HttpMessageConverter;
    import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
    import org.springframework.integration.annotation.IntegrationComponentScan;
    import org.springframework.stereotype.Component;
    import org.springframework.web.client.RestTemplate;
    
    import java.util.ArrayList;
    import java.util.List;
    
    @SpringBootApplication
    @PropertySources({
            @PropertySource(value = "classpath:application.properties")
    })
    @EntityScan(basePackageClasses = { ApplicationRunner.class, Jsr310JpaConverters.class })
    @Component
    @IntegrationComponentScan
    @EnableHypermediaSupport(type = EnableHypermediaSupport.HypermediaType.HAL)
    public class ApplicationRunner {
    
        @Configuration
        static class ObjectMapperCustomizer {
            @Autowired
            @Qualifier("_halObjectMapper")
            private ObjectMapper springHateoasObjectMapper;
    
            @Bean(name = "objectMapper")
            ObjectMapper objectMapper() {
                return springHateoasObjectMapper
                        .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
                        .configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false)
                        .configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false)
                        .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
                        .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
            }
            @Bean
            public RestTemplate restTemplate() {
                RestTemplate _restTemplate = new RestTemplate();
                List<HttpMessageConverter<?>> messageConverters = new ArrayList<>();
                messageConverters.add(new MappingJackson2HttpMessageConverter(springHateoasObjectMapper));
                _restTemplate.setMessageConverters(messageConverters);
                return _restTemplate;
            }
        }
    
        public static void main(String[] args) {
            ConfigurableApplicationContext ctx = SpringApplication.run(ApplicationRunner.class, args);
        }
    }
    DatabasePopulator.java
    Java Code:
    package thesis;
    
    import com.fasterxml.jackson.databind.ObjectMapper;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.beans.factory.annotation.Qualifier;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;
    import org.springframework.core.io.ClassPathResource;
    import org.springframework.core.io.Resource;
    import org.springframework.data.repository.init.Jackson2RepositoryPopulatorFactoryBean;
    
    import java.io.IOException;
    
    @Configuration
    public class DatabasePopulator {
    
        @Autowired
        @Qualifier("objectMapper")
        ObjectMapper mapper;
        @Bean
        public Jackson2RepositoryPopulatorFactoryBean repositoryPopulator() throws IOException {
            Resource sourceData = new ClassPathResource("services.json");
            Jackson2RepositoryPopulatorFactoryBean factory = new Jackson2RepositoryPopulatorFactoryBean();
            factory.setMapper(mapper);
            factory.setResources(new Resource[] { sourceData });
            return factory;
        }
    }

    services.json
    Java Code:
    [
      {
        "_class": "thesis.service.Service",
        "price": 1.01,
        "name": "Service 1",
        "provider": "Service provider 1"
      },
      {
        "_class": "thesis.service.Service",
        "price": 2.02,
        "name": "Service 2",
        "provider": "Service provider 2"
      }
    ]
    Java Code:
    /usr/lib/jvm/java-8-oracle/bin/java -Didea.launcher.port=7535 -Didea.launcher.bin.path=/home/rain/idea-IU/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/rain/fortumo/target/classes:/home/rain/.m2/repository/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar:/home/rain/.m2/repository/org/apache/httpcomponents/httpcore/4.4.5/httpcore-4.4.5.jar:/home/rain/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/rain/.m2/repository/org/webjars/bootstrap/3.3.6/bootstrap-3.3.6.jar:/home/rain/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.4.3.RELEASE/spring-boot-starter-web-1.4.3.RELEASE.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot-starter/1.4.3.RELEASE/spring-boot-starter-1.4.3.RELEASE.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.4.3.RELEASE/spring-boot-starter-logging-1.4.3.RELEASE.jar:/home/rain/.m2/repository/ch/qos/logback/logback-classic/1.1.8/logback-classic-1.1.8.jar:/home/rain/.m2/repository/ch/qos/logback/logback-core/1.1.8/logback-core-1.1.8.jar:/home/rain/.m2/repository/org/slf4j/jul-to-slf4j/1.7.22/jul-to-slf4j-1.7.22.jar:/home/rain/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.22/log4j-over-slf4j-1.7.22.jar:/home/rain/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.4.3.RELEASE/spring-boot-starter-tomcat-1.4.3.RELEASE.jar:/home/rain/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.6/tomcat-embed-core-8.5.6.jar:/home/rain/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.6/tomcat-embed-el-8.5.6.jar:/home/rain/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.6/tomcat-embed-websocket-8.5.6.jar:/home/rain/.m2/repository/org/hibernate/hibernate-validator/5.2.4.Final/hibernate-validator-5.2.4.Final.jar:/home/rain/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/home/rain/.m2/repository/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar:/home/rain/.m2/repository/com/fasterxml/classmate/1.3.3/classmate-1.3.3.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.8.5/jackson-databind-2.8.5.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.8.5/jackson-annotations-2.8.5.jar:/home/rain/.m2/repository/org/springframework/spring-web/4.3.5.RELEASE/spring-web-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-webmvc/4.3.5.RELEASE/spring-webmvc-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-expression/4.3.5.RELEASE/spring-expression-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/webjars/jquery/2.2.0/jquery-2.2.0.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot-starter-thymeleaf/1.4.3.RELEASE/spring-boot-starter-thymeleaf-1.4.3.RELEASE.jar:/home/rain/.m2/repository/org/thymeleaf/thymeleaf-spring4/2.1.5.RELEASE/thymeleaf-spring4-2.1.5.RELEASE.jar:/home/rain/.m2/repository/org/thymeleaf/thymeleaf/2.1.5.RELEASE/thymeleaf-2.1.5.RELEASE.jar:/home/rain/.m2/repository/ognl/ognl/3.0.8/ognl-3.0.8.jar:/home/rain/.m2/repository/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA.jar:/home/rain/.m2/repository/org/unbescape/unbescape/1.1.0.RELEASE/unbescape-1.1.0.RELEASE.jar:/home/rain/.m2/repository/nz/net/ultraq/thymeleaf/thymeleaf-layout-dialect/1.4.0/thymeleaf-layout-dialect-1.4.0.jar:/home/rain/.m2/repository/org/codehaus/groovy/groovy/2.4.7/groovy-2.4.7.jar:/home/rain/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.4.3.RELEASE/spring-boot-autoconfigure-1.4.3.RELEASE.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot/1.4.3.RELEASE/spring-boot-1.4.3.RELEASE.jar:/home/rain/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-csv/2.7.0/jackson-dataformat-csv-2.7.0.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.5/jackson-core-2.8.5.jar:/home/rain/.m2/repository/org/projectlombok/lombok/1.16.6/lombok-1.16.6.jar:/home/rain/.m2/repository/info/cukes/gherkin/2.12.2/gherkin-2.12.2.jar:/home/rain/.m2/repository/org/springframework/boot/spring-boot-configuration-processor/1.4.3.RELEASE/spring-boot-configuration-processor-1.4.3.RELEASE.jar:/home/rain/.m2/repository/org/json/json/20140107/json-20140107.jar:/home/rain/.m2/repository/org/springframework/spring-core/4.3.5.RELEASE/spring-core-4.3.5.RELEASE.jar:/home/rain/.m2/repository/net/sourceforge/nekohtml/nekohtml/1.9.21/nekohtml-1.9.21.jar:/home/rain/.m2/repository/xerces/xercesImpl/2.10.0/xercesImpl-2.10.0.jar:/home/rain/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/home/rain/.m2/repository/org/springframework/data/spring-data-jpa/1.10.2.RELEASE/spring-data-jpa-1.10.2.RELEASE.jar:/home/rain/.m2/repository/org/springframework/data/spring-data-commons/1.12.6.RELEASE/spring-data-commons-1.12.6.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-orm/4.3.5.RELEASE/spring-orm-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-jdbc/4.3.5.RELEASE/spring-jdbc-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-context/4.3.5.RELEASE/spring-context-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-aop/4.3.5.RELEASE/spring-aop-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-tx/4.3.5.RELEASE/spring-tx-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-beans/4.3.5.RELEASE/spring-beans-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/aspectj/aspectjrt/1.8.9/aspectjrt-1.8.9.jar:/home/rain/.m2/repository/org/slf4j/slf4j-api/1.7.22/slf4j-api-1.7.22.jar:/home/rain/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.22/jcl-over-slf4j-1.7.22.jar:/home/rain/.m2/repository/org/springframework/integration/spring-integration-core/4.2.5.RELEASE/spring-integration-core-4.2.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/retry/spring-retry/1.1.5.RELEASE/spring-retry-1.1.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/spring-messaging/4.3.5.RELEASE/spring-messaging-4.3.5.RELEASE.jar:/home/rain/.m2/repository/org/springframework/hateoas/spring-hateoas/0.20.0.RELEASE/spring-hateoas-0.20.0.RELEASE.jar:/home/rain/idea-IU/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain thesis.ApplicationRunner --spring.output.ansi.enabled=always
    
      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v1.4.3.RELEASE)
    
    03:15:25.767 [main] INFO  thesis.ApplicationRunner - Starting ApplicationRunner on rain with PID 12672 (/home/rain/fortumo/target/classes started by rain in /home/rain/fortumo)
    03:15:25.780 [main] INFO  thesis.ApplicationRunner - No active profile set, falling back to default profiles: default
    03:15:26.478 [background-preinit] INFO  o.h.validator.internal.util.Version - HV000001: Hibernate Validator 5.2.4.Final
    03:15:26.736 [main] INFO  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d21a74c: startup date [Fri May 26 03:15:26 EEST 2017]; root of context hierarchy
    03:15:28.375 [main] ERROR o.s.boot.SpringApplication - Application startup failed
    java.lang.NoClassDefFoundError: org/springframework/plugin/core/support/PluginRegistryFactoryBean
    	at org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar.registerBeanDefinitions(LinkBuilderBeanDefinitionRegistrar.java:57)
    	at org.springframework.hateoas.config.HypermediaSupportBeanDefinitionRegistrar.registerBeanDefinitions(HypermediaSupportBeanDefinitionRegistrar.java:100)
    	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:352)
    	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:143)
    	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
    	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:320)
    	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)
    	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:270)
    	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93)
    	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)
    	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
    	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
    	at thesis.ApplicationRunner.main(ApplicationRunner.java:63)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
    Caused by: java.lang.ClassNotFoundException: org.springframework.plugin.core.support.PluginRegistryFactoryBean
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    	... 23 common frames omitted
    03:15:28.377 [main] INFO  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d21a74c: startup date [Fri May 26 03:15:26 EEST 2017]; root of context hierarchy
    03:15:28.379 [main] WARN  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception thrown from LifecycleProcessor on context close
    java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d21a74c: startup date [Fri May 26 03:15:26 EEST 2017]; root of context hierarchy
    	at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:417)
    	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1002)
    	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)
    	at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:818)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
    	at thesis.ApplicationRunner.main(ApplicationRunner.java:63)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
    03:15:28.380 [main] ERROR o.s.b.f.s.DefaultListableBeanFactory - Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception
    java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d21a74c: startup date [Fri May 26 03:15:26 EEST 2017]; root of context hierarchy
    	at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404)
    	at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97)
    	at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:959)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:966)
    	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033)
    	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1009)
    	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)
    	at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:818)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
    	at thesis.ApplicationRunner.main(ApplicationRunner.java:63)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
    
    Process finished with exit code 1

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: How do I correctly populate database from json?

    Looks to me like you haven't got all of the Spring jars you need:

    java.lang.ClassNotFoundException: org.springframework.plugin.core.support.PluginRegi stryFactoryBean
    rain13 likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 0
    Last Post: 04-06-2016, 04:43 AM
  2. Populate a database using loops
    By Castro__711 in forum New To Java
    Replies: 5
    Last Post: 01-06-2014, 12:58 PM
  3. populate jCombobox with database data
    By joeyxaza in forum JDBC
    Replies: 2
    Last Post: 01-06-2014, 10:09 AM
  4. populate jCombobox with database data
    By joeyxaza in forum JDBC
    Replies: 0
    Last Post: 01-19-2009, 04:30 PM
  5. how to populate html:select with values from database
    By sathya_k_83 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-07-2007, 10:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •