Go to End
 
 
TAR Number 3656046.996   Open Date 02-MAR-04 15:44:38
Support Identifier 156323   Name Michael Wever
Severity 2   Last Update 08-MAY-04 00:00:42
Product Oracle Containers for J2EE   Product Version   9.0.4.0.0
Platform Linux x86   Detailed Status Hard Close
TAR Reference   3682720.994   BUG Reference 3549625

Abstract

ESC: URL REQUIRED FOR JMS CONNECTION FROM OUTSIDE SERVER
 
 
Resolution History


02-MAR-04 15:44:39 GMT

Can you easily recover from, bypass or work around the problem? = NO
Does your system or application continue normally after the problem occurs? = NO
Are the standard features of the system or application still available; is the loss of s
ervice minor? = NO

### Detailed Problem Statement: ###
Need details to connect to a JMS queue on a 10g server from another machine,but do not know all the req
uired information, especially the URL (or JavaNamingProviderURL).
<InterfaceHandler name="com.datek.cpas5.interfaceHandler.JMSInterfaceHandler">

<InterfaceType>com.datek.cpas5.interfaceHandler.XMLInterfaceFormat</InterfaceType>
<JMSInterfaceParameters>
<UseJNDI>true</UseJNDI>

<JavaNamingProviderURL>http://samboapp-1.bokklubbene.no:9127</JavaNamingProvider
URL>


<JavaNamingFactoryInitial>com.evermind.server.jms.EvermindQueueConnectionFactory
</JavaNamingFactoryInitial>

<JavaNamingSecurityPrincipal></JavaNamingSecurityPrincipal>

<JavaNamingSecurityCredentials></JavaNamingSecurityCredentials>

<QueueConnectionFactoryName>javax.jms.QueueConnectionFactory</QueueConnectionFac
toryName>

<ReadQueue>java:comp/env/jms/SmsOutQueue</ReadQueue>

<WriteQueue>java:comp/env/jms/SmsInQueue</WriteQueue>
</JMSInterfaceParameters>
</InterfaceHandler>

### What were you trying to accomplish when the problem occurred? ###
..

### Has this ever worked? ###
No

### Can you reproduce the problem at will? ###
Yes

### Reproducible on other platforms, systems, environments? ###
No

### Known recent changes to your computer environment: ###
no

Contact me via : E-mail -> Michael.Wever@bokklubbene.no




03-MAR-04 02:21:55 GMT

Dear Customer,

We have received your service request and we'll proceed to investigate.

Thank you.



04-MAR-04 08:59:44 GMT

=== Action ===
Hi,
The Oracle Containers for J2EE Service Guide includes a complete chapter (3) about the Java Message Service. The Service Guide can be found a
t:
http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10326.pdf
Please read this chapter as this also includes informations about JMS queues.

Regards, andre reker


04-MAR-04 10:37:27 GMT

New info : Ok, the properties have been sorted.

java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory
useJndi=true
java.naming.security.principal=admin
queueConnectionFactory=javax.jms.QueueConnectionFactory
outputQueue=jms/SmsInQueue
java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no:9127:home
inputQueue=jms/SmsOutQueue
jmsValidity=86400000
java.naming.security.credentials=welcome

But now I get:
11:36.06.674 04.03.2004 SEVERE IF-HANDLER Exception occurred during connection: META-INF/application-client
.xml resource not found (see J2EE spec, application-client chapter for requireme
nts and format of the file)javax.naming.NamingException: META-INF/application-cl
ient.xml resource not found (see J2EE spec, application-client chapter for requi
rements and format of the file)
javax.naming.NamingException: META-INF/application-client.xml resource not found (see J2EE spec, application-client chapter for
requirements and format of the file)
at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFact
ory.java:86)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.initializeConnect
ion(JMSInterfaceHandler.java:373)
at com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterfaceHandler.java:36)
at com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.makeConnection(JMSInt
erfaceHandler.java:780)
at com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSInterfaceHandler.java:742)
at java.lang.Thread.run(Thread.java:534)
I cannot find the referenced documentation. What is missing?


04-MAR-04 11:40:52 GMT

Hi Michael,

Does the file META-INF/application-client.xml exists? Is jndi.jar in CLASSPATH? If all is ok can you switch the order of oc4j.jar and your app-client
.jar in your classpath and check if the problem dissappears.

Regards,
Prag
EMEA IP Support


04-MAR-04 11:41:03 GMT

Email Update button has been pressed -- Sending email.


04-MAR-04 13:13:29 GMT

New info : The jndi classes (javax.naming.*) are inside the client jar. (3rd par
ty). Regardless of classpath (smsgw.jar:oc4jclient.jar or oc4jclient-jar:smsgw.j
ar) I get the same exception.


04-MAR-04 13:14:35 GMT

New info : No, I cannot find the META-INF/application-client.xml file in either

of the jars.


04-MAR-04 13:39:52 GMT

An application-client.xml file contains the info for a J2EE application-client.
It is located in META-INF/application-client.xml below the client's root. This f
ile contains JNDI information for accessing the server application and other cli
ent information

orion-application-client.xml
This OC4J-specific deployment file is for the client application. It contains JNDI mappings and entries for the cl
ient. It also has mapping of the EJB reference logical name to the JNDI name fo
r the EJB.

Details can be found in Oracle9iAS Containers for J2EE Stand Alone User's Guide release 2

eg:
<application-client>
<display-name>TemplateBean</display-name>
<ejb-ref>
<ejb-ref-name>TemplateBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>mTemplateHome</home>
<remote>Template</remote>
</ejb-ref>
</application-client>

.....
<orion-application-client>
<ejb-ref-mapping name="TemplateBean" location="myapp/myapp-ejb/TemplateBean" />
</orion-application-client>

Hope this helps.

Thanks,
Prag



04-MAR-04 13:51:33 GMT

Email Update button has been pressed -- Sending email.


05-MAR-04 14:19:32 GMT

New info : Forwarded from Datek:
Hi, Michael.
It looks like Oracle thinks you are using an Enterprise Java Bean that requires
an external configuration file. Can you check it? It is important to specify to
them that this is a stand-alone jms client application.The
application-client.xml file below is as far as we can understand the external
configuration file for a bean.
Lars Ove


05-MAR-04 16:43:03 GMT

ok, will investigate


07-MAR-04 07:14:13 GMT

Hi Lars,

The above xml piece is just an example if you are not using EJB use those xml file (refer to DTDs) to define resource mapping, env-entry mapping etc.

Thanks,
Prag


07-MAR-04 07:14:27 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


08-MAR-04 09:12:33 GMT

New info : Putting an empty application.xml (contains <display-name> only) file

into META-INF now results in the following exception.
Something is missing from the classpath?
(I'm only adding oc4jclient.jar).
10:05.36.554 08.03.2004 SEVERE Thread: IF-HANDLER (connection worker)
terminated with an exception: oracle/ias/opmn/optic/OpticException,
oracle/ias/opmn/optic/OpticException (throwable is of type class
java.lang.NoClassDefFoundError, java.lang.NoClassDefFoundError:
oracle/ias/opmn/optic/OpticException ) java.lang.NoClassDefFoundError:
oracle/ias/opmn/optic/OpticException<LF><TAB>at
com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialCon
textFactory.java:238)<LF><TAB>at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(App
licationClientInitialContextFactory.java:129)<LF><TAB>at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)<LF><TAB
>at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)<LF><TAB>a
t javax.naming.InitialContext.init(InitialContext.java:219)<LF><TAB>at
javax.naming.InitialContext.<init>(InitialContext.java:195)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.initializeConnection(JMSInt
erfaceHandler.java:373)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterfaceHand
ler.java:36)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.makeConnec
tion(JMSInterfaceHandler.java:780)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSInt
erfaceHandler.java:742)<LF><TAB>at java.lang.Thread.run(Thread.java:534)<LF>



08-MAR-04 10:03:45 GMT

Hi,

The earlier error you had was about application-client.xml & not application.xml. Make sure you have any the environment variable PATH/CLASSPATH set as req
uired. Looks like either a usage is wrong (opticExcerption error) or is it likel
y there is an error in your opmn.xml?

Regards,
Prag


08-MAR-04 10:03:57 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


08-MAR-04 10:36:41 GMT

New info : Sorry, typo on my behalf. It was application-client.xml that was

