Calendar Server 3.5: Problem using user's ID with uniuser -mod command

When there are two users who have the same Common Name (CN) in LDAP but
different User ID's (uid
field), I have a problem using the uid
field as an argument to
uniuser -mod in Netscape Calendar
Server (NCS) 3.5. For example, there may be two users, User1 and User2, who
both have the CN "John Smith."<BR>
<P>
<B>User1</B>
uid: jsmith2
sn: Smith
givenname: John
nscalxitemid: 10001:00314
<B>User2</B>
uid: jsmith
sn: Smith
givenname: John
nscalxitemid: 10001:00213
<P>
Let's say I want to change the value for nsCalOrgUnit2
for User1 to "jsmith." In NCS 4.0,
I can specify the uid as
an argument to uniuser -mod
. However, in NCS 3.5, if I specify the
uid as an argument to
uniuser -mod, the entry
for the user does not get changed.<BR>
<P>
<B>Calendar Server 4.0</B><BR>
<P>
%uniuser -mod "ID=00314" -m "OU2=jsmith/OU3=People" -n 10001
<BR>
uniuser: modified "Smith, John"<BR>
<P>
(The LDAP entry for User1 also reflects this change.)
<P>
<B>Calendar Server 3.5</B><BR>
<P>
%uniuser -mod "ID=00314" "OU2=jsmith/OU3=People" 10001
<BR>
uniuser: no need to modify "Smith,John"<BR>
<P>
(The LDAP entry for User1 does not reflect the change.)<BR>
<P>
%uniuser -mod "S=Smith/G=John/ID=00314" "OU2=jsmith/OU3=People"
10001<BR>
uniuser: no need to modify "Smith,John"<BR>
<P>
(The LDAP entry for User1 does not reflect the change.)<BR>
<P>
If I use the command uniuser -mod "S=Smith/G=John"
"OU2=jsmith/OU3=People" 10001
in NCS 3.5, the script will change the entry of the first "John Smith" in the
database and will cause the LDAP entry for this user to be updated as well.
However, the entry modified may or may not be the correct one. So, in
NCS 3.5, is there a way to specify a particular uid
to ensure that the correct LDAP entry
is modified?
<P>
To modify a user's information using the uid
field in Calendar Server 3.5, change
the user.ini file. The
following steps show how to change a user's information by modifying the
.ini file:<BR>
<P>
<OL>
<LI>Open the user.ini
file, which is in the path /users/unison/misc/user.ini
<P>
<LI>Add a section containing the desired changes. For example,<BR>
<P>
[Test]<BR>
OU2 = jsmith<BR>
OU3 = People<BR>
<P>
<LI>Run uniuser with
the following options:<BR>
<P>
% uniuser -mod "ID=00314" -s Test 10001
</OL>

It turns out to be a problem with the user Keychain. It has some weird entry that was sending the wrong password. I delete all entries to the server and that corrected the problem

