Author Topic: Exception encountered in auditor.validateInitialValues(). Aborting.  (Read 7359 times)

elnino

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Hi,

I encountered a problem while run the appserver workload.

Exception encountered in auditor.validateInitialValues(). Aborting.
-> java.rmi.RemoteException: Failure in calling validateInitialValues() java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
->    java.rmi.RemoteException: com.mysql.jdbc.exceptions.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 '*) FROM O_item' at line 1; nested exception is:
->    javax.ejb.EJBException: com.mysql.jdbc.exceptions.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 '*) FROM O_item' at line 1


I checked the source code. I found the code like this in supplier/supplierauditses/ejb/SupplierAuditSesEJB.java:

ResultSet rs = stmt.executeQuery("SELECT COUNT (*) FROM O_item");

There is a space character between COUNT and (*), but it didn't work in my dbserver(mysql-5.6.22-2). I have to delete the space for running.

Can I just configure Mysql to resolve that issue? Or must I modify the code?

psmith

  • Moderator
  • Newbie
  • *****
  • Posts: 3
  • Karma: +3/-0
Re: Exception encountered in auditor.validateInitialValues(). Aborting.
« Reply #1 on: February 08, 2015, 07:42:37 PM »
Look up Server SQL Modes in the MySQL guide, you should be able to set the "IGNORE_SPACE" mode to resolve this error.

Paula

elnino

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Re: Exception encountered in auditor.validateInitialValues(). Aborting.
« Reply #2 on: February 09, 2015, 09:46:40 PM »
Hi,

Why does the appserver connect to the dbserver automatically?

I run the command tcpdump in the dbserver, when I start the glassfish, it connect to the dbserver automatically.
And there is error in the glassfish log. it looks like :

[2015-02-10T10:37:58.821+0800] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=57 _ThreadName=Thread-9] [timeMillis: 1423535878821] [levelValue: 1000] [[
  java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
        at sun.net.www.http.HttpClient.New(HttpClient.java:308)
        at sun.net.www.http.HttpClient.New(HttpClient.java:326)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1167)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1103)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:997)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:931)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1281)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1256)
        at org.spec.jappserver.supplier.helper.NonSecureXmlCommand.execute(NonSecureXmlCommand.java:87)
        at org.spec.jappserver.supplier.buyermdb.ejb.BuyerMDB.sendPO(BuyerMDB.java:356)
        at org.spec.jappserver.supplier.buyermdb.ejb.BuyerMDB.createPO(BuyerMDB.java:328)
        at org.spec.jappserver.supplier.buyermdb.ejb.BuyerMDB.purchase(BuyerMDB.java:212)
        at org.spec.jappserver.supplier.buyermdb.ejb.BuyerMDB.onMessage(BuyerMDB.java:92)
        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:483)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4211)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4766)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
        at org.glassfish.ejb.mdb.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1219)
        at org.glassfish.ejb.mdb.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
        at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
        at com.sun.proxy.$Proxy267.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:283)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:107)
        at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
        at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)]]

How should I do?

Thanks.

ChrisFloyd

  • Moderator
  • Jr. Member
  • *****
  • Posts: 50
  • Karma: +2/-0
Re: Exception encountered in auditor.validateInitialValues(). Aborting.
« Reply #3 on: February 11, 2015, 12:51:48 PM »
Are you certain the firewall is disabled on the database VM, and the database service is up? 

abond

  • Moderator
  • Newbie
  • *****
  • Posts: 35
  • Karma: +6/-0
Re: Exception encountered in auditor.validateInitialValues(). Aborting.
« Reply #4 on: February 11, 2015, 05:27:11 PM »
I would also validate that you have the current MySQL login permissions set as well as access permissions to the database.  This test is best when done on the appserver VM to make it as close to the type of connection the dbserver would normally see.

You could use a command similar to:

mysql --user=spec --password=spec --database=specdb --host=dbserver

You could also enable the logging of connection attempts by adding this line to the /etc/my.cnf.d/server.cnf file
log=/usr/log/mysql-query.log

You will need to restart your mysql service for the new logging setting to take effect.