added, not application.xml.
opmn.xml? where is this supposed to be?
The client machine (trying to get a jms connection to the server's jms queue)
is a separate machine to the ias server.


08-MAR-04 11:56:31 GMT

New info : (This was sent before they were aware I had tried an empty

application-client.xml and recieved the latest NoClassDefError, that is, they,

Datek, are working on the problem separately).
Hi, Michael.
We cannot find the correct way to do this based on what we know. It is too much
documentation and we have no experience in using Oracle for this. I'm sorry,
but we have spent some time now trying to figure this out... The options are
MANY!My suggestion is that you ask Oracle to supply a point-by-point list of
what we should do to get this up. In Oracle-terms, we are using a stand-alone
client application, and we simply need JMS connection setup parameters for
that. The parameters we request in the configuration file are standard JMS
parameters and should work for all JMS implementations. Also, we cannot
understand why we should supply an xml configuration file just for Oracle. Our
application should programmatically supply all they need. Don't mix EJB into
this, either.Please get back to me on what you think!
Lars Ove


08-MAR-04 12:44:32 GMT

New info : Another point:
This is not an application client that is being deployed. It is a true
standalone java program that is trying to connect to server's jms queues.


08-MAR-04 12:54:37 GMT

ok, thanks for the clarification. wil point you to some notes/manual with detail
s after investigation


08-MAR-04 15:16:09 GMT

There are couple of JMS related docs that you can refer to
http://download-uk.oracle.com/docs/cd/B10464_01/web.904/b10324/mdb.htm#1013265
http://download-uk.oracle.com/docs/cd/B10464_01/web.904/b10326/jms.htm#1023396

If you want to use a logical name in your client application code, then
1. define the logical name in the application-client.xml file for a standalone Java client
2. map the logical names to actual names in the orion-application-client.xml file for a standal
one Java client. The actual names, or JNDI names, are different in OC4J JMS than
in Oracle JMS.

Ct need application-client.xml because they are using ApplicationClient factory & not RMI or Application factory. Also I think ct should be us
ing RMI port here rather than JMS port
java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no:9127:home

I suppose you are using Oracle JMS and you using a standalone java client to connect to JMS Queue running Application Server -
Is that right?

Regards,
Prag


08-MAR-04 15:42:47 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


08-MAR-04 16:37:44 GMT

New info : No, i'm using 'Oracle Application Server JMS'.
Yes, it's a standalone Java program trying to connect to a JMS queues on a running IAS Server.
What's the RMI port?
Should I be using the ApplicationClientInitialContext ?


08-MAR-04 16:42:48 GMT

RMI port is a range of port in opmn.xml.
But we can identify the port currently being used from output of 'opmnadmin debug' or 'opmnadmin dump'
We can then use this for testing. Once we get this working I can discuss with you how to make
the port no permanent later on

Prag

08-MAR-04 16:43:01 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


08-MAR-04 16:44:16 GMT

New info : The client is using explicit names not logical, so there should be
no need to map them.



08-MAR-04 17:09:01 GMT

New info : Where is opmnadmin?
find . opmnadmin
does not find it under the oracle home directory..



09-MAR-04 02:29:21 GMT

Hi ,

The opmnadmin should be there in $ORACLE_HOME/opmn/bin directory , (in IAS 9.0.2 , in 9.0.4 this file is not present)

As you are using 10g (9.0.4) you can use the following command to get the RMI port ,

$ORACLE_HOME/opmn/bin/opmnctl status -l


Here check for the ports column , this will have the RMI port information.

Regards

ravi


09-MAR-04 02:29:32 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


11-MAR-04 12:02:35 GMT

New info : Tried using the rmi port, and

com.evermind.server.rmi.RMIInitialContextFactory.
Still getting the same NoClassDefError on 'OpticException', see previous post.


11-MAR-04 12:41:42 GMT

Thanks, will investigate


11-MAR-04 15:21:09 GMT

In the Oracle Application Server, a Java application client would access a JMS D
estination object by providing the following in the JNDI properties:
eg:
java.naming.factory.initial= com.evermind.server.ApplicationClientInitialContextFactor
y
java.naming.provider.url=opmn:ormi://$HOST:$OPMN_REQUEST_PORT:$OC4J_INSTANCE/
java.naming.security.principal=admin
java.naming.security.credentials=welcome

In opmn.xml you may have entry like this..

<opmn xmlns="http://www.oracle.com/ias-instance">
<notification-server>
<port local="6101" remote="6201" request="6004"/>

Port 6004 is the opmn request_port so your
java.naming.provider.url=opmn:ormi://$HOST:$OPMN_REQUEST_PORT:$OC4J_INSTANCE/
should read
java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no:$6004:home/

Sorry about the confusion I caused earlier.

regards,
Prag


12-MAR-04 09:32:43 GMT

New info : <notification-server>
<port local="6100" remote="6200" request="6003"/>
<log-file path="$ORACLE_HOME/opmn/logs/ons.log" level="4"
rotation-size="1500000"/>
<ssl enabled="true"
wallet-file="$ORACLE_HOME/opmn/conf/ssl.wlt/default"/>
</notification-server>
So I'm using 6003 instead.
I'm still getting:
java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException<LF><TAB>at
com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialCon
textFactory.java:238)<LF><TAB>at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(App
licationClientInitialContextFactory.java:129)<LF><TAB>at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)<LF><TAB
>at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)<LF><TAB>a
t javax.naming.InitialContext.init(InitialContext.java:219)<LF><TAB>at
javax.naming.InitialContext.<init>(InitialContext.java:195)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.initializeConnection(JMSInt
erfaceHandler.java:373)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterfaceHand
ler.java:36)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.makeConnec
tion(JMSInterfaceHandler.java:780)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSInt
erfaceHandler.java:742)<LF><TAB>at java.lang.Thread.run(Thread.java:534)<LF>
Which still suggests to me that I'm missing something from my classpath



12-MAR-04 10:03:20 GMT

ok. let me investigate


12-MAR-04 10:19:22 GMT

Hi,

The error you get is froma class which is not exposed. Can you please answer the following questions.

Is this a new installation of ias? Can you confirm from your log file that the installation went on without any issues?
Is there any further description of error in the log files - dcm, opmn, application etc?
Can you cut & paste teh output of 'dcmctl getstate -v -d'.
Does the problem still occur after you do a complete start & stop of ias instance?
Is this a standalone instance of ias or is associated with an infrastructure?
Does this machine have a static i[p address?
Also update the SR with your contact number.

Thanks,
Prag


12-MAR-04 10:19:37 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


12-MAR-04 10:44:32 GMT

New info : This exception is occuring from the client java program on a

different machine to the server.


12-MAR-04 10:48:32 GMT

New info :
Is this a new installation of ias?
10g, no, it has been in use for a month now with numerous other web application deployed on it working fine.

Can you cut & paste teh output of 'dcmctl getstate -v -d'.
[oracle@samboapp-1 bin]$ ./dcmctl getstate -v -d
Current State for Instance:ias.samboapp-1
Component Type Up Status In Sync Status
================================================================================
1 home OC4J Up True
2 HTTP_Server HTTP_Server Up True

Does the problem still occur after you do a complete start & stop of ias instance?
Yes.

Is this a standalone instance of ias or is associated with an infrastructure?
Infrastructure. (Database listeners, and another server running portal application).

Does this machine have a static ip address?
Yes.

Also update the SR with your contact number.
+47 22022067


12-MAR-04 11:06:43 GMT

Hi Michael,

Can you confirm if you are still using ApplicationClientInitialContextFactory & you do not have any dummy application-client.xml? If required is it po
ssible for me to ODC (http://meatlink.oracle.com/odc/east) to your machine & che
ck your setup?

Thanks,
Prag


12-MAR-04 11:06:55 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


12-MAR-04 11:19:31 GMT

New info : Latest settings:
<JMSInterfaceParameters>
<UseJNDI>true</UseJNDI>
<JavaNamingProviderURL>opmn:ormi://samboapp-1.bokklubbene.no:6003:home</JavaNamingP
roviderURL>
<JavaNamingFactoryInitial>com.evermind.server.ApplicationClientInitialContextFactory</JavaNamingFactoryInitial>

<JavaNamingSecurityPrincipal>admin</JavaNamingSecurityPrincipal>
<JavaNamingSecurityCredentials>welcome</JavaNamingSecurityCredentials>
<QueueConnectionFactoryName>javax.jms.QueueConnectionFactory</QueueConnectionFactoryName>
<ReadQueue>jms/SmsOutQueue</ReadQueue>
<WriteQueue>jms/SmsInQueue</WriteQueue>
</JMSInterfaceParameters>


12-MAR-04 12:06:39 GMT

Hi,

Could you please let me know where are these settings set - in which file? I do not recognise the JMSInterfaceParameters tag. Please explain. Also let me
know if odc is possible

Thanks
Prag

12-MAR-04 12:06:52 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


12-MAR-04 12:40:34 GMT

New info : These settings are from custom config file, they get translated to:
-- listing properties --
java.naming.factory.initial=com.evermind.server.ApplicationClient...
useJndi=true
java.naming.security.principal=admin
queueConnectionFactory=javax.jms.QueueConnectionFactory
outputQueue=jms/SmsInQueue
java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no...
inputQueue=jms/SmsOutQueue
jmsValidity=86400000
java.naming.security.credentials=welcome
Yes, odc is ok.
I still have a application-client.xml in the jar, but it only contains the display-
name tag.


12-MAR-04 13:33:51 GMT

Thanks


15-MAR-04 12:29:54 GMT

Hi,

Is it possible for me to ODC to your machine at 2pm GMT this afternoon so that you can demonstrate your problem to me.

thanks,
Prag

15-MAR-04 12:30:24 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


15-MAR-04 12:36:26 GMT

New info : eh.. I got another ODC happing at 3pm (2pm GMT). My machine is linux,
and the code is running on another server, also linux. After 3pm?


15-MAR-04 12:38:01 GMT

That should be fine. I can ODC at 3pm GMT.


15-MAR-04 12:38:13 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


15-MAR-04 15:10:55 GMT

Hi,

Youmay connect to em-sys-as21 if you have completed your previous ODC & if you could do another one now

regards,
Prag


15-MAR-04 15:11:01 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


15-MAR-04 15:16:44 GMT

New info : I do not know how to connect to a ODC.
Please give instructions.


15-MAR-04 15:19:09 GMT

Hi,

As you were doing another ODC i assumed you knew how to do ODC. Anyway, please go to http://metalink.oracle.com/odc/east. Fill the template up there. And c
hoose em-sys-as21 as the support engineer.

Regards,
Prag



15-MAR-04 15:19:23 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


15-MAR-04 15:25:23 GMT

New info : I get:
Sorry, we don't support your operating system
We currently support Windows 95, 98, 2000, Me, NT 4.0, and XP.


15-MAR-04 15:27:24 GMT

New info : The previous ODC never happened.. Oracle contact never replied to TAR
!
I have to leave now. Tomorrow?


15-MAR-04 15:28:20 GMT

ok, let me know tomorrow when you can do it


15-MAR-04 15:28:33 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


15-MAR-04 15:34:32 GMT

New info : But it doesn't work on linux?!?


15-MAR-04 15:36:28 GMT

No, it does not. you have to connect to ODC from windows box. However I can look
into Linux environment by telnet/SSH from your windows machine to Linux.


15-MAR-04 15:47:53 GMT

New info : "from your windows machine" ?
As I mentioned before I use a linux machine.
I will try to find a vacant windows machine tomorrow, but I cannot guarantee
this.


15-MAR-04 16:21:30 GMT

ok, thanks


16-MAR-04 15:21:37 GMT

New info : Is anything happening?


16-MAR-04 16:34:19 GMT

I was waiting for you to let me know your availability for ODC. Could you please
let em know this tomorrow, so that we can work on it. Preferrably in the aftern
oon


16-MAR-04 16:34:33 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


17-MAR-04 08:05:14 GMT

New info : I am not available for ODC. It doesn't work from my linux machine.
Are there other alternatives?



17-MAR-04 08:19:06 GMT

Hi,

Alternativelycan you zip the oc4j home & send it to me along with your client application and the config files

Regards,
Prag


17-MAR-04 08:19:20 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


17-MAR-04 09:49:16 GMT

Country: NORWAY
The customer has uploaded the following file via MetaLink:
oc4j-home.tar.gz


17-MAR-04 10:10:14 GMT

Country: NORWAY
The customer has uploaded the following file via MetaLink:
datek.tar.gz


17-MAR-04 10:13:16 GMT

New info : The client software is run with
java -classpath smsgw.jar:oc4jclient.jar com.datek.cpas5.Cpas5Application
-config
and all the configuration settings are in the config.xml file.


17-MAR-04 10:17:21 GMT

Thanks will investigate


17-MAR-04 11:49:02 GMT

Hi,

Can you please add oc4j.jar files to your classpath & rerun your client. Let me know the outcome.

regards,
Prag


17-MAR-04 11:49:15 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


17-MAR-04 11:49:46 GMT

looks liek samboweb is the application concerned


17-MAR-04 11:52:10 GMT

New info : No, SamuraiSMS (or just SMS) is the application involved.


17-MAR-04 11:55:12 GMT

New info : Still getting:
12:54.17.408 17.03.2004 SEVERE Thread: IF-HANDLER (connection worker)
terminated with an exception: oracle/ias/opmn/optic/OpticException,
oracle/ias/opmn/optic/OpticException (throwable is of type class
java.lang.NoClassDefFoundError, java.lang.NoClassDefFoundError:
oracle/ias/opmn/optic/OpticException ) java.lang.NoClassDefFoundError:

oracle/ias/opmn/optic/OpticException<LF><TAB>at

com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialCo
n
textFactory.java:238)<LF><TAB>at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(Ap
p
licationClientInitialContextFactory.java:129)<LF><TAB>at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)<LF><TA
B
>at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)<LF><TAB>
a
t javax.naming.InitialContext.init(InitialContext.java:219)<LF><TAB>at
javax.naming.InitialContext.<init>(InitialContext.java:195)<LF><TAB>at

