Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » print messages on console(print messages on incse console message not coming)
print messages on console [message #1816486] Wed, 30 October 2019 05:03 Go to next message
Krupa K is currently offline Krupa KFriend
Messages: 5
Registered: October 2019
Junior Member
Hi,

I gave some system.out.println messages for debugging purpose but that is not coming on the console after successful build and maven install.

In previous version it was working. How to enable that ?



Re: print messages on console [message #1816493 is a reply to message #1816486] Wed, 30 October 2019 07:28 Go to previous messageGo to next message
Guillaume Garzone is currently offline Guillaume GarzoneFriend
Messages: 54
Registered: April 2015
Member
Hi,
Due to the OSGi framework and the configuration of OM2M, you should not use println in your code. Use the provided LOGGER instead.
To configure the logger according to what you need (for instance change to debug level) use the log4j.configuration file provided in the compiled target. If you want specific configurations, check on how to configure Apache LOG4J.
Re: print messages on console [message #1816594 is a reply to message #1816493] Fri, 01 November 2019 05:37 Go to previous message
Krupa K is currently offline Krupa KFriend
Messages: 5
Registered: October 2019
Junior Member
Hi Gulliame,

Thank you for the reply. We shall use that.
Can you suggest how to connect to MySQL database.
In postman we get
CSE service is not available.

and OSGi console,
Exception in thread "pool-2-thread-1" javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE, DELETE, DISCOVERY, NOTIFY, RETRIEVE, UPDATE) VALUES (1, 1, 1, 1, 1, 1, 1' at line 1
Error Code: 1064
Call: INSERT INTO ACR (ACR_ID, CREATE, DELETE, DISCOVERY, NOTIFY, RETRIEVE, UPDATE) VALUES (?, ?, ?, ?, ?, ?, ?)
bind => [7 parameters bound]
Query: InsertObjectQuery(org.eclipse.om2m.commons.entities.AccessControlRuleEntity@6c873167)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:157)
at org.eclipse.om2m.persistence.eclipselink.internal.DBTransactionJPAImpl.commit(DBTransactionJPAImpl.java:45)
at org.eclipse.om2m.core.CSEInitializer.initACP(CSEInitializer.java:370)
at org.eclipse.om2m.core.CSEInitializer.init(CSEInitializer.java:92)
at org.eclipse.om2m.core.Activator$2$1.run(Activator.java:106)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE, DELETE, DISCOVERY, NOTIFY, RETRIEVE, UPDATE) VALUES (1, 1, 1, 1, 1, 1, 1' at line 1
Error Code: 1064

Please tell how to correct this.
Previous Topic:JSON content "con" attribute in ContentInstance
Next Topic:ssl handshake exception
Goto Forum:
  


Current Time: Thu Apr 18 23:27:02 GMT 2024

Powered by FUDForum. Page generated in 0.01982 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top