ACE: Can't allocate resource class due to resource in use

When I try to enter the member [resource_class] command under the context config mode I get...
Error: resources in use
Any idea how I get around this?
Note: I am trying to do this so that I can configure stickiness in my context and I get
Error: sticky resource not available

is this any help?
ace-1/Admin# sh resource usage
Allocation
Resource Current Peak Min Max Denied
Context: Admin
conc-connections 10 11 0 8000000 0
mgmt-connections 4 14 0 5000 0
proxy-connections 0 0 0 1048574 0
xlates 0 0 0 1048574 0
bandwidth 502 93472 0 500000000 410
connection rate 0 40 0 1000000 0
ssl-connections rate 0 0 0 1000 0
mgmt-traffic rate 156 26863 0 125000000 0
mac-miss rate 0 8 0 2000 0
inspect-conn rate 0 0 0 6000 0
acl-memory 6360 6520 0 78610432 0
regexp 0 0 0 1048576 0
syslog buffer 3562496 3562496 0 4194304 0
syslog rate 0 11 0 3000 0
Context: C1
conc-connections 2 8 0 8000000 0
mgmt-connections 22 56 0 5000 0
proxy-connections 0 8 0 1048574 0
xlates 0 0 0 1048574 0
bandwidth 276 387123 0 500000000 0
connection rate 2 30 0 1000000 0
ssl-connections rate 0 0 0 1000 0
mgmt-traffic rate 92 13673 0 125000000 0
mac-miss rate 0 2 0 2000 0
inspect-conn rate 0 0 0 6000 0
acl-memory 3664 20288 0 78610432 0
regexp 0 0 0 1048576 0
syslog buffer 631808 631808 0 4194304 0
syslog rate 2 24 0 3000 0
Context: C2
conc-connections 0 0 0 8000000 0
mgmt-connections 0 0 0 5000 0
proxy-connections 0 0 0 1048574 0
xlates 0 0 0 1048574 0
bandwidth 0 514 0 500000000 0
connection rate 0 2 0 1000000 0
ssl-connections rate 0 0 0 1000 0
mgmt-traffic rate 0 390 0 125000000 0
mac-miss rate 0 0 0 2000 0
inspect-conn rate 0 0 0 6000 0
acl-memory 0 5120 0 78610432 0
regexp 0 0 0 1048576 0
syslog buffer 0 0 0 4194304 0
syslog rate 0 0 0 3000 0