com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.initializeConnection(JMSIn
t
erfaceHandler.java:373)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterfaceHan
d
ler.java:36)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.makeConne
c
tion(JMSInterfaceHandler.java:780)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSIn
t
erfaceHandler.java:742)<LF><TAB>at java.lang.Thread.run(Thread.java:534)<LF>
with oc4j.jar in the classpath.


17-MAR-04 15:35:32 GMT

I can see in oc4jclient.jar manifest file there is a pointer to various jar file
s, including optic.jar which usually resides in opmn/lib on ias side. The error
seems to indicate JNDi lookup issue. I am not sure if all these files need to be
in classpath, perhaps you could try it. After discussing with opmn specialists
they think it could possibly be a bug. Can you test that if you are able to acc
ess the JMS from servlet instead of standalone application?

Regards,
Prag


17-MAR-04 15:35:46 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


17-MAR-04 16:13:24 GMT

New info : Yes, the queues already have messages in them from the SamuraiSMS

web application.


18-MAR-04 08:10:00 GMT

Can you please confirm that you can access these queues from an external servlet
instead of standalone java application?


18-MAR-04 08:10:14 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


18-MAR-04 08:14:11 GMT

New info : External servlet? You mean a servlet running within a Application Ser
ver on another machine?


18-MAR-04 08:28:43 GMT

yes, you are right.
If that is working then i will raise a bug to address the issue


18-MAR-04 08:28:57 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


18-MAR-04 12:19:11 GMT

New info : What's some example code to connect to the queue from inside OC4J to
another machine?


18-MAR-04 14:13:46 GMT

In the demo directory of j2ee/home you will find lot of demos for JMS. Please us
e the one relevant to you


18-MAR-04 14:14:02 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


19-MAR-04 09:36:14 GMT

New info : j2ee/home/demo/jms/oc4jjms can connect to same host oc4j, but not to
10g server on different machine. Producing output:
mick@miw-1719 oc4jjms $ ant Qsend
Buildfile: build.xml

Qsend:

common:
[echo] BuildName: oc4jjmsoc4jjmsdemo
[echo] BuildHome: /home/oc4j/j2ee/home/demo/jms/oc4jjms
[echo] BuildFile: /home/oc4j/j2ee/home/demo/jms/oc4jjms/build.xml
[echo] BuildJVM: 1.4

init:

run-demo:
[exec] *** looking up java:comp/env/jms/QueueConnectionFactory via JNDI
[exec] Exception in thread "main" java.lang.NoClassDefFoundError:
oracle/ias/opmn/optic/OpticException
[exec] at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactor
y.java:238)
[exec] at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:129)
[exec] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.j
ava:662)
[exec] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
[exec] at javax.naming.InitialContext.init(InitialContext.java:219)
[exec] at javax.naming.InitialContext.<init>(InitialContext.java:175)
[exec] at Oc4jjmsDemo.getCF(Oc4jjmsDemo.java:66)
[exec] at Oc4jjmsDemo.getQCF(Oc4jjmsDemo.java:56)
[exec] at Qsend.doit(Qsend.java:63)
[exec] at Qsend.main(Qsend.java:47)

[exec] Result: 1

BUILD SUCCESSFUL
Total time: 2 seconds


19-MAR-04 09:37:09 GMT

Thanks, will investigate


19-MAR-04 09:43:14 GMT

New info : When I put optic.jar into classpath I get:
[exec] javax.naming.NamingException: Error reading application-client descriptor: Error communicating
with server: Lookup error:
javax.naming.AuthenticationException: Invalid username/password for default
(admin); nested exception is:
[exec] javax.naming.AuthenticationException: Invalid username/password for default (admin); nes
ted exception is:
[exec] javax.naming.NamingException: Lookup error:
javax.naming.AuthenticationException: Invalid username/password for default (adm
in); nested exception is:
[exec] javax.naming.AuthenticationException: Invalid username/password for default (admin) [Root exception is javax.naming.Au
thenticationException: Invalid username/password for default (admin)]
[exec] at com.evermind.server.ApplicationClientInitialContextFactory.getInitialCo
ntext(ApplicationClientInitialContextFactory.java:161)
[exec] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
[exec] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
[exec] at javax.naming.InitialContext.init(InitialContext.java:219)
[exec] at javax.naming.InitialContext.<init>(InitialContext.java:175)
[exec] at Oc4jjmsDemo.getCF(Oc4jjmsDemo.java:66)
[exec] at Oc4jjmsDemo.getQCF(Oc4jjmsDemo.java:56)
[exec] at Qsend.doit(Qsend.java:63)
[exec] at Qsend.main(Qsend.java:47)
What's the password for the server? There's so many :=(


19-MAR-04 13:50:30 GMT

Hi,

The default admin password is 'manager' within ias. If you have a ias mid-tier associated with infrastructure you can change password using OID DAS. Try u
sing jazn.com/admin as user name instead of just admin. Hope that helps.

Thanks,
Prag


19-MAR-04 13:50:43 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


19-MAR-04 14:26:18 GMT

New info : Tried suggested usernames/passwords, did not work.
What is OID DAS?


19-MAR-04 16:23:50 GMT

Ok, will point you to relevant docs


23-MAR-04 09:40:05 GMT

Please check OIDDAS docs at http://download-west.oracle.com/docs/cd/A97329_01/co
re.902/a92171/security.htm#1007786


23-MAR-04 09:40:31 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


24-MAR-04 10:49:42 GMT

New info : The server is not part of an instructure so it OID does not
work.
Any other ideas?


24-MAR-04 10:56:13 GMT

Hi,

Follow this documentation to check your password is correct
http://download-uk.oracle.com/docs/cd/B10464_01/web.904/b10325/admintoo.htm#1006575

If that still does not work as mentioned earlier use jazn.com/admin as user name instead o
f just admin. Let em know the results.

Thanks,
Prag


24-MAR-04 10:56:27 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


24-MAR-04 11:41:49 GMT

New info : Found out the password. Now I can get the oc4jjms example to connect
from a separate machine.
But running the same properties on the real product, I still recieve exactly the same exception, even though i've added optic.jar to t
he classpath. Is it neccessary to install a oc4j standalone instance on the clie
nt machine? (Since the demos require ORACLE_HOME and J2EE_HOME variable set).


24-MAR-04 12:04:04 GMT

Hi,

you need to add oc4j.jar & oc4j-client.jar to the classpath to the client. The demos should run without the oracle_home variable set anyway. You need J2E
E_HOME set so that oc4j.jar can be picked up relative to that.

Regards,
Prag


24-MAR-04 12:04:17 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


24-MAR-04 12:52:46 GMT

New info : These jars are already in the classpath.


24-MAR-04 16:22:27 GMT

Hi,

Please let me know which error exactly do you get now. Now that we know it is a setup issue, Can you cross check if all the information are available in cu
stom code as in demo? Did you get the demo to work with oc4j in ias or standalon
e oc4j?

Regards,
Prag


24-MAR-04 16:22:41 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


25-MAR-04 08:33:43 GMT

New info : I get the demo to work on both ias machine and a standalone oc4j
machine.
The exception I get with the real product is still:
13:52.03.360 24.03.2004 SEVERE Thread: IF-HANDLER (connection worker)
terminated with an exception: oracle/ias/opmn/optic/OpticException,
oracle/ias/opmn/optic/OpticException (throwable is of type class
java.lang.NoClassDefFoundError, java.lang.NoClassDefFoundError:
oracle/ias/opmn/optic/OpticException ) java.lang.NoClassDefFoundError:
oracle/ias/opmn/optic/OpticException<LF><TAB>at
com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:238)<LF
><TAB>at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:129)<LF><TAB>at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)<LF><TAB
>at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)<LF><TAB>
at javax.naming.InitialContext.init(InitialContext.java:219)<LF><TAB>at
javax.naming.InitialContext.<init>(InitialContext.java:195)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.initializeConnection(JMSInterfaceHandler.java:373
)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterfaceHandler.java:36)<LF><TAB>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.makeConnection(JMSInterfaceHandler.java:780)<LF><TA
B>at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSInterfaceHandler.java:742)<LF><TAB>at java.lang.Thread.run(Thread.java:534)<L
F>


