Mohnish Saini

Ranch Hand
+ Follow
since Jan 04, 2009
Merit badge: grant badges
For More
Pune, India
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mohnish Saini

ya this one is trickier. NPE is there because ternary operator always return same data type.

return string == null ? defaultValue : Integer.parseInt(string);

here, compiler tries to parse defaultValue (which is null) into Integer using Integer.parseInt(defaultValue) which causes NPE.

Thanks
Mohnish
@Jeanne

I already started your OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide book for preparing IZ0-813 exam. But as per your response, I am assuming only OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide to be read thoroughly along with other few questions but not OCA book.

Am I correct in understanding your response? Thanks
These following books I have

1) OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide: Exam 1Z0-808 By Jeanne
2) OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide: Exam 1Z0-809 By Jeanne

My questions are:

1. Does Upgrade to Java SE 8 OCP ( Java SE 6 and all prior versions) - 1Z0-813 exam need above 2 books to be studied.
2. No other books / reference required?
3. Does 1Z0-813 exam contains any Java 7 or earlier related questions.?

Thanks
@Roel De Nijs

Any dedicated book for IZ0-813 or reference material?
Hi

I am targeting Upgrade to Java SE 8 OCP ( Java SE 6 and all prior versions) - 1Z0-813 because I have already appeared for SCJP 5.0 in 2008.  I am having specific books for OCA 8 (IZ0-808) and OCP 8 (IZ0-809) exams. But I am not having a dedicated book for IZ0-813. Can you please refer a dedicated book and reference material for IZ0-813.

Thanks
Hi

I appeared for SCJP 5.0 in Mar 2008 and secured 88%. I have a certificate as well. Apart from this, I dont have any details. I have checked in CertView as well nut no success.
How can we obtain my certification details? Are Oracle / Sun maintaining results and certificates of older certifications like SCJP.

I am asking because for appearing for current OCP upgrade certification, I need to show proof that I have already appeared for SCJP in 2008. How to do that?

Thanks
Mohnish
I appeared for SCJP 5.0 in Mar 2008. Now In 2016, I want to appear for certification in Java 1.8. So which Certification I need to go for?

Java SE 8 Programmer I 1Z0-808
Java SE 8 Programmer II 1Z0-809 (for this  1Z0-808 is mandatory)
Or this Upgrade to Java SE 8 OCP ( Java SE 6 and all prior versions) 1Z0-813

Also, let me know which certification book I have to follow.

Thanks
I got this exception in testing environment:

Caused by: java.sql.SQLException: Fail to convert to internal representation
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.CharCommonAccessor.getInt(CharCommonAccessor.java:132)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:527)
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1563)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getInt(Unknown Source)
at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.ibatis.common.jdbc.logging.ResultSetLogProxy.invoke(ResultSetLogProxy.java:47)
at $Proxy77.getInt(Unknown Source)
at com.ibatis.sqlmap.engine.type.IntegerTypeHandler.getResult(IntegerTypeHandler.java:35)
at com.ibatis.sqlmap.engine.mapping.result.ResultMap.getPrimitiveResultMappingValue(ResultMap.java:619)
at com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:345)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
... 96 more
18 Nov 2011 08:42:01,004,[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'],ERROR,2045382,com.db.paragon2.dao.analysis.impl.live.RatingServiceDAOImpl - Exception in method: populateRatingAnalysisData Exception is:
com.db.lrc.creditrisk.paragon2.common.framework.exception.DAOException: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in ibatis/analysis/SqlMapRatingService.xml.
--- The error occurred while applying a result map.
--- Check the RatingService.RatingAnalysisData.
--- Check the result mapping for the 'productionReason' property.
--- Cause: java.sql.SQLException: Fail to convert to internal representation
at com.db.lrc.creditrisk.paragon2.common.framework.exception.ManagedException.fillInStackTrace(ManagedException.java:143)
at java.lang.Throwable.<init>(Throwable.java:241)
at java.lang.Exception.<init>(Exception.java:77)
at java.lang.RuntimeException.<init>(RuntimeException.java:77)
at com.db.lrc.creditrisk.paragon2.common.framework.exception.ManagedException.<init>(ManagedException.java:132)
at com.db.lrc.creditrisk.paragon2.common.framework.exception.DAOException.<init>(DAOException.java:42)
at com.db.paragon2.dao.analysis.impl.live.RatingServiceDAOImpl.populateRatingAnalysisData(RatingServiceDAOImpl.java:4172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy66.populateRatingAnalysisData(Unknown Source)
at com.db.paragon2.services.analysis.impl.live.RatingServiceImpl.populateAnalysis(RatingServiceImpl.java:1127)
at com.db.paragon2.facade.analysis.impl.live.RatingServiceFacadeImpl.populateAnalysis(RatingServiceFacadeImpl.java:736)
at com.db.paragon2.facade.analysis.impl.live.RatingServiceFacadeImplLSFProjectFinance.populateAnalysis(RatingServiceFacadeImplLSFProjectFinance.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy96.populateAnalysis(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421)
at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerAdapter.java:101)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:726)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:636)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:556)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.ui.preauth.AbstractPreAuthenticatedProcessingFilter.doFilterHttp(AbstractPreAuthenticatedProcessingFilter.java:69)
at com.db.lrc.creditrisk.paragon2.common.framework.filter.security.SecurityFilter.doFilterHttp(SecurityFilter.java:152)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

