ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » java class not found

Post new topic  Reply to topic
 java class not found « View previous topic :: View next topic » 
Author Message
sunny7413
PostPosted: Sun Oct 13, 2013 2:56 am    Post subject: java class not found Reply with quote

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
View user's profile Send private message
vishnurajnr
PostPosted: Sun Oct 13, 2013 7:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
lancelotlinc
PostPosted: Mon Oct 14, 2013 3:08 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Your function signatures do not match.

Code:
final

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
sunny7413
PostPosted: Tue Oct 15, 2013 3:51 am    Post subject: Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Tue Oct 15, 2013 4:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
sunny7413
PostPosted: Tue Oct 15, 2013 10:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
vishnurajnr
PostPosted: Tue Oct 15, 2013 11:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sunny7413
PostPosted: Wed Oct 16, 2013 5:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » java class not found
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.