25-MAR-04 09:32:43 GMT

New info : The custom code is closed source to us. It is a product that supports
the JMS standards and works successfully on a number of other pplication Server
products. The most obvious solution to this problem for us, and recommended by
the third party innvolved, is to change to another company as Oracle seems not
to meet this standard, or if it does makes it so overwhelmingly complicated as t
o not
be practical.

Back to the "java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException" problem? Are you sure I do not need to install OC4J st
andalone on the client machine? For what I can see that is the major difference
between the real thing and the demo examples.



25-MAR-04 10:24:03 GMT

investigating..


25-MAR-04 11:07:58 GMT

ok, I see your point of installing the oc4j standaloen on client side. But i do
not think this will resolve our issue completely. In the manifest.f file of oc4j
.jar the optic.jar, ons.jar etc are all in ../../opmn/lib directory. This direct
ory structure does not exist at all. You may want to create this directory struc
ture relative to your directory in which oc4j.jar exists and place the jar files
in there , so that it might get picked up.

could you please try this. If this works I willr aise a bug to get the manifest.mf in oc4j.jar permanently changed.


regards,.
Prag

25-MAR-04 11:08:12 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


29-MAR-04 08:36:17 GMT

SR escalated as requested


29-MAR-04 15:58:41 GMT

I have called the customer who has tried the suggestions provided by Prag above
and found them not to solve the problem.
The customer will update this Service Request shortly with his results.


29-MAR-04 16:10:45 GMT

New info : I do not have permission to create a directory at ../.. level (I coul
d have moved the current directory into a new folder but instead) so I unzipped
the whole oc4j_extended.zip to /opt/oc4j. The program lies under /opt/datek.I a
lso added the directory /opt/oc4j/opmn/lib with optic.jar and ons.jar.I set ORAC
LE_HOME and J2EE_HOME variables same as in the previous example. And
I ran the class like:
java -classpath smsgw.jar:/opt/oc4j/j2ee/home/oc4j.jar:/opt/oc4j/opmn/lib/optic.jar:/opt/oc4j/opmn/lib/ons.jar com.datek.cpas5.Cpas5Application -con
fig
I get exactly the same exception thrown :=(


29-MAR-04 16:27:53 GMT

strange! i will check with others if they have come across this issue before
senta mail describing the issue to internal mailing list. looking for some reply t
omorrow


30-MAR-04 08:48:46 GMT

mailing list requested further info which i hv provided again today


30-MAR-04 16:22:35 GMT


J2EE_HOME/<default-island>/log/server.log - from oc4j home zip of samuraisms application
================================
04/03/09 14:59:57 Internal error in HttpServer
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:216)
at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:151)
at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:146)
at com.evermind.server.http.EvermindHttpServletResponse.handleException(Evermin
dHttpServletResponse.java:1743)
at com.evermind.server.http.EvermindHttpServletResponse.handleException(EvermindHttpServletResponse.java:1572)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:803)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResource
PooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)


datek.tar.gz/datek/log MSGW log from 8th march onwards..
=================
13:39.08.203 12.03.2004 SEVERE Thread: IF-HANDLER (connection worker) terminated with an e
xception: oracle/ias/opmn/optic/OpticException, oracle/ias/opmn/optic/OpticExcep
tion (throwable is of type class java.lang.NoClassDefFoundError, java.lang.NoCla
ssDefFoundError: oracle/ias/opmn/optic/OpticException ) java.lang.NoClassDefFoun
dError: oracle/ias/opmn/optic/OpticException<LF><TAB>at com.evermind.server.rmi.
RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:238)<LF
><TAB>at com.evermind.server.ApplicationClientInitialContextFactory.getInitialCo
ntext(ApplicationClientInitialContextFactory.java:129)<LF><TAB>at javax.naming.s
pi.NamingManager.getInitialContext(NamingManager.java:662)<LF><TAB>at javax.nami
ng.InitialContext.getDefaultInitCtx(InitialContext.java:243)<LF><TAB>at javax.na
ming.InitialContext.init(InitialContext.java:219)<LF><TAB>at javax.naming.Initia
lContext.<init>(InitialContext.java:195)<LF><TAB>at com.datek.cpas5.interfaceHan
dler.JMSInterfaceHandler.initializeConnection(JMSInterfaceHandler.java:373)<LF><
TAB>at com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterf
aceHandler.java:36)<LF><TAB>at com.datek.cpas5.interfaceHandler.JMSInterfaceHand
ler$ConnectionWorker.makeConnection(JMSInterfaceHandler.java:780)<LF><TAB>at com
.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSInterf
aceHandler.java:742)<LF><TAB>at java.lang.Thread.run(Thread.java:534)<LF>

from config.xml
============
<InterfaceHandler name="com.datek.cpas5.interfaceHandler.JMSInterfaceHandler">
<InterfaceType>com.datek.cpas5.interfaceHandler.XMLInterfaceFormat</InterfaceType>
<JMSInterfaceParameters>
<UseJNDI>true</UseJNDI>
<JavaNamingProviderURL>opmn:ormi://samboapp-1.bokklubbene.no:6003:home</JavaNamingProviderURL>
<JavaNamingFactoryInitial>com.evermind.server.ApplicationClientInitialContextFactory</JavaNamingFactoryInitial>
<JavaNamingSecurityPrincipal>admin</JavaNamingSecurityPrincipal>
<JavaNamingSecurityCredentials>welcome</JavaNamingSecurityCredentials>
<QueueConnectionFactoryName>javax.jms.QueueConnectionFactory</QueueConnectionFactoryName>
<ReadQueue>jms/SmsOutQueue</ReadQueue>
<WriteQueue>jms/SmsInQueue</WriteQueue>
</JMSInterfaceParameters>
</InterfaceHandler>



31-MAR-04 11:09:43 GMT

Albert is testing thsi internally. We managed to reproduce the issue (NoClassDef
FoundError) without placing optic.jar in path. This as suggested earlier proves
that jar file is not recognised, because of absence. It could perhaps be a class
loader issue. We are going to place optic.jar in bootclasspath, classpath & jdk
external library & test.


31-MAR-04 11:21:43 GMT

strange! adding optic.jar to standard classpath and placing the optic.jar in th
e location specified fixes the problem for us

Need to check if ct has placed the optic.jar in the right place & obtained the right version of optic.jar. ie: sa
me version as the oc4j container
I will send the custom code to customer to test in his environment. Also we are using the same version of JDK that comes with i
as


31-MAR-04 13:20:44 GMT

what we have found now is that if you remove all ias related jar files from clas
spath & add it to the classpath only on need then it seems to work properly. Th
e issue is it is loading all the oc4j related files from manifest file

To run our sample code standalone, nothing to do with JMS as such

cp $ORACLE_HOME/opmn/lib/optic.jar $HOME
cp $ORACLE_HOME/j2ee/home/oc4jclient.jar $HOME

The command to run it is:

cd $HOME
$ORACLE_HOME/jdk/bin/java -cp .:./optic.jar:./oc4jclient.jar RMIClientTest

so can you try like on both your application as well as the RMIClientTest application file that I am emailing to you separately..
Michael.Wever@bokklubbene.no


31-MAR-04 13:21:11 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


01-APR-04 07:57:42 GMT

New info : Tried the following all on the remote machine:
<br/>
1) Copied RMIClientTest.java to $ORACLE_HOME/j2ee/home/ and changed the following lines:
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFacto
ry");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "manager1");
env.put(Context.PROVIDER_URL,"opmn:ormi://samboapp-1.bokklubbene.no:home");
Compiled and ran with "java -classpath
.:oc4jclient.jar:../../opmn/lib/optic.jar RMIClientTest". Received:
Exception in thread "main" java.lang.NoClassDefFoundError:
oracle/ias/opmn/optic/OpticException
at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContext
Factory.java:238)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at RMIClientTest.<init>(RMIClientTest.java:16)
at RMIClientTest.main(RMIClientTest.java:31)
2) cd into $ORACLE_HOME/j2ee/home/demo/jms/oc4jjms
changed etc/jndi.properties to:
java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no:6003:home
java.naming.security.principal=admin
java.naming.security.credentials=manager1
(also tried with
java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory)
then cleaned and compile the example. Ran it (ant Qsend), received:
run-demo:
[exec] *** looking up java:comp/env/jms/QueueConnectionFactory via JNDI
[exec] Exception in thread "main" java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException
[exec] at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(
RMIInitialContextFactory.java:238)
[exec] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
[exec] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
[exec] at javax.naming.InitialContext.init(InitialContext.java:219)
[exec] at javax.naming.InitialContext.<init>(InitialContext.java:175)
[exec] at Oc4jjmsDemo.getCF(Oc4jjmsDemo.java:66)
[exec] at Oc4jjmsDemo.getQCF(Oc4jjmsDemo.java:56)
[exec] at Qsend.doit(Qsend.java:63)
[exec] at Qsend.main(Qsend.java:47)
Text continued in next action...