I am not able to replicate this issue in local although the code at local system is connected to same testing database. Please help.
Hi Friends

I build a 2 page web application in jdk 1.4, struts 1 and hibernate 2.

I made the war and deploy at 3 different servers:

1. JBoss 4.2 (on my machine)

I deployed the war on this server. It reads hibernate.cfg.xml. From this, it reads a mapping file Login.hbm.xml and automatically mapped with "Login" class(See the red line below) .

Log:

11:31:07,655 INFO [STDOUT] Before Creating SessionFactory
11:31:13,811 INFO [STDOUT] Mohnish Before Configure
11:31:14,546 INFO [STDOUT] 11:31:14,544 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
11:31:14,548 INFO [STDOUT] 11:31:14,547 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
11:31:14,758 INFO [STDOUT] 11:31:14,757 INFO [Configuration] Mapping resource: com/hibernate/dto/Login.hbm.xml
11:31:14,976 INFO [STDOUT] 11:31:14,976 INFO [Binder] Mapping class: com.hibernate.dto.Login -> LOGIN
11:31:15,185 INFO [STDOUT] 11:31:15,185 INFO [Configuration] Configured SessionFactory: java:hibernate/SessionFactory

Note: Jboss 4.2 points to JDK 1.5... It cant run with jdk1.4.

2. WAS 7.0 (on my machine)

I deployed the same war on this server. It reads hibernate.cfg.xml. From this, it reads a mapping file Login.hbm.xml and automatically mapped with "Login" class (See the red line below) .

Log:

11:31:07,655 INFO [STDOUT] Before Creating SessionFactory
11:31:13,811 INFO [STDOUT] Mohnish Before Configure
11:31:14,546 INFO [STDOUT] 11:31:14,544 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
11:31:14,548 INFO [STDOUT] 11:31:14,547 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
11:31:14,758 INFO [STDOUT] 11:31:14,757 INFO [Configuration] Mapping resource: com/hibernate/dto/Login.hbm.xml
11:31:14,976 INFO [STDOUT] 11:31:14,976 INFO [Binder] Mapping class: com.hibernate.dto.Login -> LOGIN
11:31:15,185 INFO [STDOUT] 11:31:15,185 INFO [Configuration] Configured SessionFactory: java:hibernate/SessionFactory

Note: WAS 7 points to JDK 1.5 or higher... It cant run with jdk1.4.

3. WAS 6.0 (on server i.e. production machine)

I deployed the war on this server. It reads hibernate.cfg.xml. From this, it reads a mapping file Login.hbm.xml but couldnt able to map with "Login" class(missing red line below) .

Log:

