Author |
Message
|
sunny7413 |
Posted: Sun Oct 13, 2013 2:56 am Post subject: java class not found |
|
|
Apprentice
Joined: 02 Oct 2013 Posts: 29
|
Hi everyone im using a java class to invoke a static method as per requirement and when i am trying to invoke the class i am getting the class not found exception.I tried Resolving this but can't.
Code: |
CREATE PROCEDURE Invokezip(IN logString CHAR,IN destinationdirec CHAR,IN pwd CHAR)
LANGUAGE JAVA
EXTERNAL NAME "zip.decompressor.zipdecompressor.unzipDirWithPassword"; |
Java code is
Code: |
public static void unzipDirWithPassword(String sourceZipFile,final String destinationDir,String password)
{ |
Can Anyone help me resolving this |
|
Back to top |
|
 |
vishnurajnr |
Posted: Sun Oct 13, 2013 7:46 pm Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Is this the same issue similar to this below?
http://www.mqseries.net/phpBB2/viewtopic.php?t=65542&postdays=0&postorder=asc&start=0
If you have any external dependant JAR used in your java function, you have to put those JAR/JARs also in shared classes.
Also post the exception tree here to get more details and the steps you have already followed to resolve the same. _________________ -------
A man is great by deeds, not by birth...! |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Oct 14, 2013 3:08 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
sunny7413 |
Posted: Tue Oct 15, 2013 3:51 am Post subject: |
|
|
Apprentice
Joined: 02 Oct 2013 Posts: 29
|
No vishnu this is new one.I will sure have the trace.ty lacelotlink i removed the final and tried but error remains same let me take the trace. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Oct 15, 2013 4:36 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Is the package name correct (spelling, punctuation and capitalization) ? Why not use a traditional package name rather than an arbitrary one ? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
sunny7413 |
Posted: Tue Oct 15, 2013 10:31 pm Post subject: |
|
|
Apprentice
Joined: 02 Oct 2013 Posts: 29
|
yes the package name is correct.Here i am attaching the trace.I kept the jar in classpath but is showing as a error in trace
Code: |
RecoverableException BIP3202E: ('common.Invokezip', '1.1') : An error occurred when trying to resolve the Java class or method ''zip.decompressor.zipdecompressor.unzipDirWithPassword'' which is referred to by the routine ''Invokezip''.
Further messages are generated that explain the error in more detail.
Correct the syntax of your Java expression in node ''common.Invokezip'', around line and column ''1.1'', then redeploy the message flow.
2013-10-16 11:35:02.847898 7552 RecoverableException BIP2943E: The Java Method ''zip.decompressor.zipdecompressor.unzipDirWithPassword'' could not be found as its containing class could not be found in the broker classpath
The specified Java Method ''zip.decompressor.zipdecompressor.unzipDirWithPassword'' belongs to a class that could not be found in the broker classpath. Ensure that the fully qualified name of the method is correct and that its containing class or jar file is in the broker classpath.
Examine and correct the SQL program.
2013-10-16 11:35:03.848376 7552 Error BIP2648E: Message backed out to a queue; node 'unzip.MQ Input'.
Node 'unzip.MQ Input' has received a message which has previously been backed out one or more times because of a processing error in the main path of the message flow. The failure terminal is not attached, so the message broker is putting the message directly to the requeue or dead letter backout queue associated with this node. The MQMD 'backoutCount' of the message now equals the 'backoutThreshold' defined for the WebSphere MQ input queue.
Examine previous messages and the message flow to determine why the message is being backed out. Correct this situation if possible. Perform any local error recovery processing required.
2013-10-16 11:35:03.848721 7552 UserTrace BIP2638I: The MQ output node 'unzip.MQ Input' attempted to write a message to queue ''SYSTEM.DEAD.LETTER.QUEUE'' connected to queue manager ''MB7QMGR''. The MQCC was '0' and the MQRC was '0'.
2013-10-16 11:35:03.848736 7552 UserTrace BIP2615I: The WebSphere MQ input node 'unzip.MQ Input' has backed out the message to the backout requeue or the dead letter queue.
Message backout processing has been invoked, and the message has either been backed out by being written to the backout requeue or dead letter queue, as determined by the WebSphere MQ queue manager and queue configuration.
No user action required. |
|
|
Back to top |
|
 |
vishnurajnr |
Posted: Tue Oct 15, 2013 11:01 pm Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Have you exported the JAR files from your workspace and placed it on the shared-classes folder and restart/reload broker?
(Shared classes folder path on Win7 is '%ALLUSERSPROFILE%\Application Data\IBM\MQSI\shared-classes').
The trace clearly shows broker can not found the function's class.
For testing purpose, you can call the function 'zip.decompressor.zipdecompressor.unzipDirWithPassword' from another Java function which use the JAR file reference (Not project reference or import) to see the JAR is properly packaged and is accessible. |
|
Back to top |
|
 |
sunny7413 |
Posted: Wed Oct 16, 2013 5:40 am Post subject: |
|
|
Apprentice
Joined: 02 Oct 2013 Posts: 29
|
Thanks for the help the mistake what i made is that external jars used for referencing in this project are not kept in classpath.Now the issue is resolved |
|
Back to top |
|
 |
|