unable to load data in own table of database on dev profile inmomery in jhipster - jhipster

Hello Everyone,
I am working on jhipster.I have created a database on dev profile and it is created fine.but when i will try to load data into table using csv file then getting a exception.Please help me.
Error creating bean with name 'org.springframework.scheduling.annotation.SchedulingConfiguration': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.scheduling.annotation.SchedulingConfiguration.setBeanFactory(Lorg/springframework/beans/factory/BeanFactory;)V
Thanks in advance.
email;firstName;middleName;lastName;sex;aboutYou;dateOfBirth;password;picture;isActive;createdDate
test#gmail.com;charn;jeet;singh;b;aboutme;NULL;b8f57d6d6ec0a60dfe2e20182d4615b12e321cad9e2979e0b9f81e0d6eda78ad9b6dcfe53e4e22d1;NULL;1;NULL

The problem is that you hit a specific bug in Spring Boot, which masks your original exception:
https://github.com/spring-projects/spring-boot/issues/253
In order to see your "real" exception, either:
Migrate to the latest "SNAPSHOT" version of Spring Boot, as it looks to be solved now
Remove the configuration from your AsyncConfiguration class, which is responsible for this bug

Related

Liferay: GA4 on an empty MySQL 5.7 results in a fatal exception

I am trying to install Liferay GA4 and a Master build for development purposes. However I keep falling into a fatal exception with MySQL 5.7.
As described at: https://issues.liferay.com/browse/LPS-73410
In an empty database, MySQL 5.7, when the servers is brought up the follow exception is raised. (seem on both drivers com.mysql.jdbc.Driver and com.mysql.cj.jdbc.Driver)
liferay | 21:45:35,927 ERROR [localhost-startStop-1][MainServlet:275] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: java.sql.SQLSyntaxErrorException: Table 'XXXXX.EVENTS' doesn't exist
liferay | com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: java.sql.SQLSyntaxErrorException: Table 'XXXXX.EVENTS' doesn't exist
I was wondering if this is something I can get around by some procedure done directly into the database...Any thoughts?
I have found my way out this issue with new JDBC defaults.
jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.default.url=jdbc:mysql://${database.host}/${database.schema}?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false&useSSL=false&nullNamePatternMatchesAll=true&&nullCatalogMeansCurrent=true
From: https://www.e-systems.tech/web/guest/blog/-/blogs/liferay-with-mysql-5-7-driver-changes

Amazon SQS Outbound channel adapter won't initialize

I'm trying to start up a spring-int-aws flow that is writing to an SQS queue, but the context won't load.
Error starting ApplicationContext. To display the auto-configuration report
re-run your application with 'debug' enabled.
2016-10-03 14:10:51.848 ERROR 3741 --- [ main]
o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.integration.aws.outbound.SqsMessageHandler#0':
Bean instantiation via constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.integration.aws.outbound.SqsMessageHandler]: Constructor
threw exception; nested exception is java.lang.NoSuchMethodError:
org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate.<init
(Lcom/amazonaws/services/sqs/AmazonSQS;Lorg/springframework/cloud/aws/core/env/ResourceIdResolver;)V
....
Did some research: Inside of the SQSMessageHandler (v 1.0.0-RELEASE) it's attempting to create a QueueMessagingTemplate using a declared AmazonSQS object, however the QueueMessagingTemplate (v1.1.3 Release) it requires an AmazonSQSAsync object in the constructor. Since spring-cloud-aws uses the sub-interface, it seems that spring-int-aws should as well.
Am I missing something, or should this be an issue filed against the project?
spring-integration-aws is built against 1.1.1.
Please open an issue there so we can make a compatible build.
That said, it's pretty unusual for Spring projects to break APIs in a point release, so we should raise an issue for spring-cloud-aws too, to ask them to restore the other ctor (if possible), and cross-link the issues.
I opened issues.
We would wait for the disposition of that issue before doing anything in spring-integration-aws (but we should still go ahead and support the async option).

insert data into Microsoft SQL server using Spark

I am trying to insert data into sql server using spark using the below Jdbc methods.
Option 1:
prop.put("driver", "com.microsoft.sqlserver.jdbc.SQLServerDriver")
dataf.write.mode(org.apache.spark.sql.SaveMode.Append).jdbc(url,table_name, prop)
Table is already created. Appending new data.Job Error-ed with the below exception
Exception in thread "main"
com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE
permission denied in database
Question is : Why create table permission is required for appending the data?
Option2:
prop.put("driver", "com.microsoft.sqlserver.jdbc.SQLServerDriver")
org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils.saveTable(dataf, url, table_name, prop)
Above command working from spark-shell. when the same is used in scala code and packaged with dependencies giving below exception
Exception in thread "main" java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:315)
I tried setting driver class-path and executor class-path and also --jars still no luck. Included sqljdbc4.jar in driver-classpath and --jars.
Copied sqljdbc4.jar to all worker nodes as well still no luck.
Any Ideas on this?
After Lot of searching and Testing, I found the answer. It might be useful for someone.
Option 1: This is because of bug in spark 1.5.X. the same was resolved
in 1.6.x and later. Because of the bug, It always try to create a new
table.
Option2: This causes because , driver name on classpath given
priority than properties we are passing as argument. Workaround for
this is to create connection and then invoke savetable.
workaround if you are using spark 1.5.x or lower.
JdbcUtils.createConnection(url, prop)
JdbcUtils.saveTable()

Error on project

Im getting this error running my project.
type Exception report
messageInternal Server Error
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/IFPWAFCAD"
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/IFPWAFCAD"
Anybody had a clue why this is happening?
Thanks for the help
This error could happened for many reasons (and since you don't upload more code its pretty difficult to help you).
First Possible Reason
You are getting this error "no suitable driver" because the resource referens isn't beed added to the web.xml deployment descriptor, so add the following code.
<resource-ref>
<description>Database for IFPWAFCAD application</description>
<res-ref-name>jdbc/IFPWAFCAD</res-ref-name>
<res-type>javax.sql.data source</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Second possible Reason
This may be tricky but check that there is not 'blankspace' on your xml files
Third possible reason
If you are deploying the current app lets call them "testApp" to a Webserver, have in mind that you should copy the mysql connector to the lib directory of that web server
Hope this Help You

Incorrect attribute value type Microsoft.Xrm.Sdk.OptionSetValue

While creating an Incident. I am facing this issue. I have created some incidents and it working fine but sometime it shows this exception "Incorrect attribute value type Microsoft.Xrm.Sdk.OptionSetValue".
How to trace which OptionSetValue throws an error.
I'm going to assume that you're creating these via a C# sdk call. I believe turning on server side tracing would tell you. The other option is if you can debug it locally, catch the exception and manually attempt to update each optionset attribute, one at a time until you find the culprit.

Resources