INFO: Initializing Mojarra (1.2_09-20081212-SNAPSHOT) for context '/sampleWeb'
DBLog constructor called
Inside logPreAuth
SP created
java.sql.SQLException: The external "DBLog::insLog" routine had the following runtime exception "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)
......
Also FYI, there were following 2 build warnings,
Classpath entry E:/Oracle/Middleware/wlserver_10.3/common/eval/pointbase/lib/pbembedded57.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.
The import com.pointbase.jdbc is never used
Then tried adding "net.local.util.common.DBLog" to EXTERNAL NAME as follows,
EXTERNAL NAME \"net.local.util.common.DBLog::insLog\" but now I got the error,
DBLog constructor called
Inside logPreAuth
SP created
java.sql.SQLException: The external "net.local.util.common.DBLog::insLog" routine had the following runtime exception "java.lang.ClassNotFoundException: net.local.util.common.DBLog"
at com.pointbase.net.netJDBCPrimitives.handleResponse(Unknown Source)
......
Then I tried adding the following classpath entry to startPointbase.cmd,
@REM Add PointBase 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 constructor called
Inside logPreAuth
SP created
java.sql.SQLException: The external "net.local.util.common.DBLog::insLog" routine had the following runtime exception "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 again same above error.
Also tried adding external class folder in Libraries tab of Java build path. Still same above error.
I will be extremely thankful for any help.
Java App Servers
Last Comment
for_yan
8/22/2022 - Mon
for_yan
Have you tried like that:
EXTERNAL NAME 'net.local.util.common.DBLog.insLog'
I was also thinking that you need to have a static method to be able
to stotr in Java Stored Procedure
Another thing, I'd suggest to split these two tasks - make one piece of code which
would create java stored procedure - then you can check at the sql prompt if such
stored procedure was created and exists.
Then run a separate code which will have tested its operation
weblogicme
ASKER
Tried like this,
EXTERNAL NAME \"net.local.util.common.DBLog.insLog\"
And got,
java.sql.SQLException: The routine name "null" does not contain a "::" to delimit the method name.
Tried like this,
EXTERNAL NAME \"net.local.util.common.DBLog.insLog::insLog\"
And got,
java.sql.SQLException: The external "net.local.util.common.DBLog.insLog::insLog" routine had the following runtime exception "java.lang.ClassNotFoundException: net.local.util.common.DBLog.insLog"
Tried like this,
EXTERNAL NAME \"net.local.util.common.DBLog::insLog\"
And got,
java.sql.SQLException: The external "net.local.util.common.DBLog::insLog" routine had the following runtime exception "java.lang.ClassNotFoundException: net.local.util.common.DBLog"
As you said, I changed my code and splitted it as follows,
java.sql.SQLException: The external "DBLog::insLog" routine had the following runtime exception "java.lang.ClassNotFoundException: DBLog"
And I can see from logs, till "SP Created" its going fine, and then after that its throwing error. Also checked in pointbase DB and found insLog routine is listed.
weblogicme
ASKER
Its really strange. I followed the steps given in the below documentation on setting the classpath and still same error!
As they mentioned in that doc. under the section "Using JAR and ZIP files" in page 10, I updated pbembedded75.jar with DBLog.class package as follows,
jar -uf pbembedded57.jar net
In the above command, "net" is the folder package structure having DBLog.class inside it.
Verified whether commEnv.cmd is having right classpath and found the below,
set POINTBASE_CLASSPATH=C:\bea\user_projects\workspaces\WhatsNext\WhatsNextUtility\build\classes;%POINTBASE_HOME%\lib\pbembedded57.jar;%POINTBASE_CLIENT_CLASSPATH%
To make sure, I checked the console window while admin server is running, and it outputted the following,
So pbembedded57.jar file is having DBLog.class and also my classpath is pointing to it.
Now I tried both the ways of calling EXTERNAL NAME \"DBLog::insLog\" as well as EXTERNAL NAME \"net.verizon.whatsnext.util.common.DBLog::insLog\" , and the result was the same error.
I see. So does Oracle Express has a database in which I can create Stored procedures and call from java? The point is I need to test my local java code setup and see if I am able to make jdbc call to Oracle SP.
So if Oracle Express has a database feature I can connect to, then I can very well try it.
Please suggest. Thanks
for_yan
As far as I know any Oracle supports Java stored procedure
And the way I tried was that I used lodjava command
In general I think you need to have a good reason to use Java Stored Procedure, don't see wvery manty cases where you would not be able to use JDBC + PL/SQL procedures instaed
weblogicme
ASKER
Using oracle database client, is it possible to create a local test database, so that I can create stored procedures in it?
Yes, with Oracle Express you can create the oracke database right on your local machine and then you should be able to create your schem and load java stored proceduure in that schema.
weblogicme
ASKER
No, I mean do I need to install database or client is sufficient? But I dont think I can create a database im my local system using client, right?
for_yan
No, you need to download and instal Oracle Express database - this is of course not a client but quite separate product - it is the database which is limited in size and connections but otherwise it has Oracle database functionality and it is free.
And it makes much more sense than pointbase as everything you would develop with it is transferable to any oracle database.
EXTERNAL NAME 'net.local.util.common.DBL
I was also thinking that you need to have a static method to be able
to stotr in Java Stored Procedure
Another thing, I'd suggest to split these two tasks - make one piece of code which
would create java stored procedure - then you can check at the sql prompt if such
stored procedure was created and exists.
Then run a separate code which will have tested its operation