Tuesday, December 1, 2015

java.sql.SQLException: ResultSet.next was not called Oracle JDeveloper, B2B Callout

While running a Java code of B2B callout i was getting the below error. This was due to below Java code. The commented code was causing the problem then i defined it in if statement as shown below. I hope you understand the reason.


 PreparedStatement pstmt = conn.prepareStatement("My select query=?");
        pstmt.setInt(1, Integer.parseInt(SequenceNum));
     
   ResultSet rs = pstmt.executeQuery();
               //  TR=rs.getString(1);
              //  System.out.println("TR is " +TR);
      if (rs.next())
     {
                    TR=rs.getString(1);
                    System.out.println("TR is " +TR);
        
      }


java.sql.SQLException: ResultSet.next was not called
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_1035_WLStub.getString(Unknown Source)
at weblogic.jdbc.rmi.internal.ResultSetStub_weblogic_jdbc_rmi_internal_ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_1035_WLStub.getString(Unknown Source)
at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getString(ResultSetStraightReader.java:45)
at weblogic.jdbc.rmi.SerialResultSet.getString(SerialResultSet.java:150)
at DBInserterMT100.dbInserter(DBInserterMT100.java:105)
at DBInserterMT100.execute(DBInserterMT100.java:55)
at oracle.tip.b2b.callout.CalloutExecuteWorker.doWork(CalloutExecuteWorker.java:288)
at oracle.tip.b2b.callout.CalloutExecuteWorker.run(CalloutExecuteWorker.java:258)
at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.sql.SQLException: ResultSet.next was not called
at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:2870)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getString(Unknown Source)
at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getString(Unknown Source)
at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_WLSkel.internalInvoke1(Unknown Source)
at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
... 2 more

javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3: Destination unreachable

While compiling some code in JDeveloper I was getting the below error. It was coming due to proxy issue. So go to Jdeveloper then Tools---Preferences---Web Browser and Proxy then in exceptions field enter your server hostname. Test your code again and this time hopefully error will not come. It resolved my issue and i hope it will be helpful.


SEVERE: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://hostname:port: Destination unreachable; nested exception is: 
java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. Forefront TMG is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.  )'; No available router to destination]
oracle.bpel.services.workflow.client.WorkflowServiceClientException: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://hostname:port: Destination unreachable; nested exception is: 
java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. Forefront TMG is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.  )'; No available router to destination]
at oracle.bpel.services.workflow.client.WorkflowServiceClientContext.createInitialContext(WorkflowServiceClientContext.java:793)
at oracle.bpel.services.workflow.client.WorkflowServiceClientContext.getJNDIInitialContext(WorkflowServiceClientContext.java:423)
at oracle.bpel.services.workflow.query.client.TaskQueryServiceRemoteClient.getInitialContext(TaskQueryServiceRemoteClient.java:47)
at oracle.bpel.services.workflow.query.client.TaskQueryServiceRemoteClient.authenticate(TaskQueryServiceRemoteClient.java:90)
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 oracle.bpel.services.workflow.client.WFClientRetryInvocationHandler.invokeTarget(WFClientRetryInvocationHandler.java:144)
at oracle.bpel.services.workflow.client.WFClientRetryInvocationHandler.invoke(WFClientRetryInvocationHandler.java:82)
at $Proxy14.authenticate(Unknown Source)
at nl.whitehorses.fcforms.tasks.utility.BPELWorkflowServices.authenticate(BPELWorkflowServices.java:191)
at nl.whitehorses.fcforms.tasks.services.HumanTaskClient.completeTask(HumanTaskClient.java:265)
at nl.whitehorses.fcforms.tasks.test.Complete.<init>(Complete.java:9)
at nl.whitehorses.fcforms.tasks.test.Complete.main(Complete.java:14)
Caused by: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://hostname:port: Destination unreachable; nested exception is: 
java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. Forefront TMG is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.  )'; No available router to destination]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
at weblogic.jndi.Environment.getContext(Environment.java:315)
at weblogic.jndi.Environment.getContext(Environment.java:285)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at oracle.bpel.services.workflow.client.WorkflowServiceClientContext.createInitialContext(WorkflowServiceClientContext.java:789)
... 14 more
Caused by: java.net.ConnectException: t3://hostname:port: Destination unreachable; nested exception is: 
java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. Forefront TMG is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.  )'; No available router to destination
at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:353)
... 22 more
Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is: 
java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. Forefront TMG is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.  )'; No available router to destination
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:470)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:321)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:254)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200)
... 25 more
Exception in thread "main" java.lang.RuntimeException: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://hostname:port: Destination unreachable; nested exception is: 
java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. Forefront TMG is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.  )'; No available router to destination]
at nl.whitehorses.fcforms.tasks.services.HumanTaskClient.completeTask(HumanTaskClient.java:280)
at nl.whitehorses.fcforms.tasks.test.Complete.<init>(Complete.java:9)
at nl.whitehorses.fcforms.tasks.test.Complete.main(Complete.java:14)

Friday, September 4, 2015

java.security.PrivilegedActionException: weblogic.common.ResourceException Oracle SOA

java.security.PrivilegedActionException: weblogic.common.ResourceException: java.security.PrivilegedActionException: weblogic.common.ResourceException: No credential mapper entry found for password indirection user=apps for data source DataSourceName

While creating a war file and then deploying on weblogic we get this error. To get ride of this error in Jdeveloper go to application properties and then deployments and then uncheck "Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment"

then create WAR file again and deploy it again and this error will be no more

Error(1,1)mdssys/mdx/componentType.rdf: XML-20108: (Fatal Error) Start of root element expected.

 Error(1,1)mdssys/mdx/componentType.rdf<Line 1, Column 1>: XML-20108: (Fatal Error) Start of root element expected.

Sometimes when we build Oracle SOA project we get the above error. To resolve this issue just go to those file where this error is coming you can see this from compiler and remove those file or add following in those files 

<xml version="1.0" encoding="UTF-8"/> 

Save it and rebuild the code again and this error will be no more.

rul-05720 datatype mismatch for test jaxbelement >int Oracle SOA business rule

rul-05720 datatype mismatch for test jaxbelement >int

Sometime we face this error while creating business rule. I was facing the same issue with variable that I was using in business rule by removing minOccurs="0" in my schema element. Like below 

<xs:element name="netAmount" type="xs:decimal" minOccurs="0" nillable="true"/>

just remove the highlighted area and try to create your business rule with newly updated schema.

<xs:element name="netAmount" type="xs:decimal"  nillable="true"/>


Oracle SOA Business rule Fact not found in the rule engine working memory

The following error comes sometimes in Oracle SOA suite business rule.

Fact not found in the rule engine working memory, rule session execution failed. This is most likely a rule modeling error.

I was facing the same issue while working on business rule. The error was coming due to schema issues or namespace issues in schema. If you create a separate application and test this using the same schema the chances of error would be very less. I just created a new XSD with new target namespace and copy pasted the existing elements/complex elements into new xsd not namespaces, then it started working fine. 

Thursday, June 25, 2015

Oracle BPM 12c vacation rule

Recently I was trying to use Oracle BPM 12c vacation rule but it was not working for me. I also posted on Oracle community and following was the detailed problem.

 Oracle BPM 12c vacation rule issue

How it worked for me then? So go to your .task file of that user like manager in my case as shown below in snapshot.


Now double click on default.DefaultPerformet activity and go to properties. Then from General tab select names and expression from Build a list of participants from using dropdown list. Now at the bottom under participant name create a new participant i.e manager in my case as shown below.
Now save all the changes and redeploy the application. This time vacation rule will work fine.