0 Replies Latest reply: Feb 17, 2013 9:18 AM by 991563 RSS

    Convert SDO_GEOMETRY to JGeometry -- Problem

    991563
      Hi,
      I try to convert a SDO_GEOMETRY to JGeometry object in my Oracle CEP Applications but i have errors.
      I try to do this :


                     DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                     Connection aConnection = DriverManager.getConnection(databaseUrl, databaseUser, databasePassword);
                     java.sql.Statement instruc = aConnection.createStatement();
                     ResultSet RS=null;
                     
                     RS = instruc.executeQuery("select * from TAB_REALTIME_POS_VEHICLES");
           while(RS.next())
           {
                String id = RS.getObject(1).toString();
                STRUCT st = (STRUCT) RS.getObject(2);
                JGeometry geom = JGeometry.load(st); ----> the error comes from this line
      }
      And here the errors :

      commonj.work.WorkException: java.lang.LinkageError: Class oracle/sql/STRUCT violates loader constraints
           at weblogic.work.commonj.CommonjWorkManagerImpl$WorkStatus.setThrowable(CommonjWorkManagerImpl.java:268)
           at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:206)
           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
      Caused By: java.lang.LinkageError: Class oracle/sql/STRUCT violates loader constraints
           at com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapter.run(HelloWorldAdapter.java:96)
           at com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapter$$FastClassByCGLIB$$1287de2.invoke(<generated>)
           at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
           at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
           at com.bea.wlevs.ede.impl.EventManagerAccessorProxy.invoke(EventManagerAccessorProxy.java:30)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
           at com.bea.wlevs.ede.impl.EventBeanProxy.invoke(EventBeanProxy.java:38)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
           at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
           at com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapter$$EnhancerByCGLIB$$3cd1d38e.run(<generated>)
           at com.bea.wlevs.spring.RunnableBeanPostProcessor$RunnableWrapper.run(RunnableBeanPostProcessor.java:117)
           at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:204)
           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

      Any Idea ?

      Thanks.