SQLJ ok Java app but jax - ws will not deploy

H,

I'm new to Jdeveloper (currently using 12.1.2.0.0) and I haven't used Java for some time. So I apologize if the question is stupid.

I have problems with the current project, I decided to write a very simple java application using sqlj and make sure that it would work. The application works perfectly. Please see below.

= java file with Main class =.

package sqlj.test2;

import java.sql.SQLException;

public class sqlj_test {}

public sqlj_test() {}

Super();

}

Public Shared Sub main (String [] args) throws SQLException {}

sqlj_test sqlj_test = new sqlj_test();

REF FREHandler.

int tmp = 100037;

String ImageBase64Encoded;

try {}

REF = new FREHandler();

ImageBase64Encoded = fre.getImgBase64 (tmp);

System.out.println (ImageBase64Encoded);

} catch (SQLException e) {}

System.out.println ("error code:" + e.getErrorCode () + "error msg:"+ e.getMessage () ');

String sqlState = e.getSQLState ();

System.out.println ("SQL State:"+ sqlState ");

}

}

}

================================ FRE_Handler.sqlj ========================================

package sqlj.test2;

to import java.sql.DriverManager;

import java.sql.SQLException;

Import oracle.jdbc.OracleDriver;

Import sqlj.runtime.ref.DefaultContext;

public class FREHandler {}

CTX DefaultContext.

public getCtx() {} DefaultContext

return ctx;

}

Public FREHandler() throws SQLException {}

Super();

try {}

DriverManager.registerDriver (new OracleDriver());

java.sql.Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@obase-bip6:1521:orcl", "PUT", "$2012 DasuMet");

DefaultContext.setDefaultContext (new DefaultContext (conn));

CTX = DefaultContext.getDefaultContext ();

} catch (SQLException e) {}

System.out.println ("error code:" + e.getErrorCode () + "error msg:"+ e.getMessage () ');

String sqlState = e.getSQLState ();

System.out.println ("SQL State:"+ sqlState ");

}

}

Get the picture to format base 64 encoded for the user of the URN Ref number entry application

public String getImgBase64 (int i) throws SQLException {exception

int jctcr = i;

String limgbase64 = "";

#sql limgbase64 = {VALUES (FGET_IMGCLOB_FROM_URN (: IN jctcr))};

           

System.out.println ("public String getImgBase64 (int i) return"+ limgbase64);

Return limgbase64;

}

}

=============================================================

The problem is that when it transformed into a jax - ws without changing the code, except for the failure of the main class. I get such error as shown below.

= SQLJ file with Service WS =.

package sqlj.test3;

import java.sql.SQLException;

Import javax.jws.WebMethod;

Import javax.jws.WebService;

Import oracle.jdbc.OracleDriver;

Import sqlj.runtime.ref.DefaultContext;

Import oracle.sqlj.runtime.Oracle;

@WebService

public class FRE_Handler {}

CTX DefaultContext.

Public FRE_Handler() throws SQLException {}

Super();

try {}

Tested this style of connection as stand-alone Java application and it works

java.sql.DriverManager.registerDriver (new OracleDriver());

java.sql.Connection conn = java.sql.DriverManager.getConnection ("jdbc:oracle:thin:@obase-bip6:1521:orcl", "PUT", "$2012 DasuMet");

sqlj.runtime.ref.DefaultContext.setDefaultContext (new DefaultContext (conn));

CTX = sqlj.runtime.ref.DefaultContext.getDefaultContext ();         

} catch (SQLException e) {}

System.out.println ("error code:" + e.getErrorCode () + "error msg:"+ e.getMessage () ');

String sqlState = e.getSQLState ();

System.out.println ("SQL State:"+ sqlState ");

}

}

@WebMethod

public String getImgBase64 (int i) throws SQLException {exception

int jctcr = i;

String limgbase64 = "";

#sql limgbase64 = {VALUES (FGET_IMGCLOB_FROM_URN (: IN jctcr))};

           

System.out.println ("public String getImgBase64 (int i) return"+ limgbase64);

Return limgbase64;

}

}

=====================================================================

Here are the errors displayed by JDSeveloper when I try to test the Web Service

[Running the application on IntegratedWebLogicServer SQLJ_TEST_3...]

