Menu

#102 Java API has been reported to have some issues

v2.0
closed-fixed
general (93)
7
2007-01-15
2006-10-20
No

Discussion

  • Rakesh Kalra

    Rakesh Kalra - 2006-11-05
    • priority: 5 --> 7
    • milestone: 651809 --> v2.0
     
  • Rakesh Kalra

    Rakesh Kalra - 2006-11-05
    • assigned_to: rkalra --> parikhkc
     
  • Kashyap Parikh

    Kashyap Parikh - 2006-11-10
     
  • Kashyap Parikh

    Kashyap Parikh - 2006-11-10

    Logged In: YES
    user_id=1621147

    ServiceContextImpl was asserting on null app and mbean name,
    I removed that assert as both the fields are optional now.
    Moved T_APPLICATION_DOWNTIME/T_APPLICATION_DOWNTIME_HISTORY
    table creation logic in DBUtils from CoreUtils.

    Patch details attached.

     
  • Kashyap Parikh

    Kashyap Parikh - 2006-11-10
    • status: open --> pending-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    I have had the same issue. I would really appreciate any help in this regard.

    Hi!

    I was not sure where to post this issue. I also saw that someone had posted this issue without any answers.

    I am not sure if there is a fox to this. I would really appreciate if someone can get back to me on this.

    I am trying to use jmanage api to add a new application but receiving “Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException” exception

    Here is my code:

    import org.jmanage.core.services.ConfigurationService;
    import org.jmanage.core.services.ServiceFactory;
    import org.jmanage.core.data.ApplicationConfigData;
    import org.jmanage.core.services.RemoteServiceContextFactory;
    import org.jmanage.core.services.*;

    public class addApp{

    public static void main(String[] args){
    RemoteServiceContextFactory.setJManageURL("http://localhost:9090");
    ServiceContext context = RemoteServiceContextFactory.getServiceContext(
    "admin", "123456",
    null, null);
    ConfigurationService configService = ServiceFactory.getConfigurationService();
    /* Build ApplicationConfigData object */
    ApplicationConfigData configData = new ApplicationConfigData();
    configData.setHost("intadui-001.ysm.oc2.yahoo.com");
    configData.setPort(new Integer(1099));
    configData.setName("testApp1");
    configData.setType("jboss");
    /* add application */
    configData = configService.addApplication(context, configData);

    System.out.println("ApplicationId:" + configData.getApplicationId());
    };
    }

    Exception:
    Nov 20, 2006 7:02:45 PM org.jmanage.core.util.CoreUtils <clinit>
    INFO: jManage.root=/home/shekart/jmanage
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.jmanage.core.remote.server.ServiceCallHandler.execute(ServiceCallHandler.java:74)
    at org.jmanage.webui.servlets.ServiceInvokerServlet.processRequest(ServiceInvokerServlet.java:76)
    at org.jmanage.webui.servlets.ServiceInvokerServlet.doPost(ServiceInvokerServlet.java:56)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
    at org.mortbay.http.HttpServer.service(HttpServer.java:879)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jmanage.core.remote.server.ServiceCallHandler.executeInternal(ServiceCallHandler.java:99)
    at org.jmanage.core.remote.server.ServiceCallHandler.execute(ServiceCallHandler.java:56)
    ... 17 more
    Caused by: java.lang.NullPointerException
    at org.jmanage.core.auth.User.hasRole(User.java:154)
    at org.jmanage.core.auth.ACL.isAuthorized(ACL.java:98)
    at org.jmanage.core.services.AccessController.canAccess(AccessController.java:60)
    at org.jmanage.core.services.AccessController.checkAccess(AccessController.java:76)
    at org.jmanage.core.services.AccessController.checkAccess(AccessController.java:85)
    at org.jmanage.core.services.ConfigurationServiceImpl.addApplication(ConfigurationServiceImpl.java:46)
    ... 23 more

     
  • Rakesh Kalra

    Rakesh Kalra - 2006-11-21

    Logged In: YES
    user_id=1058292
    Originator: YES

    Are you using 2.0 beta?

     
  • Rakesh Kalra

    Rakesh Kalra - 2006-11-21
    • status: pending-fixed --> open-fixed
     
  • Shashank Bellary

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.