[1/7/10 20:04:57:682 IST] 00000052 SystemOut O Before Creating SessionFactory
[1/7/10 20:04:57:682 IST] 00000052 SystemOut O Mohnish Before Configure
[1/7/10 20:04:57:683 IST] 00000052 Configuration I org.apache.commons.logging.impl.Jdk14Logger info configuring from resource: /hibernate.cfg.xml
[1/7/10 20:04:57:699 IST] 00000052 Configuration I org.apache.commons.logging.impl.Jdk14Logger info Configuration resource: /hibernate.cfg.xml
[1/7/10 20:05:02:672 IST] 00000052 Configuration I org.apache.commons.logging.impl.Jdk14Logger info Mapping resource: com/hibernate/dto/Login.hbm.xml
[1/7/10 20:05:04:950 IST] 00000052 SystemOut O MOHNISH: Exception:java.lang.NullPointerException
[1/7/10 20:05:04:950 IST] 00000052 SystemOut O MOHNISH: Exception:null

See, after highlighted line, nullpointer is coming. because session factory is null. THERE IS NO MAPPING

Note: WAS 6 points to JDK 1.4... It cant run with jdk1.5.

See the red highlighted line in the log is missing when I deploy in WAS 6(server 3). Please let me know if you know anything about this.

Thanks
Mohnish
13 years ago
Hi

I developed a full application in JDK 1.5 and now I come to know then my client is using IBM WebSphere Application Server - Express, 6.0.2.19 which points to JDK 1.4.
So, on deploying my application, it throws UnsupportedClassVersionError exception.

So how can we point this application server to JDK 1.5 so that my application can run without any problem?

Note:
I am using this URL for Administrative Console: http://10.1.0.3:9060/ibm/console/
where 10.1.0.3 is ip of the sytem where this application sever is installed.

Thanks
Mohnish
13 years ago
What I am trying to do is deploying a struts blank application (struts2-blank-2.1.8.1.war downloaded directly from apache site) on IBM Websphere Application Server 6.0.

For this I created new application server and new HTTP server.

New Application Server Details:

WAS version :6.0.2.19
Application server name :IRISINFO_TEST1
Server description : IRISINFO_TEST1 for deploying IRISInfoSystem.war
Internal port range : 10048 - 10062
Virtual host : default_host
Profile root : /QIBM/UserData/WebSphere/AppServer/V6/Base/profiles
External HTTP server association : IRIS_HTTP
Server URL : http://IRISNEW:10002
Business applications : None
Sample applications :

Application name URL to access application

query Used by EJB client applications

Default Applications http://IRISNEW:10002/snoop
http://IRISNEW:10002/hitcount
http://IRISNEW:10002/hello

Note: To access the application(s) you have choosen, start both the application server and HTTP server, then enter a URL from the table above.

New HTTP Server Details:

HTTP server name : IRIS_HTTP
HTTP server description : HTTP server created by the Create Application Server wizard.
Port : 10002
Document root : /www/iris_http/htdocs
Server root : /www/iris_http
Current application server association :None
New application server association : IRISINFO_TEST1, V6.0


Both are in running mode. After that I tried running 3 default applications by using following URLs and they are running fine:

http://10.1.0.3:10002/snoop
http://10.1.0.3:10002/hitcount
http://10.1.0.3:10002/hello

Now when i deployed struts blank application, it get successfully deployed. I tried running this struts blank application using the following URL:

http://10.1.0.3:10002/struts2-blank-2.1.8.1

But it doesn't show the expected page. The Websphere console clearly shows that this struts blank application is successfully deployed but I am not able to run that.
I am using IBM WAS console on http://10.1.0.3:2001/HTTPAdmin

Can you please tell me how I can run my application?

Thanks
13 years ago
Hi

I am totally new working with IBM Websphere Application Server 6.
I am deploying struts2 blank application. I downloaded struts2-blank-2.1.8.1.war from apache site and deployed on websphere.

I got the attached screenshot. Means it is successfully deployed. Now I want URL for running the application on the browser.
On which port it is running....

Thanks
Mohnish
13 years ago
I have tried jdk 6 as well as jdk 5. Please see attached screenshot1.jpg... .

Thanks
Mohnish