[16: 56:43] SQL_Test_3WebApp.war of Module Web recognized in the project SQL_Test_3.jpr

[16: 56:43]-deployment began.  ----

[16: 56:43] the target platform's (Weblogic 12.x).

[16: 56:43] recovery of the existing application information

[16: 56:43] analysis of the dependence running...

[16: 56:43] deployment 2 profiles...

[16: 56:44] wrote on the Web for C:\Users\Dev\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\o.j2ee\drs\SQLJ_TEST_3\SQL_Test_3WebApp.war application Module

[16: 56:44] wrote the Module Enterprise Application to C:\Users\Dev\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\o.j2ee\drs\SQLJ_TEST_3

[16: 56:44] redeploy the Application...

< 14 March 2014 16:56:44 THIS > < error > < hats > < BEA-149265 > < error has occurred in the execution of the request of deployment with the ID "1394812604414" to "7" task Error is: ' weblogic.application.ModuleException: java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext ".

weblogic.application.ModuleException: java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext

at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)

at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)

to weblogic.application.internal.flow.ModuleStateDriver$ 1.next(ModuleStateDriver.java:172)

to weblogic.application.internal.flow.ModuleStateDriver$ 1.next(ModuleStateDriver.java:167)

to weblogic.application.utils.StateMachineDriver$ ParallelChange.run (StateMachineDriver.java:80)

Truncated. check the log file full stacktrace

Caused by: java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext

at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:335)

at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:302)

at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)

at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

Truncated. check the log file full stacktrace

>

< 14 March 2014 16:56:44 THIS > < WARNING > < hats > < BEA-149004 > < failures have been detected all introducing deploy the task for the application "SQLJ_TEST_3" >.

< 14 March 2014 16:56:44 THIS > < WARNING > < hats > < BEA-149078 > < message 149004 track battery

weblogic.application.ModuleException: java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext

at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)

at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)

to weblogic.application.internal.flow.ModuleStateDriver$ 1.next(ModuleStateDriver.java:172)

to weblogic.application.internal.flow.ModuleStateDriver$ 1.next(ModuleStateDriver.java:167)

to weblogic.application.utils.StateMachineDriver$ ParallelChange.run (StateMachineDriver.java:80)

Truncated. check the log file full stacktrace

Caused by: java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext

at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:335)

at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:302)

at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)

at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

Truncated. check the log file full stacktrace

>

[16: 56:44] undeployment.

[16: 56:44] - incomplete deployment.

[16: 56:44] remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)

# Can't run application SQLJ_TEST_3 due to the deployment on IntegratedWebLogicServer error.

[16: 56:44] requested cancellation

[SQLJ_TEST_3 application stopped and cancelled IntegratedWebLogicServer]

This is because the SQLJ library does not come as part of WebLogic and is not deployed by default.

You can add the jar for SQLJ file in the lib of your WebLogic domain directory or set the default Runtime SQLJ Jdeveloper to deploy library.

Tags: Java

Similar Questions

Maybe you are looking for

  • CQ50-NR215: bad recovery

    This Compaq CQ50-NR215 continued to get slower over time. It was purchased at BestBuy and came with (2) "GeekSquad" recovery CD - as opposed to a Microsoft OS disk? The backup of my data, I went with Disk1 - which he said successfully did something w

  • Maddening dialog box keeps popping up

    Sometimes I get in a situation where a dialog box keeps popping up and the only way to stop it is to close Labview via Manager Windows tasks. Currently, for example, its happening with the error below. Is it possible to end with elegance the program?

  • HELPPP PLEASEEE

    Well, we have a HP desktop with Vista OS computer. The beginning of the week the computer just stops. the screen went black and had to press the power button to get to reboot and we have activated it back it beeps and beeps and beeps. FINALLY, he wen

  • MD3200 (SAS) Raid controllers and VLAN

    I have a MD3200 (SAS) and the host running ESXi 5 U2. Is it possible to configure the VLAN tagging on the management ports of the MD3200 outside the standard IP gateway configuration and the subnet mask?

  • My office has pages of calendars, etc. in the column of gadgets!

    AM operating Windows Vista Edition Home Premium and my office is filled with calendars in the column of gadgets to the right of the screen.  Whenever I try to delete a calendar system breaks down!