01-APR-04 07:58:44 GMT

Text continued from previous action...

[exec] Result: 1
Neither the demo or RMIClientTest.java works on the remote machine.



01-APR-04 08:13:39 GMT

New info : Sorry if there was some confusion here to where the demo had previous
ly worked. Just to clarify, the first time I got the demo to work, was on a diff
erent machine that had oc4j standalone installed. The 'remote' machine (the one
to run the actual product) did not have oc4j installed at this time.
It now does and the jars from the original oc4j installation are being used instead now. T
his recent installation of oc4j on the remote machine allowed me to try and run
the demos. They don't work on this machine as explained in the previous comment.




01-APR-04 09:42:47 GMT

ok. As the first step, install standalone on the machine where you are running y
our client from. Run oc4jJMS demo from this client machine to connect to your re
mote ias machine where your OC4JJMS is running for your application.
This will bring out any config issue. when this step is successful we can run your custom c
lient & then address any issue

Is there any firewall between the two machines? Let me know if you need any further info on this.

regards,
Prag

01-APR-04 09:43:02 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


01-APR-04 09:49:42 GMT

New info : As explained running the oc4jjms demo on the 'remote' machine, with

same parameters that work on the other standalone oc4j machine, throws the
same
exception that I've been getting all along.


01-APR-04 11:58:55 GMT

ok, ct has 3 machines at the moment
JMS server - where the application JMS server is running
Client - where application client is running
own - his own machine where he ran the demo to conenct to JMS server & it works

running jmsdemo from client m/c to JMS server is not working
ct is going to run client from his own machine to connect to JMS server. This may not be tested successfully because the
machien were client runs need to have external server connection before it can
reach the point where it will connect to JMSServer. He will anywya try this & up
date teh Sr. At the moment problem seesm to be unique to client machine. possibl
e env set up


01-APR-04 13:01:43 GMT

New info : On my pc with standalone oc4j installed:
1) oc4jjms demo works with jms connections to the server.
2) client program does not, still throwing the
"java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException".


01-APR-04 13:59:09 GMT

What is the command did you use?
Did you sue something like this? java -classpath smsgw.jar com.datek.cpas5.Cpas5Application -config
Please do not add any other jar files to the class path to start with.
Then depending on the error add the relevant jar file to the top of classpath in the command. Please let me know the
outcome


01-APR-04 14:01:12 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


01-APR-04 18:37:46 GMT

New info : java -classpath smsgw.jar com.datek.cpas5.Cpas5Application -config
-->
javax.naming.NoInitialContextException: Cannot instantiate class:
com.evermind.server.ApplicationClientInitialContextFactory [Root exception is
java.lang.ClassNotFoundException:
com.evermind.server.ApplicationClientInitialContextFactory]
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.initializeConnection(JMSInt
erfaceHandler.java:373)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterfaceHand
ler.java:36)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.makeConnec
tion(JMSInterfaceHandler.java:780)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSInt
erfaceHandler.java:742)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException:
com.evermind.server.ApplicationClientInitialContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
java -classpath ../oc4j/j2ee/home/oc4jclient.jar:smsgw.jar
com.datek.cpas5.Cpas5Application -config
-->
java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException



01-APR-04 18:40:42 GMT

New info : Same results again changing
com.evermind.server.ApplicationClientInitialContextFactory
to
com.evermind.server.rmi.RMIInitialContextFactory



01-APR-04 21:13:50 GMT


Reviewing progress made to date.

This is a standard java application accessing JMS server within AS 10g (9.0.4).
There seem to be problems accessing classes contained in the Oracle library "optic.jar"

There are two thoughts that occur to me:

[1] I suspect the optic.jar file is needed when the client uses the provider.url:

java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no:9127:home

which I believe dynamically discovers the rmi provider from the OPMN layer.
In this case (which I have not seen used all that frequently and therefore will
have to refresh my memory of
the documentation) I believe the port should be the ONS or RMI port rather than the JMS port.
I do however need to chech this.

I suspect that for now the port is not the issue, as this is a class loader problem
.

In case the dynamic lookup is causing a problem, have we tried accessing the rmi provide more statically, via say
ormi://samboapp-1.bokklubbene.no:3101 ?

[2] Does the client jar that you run have a manifest file including a Class-Path a
ttribute?

When this is present I believe any classpath entries on the command l ine/environment are ignored in favor of the client's mainfest.
This could be checked by walking the classpath returned by:

String classPath=System.getProperty("java.class.path");

I will work on setting up a simple client to access 10g remotely (as has been done) which I will package and run from a JAR file.
I will then add a MANIFEST.MF conyaining a Class-Path attribute to the client's META-INF
directory to see if it breaks the same way.

Regards,
Andy Parkman

@WIP




01-APR-04 22:24:37 GMT


I setup a quick JMS client example with the client running from Windows to the OC4J server running on windows.
For the client env I have a script which sets up the CLASSPATH variable for the most part as it would from the:

- oc4j.jar's META-INF/Manifest.mf "Class-Path"
- the %OC4J_HOME%/applib

I comment some of the JARS not needed out to save environment length.
In fact, I can shorten the classpath down to just include "oc4jclient.jar" and it will work.
So I stick with this minimal path for testing.

The moment I introduce OPMN into the provider URL: opmn:ormi://aparkman-sun.us.oracle.com:5134:JMS_DEMO/OJMS_TEST2_APP
I get:

JMSQueueProducer::retrieveInitialContext() - THROWABLE[java.lang.NoClassDefFoundErr
or: oracle/ias/opmn/optic/OpticException]

As soon as I copy "optic.jar" to the client (it is not in the standalone distribution, so I ftp'd it to the client m
achine from the location $ORACLE_HOME/opmn/lib/optic.jar) and include it in the
classpath I get different errors but NOT the class not found:

> JMSQueueProducer::main() - ENTER
> JMSQueueProducer::JMSQueueProducer() - ENTER
> JMSQueueProducer::retrieveInitialContext() - ENTER
> Error: Error while parsing OPMN dump in XML format: XML Parse Exception: tag=[null] Not Found: <,
> content [Invalid protocol verification, illegal ORMI request or request performed with an incompatib
le version of this protocol
> Invalid protocol verification, illegal ORMI request or request performed with an incompatible version of this protocol]

So I changed the port in the provider to match the servers ONS "request" as per $ORACLE_H
OME/opmn/conf/ons.conf (6003)
and after this I get different errors:

> java.lang.InstantiationException: Error creating context: jms/QueueConnectionFactory not
found

Looking at this again more carefully....

@WIP



02-APR-04 02:28:36 GMT


Rechecked my steps a little more slowly and carefully.

On the server end, created a new OC4J instance named "JMS_TEST" as a DCM managed OC4J component in an A
S 9.0.4 instance.
To the JMS_TEST/config/jms.xml I added the queues needed by the test case:

> <!-- vvv APARKMAN 2004-APR-01 vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
>
> <queue
> name="APARKMAN_JOB_QUEUE"
> location="jms/APARKMAN_JOB_QUEUE"
> >
> <description>Job queue for application OJMS_TEST1_APP</description>
> </queue>
>
> <queue
> name="APARKMAN_JOB_QUEUE2"
> location="jms/APARKMAN_JOB_QUEUE2"
> persistence-file="APARKMAN_JOB_QUEUE2.persistence"
> >
> <description>Job queue for application OJMS_TEST2_APP</description>
> </queue>
>
> <!-- ^^^ APARKMAN 2004-APR-01 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->

By default, newly created OC4J instances use jazn-data.xml for authentication.
I wanted to make the test case a little more flexible (not using the admin username an
d password which might be
tricky to change) so used "jaznadmin" tool to create a new user "aparkman" (password "aparkman").

To do so, since jaznadmin tool will only modify jazn-data,xml file at location $ORACLE_HOME/j2ee/home/config/jazn-d
ata.xml,
I first renamed this file to jazn-data.xml.orig then created a symbolic link called "jazn-data.xml" that pointed across to $ORACLE_HOME/j2ee/JMS_TEST/c
onfig/jazn-data.xml.

I was then able to create the aparkman user via the following:

% cd $ORACLE_HOME/j2ee/home
% java -jar jazn.jar -user admin -password welcome -shell
JAZN:>

First add user:

JAZN:> adduser jazn.com aparkman aparkman
JAZN:>

Next, grant user RMI "login" permission:

JAZN:> grantperm jazn.com -user aparkman com.evermind.server.rmi.RMIPermission login
JAZN:>

It is necessary to exit the "jaznadmin" shell (before jazn-data.xml is updated) and then re
start the JMS_TEST instance for the change to take effect (opmnctl restartproc p
rocess-type=JMS_TEST).

NOTE: after this point the symbolic link can be deleted and the original jazn-data.xml restored under $ORACLE_HOME/j2ee/home.

I packaged up my client as a JAR file "client1.jar".
I created a directory that contained "client1.jar" and "optic.jar" and the following "jndi.properties" file:

java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactor
y
java.naming.provider.url=ormi://aparkman-sun.us.oracle.com:5134/
java.naming.security.principal=admin
java.naming.security.credentials=welcome

I find that I do need both of the following OC4J libraries in the path for my client:

- $ORACLE_HOME/j2ee/home/oc4j.jar
- $ORACLE_HOME/j2ee/home/oc4jclient.jar

So my classpath looked like this:

M:\tstdir>echo %CLASSPATH%
.;M:\oc4j90400_031125.1647\j2ee\home\oc4j.jar;M:\oc4j90400_031125.1647\j2ee\home\oc4jclient.jar;.\clien
t1.jar;.\optic.jar

I was then able to execute the client class "JMSQueueProducer.class" as follows:

% java JMSQueueProducer 1 1 2 1

This runs successfully.

I then modify the provider URL to use OPMN syntax:

