I am getting a NullPointerException Exception while adding data from the online JSP page.
The error description is as follows:
javax.transaction.TransactionRolledbackException: CORBA
TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK:
javax.transaction.TransactionRolledbackException: ; nested exception is:
java.lang.NullPointerException vmcid: 0x0 minor code: 0 completed: No
I am using Websphere server "IBM WebSphere Application Server - ND, 6.0.2.35".
However, there was no problem when i was using "IBM WebSphere Application Server - ND, 6.0.2.17"
Is there any idea why this is happending.
Appreaciate all your efforts in this regard.
Thanks,
Manoja.
Likely, the NPE occurs in an EJB called when processing entered data.
In SystemOut/Err log, there likely will be complete stacktrace of the error. Find the nested NPE there and check its stacktrace for classes that belong to your application (i.e. no IBM or Java ones). That should give you some clue at least.
Related
We have an EJB application deployed on WebSphere 8.5, We are getting the following exception on console,
java.rmi.Exception:CORBA NO_RESPONSE 0x4942fb01 Maybe: nested exception is:
RESPONSE: Request 221370 timed out vmcid: IBM minor code: B01 Completed maybe
I can also see the root cause of exception as below:
caused by: org.omg.CORBA.NO_RESPONSE: Request timed out vmcid: B01 Completed maybe
at com.ibm.rmi.iiop.Connection.getCallStream(Connection.java:2493)
The effect of it is end user is unable to connect to the application.
Upon doing some analysis: I found out that main reason could be the connection pool settings.
So Can someone please help me on following:
possible root causes of above exception
possible way to fix this exception
Request timed out means that the EJB request timed out (default 180 seconds): https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/uorb_rsetg.html
This may have many causes, but in general, it's best to analyze the performance of the EJB backend service (e.g. garbage collection, long response times due to a database, etc.). Here is a place to start on investigating general WAS performance problems: https://publib.boulder.ibm.com/httpserv/cookbook/Recipes-WAS_Traditional_Recipes-General_WAS_Traditional_Performance_Problem.html
A key item is step 8 which gathers thread dumps and basic OS statistics during the problem. If you are stuck analyzing that data, you may open an IBM support request with that MustGather data.
I'm learning JAVA EE 7.0 by this tutorial:
https://netbeans.org/kb/docs/javaee/ecommerce/connect-db.html
It was going fine until I come to this part:
Examine testDataSource.jsp in the browser. You see an HTML table listing data contained in the category and product tables.
The code was successfully generated. but it keeps saying the mysql jdbc driver can't be found:
HTTP Status 500 - Internal Server Error
type Exception report
messageInternal Server Error
descriptionThe 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/affablebean"
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/affablebean"
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1.1 logs.
This is what I get in glassfish's log:
Warning: Context path from ServletContext: /FA-war differs from path from bundle: FA-war
Warning: StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/affablebean"
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:318)
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:201)
at org.apache.jsp.test.testDataSource_jsp._jspx_meth_sql_query_0(testDataSource_jsp.java:120)
at org.apache.jsp.test.testDataSource_jsp._jspService(testDataSource_jsp.java:75)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.
I tried putting mysql driver to GLASSFISH's lib directory and WEB-INF/lib, neither worked.
But when I tried to ping this data source in glassfish, it can be pinged successfully. So it means actually glassfish should have everything it needs to access mysql.
So what's the problem? I'm doing everything told by the tutorial, except that I'm using glassfish 4.1.1 & netbeans 8.1.
Thanks in advance.
I've figured it out. It looks like this exception really can mean a lot of totally difference situations.
My situation is: Once I define a resource in glassfish-resources.xml(maybe the name is incorrect), it doesn't really appear in the JDBC entry of glassfish's admin console.
Glassfish considers it an application-scoped resource. It's named :
FA ----------- java:app/AffableConnPool JDBC Connection Pools
FA ----------- java:app/jdbc/affablebean
Look! You see the JNDI is manipulated. I tried java:app/jdbc/affablebean in my sqlquery taglib too, which failed to work too. But I've managed to work around the problem by defining the connection pool manually in glassfish.
Try it if you get the same problem, my friend. Never get stuck on classpath issues, the exception is IRRITATINGLY MISLEADING.
I've been learning about RMI and I started with the Hello World program, which I got to work, and then began using other sample programs which all worked. (well there were errors, but I debugged them with the help of google/stackoverflow). and now I began writing my own project, which is basically a Traveling Salesman implementation that offloads the intense computation to a server.
Everything was working fine, when suddenly all my server RMI implementations broke. ie. when I run computeEngine from Eclipse as an RMI application (I use the RMI plugin), I get either the error:
java.rmi.ConnectException: Connection refused to host
or the error:
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.io.EOFException
I have 4-5 different RMI applications that were all working and then all of a sudden the "ComputeEngine.java" file which I run on the server started returning one of these 2 errors for every single one of my applications.
Note: since I am testing these applications, I use "localhost" as my server hostname. In otherwords, the server and the client are the same machine.
Things I have tried:
I have checked my etc/hosts/ file and found that 127.0.0.1 is set as localhost. I also created a new machine entitled "virtualmachine" and used my public IP address. Both did not work.
I have double and triple checked my server.policy and client.policy files, and both seem to be fine.
I have tried running the RMI application from terminal (instead of using the RMI plugin from eclipse) and I get the same errors
I quit all java processes and reran everything making sure I started the server first (other threads suggested that these errors come from running the client first)
I've portscanned myself and port 1099 (the default rmi port) says "LISTEN" when I run my server (even though the server is returning an exception).
I've tried changing java.rmi.server.hostname, but nothing has seemed to help so far.
I'm not understanding how I'm not getting connection to host when I am running both the server and client on the same computer.
I preemptively apologize from being sucky at RMI and Java and missing some likely obvious solution.
Should I include any source code from what I have been trying to run?
EDIT: Here is the stack trace:
ComputeEngine exception:
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:227)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at engine.ComputeEngine.main(ComputeEngine.java:33)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:213)
... 3 more
Thank You!
EDIT 2:
I noticed that if I restarted the RMIregistry when I started the application (as in, I selected the option in the Eclipse RMI plugin that restarted the rmiregistry) I would get a ClassNotFoundError for a class that is in my 'codebase.jar'.
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: compute.Compute
Any ideas?
We are trying to consume a Java Web Service hosted on Oracle WebLogic Server (implemented following JAX-WS specifications) from a C# WCF 4.0 Client.
The error codes thrown on Server Side Trace is
Error codes: 3001 3201 4008 4208 6408 Error code:3001
We are unable to figure out what these means ? It seems these are not documented. (We might be wrong or looking at a wrong place).
I'm trying to deploy my java based appengine app through the eclipse plugin. I get an error at the very end of the process whichI pasted below. Any ideas what this could mean?
com.google.appengine.tools.admin.AdminException: Unable to update app: Error posting to URL: http://appengine.google.com/api/queue/update?app_id=ipoobeta&version=v1-6&
500 Internal Server Error
Server Error (500)
A server error has occurred.
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:62)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:271)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Error posting to URL: http://appengine.google.com/api/queue/update?app_id=ipoobeta&version=v1-6&
500 Internal Server Error
Server Error (500)
A server error has occurred.
at com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:522)
at com.google.appengine.tools.admin.AppVersionUpload.updateQueue(AppVersionUpload.java:255)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:134)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:56)
... 4 more
Since this question was written there have been many enhancements to the serving infrastructure of Google App Engine. Be sure you are using the High Replication Datastore (HRD). It is extremely unlikely that you will encounter this type of error and if you do it will be transient.