Similar Messages

  • Can we call super class method from Overwrite method using SUPER keyword

    Hi All,
    For one of our requirement , I need to overwrite "Process Event" method of a feeder class  ,where process event is present is protected method. so when we are making a call , then its saying
    "Method  "process event"  is unknown or Protected  or PRIVATE ".
        But we are just copied the source code in the "Process Event" method to the Overwrite method.
    Can anyone provide me the clarification , why system behaving like this.
    Thanks
    Channa

    Hi,
    I think you can not.
    Because, only public attributes can be inherited and they will remain public in the subclass.
    for further detail check,
    http://help.sap.com/saphelp_nw70/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm
    regards,
    Anirban

  • Resource Class issue

    Hi,
    I am using ACE4710 with all the servers in default admin context. Now i need to enable sticky persistence and for this it asks me for resource allocation. I've couple of questions regarding this:
    1- can i allocat sticky resources to default resource class?
    2- If i've to create a new resource class, then how can i associate this class to default Admin context? and will Admin context be member of both default resource calss and the new resource class the same time?
    3-Does it really require a restart of ACE once we change default resource class?
    besides this i'd really appreciate any other recommendations/suggestions from you guys.
    Regards,

    You need something like the following
    resource-class mycompany
    limit-resource all minimum 0.00 maximum unlimited
    limit-resource sticky minimum 2.00 maximum equal-to-min
    context Admin
    allocate-interface vlan x
    allocate-interface vlan x
    member mycompany
    1. No ,you cannot edit default class. You will have to create a seperate resource class
    2.Define it under "context Admin". No Admin context will just be member of the defined resource class
    3.No
    HTH
    Syed Iftekhar Ahmed

  • How can i get all java class names from a package using reflection?

    hi,
    can i get all classes name from a package using reflection or any other way?
    If possible plz give the code with example.

    You can't, because the package doesn't have to be on the local machine. It could be ANYWHERE.
    For example, via a URLClassLoader (ie from the internet) I could load a class called:
    com.paperstack.NobodyExpectsTheSpanishInquisitionI haven't written it yet. But I might tomorrow. How are you going to determine if that class is in the package?
    This subject comes up a lot. If you want to do something a bit like what you're asking for (but not quite) there are plenty of threads on the subject. Use google and/or the forum search facility to find them.
    But the answer to your question, as you asked it, is "you can't do that".

  • Can not find Main Class - Can't Run Application

    I have at this for a while and it is drivng me crazy... I have an application that I want execute in a bat file. I have checked the runtime environment by executing java and javaw, both which give option on error messages. I have set the classpath to point too the class subdirectory. Here it is.., Every time I execute the bath file or execute the javaw command, I get the "Can not find main class" message.
    I am using XP ...
    Help please...
    Thanks for all your help.

    when you set the classpath I presume you mean that your running java or javaw as:
    javaw.exe -cp %classpath%;.;c:\library\myfiles com.mycomp.myapp.MainClassIf your using a jar then you must specify the jar in the class path.
    Don't presume it will find the jar. Other than that, you will have
    to provide more details.

  • How can VDC allocate cpu and memory resources?

    Hi,
       I know VDC on nexus 7k can allocate interface ,fib acl tcam resources,
      but how can vdc allocate memory and cpu resouces an sup2/sup2e and i/o module!
       for example.
       vdc  1 get at least 20% cpu , and he can reache beyond 20% cpu  if cpu ultilization is low. but if system is busy , he just can get 20
    % cpu resouces. I know cpu resources is difficult to config like this.
       or memory , can one vdc limit to 20% memory.
       thank you!
    tom

    Hi,
    in this documents do you have a way to make something that you want.
    http://d2zmdbbm9feqrf.cloudfront.net/2012/usa/pdf/BRKDCT-2121.pdf
    Thanks.

  • Resource class best practice

    I have created a reserved context with 20% min and max = to min in every resource
    including sticky.
    I also have the default resource class
    I have also created another resource with 20% sticky but left everything else at default 0-100%
    our network traffic doesnt carry a heavy load on the new loadbalancer..but what is a good rule of thumb?
    most of the traffic is http and at this point we will create about 2 contexts after the Admin

    Hello!
    This is a very pertinent question, however as many things in life there is no one size fits all here.
    We basically recommend, as best practice, to allocate for each specific context only the estimated needed resources. These values should always come from a previous study on the network patterns/load.
    To accomodate for growth and scalability it is strongly advised to initially keep as many resources reserved as possible and allocate the unused resources as needed. To accomplish this goal, you should created a reserved resource class, as you did already, with a guarantee of 20 to 40 percent of all ACE resources and configure a virtual context solely with the purpose of ensuring that these resources are reserved.
    As you might already know ACE protects resources in use, this means that when decreasing a context's resources, the resources must be unused before then can be reused by other context. Although it is possible to decrease the resource allocations in real time, it typically requires additional overhead to clear any used resources before reducing them.
    Based on the traffic patterns, number of connections, throughput, concurrent SSL connections , etc, for each of the sites you will be deploying you will have a better idea on what might be the estimated needed resources and then assign them to each of the contexts. Thus this is something that greatly depends on customer's network environment.
    Hope this helps to clarify your doubts.

  • Can't allocate 2GB in JNI?

    Hi,
    I've got an application that uses JNI to allocate lots of memory. I was surprised to learn that my process maxes out at about 1900 MB (I would expect to get arbitrarily close to 2048 MB on a 32-bit windows platform).
    I don't think it's fragmentation - I've tried allocating very small amounts of memory and still fail.
    I run java with -Xmx2M -Xms2M so that the java heap is small.
    If I investigate the process heap (for example with ProcessViewer) I see lots of free blocks, but the OS won't let me allocate them for some reason.
    I guess this is probably something to do with the way the windows allocator works - can anybody explain this to me?
    It's very easy to duplicate this behaviour:
    Thanks!
    public class test extends JFrame
    public test() {
    System.out.println("In java constructor.");
    System.loadLibrary("jtest");
    testFunc();
    native public void testFunc();
    public static void main(String[] args)
    test t = new test();
    System.exit(0);
    // JNI function which allocates memory until it fails, then reports the total process memory usage.
    #include <iostream>
    #include <jni.h>
    #include <jawt_md.h>
    #include <new>
    #include <exception>
    #include "windows.h"
    #include "psapi.h"
    #include "test.h"
    using namespace std;
    // Simple linked list.
    struct BigNum {
    float d[4095];
    BigNum *next;
    /* Dump the total memory used by the process. */
    void dumpProcessMemory() {
    DWORD processID = GetCurrentProcessId();
    HANDLE hProcess;
    PROCESS_MEMORY_COUNTERS pmc;
    hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
    PROCESS_VM_READ,
    FALSE, processID );
    if (NULL == hProcess)
    return;
    if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) )
    cout << "Total memory use is " << pmc.PagefileUsage << " bytes." << endl;
    JNIEXPORT void JNICALL Java_test_testFunc(JNIEnv *, jobject) {
    BigNum head;
    BigNum *next = &head;
    int count = 0;
    try {
    while(true) {
    BigNum *alloc = new BigNum;
    // windows allocator returns null when it can't allocate.
    if (!alloc) throw exception("Out of memory!");
    next->next = alloc;
    next = next->next;
    ++count;
    } catch (exception&) {
    cout << "Ran out of memory: q size is " << count*sizeof(BigNum)/1024/1024 << " MB." << endl;
    dumpProcessMemory();
    next = head.next;
    while (next) {
    BigNum *nextnext = next->next;
    delete next;
    next = nextnext;

    This is a 32 bit Windows problem. Basically no matter how much memory you have the default is to allocate 2GB for Windows and 2GB for applications. As there are likely at least some applications running on your machine you will never be able to get the full 2GB. And if you have less than 4GB then
    It is possible to pass a flag to the boot loader and have only 1GB partitioned for the O/S. I found a little information about that at http://www.amiravis.com/3GBswitch-instruction311.html

  • Can't allocate region

    Hello, I'm new to java and trying to figure out what this error means:
    java(25570,0xb1037000) malloc: *** mmap(size=1073745920) failed (error code=12)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    This comes from a little game (breakout) that I'm making, the game seems to run fine (it consumes a lot of possessor and memory) but after a few minutes it crashes and I get the error.
    From what I've read it seems like the program can't allocate more memory? any clue?
    I'm using Eclipse on a macbook.

    Yeah the game is Breakout, so it most likely to be an error somewhere in the code, but can't find it.
    Here is the code, it has some libraries dependencies:
    * File: Breakout.java
    * Name: Vic
    import acm.graphics.*;
    import acm.program.*;
    import acm.util.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Breakout extends GraphicsProgram {     
    /** Width and height of application window in pixels */
         public static final int APPLICATION_WIDTH = 1000;
         public static final int APPLICATION_HEIGHT = 620;
    /** Dimensions of game board (usually the same) */
         private static final int WIDTH = 400;
         private static final int HEIGHT = 600;
         private static final int FRAME_TOP = (APPLICATION_HEIGHT - HEIGHT) / 2;
         private static final int FRAME_BOTTOM = FRAME_TOP + HEIGHT;
         private static final int FRAME_LEFT = 10;     //(APPLICATION_WIDTH - WIDTH ) / 2;
         private static final int FRAME_RIGHT = FRAME_LEFT + WIDTH;
    /** Dimensions of the paddle */
         private static final int PADDLE_WIDTH = 80;
         private static final int HALF_PADDLE_WIDTH = PADDLE_WIDTH / 2;
         private static final int PADDLE_HEIGHT = PADDLE_WIDTH / 6;
    /** Offset of the paddle up from the bottom */
         private static final int PADDLE_Y_OFFSET = 40;
         private static final int PADDLE_Y = FRAME_TOP + HEIGHT - PADDLE_Y_OFFSET;
    /** Number of bricks */
         private static final int NBRICKS_PER_ROW = 10;
    /** Number of rows of bricks */
         private static final int NBRICK_ROWS = 10;
    /** Brick Colors */
         private static final Color[] BRICK_COLOR =
         {Color.red, Color.orange, Color.yellow, Color.green, Color.cyan};
    /** Separation between bricks */
         private static final int BRICK_SEP = 3;
    /** Brick constants */
         private static final int BRICK_WIDTH =
           (WIDTH - (NBRICKS_PER_ROW - 1) * BRICK_SEP) / NBRICKS_PER_ROW;
         private static final int BRICK_HEIGHT = 9;
    /** Ball constants */
         private static final int BALL_DIAMETER = 18; //multiples of 2
         private static final int BALL_RADIUS = BALL_DIAMETER / 2;
         private static final Color BALL_COLOR = Color.BLACK;
         private static final double MAX_BALL_DELAY = 6;
         private static double ballTop = 0;     
         private static double ballBottom = 0;
         private static double ballLeft = 0;
         private static double ballRight = 0;
    /** Offset of the top brick row from the top */
         private static final int BRICK_Y_OFFSET = FRAME_TOP + ((BRICK_HEIGHT + BRICK_SEP) * 6);
    /** Number of turns */
         private static final int NBALLS = 5;
         private static int ballsLeft = NBALLS;
    /** Instance variables */
         private static final double minVel = 1;     
         private static final double maxVel = 2.0;     
         private static double xVel = minVel;     // ball x velocity
         private static double yVel = minVel;     // ball y velocity
         private static double xVelBefore = xVel;
         private static double yVelBefore = yVel;
         private static int bricksLeft;
         private static int paddleContacts;
         private static double ballDelay;
         private static String currentCollider;
         private static boolean JustBoncedInPaddle;
    /** instance objects object */     
         private static GRect brick;
         private static GRect paddle;
         private static GOval ball;
         private static GObject collider;
         private static GLabel messageLabel;
    //////////////debug only
         private static GLabel mousePosition;
         private static GLabel objectLabel;
         private static GLabel ballsLabel;
         private static GLabel ballVelLabel;
         private static GLabel bricksLeftLabel;
         AudioClip audioClip = MediaTools.loadAudioClip("drip.au");
         private RandomGenerator rgen = RandomGenerator.getInstance();
    /* Method: run() */
    /** Runs the Breakout program. */
         public void run() {
              while(true){
                   Initialize();
                   play();
                   if (ballsLeft != 0) displayMessage("YOU WIN!");
                   else displayMessage("GAME OVER");
                   waitForClick();
         private void Initialize(){
              ballsLeft = NBALLS;
              paddleContacts = 0;
              ballDelay = MAX_BALL_DELAY;
              currentCollider = null;
              JustBoncedInPaddle = false;
              setSize(APPLICATION_WIDTH, APPLICATION_HEIGHT);     //resize window
              removeAll();
              addFrame();
              addBricks();
              addPaddle();
              addDebugLabels();     //debuging only
              //computeBallSections();
              addMouseListeners();
         private void play(){
              double colliderWidth;
              while (ballsLeft > 0 && bricksLeft > 0){
                   displayMessage("Click to Play");
                   waitForClick();
                   remove(messageLabel);
                   getBallAngleAndDir();
                   addBall();
                   --ballsLeft;
                   updateBallsLabel();     //debug only
                   while (bricksLeft > 0){
                        updateBallVelLabel(); //debug only
                        moveBall();
                        if (checkForWallCollision() == false){
                             break;     //ball hit bottom so put a new ball
                        //check for collition on 8 sections of ball
                        for (int i = 1; i <= 8; i++){
                             collider = getCollidingObject(i);
                             if (collider == null){
                                  currentCollider = null;
                                  updateColliderLabel();     //     debug only
                             else {
                                  colliderWidth = collider.getWidth();
                                  if (colliderWidth >= WIDTH){
                                       currentCollider = "wall";
                                       updateColliderLabel();     //     debug only
                                  else {
                                       // if collider is brick...
                                       if (colliderWidth < PADDLE_WIDTH /*&& colliderWidth > BALL_DIAMETER*/){
                                            currentCollider = "brick";
                                            remove(collider);
                                            --bricksLeft;
                                            updateBricksLeftLabel();
                                            bounceBall(i);
                                            audioClip.play();
                                            updateColliderLabel();     //     debug only
                                            //waitForClick();          //debug only
                                       //if collider is paddle...
                                       else if (JustBoncedInPaddle == false){
                                            currentCollider = "paddle";
                                            bounceBall(i);
                                            audioClip.play();
                                            ++paddleContacts;
                                            if (paddleContacts % 10 == 0) ballDelay = ballDelay*0.9; //increase speed 10%
                                            updateColliderLabel();     //debug only
                                            //waitForClick();          //debug only
                        updateColliderLabel();
                        objectLabel.setLabel("currentCollider = " +currentCollider); //debug only
                        xVelBefore = xVel;
                        yVelBefore = yVel;
                        //pauseGame();
                        pause(ballDelay);
              return;
         private void addFrame(){
              GRoundRect frame1 = new GRoundRect (FRAME_LEFT, FRAME_TOP, WIDTH, HEIGHT);
              add(frame1);
         private void addBricks(){
              int brickX = (FRAME_LEFT + (BRICK_SEP / 2)); //get Initial X position
              int brickY = (BRICK_Y_OFFSET); //get initial Y position
              int initialX = brickX;
              Color brickColor = BRICK_COLOR[0];
              bricksLeft = NBRICK_ROWS * NBRICKS_PER_ROW;
              for (int j = 1; j <= NBRICK_ROWS ; j++){          
                   //add row of bricks
                   for (int i = 0; i < NBRICKS_PER_ROW; i++){
                        brick = new GRect(brickX, brickY, BRICK_WIDTH, BRICK_HEIGHT);
                        brick.setColor(brickColor);
                        brick.setFilled(true);
                        add(brick);
                        brickX += BRICK_WIDTH + BRICK_SEP;
                   //change brick color every two rows
                   if (j % 2 == 0 && j < NBRICK_ROWS ){     
                        brickColor = BRICK_COLOR[j / 2];
                   brickY += BRICK_HEIGHT + BRICK_SEP;
                   brickX = initialX;
         private void addPaddle(){
              paddle = new GRoundRect( FRAME_LEFT + (WIDTH / 2) - (PADDLE_WIDTH / 2), PADDLE_Y, PADDLE_WIDTH, PADDLE_HEIGHT);
              paddle.setColor(Color.gray);
              paddle.setFilled(true);
              add(paddle);
         private void addBall(){
              ball = new
              GOval(FRAME_LEFT + (WIDTH / 2) - BALL_RADIUS, FRAME_TOP + (HEIGHT / 2) - BALL_RADIUS, BALL_DIAMETER, BALL_DIAMETER);
              //GOval(200, 30, BALL_DIAMETER, BALL_DIAMETER);
              ball.setColor(BALL_COLOR);
              ball.setFilled(true);
              add(ball);
         private void moveBall() {
              ball.move(xVel,yVel);
         private boolean checkForWallCollision(){
              //!!!!should check middle of ball instead of corner!!!!!
              ballTop = ball.getY() - 1;     
              ballBottom = ballTop + BALL_DIAMETER + 2;
              ballLeft = ball.getX() - 1;
              ballRight = ballLeft + BALL_DIAMETER + 2;
              if (ballBottom > FRAME_BOTTOM){
                   //bounceBall(1);
                   //audioClip.play();
                   remove(ball);
                   return false;
              else if (ballTop < FRAME_TOP){
                   bounceBall(1);
                   audioClip.play();
                   //ballDelayOn = false; //debug only
              if (ballLeft < FRAME_LEFT){
                   bounceBall(3);
                   audioClip.play();
              else if (ballRight > FRAME_RIGHT){
                   bounceBall(3);
                   audioClip.play();
              return true;
         private GObject getCollidingObject(int ballSection){
              switch(ballSection){
                   //ball North
                   case 1: return getElementAt(ballLeft + BALL_RADIUS + 4, ballTop);
                   //ball South
                   case 2: return getElementAt(ballLeft + BALL_RADIUS + 4, ballBottom);
                   //ball East
                   case 3: return getElementAt(ballRight, ballTop + BALL_RADIUS + 4);
                   //ball West
                   case 4:     return getElementAt(ballLeft, ballTop + BALL_RADIUS + 4);
                   //ball North-East
                   case 5:     return getElementAt(ballRight - (BALL_RADIUS / 3), ballTop + (BALL_RADIUS / 3));
                   //ball South-East
                   case 6:     return getElementAt(ballRight - (BALL_RADIUS / 3), ballBottom - (BALL_RADIUS / 3));
                   //ball North-West
                   case 7:     return getElementAt(ballLeft + (BALL_RADIUS / 3), ballTop + (BALL_RADIUS / 3));
                   //ball South-West
                   case 8:     return getElementAt(ballLeft + (BALL_RADIUS / 3), ballBottom - (BALL_RADIUS / 3));     
              return null;
         private void getBallAngleAndDir(){
              xVel = rgen.nextDouble(minVel, maxVel);
              if (rgen.nextBoolean(0.5)){
                   xVel = -xVel;
         //bounce ball on X, Y, or both direction
         private void bounceBall(int ballSection){
              if (ballSection == 1 || ballSection == 2){
                   if (yVel == yVelBefore) yVel = -yVel;
              else if (ballSection == 3 || ballSection == 4){
                   if (xVel == xVelBefore) xVel = -xVel;
              else {
                   if (yVel == yVelBefore) yVel = -yVel;
                   if (xVel == xVelBefore) xVel = -xVel;
              if (currentCollider == "paddle") JustBoncedInPaddle = true;
              else JustBoncedInPaddle = false;
         private void displayMessage(String message){
              messageLabel = new GLabel (message);
              //messageLabel.setFont(new Font("Verdana", Font.BOLD, 30));
              messageLabel.setFont(new Font("Verdana",Font.ITALIC , 38));
              messageLabel.setLocation (FRAME_LEFT + (WIDTH / 2) - (messageLabel.getWidth() / 2), FRAME_TOP + (HEIGHT / 2));
              add(messageLabel);
         public void mouseMoved(MouseEvent e) {
              int mouseX = e.getX();
              if ( (mouseX > (FRAME_LEFT + HALF_PADDLE_WIDTH)) && (mouseX < (FRAME_RIGHT - HALF_PADDLE_WIDTH)) && currentCollider != "paddle"){
                   paddle.setLocation(e.getX() - HALF_PADDLE_WIDTH, PADDLE_Y);
              //debug only
              mousePosition.setLabel(+e.getX()+ "," +e.getY());
    //////////////////from here all is for debuging only
         private void addDebugLabels(){
         mousePosition = new GLabel("Empty", WIDTH + 50, 20);
         add(mousePosition);
         objectLabel = new GLabel("Empty", WIDTH + 50, 40);
         add(objectLabel);
         ballsLabel = new GLabel("Remaining Balls: " +ballsLeft, WIDTH + 50, 60);
         add(ballsLabel);
         ballVelLabel = new GLabel("Ball Velocity: " +((xVel*yVel) / 2), WIDTH + 50, 80);
         add(ballVelLabel);
         bricksLeftLabel =  new GLabel("Bricks Left: " +bricksLeft, WIDTH + 50, 100);
         add(bricksLeftLabel);
         private void updateBallsLabel(){
              ballsLabel.setLabel("Remaining Balls: " +ballsLeft);
         private void updateBallVelLabel(){
              ballVelLabel.setLabel("Ball Velocity: " +((xVel*yVel) / 2)+ ", X Vel: " +xVel+ ", Y Vel: " +yVel);
         private void updateBricksLeftLabel(){
              bricksLeftLabel.setLabel("Bricks Left: " +bricksLeft);
         private void updateColliderLabel(){
              objectLabel.setLabel("currentCollider: "+currentCollider+ " ;JustBoncedInPaddle: " +JustBoncedInPaddle);
    }Edited by: avanrotciv on Nov 10, 2008 1:17 AM

  • Can not locate Java class using JNI within C++ DLL

    I am using trying to use JNI to call a Java class from C++. The Java class uses JMS to send messages to a JMS message queue. At first I coded the C++ in a console application that created the JavaVM and used JNI to access the Java class. All worked fine. Then I called the Java class using JNI from threads and ran into the problem of the Java class not able to locate the JMS related classes. This was solved by placing the following line in the constructor of the Java class.
    Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
    Then I moved the JNI code from a console application to a DLL in specific an extension DLL that is called by SQL Server or Oracle server. The DLL will use JNI to call the Java class and send messages to a JMS message queue.
    The problem I am having now when the DLL code is called by SQL Server the call to
    JNI_CreateJavaVM
    appears to work correctly but the call to find the Java class using
    jvmEnv->FindClass(pName)
    fails. It appears the is a class loading problem which occurs due to the fact JNI is called from a DLL. When the VM is created I pass the class path information using the statement
    -Djava.class.path=
    And as I stated before it all works when running from a console application. I am new to JNI and really need help in the form of some sample code that will solve this problem. I believe I need to somehow load the classpath information from the DLL but I can not find examples on how to do this using JNI. I have tried several ways using URLClassLoader and getSystemClassLoader from JNI and either it does not work or it crashes very badly.
    I used the following code to determine what the existing class path is and the string returns empty.
    jcls = jvmEnv->FindClass("java/lang/System");
    jmid = jvmEnv->GetStaticMethodID(jcls, "getProperty", "(Ljava/lang/String;)Ljava/lang/String;");
    jstrClassPath = jvmEnv->NewStringUTF("java.class.path");
    jstr = (jstring)jvmEnv->CallStaticObjectMethod(jcls, jmid, jstrClassPath);
    m_jstr = (jstring)jvmEnv->NewGlobalRef(jstr);
    pstr = jvmEnv->GetStringUTFChars(m_jstr, 0);
    Can anyone please help with example code that will solve this problem. Thanks in advance for any help.
    Charles�

    I have determined the problem occurs when the application/component is compiled using VC 6.0. The test application was compiled using VC 7.1 and works correctly by locating the class path information. If the test application is compiled using VC 6.0 it has the same problem.
    The jvm.dll I am using is version 1.4.2.80. Currently this is not an option to compile all the applications that use JNI using VC 7.1 so can someone please tell me how to solve this problem.

  • How can I allocate memory at runtime?

    Hi,
    I have declared a an array of objects like.
    private SampeObject [] channelAccounts = null;
    How can I allocate the memory at runtime(dynamically) ? I tried with
    channelAccounts = new SObject(); But its giving runtime null pointer exception.
    Can anyone tell me how can I allocate the memory.
    Thanks,
    Chinnionline

    public class ArrayAlloExample
        public void buildArray()
            // Determine how many you want
            int howMany = 12 ;
            // Declare the array to be the size its supposed to be
            SampleObject[] sObjList = new SampleObject[howMany] ;
            // Spin through the array and load it with new objects
            for(int i=0; i<howMany; i++)
                sObjList[i] = new SampleObject() ;
    class SampleObject
        private String stuff ;
        public SampleObject()
            super() ;
            doStuff() ;
        public void doStuff()
            stuff = "Put some really spiffy stuff here" ;
    }This is an example of how to load an array of objects. That said, there are MUCH better ways of dealing with collections of things than with arrays.
    Arrays are handy when you know how many of something you're going to have. If you don't, then I'd reccomend an ArrayList or something similar.
    Hope this helps,
    PS.

  • ACE: Can the ft-vlan port be used for other vlans or not?

    Hi People,
    I am a bit confused reading cisco's documentation. I am now using the ft-vlan in a dedicated port (no other vlans), but I would like to use it as a normal port in order to use it in a context.
    From cisco website:
    "You cannot use this dedicated FT VLAN Ethernet port for normal network traffic; it must be dedicated for redundancy only.
    When you specify an Ethernet port or a port-channel interface as a dedicated FT VLAN, you have the option to either configure the dedicated VLAN as the only VLAN associated with the Ethernet port or port-channel interface, or to allocate it as part of a VLAN trunk link (see "(config-if) switchport trunk allowed vlan"). Note that the ACE automatically includes the FT VLAN in the VLAN trunk link. If you choose to configure VLAN trunking, it is not necessary for you to assign the FT VLAN in the trunk link along with the other VLANs."
    First it says, you cannot use this port for other traffic, and then it says this port can be a trunk port. If the port is trunk, then obviously you pass other vlans too. Right? or not? So can the port that has the ft-vlan be used in a context with other vlans?
    thanks,
    george

    Then simply do not use the 'ft-port' command.
    This command "auto" configure the interface to be switchtrunk with one vlan  allowed.
    If you reconfigure the interface with your own switchport command, all you risk is some kind of collision or a future software version which will deny this kind of configuration.
    Here is what I use to have vlan 500 part of a normal trunk interface.
    But be aware, that if your interface is overloaded, FT traffic could get dropped and therefore you will end up with 2 active units causing major traffic disuption.
    This is why we recommend to run FT on its own interface with no other traffic.
    Generating configuration....
    interface gigabitEthernet 1/1
      switchport access vlan 1000
      shutdown
    interface gigabitEthernet 1/2
      shutdown
    interface gigabitEthernet 1/3
      switchport trunk native vlan 20
      switchport trunk allowed vlan 10-500
      no shutdown
    interface gigabitEthernet 1/4
      shutdown
    ft interface vlan 500
      ip address 192.168.77.2 255.255.255.0
      peer ip address 192.168.77.1 255.255.255.0
      no shutdown
    Gilles.

  • Why is my iPad suddenly not opening the Yahoo home page? I get a message saying Safari can not open the page due to too many redirects. This started yesterday. I shut my iPad down and still no luck.

    Why is my iPad suddenly not opening the Yahoo home page? I get a message saying Safari can not open the page due to too many redirects. This started yesterday, and I have already tried shutting off my iPad.

     

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

  • How can I convert a class file to Exe file

    hai
    How can I convert a class file to Exe file

    Please search the forums before asking questions - this has been answered hundreds (really!) of times.

Maybe you are looking for

  • BAPI or Function Module to update IMZO

    Hi, I'm looking to update table IMZO from a custom program but can't find a FM or BAPI to update the standrd table IMZO. I know this is updated from CJ20N but I can't find the FM or BAPI that does this. Can anyone help?

  • How to create a chart for past 12 months

    Our objective is to show month by month the cumulative growth of new accounts for the past 12 months. I know how to do cumulative. The problem is that for some of the months, we don't have new accounts. My pivot table only has those months that have

  • OCR-B displays the wrong font

    New Mac Mini OS-X 10.9.4 Pages 4.3 and 5.2 OCR-B-10 BT   Bitstream TrueType TT0646Z_.TTF My license for OCR-B (Optical Character Recognition) font fails in Pages 5.2. The top illustration is what it's supposed to look like (Pages 4.3) and the bottom

  • IPad power supply with iPhone

    Hi, is there any document where Apple is saying that we can use the 10W iPad power supply with the iPhone? Tnxs.

  • Unlocked T-Mobile Blackberry 8220 Flip and other Network Providers

    Hello Everyone, Just bought an unlocked t-mobile blackberry pearl 8220 flip phone and wondering if there will be any issues with my service provider in regards to mms, gprs or BIS? Currently have a sim with mms and gprs access for my Sony Ericsson T3