Я работаю над J2EE (Message Driven Beans) и Weblogic 10.3, и я совершенно новичок в обоих из них.Я пытаюсь прочитать файл свойств в файле Message Driven Bean.Когда я вызываю функцию, которая читает этот файл свойств, я получаю следующую ошибку:
.
.
.
"[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=6 tid=0x2c686c00 nid=0x708 in Object.wait() [0x2ef1f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0d8df8d8> (a weblogic.work.ExecuteThread)
at java.lang.Object.wait(Object.java:485)
at weblogic.work.ExecuteThread.waitForRequest(ExecuteThread.java:162)
- locked <0x0d8df8d8> (a weblogic.work.ExecuteThread)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:183)
"Timer-1" daemon prio=6 tid=0x2c60e400 nid=0x9b0 in Object.wait() [0x2eecf000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0d8dfae8> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:509)
- locked <0x0d8dfae8> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
"Timer-0" daemon prio=6 tid=0x2be8b800 nid=0x688 in Object.wait() [0x2ce6f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0d5303d8> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <0x0d5303d8> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
"Low Memory Detector" daemon prio=6 tid=0x009a7000 nid=0x1538 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=10 tid=0x009a0c00 nid=0x1e0 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=10 tid=0x0099f400 nid=0xc30 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x0099e000 nid=0x5fc runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=0x0098d800 nid=0xdc in Object.wait() [0x2adcf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0d5305f0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x0d5305f0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x00988c00 nid=0x1334 in Object.wait() [0x2ad7f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0d5300d8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x0d5300d8> (a java.lang.ref.Reference$Lock)
"main" prio=6 tid=0x002bb400 nid=0x11a8 in Object.wait() [0x0090f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0d5306a0> (a weblogic.t3.srvr.T3Srvr)
at java.lang.Object.wait(Object.java:485)
at weblogic.t3.srvr.T3Srvr.waitForDeath(T3Srvr.java:981)
- locked <0x0d5306a0> (a weblogic.t3.srvr.T3Srvr)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:490)
at weblogic.Server.main(Server.java:71)
"VM Thread" prio=10 tid=0x00986400 nid=0xcec runnable
"VM Periodic Task Thread" prio=10 tid=0x009a9800 nid=0xc14 waiting on condition
>
Вот код Java:
@MessageDriven(
messageListenerInterface = javax.jms.MessageListener.class,
name = "MdbA",
mappedName = "qA",
activationConfig = {
@ActivationConfigProperty(
propertyName = "connectionFactoryJndiName",
propertyValue = "connectionFactoryV"),
@ActivationConfigProperty(
propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(
propertyName = "destinationJndiName",
propertyValue = "qA"
)})
public class MdbA implements MessageListener {
private static int fileCount = 0;
private String[] aryReadingType;
private long sleepMs;
private String persistenceDirectory;
private String tomcatServerInstance;
private String tomcatStatusScript;
private String readingsProcessorInstance;
private String logServiceURL;
private static Logger log = Logger.getLogger(MdbALIreadings.class.getName()); // log4j logger
/**
* Default constructor.
*/
public MdbALIreadings()
{
System.out.println("In onMessage of MdbALIreadings as of " + new Date());
setProperties(); // fails if I call this function here
}
/**
* @see MessageListener#onMessage(Message)
*/
public void onMessage(Message message)
{
.
.
.
setProperties(); // fails if I call this function here
}
private void setProperties() {
.
.
.
try {
date = new Date();
fis = new FileInputStream("ReadingsProcessor.properties");
properties.load(fis);
}
Если я не вызываю setProperties()
Функция в любом месте в этом файле, он не выходит из строя.Любые мысли о том, почему я не могу прочитать файл в компоненте, управляемом сообщениями?Что вызывает сбой всего сервера?