NoClassDefFoundError on executing external java method

Please I need help with this desperately. Not going to cross-post anywhere. Faced with this NoClassDefFoundError :(

Creating a project of Internet (sampleWeb) portal by the following-
package net.local.util.common;

import java.sql.*;

import com.bea.netuix.transformer.openfoundation.util.XPSystem.Out;
import com.pointbase.jdbc.*;


public class DBLog {
          
     private Connection conn = null;
     private Statement m_stmt;
     private Statement l_stmt;
     private CallableStatement m_callStmt = null;
     
     
public DBLog() {

     init();
     Out.Write("DBLog constructor called");
     
}

public void init() {

     Out.Write("DBLog init called");
}
     
public void logPreAuth() {
               
          try {
               Out.Write("Inside logPreAuth");
                         
               String I_URL = "jdbc:pointbase:server://localhost:9093/weblogic_eval";
               Class.forName("com.pointbase.jdbc.jdbcUniversalDriver").newInstance();
               //Class.forName("com.pointbase.jdbc.jdbcDataSource");
               conn = DriverManager.getConnection(I_URL, "PBPUBLIC", "PBPUBLIC");
               
          String SQL_CREATE_PROC = "CREATE PROCEDURE insLog(IN P1 VARCHAR(30))"
                    + " LANGUAGE JAVA"
                    + " SPECIFIC insLog"
                    + " DETERMINISTIC"
                    + " NO SQL"
                    + " EXTERNAL NAME \"DBLog::insLog\""
                    + " PARAMETER STYLE SQL"; 

               m_stmt = conn.createStatement();
               m_stmt.executeUpdate(SQL_CREATE_PROC);
               m_stmt.close();  
               Out.Write("SP created");
               m_callStmt = conn.prepareCall("{ call PBPUBLIC.insLog(?) }");
               m_callStmt.setString(1, "Success!!");
               m_callStmt.execute(); 
               Out.Write("SP executed");
               
          }
          
          
          catch (Exception e) {
          e.printStackTrace();
          }
     
                    
     }

public void insLog(String test)
{
     try {
          
          l_stmt = conn.createStatement();
          l_stmt.execute("Insert into logs values('" + test + "')");
          l_stmt.close();
          conn.close();
     }
     catch (Exception e) {
     e.printStackTrace();
          
     }
     
}
     

} 
And created a test.jsp with the following content-
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
    import="net.local.util.common.DBLog"
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>test</title>
</head>
<body>
<%
DBLog dblog = new DBLog();
dblog.logPreAuth();
 %>
</body>
</html>
Then added pbembedded57.jar in web projects 'Add external Jar library' and built the project.

When I hit the page, http://localhost:7001/sampleWeb/faces/test.jsp

INFO: Initializing Mojarra (1.2_09 - 20081212-SNAPSHOT) to the context ' / sampleWeb'
DBLog called init
DBLog constructor called
Domestic LogPreAuth
Created SP
java.sql.SQLException: the external routine of 'DBLog::insLog' with the exception of next run "java.lang.ClassNotFoundException: DBLog.
at com.pointbase.net.netJDBCPrimitives.handleResponse (unknown Source)
at com.pointbase.net.netJDBCPrimitives.handlePrimitiveResponse (unknown Source)
at com.pointbase.net.netJDBCPreparedStatement.execute (unknown Source)
at net.local.util.common.DBLog.logPreAuth(DBLog.java:65)
......

For the record, there were also 2 next build warnings,.
Classpath entry E:/Oracle/Middleware/wlserver_10.3/common/eval/pointbase/lib/pbembedded57.jar is not exported or published. Runtime ClassNotFoundExceptions may result.
Import com.pointbase.jdbc is never used

Then tried to add "net.local.util.common.DBLog" in the name of the EXTERNAL as follows,

EXTERNAL NAME \"net.local.util.common.DBLog::insLog\" but now, I got the error

DBLog called init
DBLog constructor called
Domestic LogPreAuth
Created SP
java.sql.SQLException: the external routine 'net.local.util.common.DBLog::insLog' with the exception of next run "java.lang.ClassNotFoundException: net.local.util.common.DBLog".
at com.pointbase.net.netJDBCPrimitives.handleResponse (unknown Source)
......

Then I tried to add the following entry for classpath for startPointbase.cmd,
@REM PointBase add classes to the classpath
SET CLASSPATH=E:\Oracle\Middleware\user_projects\Workspaces\DBLog\sampleWeb\src\net\local\util\common;%POINTBASE_CLASSPATH%;%WEBLOGIC_CLASSPATH%

Now, I got the error

DBLog called init
DBLog constructor called
Domestic LogPreAuth
Created SP
java.sql.SQLException: the external routine 'net.local.util.common.DBLog::insLog' with the exception of next run "java.lang.ClassNotFoundException: net.local.util.common.DBLog".
at com.pointbase.net.netJDBCPrimitives.handleResponse (unknown Source)
......

I also tried classpath "E:\Oracle\Middleware\user_projects\Workspaces\DBLog\sampleWeb\src" and even higher error.

Also tried to add external class file in the build path libraries tab Java. Always the same above error.

I'll be very grateful for any help.

Published by: 901007 on March 10, 2012 12:36

I doubt that in the written code during execution of the prepared call. You will need to check that.

Tags: Fusion Middleware

Similar Questions

  • Shares of personalized service with java methods

    Hello!  I need a hand on a creation of a personalized service and the correct way to trigger the Java methods that I want to execute following call for this service.

    This service must have 4 methods of java, each of them would run based on the parameter I want to send.

    For example, if I call the service EUM_START_APPROVAL_PROCESS with the parameter "WFSTEP = START" ("myserver" / idcplg?) IdcService = EUM_START_APPROVAL_PROCESS & WFSTEP = START), I need to run the 'javamethodSTART' method and none of the other methods!

    < b >

    < td > < table > EUM_START_APPROVAL_PROCESS

    DocService < td >

    32

    null

    null

    value Null < br >

    Failed to retrieve the query provider page. < table >

    3:javamethodSTART:0:null < td >

    3:javamethodAPPROVE:0:null

    3:javamethodREJECT:0:null

    3:javamethodEND:0:null < table >

    < /tr >

    What is the correct syntax, I need to use in the field of actions: "3:javamethodSTART:0:null."

    Thank you very much for your help, I tried to read the news online, but can't find the solution I need (or perhaps missed somehow)!

    Anya

    Use a Java method in your service definition. It is a Java method that determines (based on the parameters that you pass) which of the 4 methods to call Java.

    Jonathan

    http://jonathanhult.com

  • How to implement binding action (#{bindings.) ExecuteWithPara) in the java method

    Hello all :)

    I have small problem,
    in my project, I'm much action affair "#{bindings." ExecuteWithParams.execute}", and I would like to implement in my java method, how do?

    someone help

    This might help:
    http://blogs.Oracle.com/Shay/2010/12/combining_multiple_queries_and.html

  • Trigger ADF commandItem and Java method using a button

    Hello

    I am completely new ADF and JDeveloper, so my apologies for maybe stupid questions.

    I try so to change attributes of database where predefined displays during a ADF table using a button. For this I use a Java method created in a Java to the ViewObject class and assign the ActionListener.

    The Code is not written to me and is already in use by another application, means that it works. Now, I want that same button triggers an exportcollectionListener ADF to download a CSV of the table has changed also, after the Java class is running successfully.

    But when I drag the Listener export button, it does not work the listener and either the Java method.

    Is it possible to get this working?

    Thank you.

    JDeveloper 12.1.2

    I did not how to implement the methods, because objects/classes like RichCommandButton have been deprecated.

    This example is built for the old version of jdev.

    It is no mistake, you will probably use af:button instead of af: commandButton so you should have this as RichButton instead of RichCommandButton

    When I run the sample application, makes me a NullPointerExecption and the bean

    OK, this example might need some tweaking.

    (he missing "return;" after line 72 in FDLtestBean.java program flow will stop so in case you have some exception upon validation of entered file name and you'll get NPE on line 75)

    Try to get the file name for the entry in field (with the full path) and see if it works

    I get a warning for the Map object: call uncontrolled to put(K,V) as a member of the java.util.Map of type raw.

    This is just warning (introduced in 12 c)

    Dario

  • Call the java method lunch application

    Hello

    I use JDev 12.1.3 with MAF, I want to call the java method of the project ViewController lunch application, how can I do this?

    Thank you

    Hello

    Can you explain usecase? What features do you need perform the start-up of the application?

    You can run java code in an application LifeCycleListener - https://docs.oracle.com/middleware/maf210/mobile/develop-maf/maf-apps-register-listeners.htm#ADFMF25120

  • call the default Java methods UCM services?

    Hello!

    I have a custom Java method that I call the definition of custom service UCM. This method of Java, one of the tasks is to call standard UCM UPDATE_DOCINFO service to update the metadata for that document. What is the right way to call the AAU services the default JAVA methods?

    Thanks a lot for your help!

    I use the lines below...

    DataBinder binder = new DataBinder();
    String cmd = "";
    this.m_requestImplementor.executeServiceTopLevelSimple(binder, cmd, this.m_userData);
    

    You can add the parameter to the service of "binder".

    binder.putLocal("", "");
    

    This doesn't cause pollution data.

  • Invoke the "return of workflow" to a Java method

    Hi, I have the following problem:

    I have a link that calls a taskFlow call. This workflow has a Java method as a default activity. In this Java method, I make little validation and if the validation fails, I want to return to the original page.

    Can I do this if I use:

    ExternalContext ectx is FacesContext.getCurrentInstance () .getExternalContext ();.

    HttpServletResponse response = (HttpServletResponse) ectx.getResponse ();

    String url = ectx.getRequestContextPath () + "page." 

    response.sendRedirect (url);

    But this way, I lose the context and I can't show a message in the FacesContext like this:

    FacesContext context = FacesContext.getCurrentInstance ();

    FacesMessage msg is new FacesMessage (FacesMessage.SEVERITY_FATAL, "Information", "message");.

    context.addMessage (null, msg);

    I want to know if I can call it the 'task flow back' this method of java (or any other form of redirecting to the page) so that I can keep the context and display the message correctly.

    I use JDeveloper 11.1.2.3.0.

    I appreciate if anyone can help. Thank you.

    You can add a default activity navigation case to the stream return axtivity task. Then, you set the action of the method to the results chain and return the name of navigation to the workflow of return if your validation fails, otherwise, you return the case of normal navigation.

    Timo

  • Calling a Java method in a page JSFF fragment.

    Can someone tell me how I can call a Java method in a page JSFF fragment?

    Here's an excerpt from my jsff (My.jsff):

    < af:column sortProperty = "CrtdByUserid" sortable = "false".
    headerText = "#{customstoregroupviewcontrollerBundle.USER_LABEL} '"
    ID = "user" align = "center" >
    < af:outputText value = "#{rank." CrtdByUserid}"id ="ot5"/ >
    < / af:column >

    Here is the method of my Java (MyBacking.java)

    public String resolveUserName (String pUserId) {}
    try {}
    JCCRoleHelper jccrh = new JCCRoleHelper();
    Return jccrh.getUserName (pUserId);
    } catch (Exception e) {}
    return pUserId;
    }
    }

    I would replace "#{rank." CrtdByUserid}"in My.jsff with a call to the java method"resolveUserName (String pUserId)"of My.java by passing the value of" #{rank. " CrtdByUserid}"to return the string to fill the 'af:outputText = value'.

    Any help would be greatly appreciated.

    Hello

    create and save a bean inside taskflow, for example, name it userResolverBean.

    The bean code

    import java.util.HashMap;
    
    public class UserResolverBean {
    
        private HashMap _user;
    
        public UserResolverBean() {
            _user = new HashMap() {
                    @Override
                    public Object get(Object key) {
                        if(key == null)
                            return null;
                        return resolveUserName(key.toString());
                    }
                };
        }
    
        public String resolveUserName(String pUserId) {
            try {
                JCCRoleHelper jccrh = new JCCRoleHelper();
                return jccrh.getUserName(pUserId);
                } catch (Exception e) {
                return pUserId;
            }
    
        }
    
        public HashMap getUser() {
            return _user;
        }
    }
    

    and use it like this

    
    
    
    

    Cheers!

    Kind regards

    Published by: Santosh Vaza on August 8, 2012 11:48

  • How to call a Java method n map the output of this method to a table in ODI

    Hello

    I am new to ODI. I wrote an interface that links the two tables (source) to a file (in the target). Now, I must apply a method (java call) on each element in a column in the target. Now my questions are:

    1. all I know is to use the procedure using BeanShell Java or Jython. Can you give some examples of commands to achieve such a feature?

    2. where should I actually apply this procedure? Is it possible to apply this procedure within the Interface during the mapping (so that I can map directly the result in the output file)?

    Thanks in advance :)

    Not sure why you want to call a java method for each column.
    But as others have mentioned, an ODI procedure won't help you do.

    However, there are other options you can exercise:
    (1.) assuming that you are using Oracle, you can compile the Java class and wrap it as a PL/SQL function and then call this function from pl/sql to the ODI interface. This procedure will be called like any other function oracle for example. Upper (col1).

    (2.) as I understand, it's that you want to apply the Java method for all columns.
    Assuming that you have knowledge with Jython and the code inside the KMs, you can customize the KM to include the Java method around the columns. But this approach is complex if you are a beginner.

    Hope that helps

  • How can we call java methods in ODI?

    Hello

    I have java jars.i would call java methods of ODI

    how it is possible in ODI?

    Please help consider myself the same

    Thank you

    Version unsupported major.minor 50.0

    error comes when you use different java version 2

    version 50.0 means also that you use a class that are compiled with the help of JAVA 6
    Try to run ODI with JAVA 6

  • Cancel the deployment of a Web application using a Java method or call

    Hi, I have an application that is running on weblogic I want to cancel the deployment using a Java method or a call.
    Is it possible to do it with a specific API to weblogic or something like?
    Thank you!

    Hi CarolinaCunha,

    Please visit the following link to cancel the deployment of Applications using the Java method:

    http://jaysensharma.WordPress.com/2010/01/15/Undeploying-application-using-Java-method-JMX/

    Thank you
    Jay SenSharma

  • What is the best way to call the Java method in JSP in weblogic 10.3

    Hello

    What is the best way to call the Java method in JSP in weblogic 10.3?

    Thank you for your help in advance.

    Thank you
    Manu

    Hello Manu,

    If I understand your question, all you need to do is import the Java class you want to create / obtain an instance of it (if you're not calling a static method), then call the method, the entire interior of the JSP. It works the same way in Weblogic that it works in any JSP.

    Kevin

  • Oracle Express with an external JAVA virtual machine

    Hello

    According to the docs on [Oracle Database 10 g Express Edition: not just for learners | http://www.oracle.com/technology/pub/articles/cunningham-database-xe.html]:

    "It has no internal Java in the database support. You can connect to a virtual machine external JAVA through JDBC but, to date, there is no internal JVM. "

    Can I call the Java code on the external JAVA virtual machine to Oracle XE?

    The quote was wrong and we are taking steps to correct it.

  • Call BI Publisher reports to an external java application

    Hello

    Working with OBIEE 10.1.3.4.

    After creating a few reports with Oracle BI Publisher I wanted to use in an external java application.

    I used this link:

    [http://oraclebizint.wordpress.com/2008/01/04/oracle-bi-publisher-101331-creating-applications-using-jdeveloper-11g-and-web-service-soap-apis/]

    but each product report does not size (0 KB).

    Any suggestions?

    See you soon...

    Follow this link, how to create webservice, but read the WSDL, then call the respective functions with requires parameter.

    This link has old webservice reference.
    There are a lot of improvement after that.

    Add this to the function you have
    repRequest.setSizeOfDataChunkDownload(-1);
    

    It should work fine.

  • How to call a Java method, pl/SQL from within ApEx

    I want to call a Java method, which I intend to use to add members to a collection at the ApEx of another source of data.



    How does one call a Java from ApEx method?



    Thank you

    Gregory


    Hello

    Curious, the link works fine for me.

    Anyway, here is another, a thread on AskTom site that addresses the basic concepts you need-

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:952229840241

    Hope this helps,

    John.
    --------------------------------------------
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone!

Maybe you are looking for