Set role with Java JPA and NativeSQL

Hi,
using 10g setting roles with Java JPA and NativeSQL works fine. After the upgrade to 11g the same commands will not work.
Ars ther any significant changes to set roles in 11g?
Regards
Siegwin

siegwin.port wrote:
using 10g setting roles with Java JPA and NativeSQL works fine. After the upgrade to 11g the same commands will not work.
Ars ther any significant changes to set roles in 11g?When I eval'd 11g, I did not notice any changes in setting my roles. I did notice a significant difference in Java. I cannot remember the JDK version change from 10g to 11g. We ended up settling back to 10g for other reasons.

Similar Messages

  • Set role with Java JPA using NativeSQL

    Hi,
    using 10g setting roles with Java JPA and NativeSQL works fine. After the upgrade to 11g the same commands will not work.
    Ars ther any significant changes to set roles in 11g?
    Regards
    Siegwin

    Hi Siegwin,
    if you want to get help on a specific issue it would be helpful if you provide specific information. Despite the fact that this doesn't seem to be an XE specific question, you could provide additional information on your environment (JDK version, possibly container used, etc.; actual command issued, other things you may have done before to open/modify the session, etc.).
    I have one general hint anyway:
    Did you update your database drivers to support 11.2 as well? You probably use JDBC for your data source, so you should try the 11.2 JDBC drivers that fit to the JDK your application uses. I'm not sure if this already solves your problem, but it's highly recommended anyway as the 10.2 drivers will definetly come back with some trouble sooner or later when used against 11.2.
    -Udo

  • SET ROLE WITH PASSWORD

    How can i to set role with password from a package ?
    the package dbms_session.set_role can set the password ?
    regards
    MDF

    Check this out.
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_10004.htm#sthref7302

  • Getting remote messaging to work with Java/Spring and Flex

    I am trying to get remote messaging working on a Flex client with a Java/Spring backend.
    I have the channel is setup on the server as such:

    channel-definition id="long-polling-channel"
    class="mx.messaging.channels.AMFChannel">
    <endpoint
    url="http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpolling"
    class="flex.messaging.endpoints.AMFEndpoint" />
    <properties>
    <!-- Values for near-real time messaging -->
    <polling-enabled>true</polling-enabled>
    <polling-interval-millis>0</polling-interval-millis>
    <wait-interval-millis>-1</wait-interval-millis>
    <max-waiting-poll-requests>
    10
    </max-waiting-poll-requests>
    </properties>
    </channel-definition>
    In the Spring context, I am setting up the MessageBroker, MessageTemplate, and some custom wrapper code:
    <? 
    xml version="1.0" encoding="UTF-8"?>< 
    beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:flex="http://www.springframework.org/schema/flex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/flex
    http://www.springframework.org/schema/flex/spring-flex-1.0.xsd" >
    <flex:message-broker id="messageServiceBroker" />
    <flex:message-destination id="event-bus"
    message-broker="messageServiceBroker" channels="long-polling-channel"
    message-time-to-live="1000"
    subscription-timeout-minutes="5"
    throttle-inbound-max-frequency="500" throttle-inbound-policy="ERROR"
    throttle-outbound-max-frequency="500" throttle-outbound-policy="IGNORE" />
    <bean id="defaultMessageTemplate" class="org.springframework.flex.messaging.MessageTemplate">
    <property name="defaultDestination" value="event-bus" />
    <property name="messageBroker" ref="messageServiceBroker" />
    </bean>
    <bean id="MessagingServices" class="com.bofa.esm.utility.messaging.MessagingServices">
    <property name="messageTemplate" ref="defaultMessageTemplate" />
    <property name="destinationName" value="event-bus" />
    <property name="scheduler" ref="PersistentQuartzScheduler" />
    </bean></ 
    beans>
    The custom wrapper code is insignificant, but it basically creates a thread and posts a custom context over and over every minute.  The actual message is posted with this bit of code:
         messageTemplate.send(msgCtx);
    On the Flex side, I create a Channel and ChannelSet like thus:
    public  
    static function getMessageChannelSet():ChannelSet{ 
    if(messageChannelSet == null){messageChannelSet =
    new ChannelSet();
    //e.g. 'http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling';
    var messageURL:String = getBaseUrl() + MESSAGE_URL; 
    var channel:AMFChannel = new AMFChannel(MESSAGE_CHANNEL_NAME,messageURL);messageChannelSet.addChannel(channel);
    return channelSet;}
    And then, latter I create a Consumer and add the channelset to it:
    var  
    _messageConsumer:Consumer = new Consumer(); 
    var msgChannel:ChannelSet = RemotingUtility.getMessageChannelSet();
    var encrypted:Object = this.encrypt(_sessionModel.username, _sessionModel.password); 
    var token:AsyncToken = msgChannel.login(encrypted.userId, encrypted.password); 
    _messageConsumer.channelSet = msgChannel;
    _messageConsumer.destination =
    "event-bus";_messageConsumer.addEventListener(MessageEvent.RESULT,
    this.onMessage);
    The problem is, I dont get the messages from the server.  In fact, from what I can tell by the logs when I post a message from the server, it doesn't appear that anything is listening to the channel:
    09:32:03,106 INFO [MessagingServices] Posting message...
    09:32:08,184 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    09:32:08,200 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    09:32:08,200 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    to subscribed clientIds: []
    09:32:08,200 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    to subscribed clientIds: []
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    09:32:12,075 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    09:32:12,075 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    09:32:12,075 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    to subscribed clientIds: []
    09:32:12,075 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    to subscribed clientIds: []
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    Shouldn't the "subscribed clientIds: []" have something listed as subscribed?  What am I missing?

    I made some modifications to the code section that registers the Consumer:
      Alert.show(
    "onRegister running","AppShellMediator",Alert.OK); 
      var _messageConsumer:Consumer = new Consumer(); 
      var msgChannel:ChannelSet = RemotingUtility.getMessageChannelSet();  _messageConsumer.channelSet = msgChannel;
      _messageConsumer.destination =
    "event-bus";  _messageConsumer.addEventListener(MessageEvent.RESULT,
    this.onMessage);  _messageConsumer.subscribe(
    "MessagingClient"+Math.random()); 
    if(_messageConsumer.connected)      Alert.show(
    "Message Channel is connected","AppShellMediator",Alert.OK); 
      if(_messageConsumer.authenticated)      Alert.show(
    "Message Channel is authenticated","AppShellMediator",Alert.OK); 
      if(_messageConsumer.subscribed)      Alert.show(
    "Message Channel is subscribed, clientId: "+_messageConsumer.clientId,"AppShellMediator",Alert.OK);
    I am now calling the subscribe method, then testing to see if the consumer is connected, authorized, and subscribed.  The first two return True, the last one does not.  So, despite the call to subscribe(), the Consumer is not subscribed.  Is there a way to figure out why?  Possibly there was an error somewhere?

  • Problem with java look and feel

    Hi! This is my first time posting here. Do apologize me if I am not familiar with the regulations here. Thanks!
    Currently, I am developing a project using NetBeans IDE. It is using RMI, and some basic UI. I am facing the following error when I tried applying the java look and feel code. Please see below for the code used and the error message.
    try {   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    } catch (Exception e) { }
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.plaf.ColorUIResource cannot be cast to java.util.List
    at javax.swing.plaf.metal.MetalUtils.drawGradient(MetalUtils.java:196)
    at javax.swing.plaf.metal.MetalInternalFrameTitlePane.paintComponent(MetalInternalFrameTitlePane.java:384)
    at javax.swing.JComponent.paint(JComponent.java:1027)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1036)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1036)
    at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1036)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1036)
    at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5129)
    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
    at javax.swing.JComponent.paint(JComponent.java:1013)
    at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
    at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
    at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
    at java.awt.Container.paint(Container.java:1797)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:734)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
    at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    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)
    Java Result: 1

    Thanks for everyone's help!
    Below is the executable code generated using NetBeans which is enough to generate the error message. Sometimes you can get the error message just by running the program. Sometimes the error will occur when you go into the Menu and click on Item.
    * NewJFrame.java
    * Created on January 8, 2008, 1:11 PM
    package client;
    import javax.swing.UIManager;
    * @author  Yang
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            jDesktopPane1 = new javax.swing.JDesktopPane();
            jInternalFrame1 = new javax.swing.JInternalFrame();
            jMenuBar1 = new javax.swing.JMenuBar();
            jMenu1 = new javax.swing.JMenu();
            jMenuItem1 = new javax.swing.JMenuItem();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
            jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
            jInternalFrame1Layout.setHorizontalGroup(
                jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 190, Short.MAX_VALUE)
            jInternalFrame1Layout.setVerticalGroup(
                jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 95, Short.MAX_VALUE)
            jInternalFrame1.setBounds(80, 40, 200, 130);
            jDesktopPane1.add(jInternalFrame1, javax.swing.JLayeredPane.DEFAULT_LAYER);
            jMenu1.setText("Menu");
            jMenuItem1.setText("Item");
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem1ActionPerformed(evt);
            jMenu1.add(jMenuItem1);
            jMenuBar1.add(jMenu1);
            setJMenuBar(jMenuBar1);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE)
                    .addGap(20, 20, 20))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
            pack();
        }// </editor-fold>                       
        private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {                                          
    // TODO add your handling code here:
            jInternalFrame1.setVisible(true);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            } catch (Exception e) {
                e.printStackTrace();
        // Variables declaration - do not modify                    
        private javax.swing.JDesktopPane jDesktopPane1;
        private javax.swing.JInternalFrame jInternalFrame1;
        private javax.swing.JMenu jMenu1;
        private javax.swing.JMenuBar jMenuBar1;
        private javax.swing.JMenuItem jMenuItem1;
        // End of variables declaration                  
    }Edited by: Boxie on Jan 7, 2008 11:23 PM

  • Problem with Java 5 and Oracle 10g JDBC driver

    Hi All,
    Currently we upgrade our web application to Java 5 and Oracle 10.2 JDBC driver. And we encountered a bug, when the user entered the information through UI and data didn't store into database (Oracle 9i). The problem is that this bug is not happend so often maybe once a day and this did not happen before we upgraded to Java 5 and Oracle 10.2 JDBC driver. Does anyone encounter the same problem ? Is this Java 5 problem or Oracle JDBC driver problem ?
    Thanks,

    sounds like a database problem...
    Are you using a driver version that's supported for your database engine?
    What else did you change? We once ran into a major bug in our application that had for 5 years been masked by performance problems in our hardware and infrastructure.
    Once those were resolved the bug showed itself and caused tens of thousands of records to be erroneously inserted into our database every day.
    It's certainly NOT a problem with your JVM (if it's a decent one, like the Sun implementation).
    So it's either your database, your driver, your network (dropping packets???), or your application.
    The upgrade may just have exposed something that was already there.

  • Problem with java, ASCII and Linux

    Hi Friends,
    I has a Linux RedHat 9.0 with a jre1.5.0_04 (rpm package of Sun).
    I has a problem with ASCII , for example :
    import java.io.*;
    public class HolaMundo
    public static void main (String[] args)
    System.out.println("Hol� M�ndo");
    this programs runs ok on my windows jdk so it prints "Hol� M�ndo", but when i run the same HolaMundo.class program on my linux redhat it prints "Hol�� M��ndo"
    I think the problem is with the ASCII table that uses the linux version of jre, but i dont know how to solve this problem. I need a Spanish-European ASCII table on my application but i think it is working with a US-ASCII table.
    Then i has installed a kaffe 1.0 (rpm) java machie on this linux and this solve the problem but i has another problems of compatibility with this old version of java kaffe.
    Do you know whats happening?
    Thanks in advance.

    The problem doesn't have to do anything with Java or Linux as far as i can see. It's more likely a problem with Windows XP and IE. Be assured that normally downloading the Linux JDK in windows is not a problem.

  • HT4352 problem sharing iTunes with new Apple TV.(model MD199LL/A. I have iTunes and Apple TV set up with same address and passwords, enabled iTunes and Apple TV for home sharing and still nothing? I have latest iTunes and Apple TV update. Any other sugges

    Have a problem with Home Sharing with Apple TV and iTunes. Have latest iTunes and Apple TV downloads. Have both items set up for home sharing with same address and passwords. AppleTV running fine for everything else. FYI, my library is about 60gigs. AppleTV model is MD199LL/A if that matters. Really want to hear my entire music library and not just Purchased items. Thanks for any help!!!

    I have an older PC with Windows XP Professional on it. I updated to the latest iTunes and I am able to access the photos, etc. on it. However, my Windows 7 PC still does work (since last Apple TV update). Apple TV does not recognize that Home Sharing is turned here. The latter PC has all my current photos on it which I would like share with others on my Apple TV. A fix would be appreciated.

  • Session retention with Java WD and OBN navigation

    Hi everybody,
    We have a Java WD application integrated into Business byDesign Portal. From this application we start OBN navigation in the same window. OBN navigation  always starts a new session with ABAP back-end. Is it possible to retain the same back-end session between Java WD and launched OBN navigation? What should be done for it?
    Thank you for yor help and kind regards,
    Helen

    is it something that you want to debug at runtime and find out those values?
    Please, follow this link->
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0cb32c5-36a7-2910-2c9b-ba4a5bbdbb56|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0cb32c5-36a7-2910-2c9b-ba4a5bbdbb56]
    Also look at this. This might be of more use. it explains extracting such portal parameters:
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0446f5c-fcb9-2910-e082-88becbe3ddc9|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0446f5c-fcb9-2910-e082-88becbe3ddc9]
    -kunal kotak
    Edited by: kunal kotak on Jan 12, 2009 12:16 PM

  • Help with Java JNI and C++

    Hi everyone! I have a problem with Hello World example. I wrote java code in Visual Age 4.0:
    <HelloGinja.java>
    package jnitest;
    public class HelloGinja {
         static {
              System.load("c://c++//hellotest//release//hellotest.dll");
          * HelloGinja constructor comment.
         public HelloGinja() {
              super();
         public native void displayHelloGinja();
         public static void main (String args[]) {
              System.out.println("Calling displayHelloGinja...\n");
              new HelloGinja().displayHelloGinja();
              System.out.println("Finished displayHelloGinja...\n");
    }I made header file from command line:
    javah -jni jnitest.HelloGinja
    I wrote C++ code in Visual Studio 6.0:
    <hellotest.cpp>
    #include "stdafx.h"
    #include "hellotest.h"
    #include <jni.h>
    #include "jnitest_HelloGinja.h"
    #include <stdio.h>
    BOOL APIENTRY DllMain( HANDLE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
        switch (ul_reason_for_call)
              case DLL_PROCESS_ATTACH:
              case DLL_THREAD_ATTACH:
              case DLL_THREAD_DETACH:
              case DLL_PROCESS_DETACH:
                   break;
        return TRUE;
    // This is an example of an exported variable
    HELLOTEST_API int nHellotest=0;
    // This is an example of an exported function.
    HELLOTEST_API int fnHellotest(void)
         return 42;
    // This is the constructor of a class that has been exported.
    // see hellotest.h for the class definition
    CHellotest::CHellotest()
         return;
    extern "C" {
         JNIEXPORT void JNICALL Java_jnitest_HelloGinja_displayHelloGinja(JNIEnv *env, jobject obj)
              printf("\nHello Ginja Glisic!\n");
              return;
    }What is the problem? I compile program well but when I run it from VAJ I am getting:
    Calling displayHelloGinja...
    Finished displayHelloGinja...
    It seems like it does not call native method at all. I exported file out from VAJ and run it from command line.I got:
    Calling displayHelloGinja...
    Hello Ginja Glisic!
    Finished displayHelloGinja...
    Everything is ok.It works. why then it won't work in VAJ?
    Can anyone have idea? I will be very thankfull for any help or advice.

    Ok, I solved my problem. I returned string from native method to java code and I got it. The point is native method is being called but I couldn't see it's output from VAJ.
    Does anyone know any good tutorial about VAJ? If does, please post it .

  • Audio capture delayed with Java Sound and JWS

    Hi.
    I am experiencing quite a strange problem with Java Sound in my Java Web Start application. I am acquiring sound from the microphone through Java Sound, using a code which looks like this:
    ==============================
    AudioFormat audioFormat = new AudioFormat(11025, 8, 1, true, false);
    // Get a TargetDataLine from the appropriate mixer
    DataLine.Info dataLineInfo = new DataLine.Info(TargetDataLine.class, audioFormat);
    TargetDataLine targetDataLine = (TargetDataLine) AudioSystem.getLine(dataLineInfo);
    // Prepare the line for use
    targetDataLine.open(audioFormat);
    targetDataLine.start();
    targetDataLine.addLineListener(myLineListener);
    // Build an input stream from the line
    AudioInputStream audioInStream = new AudioInputStream(targetDataLine);
    // Create the output file
    File outputFile = new File("C:\\MySampleAudioFile.wav");
    // Start the actual audio file-writing operation
    AudioFileFormat.Type targetFileFormatType = AudioFileFormat.Type.WAVE;
    AudioSystem.write(audioInStream, targetFileFormatType, outputFile);
    ==============================
    This code is executed in an independent thread. As you can see from the code reported above, I add a LineListener to my TargetDataLine.
    The problem is that in my JWS application several seconds (about 5-6 seconds) elapse from the call to AudioSystem.write() and the reception of the START LineEvent on my LineListener. This delay only occurs when my JWS application is downloaded from my public internet website, while it is not present when I test my JWS application on my local LAN server.
    It looks like the call to AudioSystem.write() causes some kind of network connection to the remote web server of the JWS app, and this operation takes some time. In fact, if I download my JWS app to my client from the public web server, then I disable all network connections on my client, then the START event is received immediately after the call to AudioSystem.write()... This is STRANGE, isn't it???
    Do you believe the call to AudioSystem.write(), or any other Java Sound call, may cause a network connection to the server from which the JWS application has been downloaded?
    A final addition to the above picture: I also have a "Java Applet" version of this application, which is exactly identical to the JWS version and uses the same exact code to do audio acquisition from the microphone. But, in this case the delay is not present, even when running the applet from the public web server!
    Any help / suggestion would be highly appreciated.
    Best regards,
    Marco.

    Hi
    Just Visit the following link and download sample source code for rtp in java
    http://javasolution.blogspot.com/2007/04/rtp-using-java.html
    if u want know basic simple java voice chat then visit
    http://javasolution.blogspot.com/2007/04/voice-chat-using-java.html

  • 2 ipods set up with same id and passwords...now want to change

    We set up 2 ipods for our two sons thru home computer which is wi fi equipped. created same apple id and password on both. Made one i tunes account. Now my kids cannot text each other, and when texting someone else it appears on both ipods. Same with face time ... Not sure how to change the one ipod to have its own settings etc? Is there a re-set we have to do and start over?
    Thank you for your help. We are so new at this and lost.

    okay so you can't delete the email that is currently there,,,,so fine I tried to add in a new one...note the new email I used was the same email that we used for the 2nd itunes account that I thought we must have ...so now when the ipod was trying to verify i got error message stating unable to verify email because it is already in use??? Dont understand this...

  • Optimum set-up with external library and iTunes Match

    I'm a little frustrated with iTunes Match and iTunes, as it doesn't seem to play nice with libraries stored on an external disk on a network. Here's my current set-up, and any tips on how to eliminate some of the steps I have to take would be much appreciated.
    Set-up:
    One iTunes Media folder stored on external network drive at home
    Another iTunes Media folder, titled "Away from Home", stored on Macbook
    iTunes Match is turned on and has all songs (that qualify) uploaded onto it
    Own multiple devices that access iTunes Match
    If I leave my network and want to use iTunes Match, I have to:
    1. Turn off iTunes.
    2. Option-click iTunes and hold option to select a library.
    3. Choose my "Away from Home" library (or create a new one for those who haven't done this already)
    4. Sign in to iTunes, Turn on iTunes Match and add my computer/library to iTunes Match
    5. iTunes Match does it's thing which obviously means it adds 0 songs due to having an empty library, then all my iTunes Match songs populate my library
    That is all fine and great. However, when I return home and want to listen to ALL songs, meaning those that didn't qualify and the unedited versions (since iTunes Match STILL pushes clean versions of songs), I must take these steps:
    1. Turn off iTunes.
    2. Option-click itunes and hold option to select my library on external network drive
    3. iTunes loads up, but only loads ~16,000 of 19,000 songs
    4. Turn iTunes off again.
    5. Open Finder, hold option when I click Go in menu bar, go to Library<Preferences and delete the com.apple.iTunes.plist file.
    6. Open iTunes again, this time not holding option
    7. iTunes opens as if it's been updated or newly installed (meaning it asks if I agree to the T&SA).
    8. All songs now found and appear
    This is downright stupid. I shouldn't have to take all of these steps to do each of these. It may not sound like it takes a long time, but when you come home and want to turn on music while cleaning, entertaining friends, etc., taking these steps is a hassle and makes iTunes become a chore to run. Is there not a way to simply access my songs in the Cloud without closing iTunes and having to choose a different library? Or are these really the only steps I can take to access music from home and, subsequently, when I get back home?

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • Initial set up with wireless keyboard and mouse!!

    My gods, I set up a mac mini with wireless keyboard and mouse. It stead fastly refused to find the brand new apple wireless mouse. I had to plug a wacom in, in the end to get anywhere. Then it would not find the keyboard, again apple wireless. It did find the keyboard but when it started the pairing just came up with no keyboards were found.
    I struggled in the end and after around 10 minutes blagged the keyboard, I don't know how it just suddenly worked.
    Thinking about this I had the self same problem on a wireless keyboard and mouse for an iMac as well I installed for a friend, it took ages and ages for the computer to discover the two apple devices.
    Am I just unlucky or is there voodoo involved? Luckily I am a seasoned apple user so got there in the end, but if I were a switcher and the very first experience of my new mac was it could not find its own mouse, I would not be impressed.

    I've been using the Apple wireless mouse and keyboard with my Mac mini for about a year.
    I've noticed that whenever the batteries for the two devices are running very low, they may not be recognize by the mini. Other than that, they are fine.

  • Working fine with JAVA code and Error Occured while using in JSP

    Hi.....
    When initiating a BPEL process from JAVA the code is working fine and the Process is getting initiated.But while using that code in J2EE project as a java code and while calling that method Error is occuring.....
    Here by i am attaching my JAVA Code which runs as an applicateion and package which runs in Server....
    JAVA Code (Run as Application) Working Fine:
    package bo;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    import java.util.Map;
    import java.util.Properties;
    import oracle.xml.parser.v2.XMLElement;
    /*import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest ;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession; */
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class processit {
         public static void main(String args[]){
              String input = "TATA";
              String xmlInput= "<ns1:AccessDBBPELProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/AccessDBBPEL\"><ns1:input>"+input+"</ns1:input></ns1:AccessDBBPELProcessRequest>";
              String xml="<ns1:BPELProcess1ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess1\">";
              xml=xml+"<ns1:input>"+input+"</ns1:input>";
              xml=xml+"</ns1:BPELProcess1ProcessRequest>";
              try{
              Properties props=new Properties();
              props.setProperty("orabpel.platform","ias_10g");
              props.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
              props.setProperty("java.naming.provider.url","opmn:ormi://157.227.132.226:6003:home/orabpel");
              props.setProperty("java.naming.security.principal","oc4jadmin");
              props.setProperty("java.naming.security.credentials","oc4jadmin");
              props.setProperty("dedicated.rmicontext", "true");
              Locator locator = new Locator("default", "bpel", props);
              System.out.println("After creating the locator object......");
              IDeliveryService deliveryService =(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
              System.out.println("Before creating the NormalizedMessage object......");
              NormalizedMessage nm = new NormalizedMessage();
              System.out.println("After creating the NormalizedMessage object.*.*.*...");
              nm.addPart("payload", xml);
              System.out.println("Before creating response object......");
              NormalizedMessage res = deliveryService.request("BPELProcess1", "process", nm);
              System.out.println("After calling the BPELProcess1 .*.*.*...");
              Map payload = res.getPayload();
              System.out.println("BPEL called");
              XMLElement xmlEl=(oracle.xml.parser.v2.XMLElement)payload.get("payload");
              String replyText=xmlEl.getText();
              System.out.println("Reply from BPEL Process>>>>>>>>>>>>> "+replyText);
              catch (Exception e) {
              System.out.println("Exception : "+e);
              e.printStackTrace();
    JSP and Java Method Used:
    JSP Code:
    ===============
    <%@ page import=" bo.callbpel" %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>FEATT - I30</title>
    </head>
    <body>
    <%
    String input=request.getParameter("dnvalue");
    callbpel p=new callbpel();
    String Output=p.Initiate(input);
    out.print("The Input Given to the BPEL Process is : "+input);
    %>
    <BR><BR><BR><BR><BR><BR>
    <%
    out.print("The Reply from BPEL Process is : "+Output);
    %>
    </body>
    </html>
    Java Code:
    package bo;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    import java.util.Map;
    import java.util.Properties;
    import oracle.xml.parser.v2.XMLElement;
    /*import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest ;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession; */
    //import java.util.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class callbpel {
         public String Initiate(String value){
              String replyText=null;
              String input = value;
              System.out.println(input);
              String xmlInput= "<ns1:AccessDBBPELProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/AccessDBBPEL\"><ns1:input>"+input+"</ns1:input></ns1:AccessDBBPELProcessRequest>";
              String xml="<ns1:BPELProcess1ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess1\">";
              xml=xml+"<ns1:input>"+input+"</ns1:input>";
              xml=xml+"</ns1:BPELProcess1ProcessRequest>";
              try{
              Properties props=new Properties();
              props.setProperty("orabpel.platform","ias_10g");
              props.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
              props.setProperty("java.naming.provider.url","opmn:ormi://157.227.132.226:6003:home/orabpel");
              props.setProperty("java.naming.security.principal","oc4jadmin");
              props.setProperty("java.naming.security.credentials","oc4jadmin");
              props.setProperty("dedicated.rmicontext", "true");
              Locator locator = new Locator("default", "bpel", props);
              String uniqueBpelId = com.collaxa.cube.util.GUIDGenerator.generateGUID();
              //System.out.println(uniqueBpelId);
              //java.util.Map msgProps = new HashMap();
              System.out.println("After creating the locator object......");
              IDeliveryService deliveryService =(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
              System.out.println("Before creating the NormalizedMessage object......");
              NormalizedMessage nm = new NormalizedMessage();
              System.out.println("After creating the NormalizedMessage object.*.*.*...");
              //msgProps.put("conversationId",uniqueBpelId);
              //nm.setProperty("conversationId",uniqueBpelId);
              nm.addPart("payload", xml);
              System.out.println("Before creating response object......");
              NormalizedMessage res = deliveryService.request("BPELProcess1", "process", nm);
              System.out.println("After calling the BPELProcess1 .*.*.*...");
              Map payload = res.getPayload();
              System.out.println("BPEL called");
              XMLElement xmlEl=(oracle.xml.parser.v2.XMLElement)payload.get("payload");
              replyText=xmlEl.getText();
              System.out.println("Reply from BPEL Process>>>>>>>>>>>>> "+replyText);
              catch (Exception e) {
              System.out.println("Exception : "+e);
              e.printStackTrace();
              return replyText;
    While Creating and Object for the Class callbpel and Whilw Calling that Method
    callbpel p=new callbpel();
    String Output=p.Initiate(input);
    Its throwing an Error:
    Error Occured is:
    After creating the locator object......
    Before creating the NormalizedMessage object......
    After creating the NormalizedMessage object.*.*.*...
    Before creating response object......
    Apr 24, 2008 9:12:00 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NoClassDefFoundError: javax/ejb/EJBException
         at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:76)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
         at bo.callbpel.Initiate(callbpel.java:55)
         at org.apache.jsp.output_jsp._jspService(output_jsp.java:55)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         at java.lang.Thread.run(Unknown Source)
    For Running JSP i am Using Eclipse 3.2.0 and apache-tomcat-5.5.25
    Please Provide me a Solution......
    Thanks in Advance.....
    Regards,
    Suresh K

    A JSP is not the same as a Java application. A Java application has package statment, import statements, try/catch block, a JSP doesn't.

Maybe you are looking for