java.naming.provider.url=opmn:ormi://aparkman-sun.us.oracle.com:6003:JMS_DEMO/

But get the following error during the creation of the InitialContext:

> JMSQueueProducer::retrieveInitialContext1() - ENTER
> java.lang.InstantiationException: Error creating context: jms/QueueConnectionFactory not found
> at com.evermind.server.ApplicationClientContext.addResourceEntries(ApplicationClientContext.java:259)
> at com.evermind.server.ApplicationClientContext.createContext(ApplicationClientContext.ja
va:55)
> at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:155)
> 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 JMSQueueProducer.retrieveInitialContext1(JMSQueueProducer.java:259)
> at JMSQueueProducer.<init>(JMSQueueProducer.java:409)
> at JMSQueueProducer.main(JMSQueueProducer.java:474)

Now the complaint is about the following entry in orion-application.xml:

<resource-ref-mapping
name="jms/JOB_QCF"
location="jms/QueueConnectionFactory"
/>

According to the docs:

> Default Connection Factories
> =======================
> OracleAS JMS creates six default connection factories ranging over the XA/non-XA and various JMS domains.
> You can use these connection factories in your code without needing to add them
to the jms.xml configuration file,
> rather than defining new connection factories.
> The only reason to define a new connection factory in the jms.xml file is if you need to specify non-default values
> for one or more of the optional attributes of connection-factory elements.
>
>The default connection factories are as follows:
>
> jms/ConnectionFactory
> jms/QueueConnectionFactory
> jms/TopicConnectionFactory
> jms/XAConnectionFactory
> jms/XAQueueConnectionFactory
> jms/XATopicConnectionFactory

So, this explains why this works without using a direct OC4J port even when "jms/QueueConnectionFactory" location is not explic
itly set in
"jms.xml". Since that is working, I have no explanation why this error should be seen when using the dynamic "opmn" scheme.

I am filing a bug with developmet to explore these findings.

However, in the first instance, can you try using a provider URL that does not use the "opmn" syntax so that we can see i
f
we can get working at your location what we have been able to get working here?

You should be able to tell the ports being used by your instance via:

% opmnctl status -l

Regards,
Andy Parkman

@CUS



02-APR-04 03:25:42 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


02-APR-04 04:27:43 GMT


Grrr......

I filed:

BUG#3549625
OC4J JMS CLIENT SEES "JMS/QUEUECONNECTIONFACTORY NOT FOUND" THROUGH OPMN LOOKUP

In looking over my test case to present in the bug I see my one small error.
In the OPMN lookup url, I used the WRONG OC4J instance name.
I used "JMS_DEMO" and not "JMS_TEST".

I corrected my mistake and now the program works with both lookup techniques:

java.naming.provider.url=ormi://aparkman-sun.us.oracle.com:5134/
java.naming.provider.url=opmn:ormi://aparkman-sun.us.oracle.com:6003:JMS_TEST/

It's late and I made a careless mistake, but in my defense the error presented was not very intuitive.
I got a failure to find the JNDI binding "jms/QueueConnectionFactory" which I knew to exist.
I should have seen an error saying: OC4J instance "JMS_DEMO" does not exist.
Changing the bug to be about the confusing error message rather than the original fail
ure.

I now have both of these working and in a form that we can share with you the customer to test in your environment.

The next thing would be so see why your client does not seem to want to find "optic.jar" when it is in your classpath
.
Possibly running the client with "-verbose:class" and uploading the output would help.
It is also worth checking if the customer is starting up with "java -jar mylib.jar" if that JAR file has a Main-Class and a Class-Path
in it's META-INF/MANIFEST.MF file.

If it does then I believe it ignores CLASSPATH in the environment and -cp command line directive and so will not pick up
our class files this way.

I dleiberately changes my CLASSPATH to omit just "optic.jar":

.;M:\oc4j90400_031125.1647\j2ee\home\oc4j.jar;M:\oc4j90400_031125.1647\j2ee\home\oc4jcli
ent.jar;./client1.jar

In this situation the first class it reports as missing is: oracle/ias/opmn/optic/OpticException.
If I take out oc4j.jar and oc4jclient.jar the first missing class is: javax/jms/Message

This looks to be a client side configuration issue rather than an OC4J issue.

Regards,
Andy Parkman

@CUS







02-APR-04 04:41:48 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


02-APR-04 04:56:38 GMT

Associated bug 3549625 has been updated and is still at status: 16.


02-APR-04 13:57:24 GMT

Associated bug 3549625 has been updated and is still at status: 16.


02-APR-04 19:57:49 GMT

Associated bug 3549625 has been updated and is still at status: 15.


05-APR-04 05:35:36 GMT

Associated bug 3549625 has been updated and is still at status: 15.


05-APR-04 10:32:11 GMT

New info : -jar is not used in the command line, so to my understand manifest
files won't play a part.
java -verbose:class -classpath
smsgw.jar:/opt/oc4j/j2ee/home/oc4j.jar:/opt/oc4j/opmn/lib/optic.jar:/opt/oc4j/op
mn/lib/ons.jar com.datek.cpas5.Cpas5Application -config | grep oracle
outputs (without the program's normal output):
[Loaded com.oracle.iiop.server.IIOPUtil]
[Loaded
oracle.oc4j.admin.management.callbackinterfaces.J2EEDeployedObjectCallBackIf]
[Loaded oracle.oc4j.admin.management.callbackinterfaces.J2EEModuleCallBackIf]
[Loaded
oracle.oc4j.admin.management.callbackinterfaces.AppClientModuleCallBackIf]
[Loaded oracle.oc4j.admin.management.util.CollectionModificationListener]
[Loaded oracle.oc4j.admin.management.shared.StateManageableConstant]
[Loaded oracle.oc4j.admin.management.mbeans.StateManageable]
[Loaded oracle.oc4j.admin.management.callbackinterfaces.J2EEServerCallBackIf]
[Loaded oracle.oc4j.admin.management.callbackinterfaces.JVMCallBackIf]
And still throws the same exception.
Environment variables ORACLE_HOME and J2EE_HOME have been set.



05-APR-04 10:39:14 GMT

New info : Ok, i have made a stupid mistake.
I never had $ORACLE_HOME/opmn on my desktop. Copied that folder across from an
ias machine, and
java -classpath
smsgw.jar:/opt/oc4j/j2ee/home/oc4j.jar:/opt/oc4j/opmn/lib/optic.jar:/opt/oc4j/op

mn/lib/ons.jar com.datek.cpas5.Cpas5Application -config
now fails with:
javax.naming.NameNotFoundException: javax.jms.QueueConnectionFactory not found
It still does not run on the client machine.
I have checked the permissions so I'm not too sure what could be different
between the two machines...



05-APR-04 10:58:12 GMT

New info : [oracle@samboapp-1 oracle]$ product/ias/opmn/bin/opmnctl status -l

Processes in Instance: ias.samboapp-1
-------------------+--------------------+-------+----------+------------+-------
---+-----------+------
ias-component | process-type | pid | status | uid |
memused | uptime | ports
-------------------+--------------------+-------+----------+------------+-------
---+-----------+------
OC4J | home | 30250 | Alive | 1840578876 |
331232 | 69:03:55 | jms:3701,rmi:3201,ajp:3301
WebCache | WebCacheAdmin | 30337 | Alive | 1840578878 |
3520 | 69:03:03 | administration:4000
WebCache | WebCache | 30352 | Alive | 1840578877 |
29928 | 69:03:02 | statistics:4002,invalidation:4001,http:7777
HTTP_Server | HTTP_Server | 30195 | Alive | 1840578875 |
43816 | 69:03:44 | http2:7200,http1:7778
dcm-daemon | dcm-daemon | 30168 | Alive | 1840578874 |
51132 | 69:04:10 | N/A
LogLoader | logloaderd | N/A | Down | N/A |
N/A | N/A | N/A



05-APR-04 11:00:14 GMT

New info : So my urls should be:
java.naming.provider.url=ormi://samboapp-1.bokklubbene.no:3201/
java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no:6003:home/
??
[I just love the way the TAR formats my updates :=( Is there some trick when I
want to avoid text being wrapped?]



05-APR-04 11:03:13 GMT

New info : With both the given urls in my last update I get from the client
program running on my desktop:
<br/>
javax.naming.NameNotFoundException: javax.jms.QueueConnectionFactory not found
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:149)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.initializeConnection(JMSInt
erfaceHandler.java:388)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler.access$200(JMSInterfaceHand
ler.java:36)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.makeConnec
tion(JMSInterfaceHandler.java:780)
at
com.datek.cpas5.interfaceHandler.JMSInterfaceHandler$ConnectionWorker.run(JMSInt
erfaceHandler.java:742)



05-APR-04 11:10:15 GMT

New info : Ok, apologies again...
After changing
queueConnectionFactory --> jms/QueueConnectionFactory
and
java.naming.factory.initial -->
com.evermind.server.ApplicationClientInitialContextFactory
I can get both urls to successfully work on my desktop pc.
So that leaves it just to a configuration problem between the two machines...



05-APR-04 11:17:14 GMT

New info : Output from the two urls on the client machine: <br/>
1) ormi://samboapp-1.bokklubbene.no:3201
java -classpath
smsgw.jar:/opt/oc4j/j2ee/home/oc4j.jar:/opt/oc4j/j2ee/home/oc4jclient.jar
com.datek.cpas5.Cpas5Application -config
crashes with:
java.lang.NoClassDefFoundError: javax/transaction/SystemException
...
2) opmn:ormi://samboapp-1.bokklubbene.no:6003:home
java -classpath
smsgw.jar:/opt/oc4j/j2ee/home/oc4j.jar:/opt/oc4j/j2ee/home/oc4jclient.jar:/opt/o
c4j/opmn/lib/optic.jar:/opt/oc4j/opmn/lib/ons.jar
com.datek.cpas5.Cpas5Application -config
crashes with:
java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException
...



