小编Tec*_*raT的帖子

无法向weblogic队列发送消息

我试图将一个字符串消息发送到weblogic服务器中创建的JMS队列.我使用Eclipse ide,当我运行我的Web应用程序时,我得到以下错误,并且tomcat服务器被关闭.错误是

javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: failed to unmarshal class weblogic.security.acl.internal.AuthenticatedUser; nested exception is: 
    java.io.StreamCorruptedException: invalid type code: 31]
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74)
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:32)
    at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
    at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:673)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:466)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:373)
    at weblogic.jndi.Environment.getContext(Environment.java:307)
    at weblogic.jndi.Environment.getContext(Environment.java:277)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at com.infotech.jms.JMSBEAQueueSend.sendMessage(JMSBEAQueueSend.java:48)
    at com.infotech.struts.actions.AppAction.execute(AppAction.java:75)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) …
Run Code Online (Sandbox Code Playgroud)

java weblogic jms

8
推荐指数
1
解决办法
1万
查看次数

在饼图上显示数字

我开发了一个Android应用程序来显示饼图.我用过这个achartengine库来做这个.使用下面的代码,我得到饼图输出,其中3个部分标记为categorySeries中提到的.我想在饼图上显示百分比值.我怎样才能做到这一点?

public static final GraphicalView getPieChartView(Context context,
             CategorySeries dataset, DefaultRenderer renderer) {
         checkParameters(dataset, renderer);
         PieChart chart = new PieChart(dataset, renderer);

         return new GraphicalView(context, chart);
     }

     private static void checkParameters(CategorySeries dataset,
             DefaultRenderer renderer) {
         if (dataset == null
             || renderer == null
             || dataset.getItemCount() != renderer
                .getSeriesRendererCount()) {
             throw new IllegalArgumentException(
                     "Dataset and renderer should be not null and the dataset number of items should be equal to the number of series renderers");
         }
     }     
Run Code Online (Sandbox Code Playgroud)

这是我的onCreate方法

 Bundle bundle = …
Run Code Online (Sandbox Code Playgroud)

java charts android

5
推荐指数
1
解决办法
1906
查看次数

将时间戳转换为日期

我从android中的sms消息中获取日期作为时间戳,以秒为单位或从epoch开始.我需要使用java将其显示为标准日期和时间.

int date      = (cursor.getColumnIndex(SmsReceiver.DATE));
Run Code Online (Sandbox Code Playgroud)

这会返回一些数字,如1308114404722.

使用此编号并显示为当前日期的过程是什么

java datetime android

1
推荐指数
1
解决办法
2万
查看次数

ios子视图在模拟器中显示为倒置

我在uiview子类中创建了一个活动指示器和一个标签,并在许多不同的tab中调用它.除了Graph Hosting视图(CPTGraphHostinView)之外,它在我调用它的大多数地方都能正常工作.在这个特定的视图中,subView看起来是颠倒的.标签位于微调器上方.我尝试使用imageview而不是标签,并使用相同的倒置图像.

这是我的initWithframe方法

- (id)initWithFrame:(CGRect)frame {

    self = [super initWithFrame:frame];
    if (self) {
       // Initialization code.

        NSLog(@"AI: init with frame");

    spinnerView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    spinnerView.center = self.center;       
    [self addSubview:spinnerView];

    UILabel* loadingMsg = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 90.0f, 30.0f)];
    loadingMsg.center =  CGPointMake(spinnerView.center.x , spinnerView.center.y + spinnerView.bounds.size.height/2 +10);
    loadingMsg.textAlignment = UITextAlignmentCenter;
    loadingMsg.backgroundColor = [UIColor clearColor];
    loadingMsg.text = @"loading";
    [self addSubview:loadingMsg];


}
    return self;
}
Run Code Online (Sandbox Code Playgroud)

这里是对activityIndi​​cator的调用,在视图中加载了

ob_activityobject = [[ActivityIndicator alloc] initWithFrame:self.view.bounds];

    [ob_activityobject showInView:self.view];
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

subview core-plot ios

0
推荐指数
1
解决办法
1382
查看次数

标签 统计

java ×3

android ×2

charts ×1

core-plot ×1

datetime ×1

ios ×1

jms ×1

subview ×1

weblogic ×1