Access error - Weblogic

This is a discussion on Access error - Weblogic ; Hi all, I try to connect to the jms server. The initial lookups all look fine, but things crash when i try to create the connection: Context ctx = new InitialContext(); //Host and context factory in jndi.properties _qCF = (QueueConnectionFactory) ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Access error

  1. Access error

    Hi all,

    I try to connect to the jms server. The initial lookups all look fine, but
    things crash when i try to create the connection:

    Context ctx = new InitialContext(); //Host and context factory in
    jndi.properties
    _qCF = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    _queue = (Queue) ctx.lookup(JMS_QUEUE);
    _connection = qCF.createConnection();

    , code you all have seen before. All goes well until the last statement,
    when the following error is thrown:

    java.lang.IllegalAccessError: tried to access method
    weblogic.kernel.KernelStatus.initialized()V from class
    weblogic.kernel.Kernel

    at weblogic.kernel.Kernel.ensureInitialized(Kernel.ja va:124)

    at
    weblogic.jms.dispatcher.DispatcherManager.initiali zeThreadPool(DispatcherMan
    ager.java:597)

    at
    weblogic.jms.dispatcher.DispatcherManager.(DispatcherManager.java:49)

    at
    weblogic.jms.dispatcher.DispatcherManager.create(D ispatcherManager.java:83)

    at
    weblogic.jms.client.JMSConnection.incrementConnect ionCount(JMSConnection.jav
    a:270)

    at
    weblogic.jms.client.JMSConnectionFactory.createCon nectionInternal(JMSConnect
    ionFactory.java:121)

    at
    weblogic.jms.client.JMSConnectionFactory.createQue ueConnection(JMSConnection
    Factory.java:75)

    at no.walseth.jmstest.JMSBasicObject.lookupOnServer(J MSBasicObject.java:53)

    at no.walseth.jmstest.JMSBasicObject.(JMSBasicObject.java:41)

    at no.walseth.jmstest.TextMessageSender.(TextMessageSender.java:24)

    at no.walseth.jmstest.TextMessageSender.main(TextMess ageSender.java:40)


    Have anyone seen anything like this before?

    Tron W



  2. Re: Access error


    Hi

    Call "createQueueConnection()" not "createConnection()".



    Kats
    BEA

    "Tron" wrote:
    >Hi all,
    >
    >I try to connect to the jms server. The initial lookups all look fine,
    >but
    >things crash when i try to create the connection:
    >
    >Context ctx = new InitialContext(); //Host and context factory in
    >jndi.properties
    >_qCF = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    >_queue = (Queue) ctx.lookup(JMS_QUEUE);
    >_connection = qCF.createConnection();
    >
    >, code you all have seen before. All goes well until the last statement,
    >when the following error is thrown:
    >
    >java.lang.IllegalAccessError: tried to access method
    >weblogic.kernel.KernelStatus.initialized()V from class
    >weblogic.kernel.Kernel
    >
    >at weblogic.kernel.Kernel.ensureInitialized(Kernel.ja va:124)
    >
    >at
    >weblogic.jms.dispatcher.DispatcherManager.initiali zeThreadPool(DispatcherMan
    >ager.java:597)
    >
    >at
    >weblogic.jms.dispatcher.DispatcherManager.(DispatcherManager.java:49)
    >
    >at
    >weblogic.jms.dispatcher.DispatcherManager.create(D ispatcherManager.java:83)
    >
    >at
    >weblogic.jms.client.JMSConnection.incrementConnect ionCount(JMSConnection.jav
    >a:270)
    >
    >at
    >weblogic.jms.client.JMSConnectionFactory.createCon nectionInternal(JMSConnect
    >ionFactory.java:121)
    >
    >at
    >weblogic.jms.client.JMSConnectionFactory.createQue ueConnection(JMSConnection
    >Factory.java:75)
    >
    >at no.walseth.jmstest.JMSBasicObject.lookupOnServer(J MSBasicObject.java:53)
    >
    >at no.walseth.jmstest.JMSBasicObject.(JMSBasicObject.java:41)
    >
    >at no.walseth.jmstest.TextMessageSender.(TextMessageSender.java:24)
    >
    >at no.walseth.jmstest.TextMessageSender.main(TextMess ageSender.java:40)
    >
    >
    >Have anyone seen anything like this before?
    >
    >Tron W
    >
    >



  3. Re: Access error

    Hi

    There is a typo in the code in the message (actually two), but my running
    code uses createQueueConnection(). If not, I woild have a compile error, not
    a runtime.

    Tron

    "Kats" wrote in message
    news:40313a10$1@newsgroups.bea.com...
    >
    > Hi
    >
    > Call "createQueueConnection()" not "createConnection()".
    >
    >
    >
    > Kats
    > BEA
    >
    > "Tron" wrote:
    > >Hi all,
    > >
    > >I try to connect to the jms server. The initial lookups all look fine,
    > >but
    > >things crash when i try to create the connection:
    > >
    > >Context ctx = new InitialContext(); //Host and context factory in
    > >jndi.properties
    > >_qCF = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    > >_queue = (Queue) ctx.lookup(JMS_QUEUE);
    > >_connection = qCF.createConnection();
    > >
    > >, code you all have seen before. All goes well until the last statement,
    > >when the following error is thrown:
    > >
    > >java.lang.IllegalAccessError: tried to access method
    > >weblogic.kernel.KernelStatus.initialized()V from class
    > >weblogic.kernel.Kernel
    > >
    > >at weblogic.kernel.Kernel.ensureInitialized(Kernel.ja va:124)
    > >
    > >at

    >
    >weblogic.jms.dispatcher.DispatcherManager.initiali zeThreadPool(DispatcherMa

    n
    > >ager.java:597)
    > >
    > >at

    >
    >weblogic.jms.dispatcher.DispatcherManager.(DispatcherManager.java:49)
    > >
    > >at

    >
    >weblogic.jms.dispatcher.DispatcherManager.create(D ispatcherManager.java:83)
    > >
    > >at

    >
    >weblogic.jms.client.JMSConnection.incrementConnect ionCount(JMSConnection.ja

    v
    > >a:270)
    > >
    > >at

    >
    >weblogic.jms.client.JMSConnectionFactory.createCon nectionInternal(JMSConnec

    t
    > >ionFactory.java:121)
    > >
    > >at

    >
    >weblogic.jms.client.JMSConnectionFactory.createQue ueConnection(JMSConnectio

    n
    > >Factory.java:75)
    > >
    > >at

    no.walseth.jmstest.JMSBasicObject.lookupOnServer(J MSBasicObject.java:53)
    > >
    > >at no.walseth.jmstest.JMSBasicObject.(JMSBasicObject.java:41)
    > >
    > >at no.walseth.jmstest.TextMessageSender.(TextMessageSender.java:24)
    > >
    > >at no.walseth.jmstest.TextMessageSender.main(TextMess ageSender.java:40)
    > >
    > >
    > >Have anyone seen anything like this before?
    > >
    > >Tron W
    > >
    > >

    >




  4. Re: Access error

    The first thing I suspect is that the application is
    somehow using a "mixed" set of WL jars from different
    versions in the same CLASSPATH, or that you are attempting to
    use the new 8.1 WL thin client jars in the same CLASSPATH as the
    weblogic.jar (not supported). Check your CLASSPATH.


    Tron wrote:

    > Hi
    >
    > There is a typo in the code in the message (actually two), but my running
    > code uses createQueueConnection(). If not, I woild have a compile error, not
    > a runtime.
    >
    > Tron
    >
    > "Kats" wrote in message
    > news:40313a10$1@newsgroups.bea.com...
    >
    >>Hi
    >>
    >>Call "createQueueConnection()" not "createConnection()".
    >>
    >>
    >>
    >>Kats
    >>BEA
    >>
    >>"Tron" wrote:
    >>
    >>>Hi all,
    >>>
    >>>I try to connect to the jms server. The initial lookups all look fine,
    >>>but
    >>>things crash when i try to create the connection:
    >>>
    >>>Context ctx = new InitialContext(); //Host and context factory in
    >>>jndi.properties
    >>>_qCF = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    >>>_queue = (Queue) ctx.lookup(JMS_QUEUE);
    >>>_connection = qCF.createConnection();
    >>>
    >>>, code you all have seen before. All goes well until the last statement,
    >>>when the following error is thrown:
    >>>
    >>>java.lang.IllegalAccessError: tried to access method
    >>>weblogic.kernel.KernelStatus.initialized()V from class
    >>>weblogic.kernel.Kernel
    >>>
    >>>at weblogic.kernel.Kernel.ensureInitialized(Kernel.ja va:124)
    >>>
    >>>at

    >>
    >>weblogic.jms.dispatcher.DispatcherManager.initiali zeThreadPool(DispatcherMa

    >
    > n
    >
    >>>ager.java:597)
    >>>
    >>>at

    >>
    >>weblogic.jms.dispatcher.DispatcherManager.(DispatcherManager.java:49)
    >>
    >>>at

    >>
    >>weblogic.jms.dispatcher.DispatcherManager.create(D ispatcherManager.java:83)
    >>
    >>>at

    >>
    >>weblogic.jms.client.JMSConnection.incrementConnect ionCount(JMSConnection.ja

    >
    > v
    >
    >>>a:270)
    >>>
    >>>at

    >>
    >>weblogic.jms.client.JMSConnectionFactory.createCon nectionInternal(JMSConnec

    >
    > t
    >
    >>>ionFactory.java:121)
    >>>
    >>>at

    >>
    >>weblogic.jms.client.JMSConnectionFactory.createQue ueConnection(JMSConnectio

    >
    > n
    >
    >>>Factory.java:75)
    >>>
    >>>at

    >
    > no.walseth.jmstest.JMSBasicObject.lookupOnServer(J MSBasicObject.java:53)
    >
    >>>at no.walseth.jmstest.JMSBasicObject.(JMSBasicObject.java:41)
    >>>
    >>>at no.walseth.jmstest.TextMessageSender.(TextMessageSender.java:24)
    >>>
    >>>at no.walseth.jmstest.TextMessageSender.main(TextMess ageSender.java:40)
    >>>
    >>>
    >>>Have anyone seen anything like this before?
    >>>
    >>>Tron W
    >>>
    >>>

    >>

    >
    >



  5. Re: Access error

    Hi again

    I'm using the thin client (wlclient.jar) running the remote app. I see no
    exceptions server-side when I run the client (which would surprise me!). I
    will try to run it with weblogic.jar in cp instead of the thin client. If no
    post appear within 8 hours, this was unsuccessful.

    Tron


    "Tom Barnes"

    wrote in message news:403147E6.5060408@newsgroups.bea.com...
    > The first thing I suspect is that the application is
    > somehow using a "mixed" set of WL jars from different
    > versions in the same CLASSPATH, or that you are attempting to
    > use the new 8.1 WL thin client jars in the same CLASSPATH as the
    > weblogic.jar (not supported). Check your CLASSPATH.
    >
    >
    > Tron wrote:
    >
    > > Hi
    > >
    > > There is a typo in the code in the message (actually two), but my

    running
    > > code uses createQueueConnection(). If not, I woild have a compile error,

    not
    > > a runtime.
    > >
    > > Tron
    > >
    > > "Kats" wrote in message
    > > news:40313a10$1@newsgroups.bea.com...
    > >
    > >>Hi
    > >>
    > >>Call "createQueueConnection()" not "createConnection()".
    > >>
    > >>
    > >>
    > >>Kats
    > >>BEA
    > >>
    > >>"Tron" wrote:
    > >>
    > >>>Hi all,
    > >>>
    > >>>I try to connect to the jms server. The initial lookups all look fine,
    > >>>but
    > >>>things crash when i try to create the connection:
    > >>>
    > >>>Context ctx = new InitialContext(); //Host and context factory in
    > >>>jndi.properties
    > >>>_qCF = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    > >>>_queue = (Queue) ctx.lookup(JMS_QUEUE);
    > >>>_connection = qCF.createConnection();
    > >>>
    > >>>, code you all have seen before. All goes well until the last

    statement,
    > >>>when the following error is thrown:
    > >>>
    > >>>java.lang.IllegalAccessError: tried to access method
    > >>>weblogic.kernel.KernelStatus.initialized()V from class
    > >>>weblogic.kernel.Kernel
    > >>>
    > >>>at weblogic.kernel.Kernel.ensureInitialized(Kernel.ja va:124)
    > >>>
    > >>>at
    > >>

    >
    >>weblogic.jms.dispatcher.DispatcherManager.initiali zeThreadPool(DispatcherM

    a
    > >
    > > n
    > >
    > >>>ager.java:597)
    > >>>
    > >>>at
    > >>

    >
    >>weblogic.jms.dispatcher.DispatcherManager.(DispatcherManager.java:49

    )
    > >>
    > >>>at
    > >>

    >
    >>weblogic.jms.dispatcher.DispatcherManager.create(D ispatcherManager.java:83

    )
    > >>
    > >>>at
    > >>

    >
    >>weblogic.jms.client.JMSConnection.incrementConnect ionCount(JMSConnection.j

    a
    > >
    > > v
    > >
    > >>>a:270)
    > >>>
    > >>>at
    > >>

    >
    >>weblogic.jms.client.JMSConnectionFactory.createCon nectionInternal(JMSConne

    c
    > >
    > > t
    > >
    > >>>ionFactory.java:121)
    > >>>
    > >>>at
    > >>

    >
    >>weblogic.jms.client.JMSConnectionFactory.createQue ueConnection(JMSConnecti

    o
    > >
    > > n
    > >
    > >>>Factory.java:75)
    > >>>
    > >>>at

    > >
    > > no.walseth.jmstest.JMSBasicObject.lookupOnServer(J MSBasicObject.java:53)
    > >
    > >>>at no.walseth.jmstest.JMSBasicObject.(JMSBasicObject.java:41)
    > >>>
    > >>>at

    no.walseth.jmstest.TextMessageSender.(TextMessageSender.java:24)
    > >>>
    > >>>at no.walseth.jmstest.TextMessageSender.main(TextMess ageSender.java:40)
    > >>>
    > >>>
    > >>>Have anyone seen anything like this before?
    > >>>
    > >>>Tron W
    > >>>
    > >>>
    > >>

    > >
    > >

    >




  6. Re: Access error

    Hi

    Using weblogic.jar (37 Megs) in the classpath did the trick. Thanks. Now
    to my next problem: is there any other file I can distribute with my app
    that's slightly smaller than weblogic.jar that does the trick?

    (BTW, I used both wlclient.jar and weblogic.jar in the path. It worked
    fine, because weblogic.jar was first in the path. I haven't tried with
    the thin one first, but I have my suspicions. )

    Tron

    Tom Barnes wrote:
    > The first thing I suspect is that the application is
    > somehow using a "mixed" set of WL jars from different
    > versions in the same CLASSPATH, or that you are attempting to
    > use the new 8.1 WL thin client jars in the same CLASSPATH as the
    > weblogic.jar (not supported). Check your CLASSPATH.
    >
    >
    > Tron wrote:
    >
    >> Hi
    >>
    >> There is a typo in the code in the message (actually two), but my running
    >> code uses createQueueConnection(). If not, I woild have a compile
    >> error, not
    >> a runtime.
    >>
    >> Tron
    >>
    >> "Kats" wrote in message
    >> news:40313a10$1@newsgroups.bea.com...
    >>
    >>> Hi
    >>>
    >>> Call "createQueueConnection()" not "createConnection()".
    >>>
    >>>
    >>>
    >>> Kats
    >>> BEA
    >>>
    >>> "Tron" wrote:
    >>>
    >>>> Hi all,
    >>>>
    >>>> I try to connect to the jms server. The initial lookups all look fine,
    >>>> but
    >>>> things crash when i try to create the connection:
    >>>>
    >>>> Context ctx = new InitialContext(); //Host and context factory in
    >>>> jndi.properties
    >>>> _qCF = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    >>>> _queue = (Queue) ctx.lookup(JMS_QUEUE);
    >>>> _connection = qCF.createConnection();
    >>>>
    >>>> , code you all have seen before. All goes well until the last
    >>>> statement,
    >>>> when the following error is thrown:
    >>>>
    >>>> java.lang.IllegalAccessError: tried to access method
    >>>> weblogic.kernel.KernelStatus.initialized()V from class
    >>>> weblogic.kernel.Kernel
    >>>>
    >>>> at weblogic.kernel.Kernel.ensureInitialized(Kernel.ja va:124)
    >>>>
    >>>> at
    >>>
    >>>
    >>> weblogic.jms.dispatcher.DispatcherManager.initiali zeThreadPool(DispatcherMa
    >>>

    >>
    >>
    >> n
    >>
    >>>> ager.java:597)
    >>>>
    >>>> at
    >>>
    >>>
    >>> weblogic.jms.dispatcher.DispatcherManager.(DispatcherManager.java:49)
    >>>
    >>>
    >>>> at
    >>>
    >>>
    >>> weblogic.jms.dispatcher.DispatcherManager.create(D ispatcherManager.java:83)
    >>>
    >>>
    >>>> at
    >>>
    >>>
    >>> weblogic.jms.client.JMSConnection.incrementConnect ionCount(JMSConnection.ja
    >>>

    >>
    >>
    >> v
    >>
    >>>> a:270)
    >>>>
    >>>> at
    >>>
    >>>
    >>> weblogic.jms.client.JMSConnectionFactory.createCon nectionInternal(JMSConnec
    >>>

    >>
    >>
    >> t
    >>
    >>>> ionFactory.java:121)
    >>>>
    >>>> at
    >>>
    >>>
    >>> weblogic.jms.client.JMSConnectionFactory.createQue ueConnection(JMSConnectio
    >>>

    >>
    >>
    >> n
    >>
    >>>> Factory.java:75)
    >>>>
    >>>> at

    >>
    >>
    >> no.walseth.jmstest.JMSBasicObject.lookupOnServer(J MSBasicObject.java:53)
    >>
    >>>> at no.walseth.jmstest.JMSBasicObject.(JMSBasicObject.java:41)
    >>>>
    >>>> at
    >>>> no.walseth.jmstest.TextMessageSender.(TextMessageSender.java:24)
    >>>>
    >>>> at no.walseth.jmstest.TextMessageSender.main(TextMess ageSender.java:40)
    >>>>
    >>>>
    >>>> Have anyone seen anything like this before?
    >>>>
    >>>> Tron W
    >>>>
    >>>>
    >>>

    >>
    >>

    >



  7. Re: Access error

    Hi Tron,

    Again, don't mix the two jars in the same CLASSPATH.
    (Think Ghostbusters: "Don't cross the streams!").

    Anyhow, there are ways to reduce the size
    of weblogic.jar, but they
    take time, and I recommend against it.
    There is even a white-paper:
    http://dev2dev.bea.com/products/wlse...rintclient.jsp
    (Some variant of the URL class-loading method generates the smallest jar).

    So, first - make sure you are at 8.1SP2 for the wlclient.jar
    (not sure if server needs to be at SP2.) And if things still don't
    work, contact customer support and open a case with them - any
    bug will get fixed in a timely manner.

    Tom


    Tron wrote:

    > Hi
    >
    > Using weblogic.jar (37 Megs) in the classpath did the trick. Thanks. Now
    > to my next problem: is there any other file I can distribute with my app
    > that's slightly smaller than weblogic.jar that does the trick?
    >
    > (BTW, I used both wlclient.jar and weblogic.jar in the path. It worked
    > fine, because weblogic.jar was first in the path. I haven't tried with
    > the thin one first, but I have my suspicions. )
    >
    > Tron
    >
    > Tom Barnes wrote:
    >
    >> The first thing I suspect is that the application is
    >> somehow using a "mixed" set of WL jars from different
    >> versions in the same CLASSPATH, or that you are attempting to
    >> use the new 8.1 WL thin client jars in the same CLASSPATH as the
    >> weblogic.jar (not supported). Check your CLASSPATH.
    >>
    >>
    >> Tron wrote:
    >>
    >>> Hi
    >>>
    >>> There is a typo in the code in the message (actually two), but my
    >>> running
    >>> code uses createQueueConnection(). If not, I woild have a compile
    >>> error, not
    >>> a runtime.
    >>>
    >>> Tron
    >>>
    >>> "Kats" wrote in message
    >>> news:40313a10$1@newsgroups.bea.com...
    >>>
    >>>> Hi
    >>>>
    >>>> Call "createQueueConnection()" not "createConnection()".
    >>>>
    >>>>
    >>>>
    >>>> Kats
    >>>> BEA
    >>>>
    >>>> "Tron" wrote:
    >>>>
    >>>>> Hi all,
    >>>>>
    >>>>> I try to connect to the jms server. The initial lookups all look fine,
    >>>>> but
    >>>>> things crash when i try to create the connection:
    >>>>>
    >>>>> Context ctx = new InitialContext(); //Host and context factory in
    >>>>> jndi.properties
    >>>>> _qCF = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    >>>>> _queue = (Queue) ctx.lookup(JMS_QUEUE);
    >>>>> _connection = qCF.createConnection();
    >>>>>
    >>>>> , code you all have seen before. All goes well until the last
    >>>>> statement,
    >>>>> when the following error is thrown:
    >>>>>
    >>>>> java.lang.IllegalAccessError: tried to access method
    >>>>> weblogic.kernel.KernelStatus.initialized()V from class
    >>>>> weblogic.kernel.Kernel
    >>>>>
    >>>>> at weblogic.kernel.Kernel.ensureInitialized(Kernel.ja va:124)
    >>>>>
    >>>>> at
    >>>>
    >>>>
    >>>>
    >>>> weblogic.jms.dispatcher.DispatcherManager.initiali zeThreadPool(DispatcherMa
    >>>>
    >>>
    >>>
    >>>
    >>> n
    >>>
    >>>>> ager.java:597)
    >>>>>
    >>>>> at
    >>>>
    >>>>
    >>>>
    >>>> weblogic.jms.dispatcher.DispatcherManager.(DispatcherManager.java:49)
    >>>>
    >>>>
    >>>>> at
    >>>>
    >>>>
    >>>>
    >>>> weblogic.jms.dispatcher.DispatcherManager.create(D ispatcherManager.java:83)
    >>>>
    >>>>
    >>>>> at
    >>>>
    >>>>
    >>>>
    >>>> weblogic.jms.client.JMSConnection.incrementConnect ionCount(JMSConnection.ja
    >>>>
    >>>
    >>>
    >>>
    >>> v
    >>>
    >>>>> a:270)
    >>>>>
    >>>>> at
    >>>>
    >>>>
    >>>>
    >>>> weblogic.jms.client.JMSConnectionFactory.createCon nectionInternal(JMSConnec
    >>>>
    >>>
    >>>
    >>>
    >>> t
    >>>
    >>>>> ionFactory.java:121)
    >>>>>
    >>>>> at
    >>>>
    >>>>
    >>>>
    >>>> weblogic.jms.client.JMSConnectionFactory.createQue ueConnection(JMSConnectio
    >>>>
    >>>
    >>>
    >>>
    >>> n
    >>>
    >>>>> Factory.java:75)
    >>>>>
    >>>>> at
    >>>
    >>>
    >>>
    >>> no.walseth.jmstest.JMSBasicObject.lookupOnServer(J MSBasicObject.java:53)
    >>>
    >>>>> at no.walseth.jmstest.JMSBasicObject.(JMSBasicObject.java:41)
    >>>>>
    >>>>> at
    >>>>> no.walseth.jmstest.TextMessageSender.(TextMessageSender.java:24)
    >>>>>
    >>>>> at
    >>>>> no.walseth.jmstest.TextMessageSender.main(TextMess ageSender.java:40)
    >>>>>
    >>>>>
    >>>>> Have anyone seen anything like this before?
    >>>>>
    >>>>> Tron W
    >>>>>
    >>>>>
    >>>>
    >>>
    >>>

    >>

    >



+ Reply to Thread