05-APR-04 17:22:22 GMT



Thanks for your updates. We will review, and get back to you

05-APR-04 18:03:01 GMT


Hi Michael,

There have been several updates that indicate at some positive forward momentum.
I will copy some of the updates you made from above so I can add some response to questions etc:

> So my urls should be:
> java.naming.provider.url=ormi://samboapp-1.bokklubbene.no:3201/
> java.naming.provider.url=opmn:ormi://samboapp-1.bokklubbene.no:6003:home/
> ???

Yes, though this would suggest that you are using the OC4J home instance (rmi port 3201).
I would not myself recommend this. Since the OC4J home instance cannot be deleted,
I think it a better practice to create a new custom OC4J instance, that way if anything goes
unexpectedly wrong with that instance, you have the option to delete the entire OC4J insta
nce
and recreate from scratch (which is not possible with OC4J home). In release 9.0.4
the OC4J home instances are present but "disabled" by default.

I can only tell you the OPMN request port with 100% certainty of you upload or confirm th
e entries in
$ORACLE_HOME/opmn/conf/opmn.xml to be:

<?xml version = '1.0' encoding = 'UTF-8'?>
<opmn xmlns="http://www.oracle.com/ias-instance">
<notification-server>
<port local="6100" remote="6200" request="6003"/>

If your opmn:ormi port value matches the "request" port for the <notification-server> this would be correct.

> javax.naming.NameNotFoundException: javax.jms.QueueConnectionFactory not found

You are correct in how you handled this error. The name not found exception generally means that the binding
was not found. It would be nice if we said what binding we were asking for that failed instead
of telling you the binding type.
But you got it!

> After changing
> queueConnectionFactory --> jms/QueueConnectionFactory
> and
> java.naming.factory.initial -->
> com.evermind.server.ApplicationClientInitialContextFactory
> I can get both urls to successfully work on my desktop pc.

I'll assume that the above means you got your special client to work from your PC, which proves that this is not
a technical issue
our incompatability between your client and our container (or our container and the expected standards).
I therefore agree that this is a configuration issue.

I assuming that the following:

> 1) ormi://samboapp-1.bokklubbene.no:3201
> java -classpath
> smsgw.jar:/opt/oc4j/j2ee/home/oc4j.jar:/opt/oc4j/j2ee/home/oc4jclient.jar
> com.datek.cpas5.Cpas5Application -config
> crashes with:
> java.lang.NoClassDefFoundError: javax/transaction/SystemException
> ...
> 2) opmn:ormi://samboapp-1.bokklubbene.no:6003:home
> java -classpath
> smsgw.jar:/opt/oc4j/j2ee/home/oc4j.jar:/opt/oc4j/j2ee/home/oc4jclient.jar:/opt/oc4
j/opmn/lib/optic.jar:/opt/oc4j/opmn/lib/ons.jar
> com.datek.cpas5.Cpas5Application -config
> crashes with:
> java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException

Reflects status on the other machine for thing you said you have working on your PC??

For (2) the class not found error can really only come from the JVM not picking the class file up:

- cut the command line to a file and edit the file to separate the entries
- prefix each line by "file":

file /opt/oc4j/j2ee/home/oc4j.jar
file /opt/oc4j/j2ee/home/oc4jclient.jar
file /opt/oc4j/opmn/lib/optic.jar
file /opt/oc4j/opmn/lib/ons.jar

Make sure that the permissions of the JAR's are readable to the buser invoking the client.
Also, make sure the JAR's were copied in "binary" mode to avoid corruption.
You might like to run "jar tvf /opt/oc4j/opmn/lib/optic.jar|grep OpticException" to check tha
t
"oracle/ias/opmn/optic/OpticException" is in there - optic.jar is the only place it should be.

For (1) which JDK are you picking up when running the client?
Can you check: "which java" and "java -fullversion"?
I am assuming that this was not a JDK that was installed during a 9iAS installation on this system (please
correct if this is incorrect)?

The "javax/transaction/SystemException" should come from the "jta.jar" which by default is in the $ORACLE_HOME/j2ee/home/lib dir
ectory.
During installation certain files are copied to the JDK_HOME/jre/lib/ext directory and if you upgrade the JSDK used by Application Server to one downloa
ded rather than "installed" additional steps have to be conducted as per:

Note:258833.1
How to update the JAVA SDK installed within Oracle Application Server 9.0.2.0.1

I think that in my case I only needed oc4j.jar, oc4jclient.jar and optic.jar, since I was using the same JDK from the $ORACLE_HOME location.
I think if you copy the ${ORACLE_HOME}/j2ee/home/lib/jta.jar file to your client system
and include this on the classpath, then it will resolve the ClassNotFound error
on javax/transaction/SystemException.

Let's concentrate on getting the simple case or ormi to work first and once this is working, try the same environment wi
th optic.jar added for the "opmn:ormi" dynamic lookup.

Regards,
Andy Parkman

@CUS



05-APR-04 21:37:27 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


06-APR-04 14:03:26 GMT


Called Michael.

The machine that works has standalone OC4J. It has a 9.2 database client present.
This works even with the customers client.
The 9.2 client does install an Oracle version of the JDK at $ORACLE_HOME/jdk and this does includ
e jta.jar in it's jre/lib/ext directory.
However, Michael is not using this JDK, he is using a standard sun 1.4.2 jdk from the /opt directory.

On the system that does not work, the same JDK is used. The environment is similar but we still
seem to be unable to locate some JAR files. Michael will start by getting the si
mpler ormi client to work and agrees that adding the ${ORACLE_HOME}/j2ee/home/li
b/jta.jar is the first quick test.

However, at this point, the system he needs is being moved and is not available to him.
The system may not be available until after Easter now, so I am going to mark this issue in SLP status awaiting furt
her updates
from Michael when we can carry on.

Regards,
Andy

@SLP




06-APR-04 14:09:28 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


15-APR-04 03:09:07 GMT


Michael,

I believe I have left enough time for you to have been able to progress this issue.
As this has been open for some time without us feeling this is a product related issue,
can you provide an updated to status?

Regards,
Andy Parkman

@CUS




15-APR-04 13:37:15 GMT

New info : When I went to put the jta.jar into the jre/lib/ext/ I found
oc4j.jar there!
Removing it seems to have fixed the problem.
I will give one more update when I am sure all is working.
(I am using opmn:ormi://samboapp-1.bokklubbene.no:6003:home url).



15-APR-04 14:12:54 GMT


Michael,

That is excellent news.

As this issue has been open for such a long time without there being a product issue as it now seems to be resolved at this poi
nt I will inactivate this service request, which still allows you to engage us o
n this issue for a further 2 weeks if the current solution does not pan out.
Based on my testing here, I am pretty confident that the technology is working and
that you have this issue fully resolved.

Thank you for using our Application Server technologies, I wish you continued success with your adoption.

Regards,
Andy Parkman

@SCL



15-APR-04 14:13:56 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


20-APR-04 10:35:52 GMT

New info : The client and the server do not appear to be accessing the same
queue!
I cannot get any messages across the two program?!
Code to access the queues in the server:
Context jndiContext = new InitialContext();
QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)jndiContext.lookup("jms/QueueConnectionFactory");
Queue dest = (Queue)jndiContext.lookup("jms/SmsOutQueue");
Queue recv = (Queue)jndiContext.lookup("jms/SmsInQueue");
Code to send messages on the server:

QueueConnection connection =
connectionFactory.createQueueConnection();
QueueSession session = connection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
QueueSender sender = session.createSender(dest);
TextMessage message = session.createTextMessage();
message.setText(text);
sender.send(message);
sender.send(session.createMessage());
Jndi properties on the client to read queues:
<JMSInterfaceParameters>
<UseJNDI>true</UseJNDI>

<JavaNamingProviderURL>opmn:ormi://samboapp-1.bokklubbene.no:6003:home</JavaNami
ngProviderURL>

<JavaNamingFactoryInitial>com.evermind.server.ApplicationClientInitialContextFac
tory</JavaNamingFactoryInitial>

<JavaNamingSecurityPrincipal>admin</JavaNamingSecurityPrincipal>

<JavaNamingSecurityCredentials>manager1</JavaNamingSecurityCredentials>

<QueueConnectionFactoryName>jms/QueueConnectionFactory</QueueConnectionFactoryNa
me>
<ReadQueue>jms/SmsOutQueue</ReadQueue>
<WriteQueue>jms/SmsInQueue</WriteQueue>
</JMSInterfaceParameters>
Is it possible that there is a mismatch of queues, and infact 4 queues exist
instead of 2?



20-APR-04 10:40:53 GMT

New info : And my $ORACLE_HOME/j2ee/home/config/jms.xml has:
<queue name="SMS to Datek Queue" location="jms/SmsOutQueue">
<description>Bokklubbene to Datek Queue</description>
</queue>


<queue name="Datek to SMS Queue" location="jms/SmsInQueue">
<description>Datek to Bokklubbene Queue</description>
</queue>



20-APR-04 10:44:48 GMT

New info : And I'm browsing the queues (which always returns nothing) with:
<br/>
QueueConnection connection = connectionFactory.createQueueConnection();
QueueSession session = connection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
Enumeration en1 = session.createBrowser(dest).getEnumeration();
System.out.println("jms/SmsOutQueue contains:");
while( en1.hasMoreElements() ){
Message msg = (Message)en1.nextElement();
System.out.println(msg.toString());
System.out.println(((TextMessage)msg).getText());
}


20-APR-04 12:40:34 GMT


Hi,

Unfortunately, this is a different issue compared to the class loading issue that I provided assistance with via the service request.
As such, this will have to be filed as a new service request to keep the details of each issue separ
ate and also gain you better alignment with your business hours.

I will inactiv ate this issue pending further updates directly related to the class loading iss
ues that were reported here.