Similar Messages

  • Having problems using ion tape express with itunes cannot find the song on hard drive

    Having problems using ION tape express with itunes.  The song is on hard drive as temp1 not the name of the song.  And I have problems playing it in itunes
    because it says it cannot locate the song'

    Then correct the name of the song or point iTunes to the new file.
    Issues with restoring should be directed to the manufacturer of the backup software/device... this is not an Apple or iTunes issue.

  • Problems using user defined activitys in Process Flows

    Hi everybody,
    i have problems using an user defined activity in my owb process flow.
    I did the following according to https://blogs.oracle.com/warehousebuilder/entry/how_to_use_user_defined_activity_in_owb_process_flow.
    1. create a script in /tmp called test.sh
    2. chmod +x on the script so it can be executed
    3. Changed the Runtime.properties file under ORACLE_HOME/owb/bin/admin
    property.RuntimePlatform.0.NativeExecution.FTP.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.SQLPlus.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.OMBPlus.security_constraint = NATIVE_JAVA
    4. Creating an Process Flow with just the user defined activity
    5. Deploying the Process flow was successfull
    But everytime i execute the pf i get the following error in my Job Details.
    TEST_PF:USER_DEFINED                                        
    Parameters                                                  
    Log file is available. Click Information button to view.                                             
    It says Log file is available. But i can't find this file. Also i don't know what the problem is.
    Can anybody help me out of this?
    Thanks a lot

    Hi,
    solved the problem by myself.
    I had problems with my script. So i insert set -x into the script an executed the pf again. Know i can see whats happening in a log. You can find this log in the job detail window by pressing the blue ! Button when the whole PF (the first entry) is marked.
    Greetings

  • Problem using Instant Client 10g with PHP4.3.10-16 on Debian Sarge

    Hello,
    My current email is [email protected]
    I am trying to use PHP on Debian box using Oracle 10gR2 on a RH 4 server. Everything works fine individually, but I cannot get PHP4 to use InstantClient to connect to the Oracle Server. This is what I've done:
    Oracle 10gR2 works fine on the RH 4 server. Listener is running and all required OS security is in place and works (TCP_wrappers, etc.).
    Client machine runs Debian 3.1 (Sarge). It works fine and SSH connectivity to RH4 server works.
    Instant Client 10gR2 installed on Debian client and works fine. Tested SQL*Plus connection to the RH server. I installed Instant Client from the zip file.
    I did have to add libclntsh.so to /etc/ld.so.conf and run ldconfig to get Debian to use it, though.
    Apache2.0.54-5 on Debian client works fine. Web pages on it can be opened in browsers from other machines.
    Installed PHP4.3.10-16 on Debian client using following:
    ./configure --with-oci8-instant-client=<dir of my choice>
    --enable-sigchild
    I first checked ./configure help and the option with-oci8-instant-client was there.
    Configure went well. Log showed checking for Instant Client files.
    Ran make. Saw numerous Instant Client message as words scrolled.
    Ran make install. Successful.
    Restarted Apache2 with following env variables:
    LD_LIBRARY_PATH=<my Instant Client directory)
    TNS_ADMIN=<same directory where I put my sqlnet.ora and tnsnames.ora files).
    SQLPATH=<same directory>
    I know this is correct because Instant Client SQL*Plus can connect.
    Browsers on other machines can view simple php scripts run from the Debian box.
    BUT, phpinfo does NOT show an OCI8 section.
    phpinfo does show the correct extension directory, though.
    Somehow, my PHP4 configure and make is not using the --with-oci8-instant-client option.
    I checked $PHP4HOME/ext/oci8/config.m4 file and the verbiage IS in there to use the --with-oci8-instant-client option, either with the default location or the extension_dir location.
    I tried using the new ZendCore product, even though it is not certified for Debian. It installed okay but I could not get PHP5 to work. I uninstalled it successfully and redid all of the above.
    So, any ideas as to what else I can do here? Other than not use Debian (which is probably the wisest thing to do). And I suppose I could install a thick Oracle client, assuming that Debian would take it. But I prefer the Instant Client.
    I tried the PHP ./configure syntax I've seen several places on this forum.
    ./configure --with-oci8=instantclient,<directory>
    This syntax may work on Red Hat machines but it throws a syntax error on Debian and aborts the configure.
    Thanks for any help.

    Thanks, but that did not work. Configure aborts because it cannot find the required OCI8 libraries. The --with-oci8 option is for the Oracle "thick" client.  I have only the Instant Client...and am not interested in loading the older client.
    I may have my own solution next week, though. I will be loading RH4 on a new server and will then install ZendCore and forget all about using Oracle with Debian.
    Update on trying ZendCore on Debian Sarge:
    I tried installing it again yesterday. The install seemed go to well, and said it was successful.
    It did NOT load PHP5, however. Nor did it load the Instant Client. My previously installed PHP4 and Instant Client remained in my original directories.

  • How to use user defined object with linked button

    Hi experts
    Can I use user defined table data with linked button. If yes then how. plz give me sample examples.
    Regards
    Gorge

    If you have an UDO in your form, or any other, the FormDataLoad eventhandler should be used.
    Take care, it is not inside the eventhandler.
    for VB:
    Select SBO_APPLICATION in the classes, and select FormDataLoad event
    Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
    in C#
    Add a new eventhandler as
    // declaration
    SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(ref SBO_Application_FormDataEvent);
    // eventhandler:
    public void SBO_Application_FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)

  • Problems using OS10.9.2 with migration assistant to transfer files from imac with OS10.6.8

    Having problems using the Migration assistant on a new imac with OS10.9.2 to transfer files from an old imac with OS 10.6.8.

    The Migration Assistant can transfer files from a computer running Mac OS X 10.1 or newer, but shouldn't be used to migrate applications from a PowerPC Mac to an Intel Mac.
    (35788)

  • Problem using odbc driver 10g with SQL Server 2005

    We are getting following error. Any solution?
    cannot retrieve the column codepage info from the OLE DB provider

    there is an additional error message
    The output column SR_CONTACT_POINT_ID (58) has a precision which is not valid. Precision must be between 1 and 38.

  • Problem using file based JNDI with JMS Bridge, WL 6.1sp3

              I am trying to connect an MQ queue to a Weblogic JMS queue using the JMS bridge,
              WLS6.1sp3. I have the CR081404_61sp3.jar and CR081511_61sp3.jar patches.
              I am having trouble getting the bridge to look up the MQ queue in the file based
              JNDI. According to the log it is trying to use a weblogic.jndi.WLInitialContextFactory
              instead of a com.sun.jndi.fscontext.RefFSContextFactory, which is what it is configured
              to use. I am getting the following error:
              <Sep 29, 2002 12:16:22 PM EDT> <Info> <MessagingBridge> <Bridge "Provd Messaging
              Bridge" is getting the connections to the two adapters.>
              <Sep 29, 2002 12:16:22 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              RUNTIME! Bridge Provd Messaging Bridge In getConnections: isStopped = false>
              <Sep 29, 2002 12:16:22 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              RUNTIME! Bridge Provd Messaging Bridge Getting source connection: sourceConnSpec
              = weblogic.jms.adapter.JMSConnectionSpec@27166f>
              <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
              <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to determine Resource
              Principal for Container Managed Security Context.>
              <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
              <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to determine Resource
              Principal for Container Managed Security Context.>
              <Sep 29, 2002 12:16:22 PM EDT> <Warning> <Connector> << Weblogic Messaging Bridge
              Adapter (XA) > ResourceAllocationException of javax.resource.ResourceException:
              ConnectionFactory: failed to get initial context (InitialContextFactory =weblogic.jndi.WLInitialContextFactory,
              url = file:/opt/mqm/java/mq-jndi, user name = guest, password = guest on createManagedConnection.>
              <Sep 29, 2002 12:16:22 PM EDT> <Error> <Connector> <Error granting connection
              request.>
              <Sep 29, 2002 12:16:22 PM EDT> <Info> <MessagingBridge> <Bridge "Provd Messaging
              Bridge" failed to connect to the source destination and will try again in 25 seconds.
              (javax.resource.spi.ResourceAllocationException: CreateManagedConnection Error:
              ConnectionFactory: failed to get initial context (InitialContextFactory =weblogic.jndi.WLInitialContextFactory,
              url = file:/opt/mqm/java/mq-jndi, user name = guest, password = guest)>
              <
              The configuration of the bridge, printed out in the log, is:
              <Sep 29, 2002 12:16:00 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              STARTUP! Bridge Provd Messaging Bridge's source properties are:
              AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
              Classpath=null
              ConnectionFactoryJNDIName = PMS.mqQcf
              ConnectionURL = file:/opt/mqm/java/mq-jndi
              InitialConnectionFactory = com.sun.jndi.fscontext.RefFSContextFactory
              DestinationType = Queue
              DestinationJNDIName = PMS.mqProvdRequest>
              <Sep 29, 2002 12:16:00 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              STARTUP! Bridge Provd Messaging Bridge's target properties are:
              AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
              Classpath=null
              DestinationType = Queue>
              Am I correct in assuming it should be using the fscontext connection factory?
              Why is it using the weblogic one?
              Jason
              

    CR081511_61sp3.jar patch should fix the problem. Make sure that the
              jar file is picked up. It should be put before other weblogic jar files.
              You should be able to tell if it is picked up by looking at the first
              couple of lines of your server log file.
              Dongbo
              Jason Kriese wrote:
              >
              > I am trying to connect an MQ queue to a Weblogic JMS queue using the JMS bridge,
              > WLS6.1sp3. I have the CR081404_61sp3.jar and CR081511_61sp3.jar patches.
              >
              > I am having trouble getting the bridge to look up the MQ queue in the file based
              > JNDI. According to the log it is trying to use a weblogic.jndi.WLInitialContextFactory
              > instead of a com.sun.jndi.fscontext.RefFSContextFactory, which is what it is configured
              > to use. I am getting the following error:
              >
              > <Sep 29, 2002 12:16:22 PM EDT> <Info> <MessagingBridge> <Bridge "Provd Messaging
              > Bridge" is getting the connections to the two adapters.>
              > <Sep 29, 2002 12:16:22 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              > RUNTIME! Bridge Provd Messaging Bridge In getConnections: isStopped = false>
              > <Sep 29, 2002 12:16:22 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              > RUNTIME! Bridge Provd Messaging Bridge Getting source connection: sourceConnSpec
              > = weblogic.jms.adapter.JMSConnectionSpec@27166f>
              > <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
              >
              > <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to determine Resource
              > Principal for Container Managed Security Context.>
              > <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
              >
              > <Sep 29, 2002 12:16:22 PM EDT> <Info> <Connector> <Unable to determine Resource
              > Principal for Container Managed Security Context.>
              > <Sep 29, 2002 12:16:22 PM EDT> <Warning> <Connector> << Weblogic Messaging Bridge
              > Adapter (XA) > ResourceAllocationException of javax.resource.ResourceException:
              > ConnectionFactory: failed to get initial context (InitialContextFactory =weblogic.jndi.WLInitialContextFactory,
              > url = file:/opt/mqm/java/mq-jndi, user name = guest, password = guest on createManagedConnection.>
              >
              > <Sep 29, 2002 12:16:22 PM EDT> <Error> <Connector> <Error granting connection
              > request.>
              > <Sep 29, 2002 12:16:22 PM EDT> <Info> <MessagingBridge> <Bridge "Provd Messaging
              > Bridge" failed to connect to the source destination and will try again in 25 seconds.
              > (javax.resource.spi.ResourceAllocationException: CreateManagedConnection Error:
              > ConnectionFactory: failed to get initial context (InitialContextFactory =weblogic.jndi.WLInitialContextFactory,
              > url = file:/opt/mqm/java/mq-jndi, user name = guest, password = guest)>
              > <
              >
              > The configuration of the bridge, printed out in the log, is:
              >
              > <Sep 29, 2002 12:16:00 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              > STARTUP! Bridge Provd Messaging Bridge's source properties are:
              > AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
              > Classpath=null
              > ConnectionFactoryJNDIName = PMS.mqQcf
              > ConnectionURL = file:/opt/mqm/java/mq-jndi
              > InitialConnectionFactory = com.sun.jndi.fscontext.RefFSContextFactory
              > DestinationType = Queue
              > DestinationJNDIName = PMS.mqProvdRequest>
              > <Sep 29, 2002 12:16:00 PM EDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
              > STARTUP! Bridge Provd Messaging Bridge's target properties are:
              > AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
              > Classpath=null
              > DestinationType = Queue>
              >
              > Am I correct in assuming it should be using the fscontext connection factory?
              > Why is it using the weblogic one?
              >
              > Jason
              

  • Problems using JavaMail and activation with Java 1.6

    Hi,
    I have developed an application with a SOAP architecture using Axis. Everything worked fine until I upgrade the JRE version from 1.5 to 1.6. Since then a "javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/related; type="text/xml" " exception is thrown every time I try to connect to the webservices.
    Debugging the code I've found that the problem is a null value in the "dch" attribute of the ObjectDataContentHandler object returned by the getInputStream method in the DataHandler class.
    When I launch the application using JRE 1.5 this attribute value is "text_plain" and everthing woks ok but when I launch it with JRE 1.6 the attribute has a wonderful "null" value...
    Anybody knows what could be the reason for that "null" value?
    I've looking for this problem in diferent forums and I believe that could be some kind of incompatibility between the activation version provided with the JRE 1.6 and the JavaMail 1.4 version but I'm not sure.
    Thanks in advance!

    My application also stopped working and sadly is a production application (is in a production environment and production depends heavily on it since it contains Standard Operation Procedures documents).
    I've tried so far uninstalling jre 1.6 from server, opening the jnlp with jre 1.5.13 and nothing yet. the curious thing is that the jre 1.6 update took place some time ago and today I'm getting the error. Not sure i the server went down recently which might explain some of it.
    Here's my error:
    java.lang.reflect.InvocationTargetException
            at sun.reflect.GeneratedConstructorAccessor4.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at org.apache.axis.Message.setup(Message.java:352)
            at org.apache.axis.Message.<init>(Message.java:235)
            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:779)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
            at org.apache.axis.client.Call.invoke(Call.java:2767)
            at org.apache.axis.client.Call.invoke(Call.java:2443)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at com.bluecubs.xinco.client.XincoExplorer.doDataWizard(XincoExplorer.java:2788)
            at com.bluecubs.xinco.client.XincoExplorer$8.mousePressed(XincoExplorer.java:1437)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
            at java.awt.Component.processMouseEvent(Component.java:6035)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
            at java.awt.Component.processEvent(Component.java:5803)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4410)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
            at java.awt.Container.dispatchEventImpl(Container.java:2102)
            at java.awt.Window.dispatchEventImpl(Window.java:2429)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Caused by: Error reading data stream:  Error in MIME data stream, start boundary not found, expected:  ------=_Part_5_13931643.1192823865125
            at org.apache.axis.attachments.MultiPartRelatedInputStream.<init>(MultiPartRelatedInputStream.java:339)
            at org.apache.axis.attachments.AttachmentsImpl.<init>(AttachmentsImpl.java:119)
            ... 39 more
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.RuntimeException
    faultActor:
    faultNode:
    faultDetail:
            {http://xml.apache.org/axis/}stackTrace:java.lang.RuntimeException
            at org.apache.axis.Message.setup(Message.java:361)
            at org.apache.axis.Message.<init>(Message.java:235)
            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:779)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
            at org.apache.axis.client.Call.invoke(Call.java:2767)
            at org.apache.axis.client.Call.invoke(Call.java:2443)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at com.bluecubs.xinco.client.XincoExplorer.doDataWizard(XincoExplorer.java:2788)
            at com.bluecubs.xinco.client.XincoExplorer$8.mousePressed(XincoExplorer.java:1437)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
            at java.awt.Component.processMouseEvent(Component.java:6035)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
            at java.awt.Component.processEvent(Component.java:5803)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4410)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
            at java.awt.Container.dispatchEventImpl(Container.java:2102)
            at java.awt.Window.dispatchEventImpl(Window.java:2429)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
            {http://xml.apache.org/axis/}hostname:PRAII1371900
    java.lang.RuntimeException
            at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
            at org.apache.axis.client.Call.invoke(Call.java:2767)
            at org.apache.axis.client.Call.invoke(Call.java:2443)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at com.bluecubs.xinco.client.XincoExplorer.doDataWizard(XincoExplorer.java:2788)
            at com.bluecubs.xinco.client.XincoExplorer$8.mousePressed(XincoExplorer.java:1437)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
            at java.awt.Component.processMouseEvent(Component.java:6035)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
            at java.awt.Component.processEvent(Component.java:5803)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4410)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
            at java.awt.Container.dispatchEventImpl(Container.java:2102)
            at java.awt.Window.dispatchEventImpl(Window.java:2429)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Caused by: java.lang.RuntimeException
            at org.apache.axis.Message.setup(Message.java:361)
            at org.apache.axis.Message.<init>(Message.java:235)
            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:779)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
            ... 32 moreAnd the related code:
    Message m = null;
                                MessageContext mc = null;
                                AttachmentPart ap = null;
                                Call call = (Call)xincoClientSession.xinco_service.createCall();
                                call.setTargetEndpointAddress(new URL(xincoClientSession.service_endpoint));
                                call.setOperationName(new QName("urn:Xinco", "downloadXincoCoreData"));
                                Object[] objp = new Object[2];
                                objp[0] = (XincoCoreData)newnode.getUserObject();
                                objp[1] = xincoClientSession.user;
                                //tell server to send file as attachment
                                //(keep backward compatibility to earlier versions)
                                ap = new AttachmentPart();
                                ap.setContent(new String("SAAJ"), "text/string");
                                call.addAttachmentPart(ap);
                                //invoke actual call
                                byte_array = (byte[])call.invoke(objp);
                                //get file from SOAP message or byte array
                                mc = call.getMessageContext();
                                m = mc.getResponseMessage();
                                if (m.getAttachments().hasNext()) {
                                    ap = (AttachmentPart)m.getAttachments().next();
                                    in = (InputStream)ap.getContent();
                                } else {
                                    in = new ByteArrayInputStream(byte_array);
                                }The stack trace point the error to the line:
    *byte_array = (byte[])call.invoke(objp);*
    Edited by: javydreamercsw on Oct 19, 2007 1:08 PM

  • Oracle 11g AQ : problem enqueue user-defined type with varchar2 attribute

    Hello.
    I have a problem enqueuing a user-defined type to the queue on Oracle 10g.
    I'm using jdbc driver (ojdbc5.jar, version 11.1.0.6.0) as they provide oracle.jdbc.aq package.
    The type is following:
    CREATE OR REPLACE TYPE FIXED_T5 AS OBJECT
    (id integer,
    label varchar2(100),
    code integer,
    today date
    )I have created a java class for this type with jpub utility supplied with oracle 11g client package:
    jpub -user=scott/tger -url=jdbc:oracle:thin:@host:sid-sql=FIXED_T5:ru.invito.FixedType -compile=falseIt generated FixedType.java and FixedTypeRef.java files. Don't understand why i need the latter (FixedTypeRef).
    Then in test app:
    package ru.invito;
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    import java.util.Date;
    import java.util.Properties;
    import java.util.UUID;
    import junit.framework.TestCase;
    import oracle.jdbc.aq.AQAgent;
    import oracle.jdbc.aq.AQEnqueueOptions;
    import oracle.jdbc.aq.AQFactory;
    import oracle.jdbc.aq.AQMessage;
    import oracle.jdbc.aq.AQMessageProperties;
    import oracle.jdbc.aq.AQEnqueueOptions.DeliveryMode;
    import oracle.jdbc.aq.AQEnqueueOptions.VisibilityOption;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    import oracle.sql.Datum;
    import oracle.sql.STRUCT;
    import oracle.sql.StructDescriptor;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class AqTest extends TestCase {
         protected Log logger = LogFactory.getLog(getClass());
         public void testEnqueue() throws Exception {
              OracleDriver dr = new OracleDriver();
              Properties prop = new Properties();
              prop.setProperty("user", Config.USERNAME);
              prop.setProperty("password", Config.PASSWORD);
              OracleConnection connection = (OracleConnection) dr.connect(Config.JDBC_URL, prop);
              assertNotNull(connection);
              connection.setAutoCommit(false);
              enqueueMessage(connection, "INVITO.FIXED_T5Q", null);
              connection.commit();
         private void enqueueMessage(OracleConnection conn, String queueName, AQAgent[] recipients) throws SQLException,
                   IOException {
              logger.debug("----------- Enqueue start ------------");
              AQMessageProperties props = makeProps(queueName);
              AQMessage mesg = AQFactory.createAQMessage(props);
              String msqText = String.format("Hello, %s!", queueName);
              FixedType data = createData(36, msqText);
              Datum d = data.toDatum(conn);
              STRUCT s = (STRUCT) d;
              debugStruct("s", s);
              String toIdStr = byteBufferToHexString(s.getDescriptor().getOracleTypeADT().getTOID(), 20);
              logger.debug("s.toIdStr: " + toIdStr);
              StructDescriptor sd = StructDescriptor.createDescriptor("INVITO.FIXED_T5", conn);
              logger.debug("sd.toXMLString(): " + sd.toXMLString());
              mesg.setPayload(s);
              AQEnqueueOptions opt = makeEnqueueOptions();
              logger.debug("sending............");
              // execute the actual enqueue operation:
              conn.enqueue(queueName, opt, mesg);
              debugMessageId(mesg);
              logger.debug("----------- Enqueue done ------------");
         private void debugMessageId(AQMessage mesg) throws SQLException {
              byte[] mesgId = mesg.getMessageId();
              if (mesgId == null) {
                   throw new IllegalStateException("message id is NULL");
              String mesgIdStr = byteBufferToHexString(mesgId, 20);
              logger.debug("Message ID from enqueue call: " + mesgIdStr);
          * @return
          * @throws SQLException
         private FixedType createData(int ID, String label) throws SQLException {
              FixedType data = new FixedType();
              data._struct.setNChar(1);// initializes the flag for 'label' field
              data.setId(ID);
              data.setLabel(label);
              data.setCode(1);
              Date today = new Date();
              data.setToday(new Timestamp(today.getTime()));
              return data;
          * @param string
          * @param s
          * @throws SQLException
         private void debugStruct(String string, STRUCT s) throws SQLException {
              logger.debug(s + ".debugString(): " + s.debugString());
              logger.debug(s + "s.dump(): " + s.dump());
          * @return
          * @throws SQLException
         private AQAgent makeAgent() throws SQLException {
              AQAgent ag = AQFactory.createAQAgent();
              ag.setName("AQ_TEST");
              String agentAddress = null;
              try {
                   agentAddress = InetAddress.getLocalHost().getHostAddress();
              catch (UnknownHostException e) {
                   logger.error("cannot resolve localhost ip address. will not set it as AQ Agent address");
                   agentAddress = "NA";
              ag.setAddress(agentAddress);
              return ag;
         private AQMessageProperties makeProps(String queueName) throws SQLException {
              final String EXCEPTION_Q_TEMPLATE = "AQ$_%sT_E";
              final int DEFAULT_DELAY = 0;
              final int DEFAULT_EXPIRATION = -1;
              final int DEFAULT_PRIORITY = 0;
              AQMessageProperties propeties = AQFactory.createAQMessageProperties();
              propeties.setCorrelation(UUID.randomUUID().toString());
              propeties.setDelay(DEFAULT_DELAY);
              propeties.setExceptionQueue(String.format(EXCEPTION_Q_TEMPLATE, queueName));
              propeties.setExpiration(DEFAULT_EXPIRATION);
              propeties.setPriority(DEFAULT_PRIORITY);
              // propeties.setRecipientList(null);//should not set
              propeties.setSender(makeAgent());
              return propeties;
          * @return
          * @throws SQLException
         private AQEnqueueOptions makeEnqueueOptions() throws SQLException {
              AQEnqueueOptions opt = new AQEnqueueOptions();
              opt.setRetrieveMessageId(true);
              // these are the default settings (if none specified)
              opt.setDeliveryMode(DeliveryMode.PERSISTENT);
              opt.setTransformation(null);
              opt.setVisibility(VisibilityOption.ON_COMMIT);
              return opt;
          * Form the AQ reference
          * @param buffer
          * @param maxNbOfBytes
          * @return
         private static final String byteBufferToHexString(byte[] buffer, int maxNbOfBytes) {
              if (buffer == null)
                   return null;
              int offset = 0;
              StringBuffer sb = new StringBuffer();
              while (offset < buffer.length && offset < maxNbOfBytes) {
                   String hexrep = Integer.toHexString((int) buffer[offset] & 0xFF);
                   if (hexrep.length() == 1)
                        hexrep = "0" + hexrep;
                   sb.append(hexrep);
                   offset++;
              String ret = sb.toString();
              return ret;
    }The output is following:
    [main] 2008-07-03 19:09:49,863 DEBUG [ru.invito.AqTest] - ----------- Enqueue start ------------
    [main] 2008-07-03 19:09:50,348 DEBUG [ru.invito.AqTest] - [email protected](): name = INVITO.FIXED_T5 length = 4 attribute[0] = 36 attribute[1] = Hell
    o, INVITO.FIXED_T5Q! attribute[2] = 1 attribute[3] = 2008-07-03 19:09:49.0
    [main] 2008-07-03 19:09:50,363 DEBUG [ru.invito.AqTest] - [email protected](): name = INVITO.FIXED_T5
    length = 4
    ID = 36
    LABEL = Hello, INVITO.FIXED_T5Q!
    CODE = 1
    TODAY = 2008-07-03 19:09:49.0
    [main] 2008-07-03 19:09:50,363 DEBUG [ru.invito.AqTest] - s.toIdStr: 507ccce5b6e9f572e040007f01007203
    [main] 2008-07-03 19:09:50,363 DEBUG [ru.invito.AqTest] - sd.toXMLString(): <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <StructDescriptor sqlName="INVITO.FIXED_T5" >
      <OracleTypeADT sqlName="INVITO.FIXED_T5"  typecode="0" tds_version="1"
               is_embedded="false" is_top_level="true" is_upt="false" finalType="true" subtype="false">
        <attributes>
          <attribute name="ID"  type="INTEGER" >
            <OracleType typecode="2" />
          </attribute>
          <attribute name="LABEL"  type="VARCHAR2" >
            <OracleType typecode="12" />
          </attribute>
          <attribute name="CODE"  type="INTEGER" >
            <OracleType typecode="2" />
          </attribute>
          <attribute name="TODAY"  type="DATE" >
            <OracleType typecode="0" />
          </attribute>
        </attributes>
      </OracleTypeADT>
    </StructDescriptor>
    [main] 2008-07-03 19:09:50,379 DEBUG [ru.invito.AqTest] - sending............
    [main] 2008-07-03 19:09:50,395 DEBUG [ru.invito.AqTest] - Message ID from enqueue call: 511ff143bd4fa536e040007f01003192
    [main] 2008-07-03 19:09:50,395 DEBUG [ru.invito.AqTest] - ----------- Enqueue done ------------But when dequeueing the 'label' attribute is lost:
    DECLARE
    dequeue_options     DBMS_AQ.dequeue_options_t;
    message_properties  DBMS_AQ.message_properties_t;
    message_handle      RAW(16);
    message             fixed_t5;
    BEGIN
      dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE;
      DBMS_AQ.DEQUEUE(
         queue_name          =>     'fixed_t5q',
         dequeue_options     =>     dequeue_options,
         message_properties  =>     message_properties,
         payload             =>     message,
         msgid               =>     message_handle);
      DBMS_OUTPUT.PUT_LINE('ID   : '||message.id);
      DBMS_OUTPUT.PUT_LINE('Label: '||message.label);
      DBMS_OUTPUT.PUT_LINE('Code : '||message.code);
      DBMS_OUTPUT.PUT_LINE('Today: '||message.today);
      COMMIT;
    END;
    ID   : 36
    Label:
    Code : 1
    Today: 03.07.08
    Could anyone tell me what is wrong with the setup/code?
    Why 'label' not saved in queue, though i saw it is not empty in STRUCT?

    Thank you for the reply!
    I have enqueued:
    [main] 2008-07-04 15:30:30,639 DEBUG [ru.invito.UserDefinedTypeAqTest$1] - [email protected](): name = INVITO.FIXED_T5
    length = 4
    ID = 41
    LABEL = Hello, INVITO.FIXED_T5Q!
    CODE = 1
    TODAY = 2008-07-04 15:30:30.0and in table (select * from FIXED_T5QT) the 'label' is blank:
    Q_NAME     FIXED_T5Q
    MSGID     51310809B5EA3728E040007F01000C79
    CORRID     b8f38fd3-4fa6-4e0f-85d1-2440d02d655e
    PRIORITY     0
    STATE     0
    DELAY     
    EXPIRATION     
    TIME_MANAGER_INFO     
    LOCAL_ORDER_NO     0
    CHAIN_NO     0
    CSCN     0
    DSCN     0
    ENQ_TIME     04.07.2008 15:28:44
    ENQ_UID     INVITO
    ENQ_TID                       4012
    DEQ_TIME     
    DEQ_UID     
    DEQ_TID     
    RETRY_COUNT     0
    EXCEPTION_QSCHEMA     AQ$_INVITO
    EXCEPTION_QUEUE     FIXED_T5QT_E
    STEP_NO     0
    RECIPIENT_KEY     0
    DEQUEUE_MSGID     
    SENDER_NAME     AQ_TEST
    SENDER_ADDRESS     10.1.1.137
    SENDER_PROTOCOL     
    USER_DATA.ID     41
    USER_DATA.LABEL     
    USER_DATA.CODE     1
    USER_DATA.TODAY     04.07.2008 15:30:30I must point to a strange thing: when the FixedType instance is created (via new operator) and then the setLabel("....") called as:
    FixedType data = new FixedType();
    // hack: proper initialization for 'label' field
    data._struct.setNChar(1);
    data.setId(ID);
    data.setLabel(label);
    data.setCode(1);
    Date today = new Date();
    data.setToday(new Timestamp(today.getTime()));
    Datum d = data.toDatum(connection);
    STRUCT s = (STRUCT) d;
    logger.debug(s + ".debugString(): " + s.debugString());
    logger.debug(s + ".dump(): " + s.dump());and if i comment line (data._struct.setNChar(1);) the debug messages for created STRUCT also shows empty value for label.
    But if i explicitly call data._struct.setNChar(1) then debug contains the label i defined in call to the setLabel method.

  • Problem using 2 Fact tables with the same dimension

    Hi,
    I have noticed a very strange behaviour in Presentation Services / BI Administrator. I have 2 cubes (created in OWB) which are in the same business model, they are set up with foreign keys etc. and works as they should using them separately. Problem is (sometimes!) when I want to use the common dimension (Project) against both of the fact tables (Sales Order and Purchase Order).
    Scenario 1:
    If I use Project Id, Purchase Amount, Sales Amount I get either an amount in Sales Amount or in Purchase Amount, BUT if the Project Id starts with a letter (not starting with a number) it will show the correct amount for both Sales- and Purchase Amount.
    Scenario 2:
    I use Project Description (even followed by Project Id or not), Sales Amount, Purchase Amount I get the correct numbers for all projects. Project Description must come before Project Id or else it will not work.
    I only noticed this problem when using both of the Fact tables since I want to compare Sales Amount and Purchase Amount in each Project. The Dimension for Project consist of Project, Sub Project and Activity and works fine. If I only use Sales Amount or Purchase Amount with Project Id I don't get this error. Only when both numbers are used.
    I would be very happy if anyone have a good solution/explanation to this problem! Seems like could be something in the BI Server memory that goes wrong somewhere.

    The strange thing is that the results from the queries are correct running them in SQL Developer. This is one that works:
    SELECT Project.Project saw_0, "- SalesOrderFact"."Sales Amount" saw_1, "- PurchaseOrderFact"."Purchase Amount" saw_2, REPORT_SUM(saw_1 BY ), REPORT_SUM(saw_2 BY ) FROM SalesOrder ORDER BY saw_0
    SALES ORDER:
    select T3032.PROJECT_DESCRIPTION as c1,
    sum(T161.SALES_AMOUNT_LOCAL) as c2
    from
    DIM_PROJECT_V T3032,
    CUBE_SALES_ORDER T161
    where ( T161.DIM_PROJECT = T3032.DIMENSION_KEY )
    group by T3032.PROJECT_DESCRIPTION
    order by c1
    PURCHASE_ORDER:
    select T3032.PROJECT_DESCRIPTION as c1,
    sum(T3020.TOTAL_BUY_AMOUNT) as c2
    from
    DIM_PROJECT_V T3032,
    CUBE_PURCH_ORDER T3020
    where ( T3020.DIM_PROJECT = T3032.DIMENSION_KEY )
    group by T3032.PROJECT_DESCRIPTION
    order by c1
    And this will give the wrong result in Answers (correct in SQL..):
    SELECT Project."Project Id" saw_0, "- SalesOrderFact"."Sales Amount" saw_1, "- PurchaseOrderFact"."Purchase Amount" saw_2, REPORT_SUM(saw_1 BY ), REPORT_SUM(saw_2 BY ) FROM SalesOrder ORDER BY saw_0
    SALES_ORDER:
    select T3032.PROJECT_KEY_NAME_ID as c1,
    sum(T161.SALES_AMOUNT_LOCAL) as c2
    from
    DIM_PROJECT_V T3032,
    CUBE_SALES_ORDER T161
    where ( T161.DIM_PROJECT = T3032.DIMENSION_KEY )
    group by T3032.PROJECT_KEY_NAME_ID
    order by c1
    PURCHASE_ORDER:
    select T3032.PROJECT_KEY_NAME_ID as c1,
    sum(T3020.TOTAL_BUY_AMOUNT) as c2
    from
    DIM_PROJECT_V T3032,
    CUBE_PURCH_ORDER T3020
    where ( T3020.DIM_PROJECT = T3032.DIMENSION_KEY )
    group by T3032.PROJECT_KEY_NAME_ID
    order by c1
    As you can see the SQL look very familiar, and I cannot see anything in SQL that should be the cause of this error. I think the error must be in the BI Memory or something.
    Any ideas?

  • Problem using Java Mail API with WLS 7.0

    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
         public static void main(String args[])
              try
                   //Context ic = getInitialContext();
                   InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
                   Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
                   Properties props = new Properties();
                   props.put("mail.transport.protocol", "smtp");
                   props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
                   props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
                   Session session2 = session.getInstance(props);
                   Message msg = new MimeMessage(session2);
                   msg.setFrom();
                   msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
                   msg.setSubject("Test Message");
                   msg.setSentDate(new Date());
                   MimeBodyPart mbp = new MimeBodyPart();
                   mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(mbp);
                   msg.setContent(mp);
                   Transport.send(msg);
              catch(Exception e)
                   e.printStackTrace();
         }//end of main
    public static Context getInitialContext()
         throws NamingException
              Properties p = new Properties();
              p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
                   p.put(Context.SECURITY_PRINCIPAL, "weblogic");
                   p.put(Context.SECURITY_CREDENTIALS, "weblogic");
              return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah

    You can use InitialContext ic = new InitialContext() only if you are using a startup class, servlet or a JSP i.e
    server side code.
    If you are using a java client you need to use Context ic = getInitialContext();
    Try this code
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try {
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, "t3://localhost:7001");
    Context ic = new InitialContext(h);
    Session session = (Session) ic.lookup("testSession");
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    props.put("mail.from", "[email protected]");
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse("[email protected]",false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    }//end of class
    We have shipped a javamail example in the samples\server\src\examples\javamail folder.
    Jimmy Shah wrote:
    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try
    //Context ic = getInitialContext();
    InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
    Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
    props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    public static Context getInitialContext()
    throws NamingException
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
    p.put(Context.SECURITY_PRINCIPAL, "weblogic");
    p.put(Context.SECURITY_CREDENTIALS, "weblogic");
    return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah--
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Problems using third-party JDBC with JDeveloper

    Hi:
    I've tried to use an Informix's JDBC to access an Informix Online Workgroup v. 7.22 under Win NT 4.0, using JDeveloper. I tried Informix JDBC Driver V. 2.1 successfully with old-fashioned code using Connect, Statement and ResultSet objects, coding connections directly, but I couldn't define a connection so I can use wizards, 'cause I got an "Unable to find server: com.informix.jdbc.IfxDriver" error when I tried to test connection. I've probed this:
    * Create a library for Informix JDBC in my project. This step allowed me to make run my old-fashioned code.
    * When I created connection, I defined correct login, password and role parameters, then I selected "Other JDBC" on the JDBC Driver's combo, as classname I defined "com.informix.jdbc.IfxDriver" and as URL "jdbc:informix-sqli://127.0.0.1:1526/atlas:INFORMIXSERVER=produc_shm;".
    Classname I used is equals to classname I used in Class.forName method. URL use same format than DriverManager.getConnection method, adding pair user-password to it, and those parameters work ok coding connection directly using Connection method. By the other side, looking at Informix JDBC's Manual, it says Informix's JDBC supports connection using Datasource also.
    Which are steps I must follow?
    Omar Muqoz.
    null

    Hi,
    Unfortunately there was a regression bug around using the Generic JDBC connector to a Foreign Database in this Technology Preview (3). I'm not able to give you good news as I don't have a workaround for you either.
    You could use SQLDeveloper to connect to the database for live work, unfortunately that will not help if you wanted to create offline objects of some sort using JDeveloper.
    regards
    Susan
    http://www.susanduncan.blogspot.com

  • Posting problem using safari or firefox with IMAC

    Can anybody help with the following issue. I can access the labs.macromedia website, I can access the Light room posting board. But signing in using safari or firefox on a imac is troublesome and takes several minutes and is half of the time unsuccesful. When trying to post, the signing in screen shows up and asks for e-mail address and password, no problem after pressing the button "continue" the system hangs for so long that safari reports a time out. I have no problems with other websites on the same imac machine I have tried this whole routine on a windows machines from the same location and internet connection set up and no problems at all. A report from another safari user shows also no problem at all. I assume that it is a combination of safari/firefox, this website and my machine settings. Probably I have to change something on the settings for safari or firefox or Imac, but I don't know what. Is there any experience with same problems and a solution out there?
    Regards
    Iemke

    Got to be honest and say this is really, really frustrating!
    Am I the only person who cannot view trailers at Apple's website, even with their browser?
    Cheers, MP

  • Problem using extension manager CS5 with command line

    Hi All,
    I had posted my question here : http://forums.adobe.com/message/4695419#4695419, but was advised to do so here as well..
    I have a requirement to get the path of all the installed Extension Managers on any Windows system for the purpose of installing an extension.. I thought, there would be no problem in getting the path from the registry. There was no problem in Win XP, but the same does not work for Win 7.. I googled, and found alternate ways to get the path.
    Here is the link : http://forums.adobe.com/thread/851359. I followed the instructions in this post, but failed to get this working for CS5 as mentioned in my previous thread... No problem for CS5.1 and CS6.. Why is that?
    I want to get this working for CS5, CS5.1, CS6... How can I get the path of all the Extension Manager versions installed on a Windows system?
    Please refer to the following screenshots to get a better understanding of my problem,
    I created a jsx file named "Result.jsx", which I saved in my D drive, with the following code,
    resultFile = new File("D:/result.log");
    resultFile.open("w");
    resultFile.write(BridgeTalk.__diagnostics__);
    resultFile.close();
    If I run this directly from ESTK CS5, there is no problem, and I get the result.log file. I tried to execute this script via command line as shown in the screenshot,
    On executing the above, I got the following error,
    What is going wrong?
    Please help!

    I am sorry for the poor documentation of Extension Manager which causes you so much trouble.
    1. You can use BridgeTalk API to ask specific version of Extension Manager to do something. There is sample in packaging_extension.pdf about this. You don't need to know the installation path of Extension Manager. One thing to note is that the value of bt.target is version specific, i.e. "exman-5.0", "exman-5.5" send this message to different version of Extension Manager, so you can change this value to install/enable/disable/remove extensions using different version of Extension Manager. More detailed documentation of BridgeTalk can be found by clicking "Help" menu then clicking "Javascript Tools Guide CS5" in "Adobe ExtendScript Toolkit CS5".
    2. Specific version of Extension Manager only manage extensions for corresponding version of product. You should use Extension Manager CS5 to install extensions for Photoshop CS5. The reason that the extension you installed for Photoshop CS5.1 using Extension Manager CS5.5 is displayed for Photoshop CS5 in Extension Manager CS5 is that two versions of Photoshop specified the same directory for Extension Manager to manage extensions. This is a defect and will cause some problems if multiple versions of Photoshop co-existed in one machine. But "to find  previous (CS5) extension manager and to enable it" should work for you, I guess you use command line to enable it and specify wrong product name (see #3) so that it doesn't work.
    3. When using command line, you should specify "product" attribute with the name displayed at the left panel of Extension Manager. So "Photoshop CS5 32" is correct. Remember to enclose it with double quote because of existence of space character.
    4. As above mentioned, use display name of Photoshop, and call proper version of Extension Manager by BridgeTalk.

Maybe you are looking for

  • What's wrong with my audio configuration?

    When I try to open iTunes, I get a message window that says, "iTunes has detected a problem with your audio configuration. Audio/Video playback may not operate properly." After pressing "Okay," iTunes will open but will not play any sound. I tried re

  • SAP PS : Certification

    Hi, I m plannig to do SAP PS certification can anyone guide me regarding this ? have any material with u ? If yes plz write/send me on [email protected] Regards Pradeep

  • Reservation with Extended classic scenario

    Hi ;o) I'm working at a costumer were we have extended classic scenario. We want to be able to make reservations in the backend if the item is on stock, and we have seen in a solution matrix from SAP that this should be possible. The configuration fo

  • Permission to remove mobile device from mailbox

    Exch 2007 sp3 I need to allow a tech to remove mobile devices from mailboxes. He is currently a Recipient Admin, but cannot delete devices.  I do not want to allow him Org Admin rights. What can I do?  Thx

  • HT4059 i cant download ibook in my ipod why?

    how can i download ibook in my ipod?? i tried downloading it thriugh computer and through ipod but i cnt why??