Regards,
Andy Parkman

@SCL


20-APR-04 12:43:30 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


20-APR-04 13:59:55 GMT

New info : Erh? The title is "URL REQUIRED FOR JMS CONNECTION FROM OUTSIDE
SERVER", not anything about classloading...
I still feel that the problem is related to not providing the correct jndi properties to connect to a specific queue on
the server. In which case it is be the same problem, and it's not solved yet. I
t still has the same priority and ramifications here.
If it definitively the correct URL then I will be happy to file a new TAR, but I'm not 100% sure on this..
.
I can browse the queue on the server and successfully read the queue's messages from the server, but the client seems still to be connecting to a different q
ueue. Is there some demo or example I can run on the client machine to ensure th
is?



20-APR-04 15:12:00 GMT

Michael,

I will look again at this issue to give a second opinion. However, the abstract of the SR was provided by yourself and has not been updated to reflect th
e problem that you were actually facing. During the whole life of this SR to dat
e, you were unable to connect to the server because you had a classloading issue
. The root cause of this problem seems to have been your having copied the oc4j.
jar file to the jre/lib/ext directory. Though you had described to us other dire
ctories on the client where you had copied files and though we made every effort
to validate (and prove with internal test cases) that these were the correct fi
les and that the product was for us working as expected, you did not give us any
indication of having copied files to any other locations. Without a little inpu
t from you on such matters, I don't think it would be fair for you to expect us
from our remote position to be able to find this.

This is why I believe the issue has moved on significantly from the issue you faced faced or at least the one
that we provided a long focus on. The time we have spent assisting you on this
service request and all the technical details in this SR are focused on that spe
cific analysis which is why I feel we have moved on here.

Regards,
Andy



21-APR-04 12:32:53 GMT

New info : The classloading was but one small hurdle involved in this TAR. Was

it really expected to open a separate TAR for each hurdle in solving the
problem?
- What was the initial naming factory to use?
- what was the url to use?
- what was the (or which) username and passord to use?
- Was the application-client.xml required or not?
- Which port to choose?
- What to include in the classpath? Where's the documentation that you must
install the WHOLE 10g onto a machine just to get the client code to work.
Either this or to isntall the standalone oc4j server and then copy the opmn
libraries across as well. (This lead onto the strange classloading problem,
that was originally and unfortunately caused by the consultant that installed
the client program also copying the oc4j.jar into java's lib/ext directory, not
information that I knew so could not be expected to offer to the TAR).
And I'm expected to swallow that this TAR is only about classloading! You have
got to be kidding. If anything this TAR is about a serious lack of
documentation. Find me all the required information needed to get a standalone
java program to connect to a JMS queue running on an Oracle 10g server in one
chapter or tutorial in any of the Oracle documentation? It is such an easy
objective on every other J2EE certified server (WebLogic, JBoss, Sun Platform),
and the JMS APIs are so incredibly simple that I am completely stunned how
oracle has managed to make it such a complicated affair. The closest, and up
until today most useful thing, has been the j2ee/home/demo/jms/oc4jjms
examples, which only exist in the standalone oc4j installation, and of which I
had no idea existed due to not reading about it in any of the JMS
documentation.
Do you still want me to open a new TAR?



22-APR-04 03:55:41 GMT


Thank you for the update. At this point I'm not sure whether I am talking to one or two people (Mike or Michael)
However, though I understand your concerns I reach a different conclusion for the following reasons.

> - What was the initial naming factory to use?
> - what was the url to use?
> - what was the (or which) username and passord to use?
> - Was the application-client.xml required or not?
> - Which port to choose?
> - What to include in the classpath?

Surely many of these are basic and standard things that are equally applicable to all the contai
ners you mention?
For example, the need for an "application-client.xml" to exist, even if not providing any key information is mandated by the J2EE specificatio
n.

The rest of the information is (in my opinion) adequately addressed in product documentation and supplemented by support notes.
I'd have to look again at the service request to be 100% sure, but I honestly don't think it took us very lo
ng to go over the product specific answers to the above question. That this did
not work immediately was down to the obscure nature of the root cause and the po
or visibility that we have on to your system.

> Where's the documentation that you must install the WHOLE 10g onto a machine just to get the client code to wo
rk.

There isn't any and I don't think you've been told this. For a normal client, you just need oc4j.jar and oc4jclient.jar.

In this case, for reasons that I have accepted rather than challenged, you seem to want to dynamicaly discover wh
ich JVM processes have been started for your OC4J instances (ie a cluster of OC4
J instances with the same configuration exists). As such, since you are using th
e opmn:ormi lookup, you need the optic.jar as well.

I wonder if this is where all the confusion is coming from???

When you gained familiarity with the other J2EE containers and JMS, did you dive right in to implementing a JMS client appli
cation where the clients load balance their access to OC4J and JMS resources acr
oss multiple JVM instances of a cluster?

I am sure that there were some learning difficulties that you encountered with your familiarization with these product
s and think you might be disappointed with the speed at which you can apply that
knwoledge to our environment. You might have a good point that the way we do it
is different enough to warrant additional documentation. I do think most things
(like dynamic port assignements) are adequately covered in the documentation, b
ut there is so much documentation it is often difficult to know where to look.

However, in turining to us in support I don't think it took very long to have pr
ovided you with the correct information. I believe the significant factor for th
e delay in getting this to work was not the advice you had been given but the en
vironment you were testing in. We went to the trouble of quickly testing the pro
cess in our environment where we rapidly got the techniques to work to ensure th
e information we had provided you was accurate.

> And I'm expected to swallow that this TAR is only about classloading!

There is no easy rule of thumb to this. It has taken a lot of time, effort and documentation in the service request
to reach this point, so much so that to anyone reading it now it seems exclusive
ly about that issue. I believe it would be much better to start a new page havin
g moved forward to a different aspect of your overall problem, just so we can ke
ep unrelated facts seprated.

Please keep in mind that Oracle support has more specialized resouces than you are likely to have. To you an issue may be "deployi
ng a J2EE application and accessing a remote database via JDBC". If that databas
e is RAC enabled and you are looking for a JDBC connect string that leverages "T
ransparent Application Failover" then to provide you the best level of support y
our one "logical" issue may span multiple support teams (Applicatiin Server and
JDBC support teams) and be better addressed by multiple service requests. As a u
le of thumb, we like to keep each service request specific to a particular probl
em so as to avoid confusion.

Therefore things are not as black and white as might appear and rather than have a single rule, I think you have to gauge when a n
ew service request is needed based on it's content. Had you:

(a) just asked the simple questions you present above; and
(b) we provided the answers and this worked quickly without a lot of analysis caused by the oc4j.jar being in the lib/e
xt directory

I would not dream of suggesting a new service request was needed at this point.
Given the work that has taken place, I think a new one would better serve clarity.

Now, on to what I perceive to by your current issue....

Do you have multiple JVM processes that are part of an OC4J process cluster or 9iAS c
luster?
What is the topology of your install?

I am implying that you have multiple OC4J instances based on your desire to use opmn:ormi.
This might also explain why multiple JMS clients are seeing different queues.

When using OracleAS JMS (lightweight memory implementation as opposed to Oracle AQ JMS that uses Oracl
e Advanced Queuing in the database to store the queue) each JVM intance will hav
e it's own JMS server.

In that situation, you want to setup the queue connection factory to specifically use a

Oracle® Application Server Containers for J2EE
Services Guide
10g (9.0.4)
Part No. B10326-01
September 2003

http://download-west.oracle.com/docs/cd/B10464_02/web.904/b10326.pdf

Chapter 3: Java Message Service
Oracle Application Server JMS
pp 3-2 through 3-31

Specifically, for OracleAS JMS, you would need to set the QueueConnectionFactory properties tha
t designate the JMS port of one specific OC4J instance in the cluster, which is
addressed in:

Table 3€“4 Connection Factory Configuration Attributes
page 3-26

host String (DNS or dot notation host name) no [ALL] The fixed OC4J JMS host t
his connection factory will connect to.
By default, a connection factory uses the same host as configured
for the jms-server element. Non default values can be used to force
all JMS operations to be directed to a specific OC4J Java virtual
machine (JVM), bypassing any locally available OC4J JMS servers and other Oracle Application S
erver or clustered configurations.

So before making any decision on whether we separate this out into a new service request, that I will be happy to create on
your behalf, can you elaborate more about what you are trying to acheive, so I c
an relate to your needs a bit better.

Regards,
Andy Parkman

@CUS



22-APR-04 05:04:42 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


22-APR-04 09:09:48 GMT

New info : Thanks for the update, it's provides some useful information. A new

TAR has been opened 3682720.994. I will provide feedback from your questions
into the new TAR. Please feel free to close this TAR.
I can understand the value added to the product by the complexity of the
environments supported. None-the-less... Oc4j JMS appears to be the entry
technology to get started on, I'm sure customers will want to get the basics
working first and then change over to the more advanced technologies (eg AS
JMS) if it is required. The documentation on Oc4j JMS is targeted more at
client web applications, not at standalone java programs. Indeed you had to
play around getting the parameters correct, I could understand this if the
requested requirements were alittle more advanced, but it seems evidence that
the documentation lacks if some research is needed to begin even the simplest
of JMS queues within 10g. IMHO it would have been in Oracle's interest to make
this first step alittle simplier, apart from relieving resources on support
deps. Yes the documentation is spread out throughout numerous books/chapters,
and I'm sure most oracle customers are accustomed to this.



22-APR-04 10:09:32 GMT

Dear Mr. Wever,

many thanks for your update.

I will keep this SR open, so that my colleague will see your update.

Thanks and regards
Jörg Dörries
Duty CTC EMEA IP


22-APR-04 10:14:01 GMT

Email Update button has been pressed: Sending email to Michael.Wever@bokklubbene
.no.


08-MAY-04 00:00:42 GMT

TAR passed SCL review date. Setting to HCL.