NameNotFound exception by using javax.jts.UserTransaction

Hello:
          I am working on using jts for the transaction access to a Oracle 7.3
          database.
          In the property file of my application, I used
          weblogic.jdbc.connectionPool.oraclePool=\
          url=jdbc:oracle:thin:@10.10.0.201:1521:orcl,\
          driver=oracle.jdbc.driver.OracleDriver,\
          loginDelaySecs=1,\
          initialCapacity=4,\
          maxCapacity=10,\
          capacityIncrement=2,\
          allowShrinking=true,\
          shrinkPeriodMins=15,\
          refreshMinutes=10,\
          testTable=dual,\
          props=user=joe;password=tiger
          weblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=guest
          weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
          In my servlet, I used
          Context ctx = null;
          Hashtable env = new Hashtable();
          env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
          env.put(Context.PROVIDER_URL, "t3://127.0.0.1:8080");
          env.put(Context.SECURITY_PRINCIPAL, "system");
          env.put(Context.SECURITY_CREDENTIALS, "Administrator");
          ctx = new InitialContext(env);
          UserTransaction tx = (UserTransaction)
          ctx.lookup("javax.jts.UserTransaction");
          When I access the servlet, the following exception were thrown.
          javax.naming.NameNotFoundException: 'javax.jts.UserTransaction';
          remaining name 'jts.UserTransaction' at
          weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java,
          Compiled Code)at
          weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)at
          weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)at
          javax.naming.InitialContext.lookup(InitialContext.java:349) at
          jtsdemo.SelectAccessor.accessDatabase(SelectAccessor.java:20)at
          jtsdemo.SelectJTS.doPost(SelectJTS.java:29) at
          jtsdemo.SelectJTS.doGet(SelectJTS.java:12)
          When I open the weblogic console, in directory Naming, I could not find
          javax.jts.UserTransaction entry. However there is weblogic.jdbc.jts
          entry which is generated by the following line, which I put into the
          properties file.
          weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
          Thank you for any thoughts.
          MSU
          [att1.html]
          

Hello:
          Thank Kumar for a reply.
          I checked the document and able to follow it and use
          javax.sql.DataSource to get a jts connection and select from database.
          In the properties file of the weblogic application server,
          weblogic.jdbc.TXDataSource.jtsOraclePool=oraclePool
          Some questions follow.
          In this way, I could not get a handle to UserTransaction. I am
          wondering in case of database insertion, does this connection
          automatically commit for each execUpdate(), if I do not call
          conn.setAutoCommit(false)?
          If a programmer has to manage the transaction on the Connection,
          what is the advantage to use jts connection pool? Does this performed
          faster or internally it behaves the same?
          Look forward to any insight.
          MSU
          Kumar Allamraju wrote:
          > Michelle,
          >
          > see the correct usage here:
          > http://www.weblogic.com/docs50/classdocs/DataSource.html#998209
          >
          > -Kumar
          >
          > Michelle Sue wrote:
          >
          >> Hello, Kumar:
          >> Thank you for the information given.
          >> Now what I did is
          >> Properties p = new Properties();
          >> p.put(Context.INITIAL_CONTEXT_FACTORY,
          >> "weblogic.jndi.WLInitialContextFactory");
          >> Context ctx = new InitialContext(p);
          >> UserTransaction tx = (UserTransaction)
          >> ctx.lookup("javax.transaction.UserTransaction");
          >> try {
          >> tx.begin();
          >> Driver myDriver = (Driver)
          >> Class.forName("weblogic.jdbc.jts.Driver").newInstance();
          >> Properties props = new Properties();
          >> props.put("connectionPoolID", "oraclePool");
          >> conn = myDriver.connect("jdbc:weblogic:jts", props);
          >> Statement stmt = conn.createStatement();
          >>
          >> The new error is
          >> JTS JDBC Driver being called without a pool name
          >> at
          >> weblogic.jdbcbase.jts.Connection.openConnectionIfNecessary(Connection.java:569)
          >>
          >> at weblogic.jdbcbase.jts.Connection.createStatement
          >>
          >> I guess something wrong with the props.put("connectionPoolID",
          >> "oraclePool");
          >> In the properties file, it seems to me that the only line related to
          >> jts is
          >>
          >> weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.oraclePool=oraclePool
          >> oraclePool was also defined in this properties file as a
          >> weblogic.jdbc.connectionPool
          >>
          >> MSU
          >>
          >>
          >> Kumar Allamraju wrote:
          >>
          >> > Hi Michelle,
          >> >
          >> > The use of javax.jts.UserTransaction is deprecated in EJB 1.1
          >> > The correct package name is javax.transaction.UserTransaction.
          >> >
          >> > Remeber you shouldn't make any t3 connections from the server side
          >> > class.
          >> >
          >> > you can directly say context c = new InitialContext( )
          >> > Pls refer one of our examples directory.
          >> > for e.g weblogic/examples/ejb/basic/beanManaged/Servlet.java
          >> >
          >> > Hope this helps
          >> > -Kumar
          >> >
          >> >
          >> >
          >> > Michelle Sue wrote:
          >> >
          >> >> Hello:
          >> >> I am working on using jts for the transaction access to a
          >> >> Oracle 7.3 database.
          >> >> In the property file of my application, I used
          >> >>
          >> >> weblogic.jdbc.connectionPool.oraclePool=\
          >> >> url=jdbc:oracle:thin:@10.10.0.201:1521:orcl,\
          >> >> driver=oracle.jdbc.driver.OracleDriver,\
          >> >> loginDelaySecs=1,\
          >> >> initialCapacity=4,\
          >> >> maxCapacity=10,\
          >> >> capacityIncrement=2,\
          >> >> allowShrinking=true,\
          >> >> shrinkPeriodMins=15,\
          >> >> refreshMinutes=10,\
          >> >> testTable=dual,\
          >> >> props=user=joe;password=tiger
          >> >>
          >> >> eblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=guest
          >> >>
          >> >> weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
          >> >>
          >> >>
          >> >> In my servlet, I used
          >> >> Context ctx = null;
          >> >> Hashtable env = new Hashtable();
          >> >>
          >> >> env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
          >> >>
          >> >> env.put(Context.PROVIDER_URL, "t3://127.0.0.1:8080");
          >> >> env.put(Context.SECURITY_PRINCIPAL, "system");
          >> >> env.put(Context.SECURITY_CREDENTIALS, "Administrator");
          >> >> ctx = new InitialContext(env);
          >> >> UserTransaction tx = (UserTransaction)
          >> >> ctx.lookup("javax.jts.UserTransaction");
          >> >>
          >> >> When I access the servlet, the following exception were thrown.
          >> >>
          >> >> javax.naming.NameNotFoundException: 'javax.jts.UserTransaction';
          >> >> remaining name 'jts.UserTransaction' at
          >> >> weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java,
          >> >> Compiled Code)at
          >> >> weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)at
          >> >> weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)at
          >> >> javax.naming.InitialContext.lookup(InitialContext.java:349) at
          >> >> jtsdemo.SelectAccessor.accessDatabase(SelectAccessor.java:20)at
          >> >> jtsdemo.SelectJTS.doPost(SelectJTS.java:29) at
          >> >> jtsdemo.SelectJTS.doGet(SelectJTS.java:12)
          >> >>
          >> >> When I open the weblogic console, in directory Naming, I could
          >> >> not find javax.jts.UserTransaction entry. However there is
          >> >> weblogic.jdbc.jts entry which is generated by the following line,
          >> >> which I put into the properties file.
          >> >> weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
          >> >>
          >> >> Thank you for any thoughts.
          >> >>
          >> >> MSU
          >> >>
          >> >>
          >> >
          [att1.html]
          

Similar Messages

  • Problem in using javax.transaction.UserTransaction

    Hi
    I am using tomcat 5.0 . I got the error when I used javax.transaction.UserTransaction interface. Prbabaly it is deprecated. is there any other way to use tx.begin() and tx.commit() for getting the data from the database?

    the app server per se has no affect on the persistence layer.
    perhaps you had the right drivers available on one but not the other. perhaps the jndi data source setup isn't the same on both.
    but if the code's written properly it should run the same regardless of app server.
    %

  • Javax.transaction.UserTransaction --- what version of jta is included in 4.5.1 (sp8)

    I have a problem with another vendor also include the javax.transaction
    package in their jar file.
    When compiling, the one included in the weblogicaux.jar is picked up and our
    extension to this thrid pary product fails because the UserTransaction
    method signatures are different in weblogicaux.jar than the one this thirty
    party expects.
    I check the online doc in JDC and looks like our third party tool looks for
    the correct signature for the JTA 1.0.1 --
    while weblogic has an older(?) version of API?
    Here is the error:
    MySessionBean.java:0: The method void setTransactionTimeout(int)
    declared in class
    com.fame.timeiq.persistence.Connection cannot override the method of the
    same signature declared in interface
    javax.transaction.UserTransaction. Their throws clauses are
    incompatible.
    My question is:
    1. to work around the problem, we put the third party jar file infront of
    the weblogic classes. Are there issues I should watch out for?
    2. What version of JTA is included in weblogic 4.5.1?
    3. Checking weblogicaux.jar, it includes both javax.jts.UserTransaction and
    javax.transaction.UserTransaction. Where is the latter used?
    Winnie

    I do not know if there will be a problem. Are you also pursuing this issue
    through technical support? I asked because I received this same question
    from our technical support people today as well.
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Winnie Tung" <[email protected]> wrote in message
    news:39b8e318$[email protected]..
    It's 1.0.1 in 5.1, but it's definitely not 1.0.1 (as your web page link
    pointed to) in 4.5.1 or 4.5.2
    btw,it was FAME.
    Is theer any harm to replace that interface class?
    Winnie
    "Michael Girdley" <[email protected]> wrote in message
    news:39b86ecf$[email protected]..
    It should be version 1.0.1. Out of curiosity, what third party productsare
    using?
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Winnie Tung" <[email protected]> wrote in message
    news:39b7c7f0$[email protected]..
    I have a problem with another vendor also include the
    javax.transaction
    package in their jar file.
    When compiling, the one included in the weblogicaux.jar is picked upand
    our
    extension to this thrid pary product fails because the UserTransaction
    method signatures are different in weblogicaux.jar than the one thisthirty
    party expects.
    I check the online doc in JDC and looks like our third party tool
    looks
    for
    the correct signature for the JTA 1.0.1 --
    while weblogic has an older(?) version of API?
    Here is the error:
    MySessionBean.java:0: The method void setTransactionTimeout(int)
    declared in class
    com.fame.timeiq.persistence.Connection cannot override the method
    of
    the
    same signature declared in interface
    javax.transaction.UserTransaction. Their throws clauses are
    incompatible.
    My question is:
    1. to work around the problem, we put the third party jar file infront
    of
    the weblogic classes. Are there issues I should watch out for?
    2. What version of JTA is included in weblogic 4.5.1?
    3. Checking weblogicaux.jar, it includes both
    javax.jts.UserTransaction
    and
    javax.transaction.UserTransaction. Where is the latter used?
    Winnie

  • Exception NameNotFound Exception

    HiWhen i run the clint i get this exception javax.naming.NameNotFoundException:'JNDInameofclient';remaining name 'JNDInameofclient' at weblogic.rmi.extensions.AbstractRequest.sendreceive(Abstractrequest.java:76)I am using WEBLOGIC 5.1 on win98Please help me to figure this out

    Are searching ejbhome?
    If yes, check your jndi-name of deployed ejb. It should match exactly.
    This is Namenotfound exception. It's just that name is matching within your
    context.
    sandip <[email protected]> wrote in message
    news:3a8924e9$[email protected]..
    HiWhen i run the clint i get this exceptionjavax.naming.NameNotFoundException:'JNDInameofclient';remaining name
    'JNDInameofclient' at
    weblogic.rmi.extensions.AbstractRequest.sendreceive(Abstractrequest.java:76)
    I am using WEBLOGIC 5.1 on win98Please help me to figure this out

  • Exception while using unit of work commit

    Hi,
    I have using this code to create a object
    KbAdAlerts alert = new KbAdAlerts();
    alert.setAlertId(kmData.getAlertId());
    alert.setAlertDesc(kmData.getOutcome());
    alert.setAlertLastRevisionDate(KmUtils.convertReviewDate(kmData.getReviewDate()));
    alert.setAlertType(kmData.getAlertType());
    System.out.println("Alert Object :" + alert);
    KbAdAlerts alertClone = (KbAdAlerts) uow.registerObject(alert);
    System.out.println("Clone Alert:" + alertClone);
    uow.printRegisteredObjects();
    uow.commit();
    I am getting exception while using uow.commit(). I have gone into alert object and everything seems to be fine.
    Could you help me in this issue.
    Thanks,
    Ashish
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-01400: cannot insert NULL into ("AD_OWNER"."KB_AD_ALERTS"."ALERT_ID")
    Error Code: 1400
    Call:insert into kb_ad_alerts(alert_id, alert_desc, alert_type, alert_last_revision_date)
    values
    (NULL, NULL, NULL, NULL)
    Query:InsertObjectQuery(oracle.ccr.admin.model.KbAdAlerts@6108)
         at oracle.toplink.exceptions.TopLinkException.<init>(TopLinkException.java:46)
         at oracle.toplink.exceptions.DatabaseException.<init>(DatabaseException.java:50)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:658)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:707)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:496)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1603)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:238)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObject(DatabaseQueryMechanism.java:355)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:433)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:60)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:622)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:586)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:479)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:110)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:259)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)
         at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:519)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:100)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:72)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2532)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:938)
         at oracle.toplink.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:240)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:161)
         at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3123)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1242)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1330)
         at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:1097)
         at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:865)
         at oracle.ccr.admin.model.FeedbackServices.writeFeedback(FeedbackServices.java:116)
         at oracle.ccr.admin.view.AlertDetails.updateTables(AlertDetails.java:834)
         at oracle.ccr.admin.view.AlertDetails.commandButton1_action(AlertDetails.java:822)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
         at oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    Hi,
    I am having a similar problem that results in this stack trace. The funny thing is that it occurs after a session.logout/login and re-read of the object I'm trying to update. The other thing is that if I remove objects from the transaction it just happens somewhere else - on a different object/descriptor. I am attempting to upgrade from 9.03 runtime to the 10.0.3.1 builder/runtime. I am connecting to a Sybase 12.5 db.
    Any ideas on this one?
    Thanks,
    Bret
    This is the sql that is found in the DatasourceCallQueryMechanism. We are not using any custom SQL.
    SQLCall(INSERT INTO Invoice (id, description, billingAddress, customerNote, invoiceNumber, startDate, stopDate, sentDate, commitDate, customerId, dueDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
    java.lang.NullPointerException
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:213)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:156)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:170)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:426)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:65)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:75)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:251)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:542)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:100)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:72)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2578)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:988)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:945)
         at oracle.toplink.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:243)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:218)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:174)
         at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3177)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1282)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1370)
         at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:1137)
         at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:905)
         at com.tbs.database.DBBroker.mergeSingleObject(DBBroker.java:288)
         at com.tbs.database.DBBroker.merge(DBBroker.java:235)
         at com.tbs.database.DBBrokerSetInvoker.merge(DBBrokerSetInvoker.java:73)
         at com.tbs.database.TbsDataSource.merge(TbsDataSource.java:353)
    /////////////////////////////////

  • Error when using javax.script package

    Hi
    I want to call a javascript method from a .js file from .java class.
    when i searched, i came to understand that using jdk1.6 i can use javax.script package tht provide me what i needed.
    using the reply i got from i earlier post, i tried one example.
    public void show() {
    ScriptEngineManager engineMgr = new ScriptEngineManager();
    ScriptEngine engine= engineMgr.getEngineByName("JavaScript");
    try {
    engine.eval(new FileReader("D:/ShowScript.js"));
    Invocable invocableEngine = (Invocable) engine;
    //show_message is my function in ShowScript.js file
    invocableEngine.invokeFunction("show_message",null);
    } catch (Exception e) {
    e.printStackTrace();
    ShowScript.js
    function show_message()
    println("===> hi");
    alert("hi");
    When i execute my program, im getting the following error
    javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "alert" is not defined. ( #8) in at line number 8
    at com.sun.script.javascript.RhinoScriptEngine.invoke(RhinoScriptEngine.java:184)
    at com.sun.script.javascript.RhinoScriptEngine.invokeFunction(RhinoScriptEngine.java:142)
    at testbuiltin.backing.Show_alert.show(Show_alert.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    When i remove the alert() from the js file, the println is working. But what i neede is the alert.
    Can anyone plz help me to solve this problem.

    As you're talking about "backing beans", are you using JSF?
    After all, this is definitely not the way to let Java and JS interact with each other. Java runs at the server side. JS runs at the client side. Java can write JS code to the response, but definitely cannot call it. JS can access the HTML DOM and invoke requests to the server (form.submit() and AJAX and so on) and send parameters along the request, but definitely cannot call Java classes and methods independently. Nothing more and nothing less than that.

  • Using javax.security.auth.LoginContext to generate a renewable ticket

    Hi,
    I tired to use javax.security.auth.LoginContext (with kerberos) to generate a forwardable and renewable ticket. With this ticket I authenticate the user at an other server.
    My problem is, that the code generates a forwardable ticket, but not a renewable one. If I use the kinit (console tool) I am able to generate a renewable one.
    Here is the JAVA-code:
    System.setProperty("sun.security.krb5.debug","true");
    System.setProperty("java.security.krb5.conf", "krb5.conf");     
    System.setProperty("java.security.auth.login.config", "login.conf");
    lc = new LoginContext("SampleCXF",new LoginGuiCallbackHandler());
    try {
         lc.login();
    }catch(Exception e) {
         e.printStackTrace();
         System.exit(1);
         Subject subject = lc.getSubject();
         KerberosTicket kt = (KerberosTicket) subject.getPrivateCredentials().iterator().next();
         System.out.println(kt);
         Subject.doAsPrivileged(subject, new PrivilegedAction<byte[]>() {
              @Override
              public byte[] run() {
                   try {
                        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
                        factory.setServiceClass(TestService.class);
                        factory.setAddress("https://server.at/TestProjektServer/services/TestService");
                        TestService client = (TestService) factory.create();
                        String message = client.service1("param service 1");
                        //String message = client.service1("param service 1");
                   }catch(Exception e) {
                        e.printStackTrace();
                   return null;
         }, null);
    the login.conf contains:
    SampleCXF {
    com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true debug=true renewTGT=true doNotPront=true;
    the krb5.conf contains:
    [libdefaults]
    default_realm = TESTREALM
         kinit = {
         forwardable = true
         proxiable = true
         renew_lifetime = 5d 0h 0m 0s
    [realms]
    TESTREALM = {
    kdc = aba.hostingcenter.uclv.net
    admin_server = aba.hostingcenter.uclv.net
    [domain_realm]
    *.test.net = TESTREALM
    .test.net = TESTREALM
    [logging]
         default = FILE:/var/log/kdc.log
         kdc = FILE:/var/log/kdc.log
    [appdefaults]
         pam = {
              renewable = true
         forwardable = true
         renew_lifetime = 5d 0h 0m 0s
    If I use my client principal and password a ticket will be generated. This ticket is not renewable!!
    If I use the ticket cache (kinit -r, and kinit -R), a renewable ticket was loaded. On the server side the forwarded ticket is not renewable. It seams that the client generates a new ticket with the forwarded flag, but the renewable flag is not set.
    does anyone have an idea?
    Thanks a lot
    Ludi
    Edited by: user6714014 on Dec 13, 2011 7:34 AM

    nobody knows?

  • Using EJB Context UserTransaction inside DBTransaction

    Hi.
    nside my bussiness logic (ADF Model) I call remote EJB to insert some data on the other side.
    My call looks like
            ....... My code do some updates, inserts and deletes.......
            Hashtable env = new Hashtable();
            // WebLogic Server 10.x connection details
            env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            env.put(Context.PROVIDER_URL, "t3://localhost:7101");
            Context context = new InitialContext(env);
            UserTransaction transaction = (UserTransaction)context.lookup("javax.transaction.UserTransaction");
            transaction.begin();
            ........ Call EJB method ........
            ........ Method returns me some data ..........After a while user decides to commit data. He does actual commit on DBTransaction. Is there any way to guarantee that EJB Context UserTransaction will do commit or rollback, based on what user do (commit or rollback)?
    How to properly use XA transaction here?
    Thx
    Regards

    Frank,
    is there any way to do something like this?
            Hashtable<String, Object> firstServerEnv = new Hashtable<String, Object>();
            firstServerEnv.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            firstServerEnv.put(Context.PROVIDER_URL, "t3://myFirstServer:7101");
            final Context firstServerContext = new InitialContext(firstServerEnv);
            UserTransaction firstServerTransaction = (UserTransaction)firstServerContext.lookup("javax.transaction.UserTransaction");
            // lookup for first EJB
            Hashtable<String, Object> secondServerEnv = new Hashtable<String, Object>();
            secondServerEnv.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            secondServerEnv.put(Context.PROVIDER_URL, "t3://mySecondServer:7101");
            final Context secondServerContext = new InitialContext(secondServerEnv);
            UserTransaction secondServerTransaction = (UserTransaction)secondServerContext.lookup("javax.transaction.UserTransaction");
            // lookup for second EJB
            Hashtable<String, Object> thirdServerEnv = new Hashtable<String, Object>();
            thirdServerEnv.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            thirdServerEnv.put(Context.PROVIDER_URL, "t3://myThirdServer:7101");
            final Context thirdServerContext = new InitialContext(thirdServerEnv);
            UserTransaction thirdServerTransaction = (UserTransaction)thirdServerContext.lookup("javax.transaction.UserTransaction");
            // lookup for third EJB
            // Start global transaction
            firstServerTransaction.begin();
            // execute methods from first EJB
            firstServerTransaction.commit();
            secondServerTransaction.begin();
            // execute methods from second EJB
            secondServerTransaction.commit();
            thirdServerTransaction.begin();
            // execute methods from third EJB
            thirdServerTransaction.commit();
            // Commit or rollback global transaction

  • ADF application on cluster throw exception when using chrome

    I deploy my ADF application to cluster with one proxy server (myip:7003) and two application server(myip:7004 myip:7005) ( http://docs.oracle.com/cd/E15051_01/wls/docs103/cluster/setup.html )
    It works fine when using firefox and IE8, but throw exception when using chrome
    ####<Mar 1, 2013 3:18:30 PM CST> <Notice> <Diagnostics> <XXX.XXX.com> <server02> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1362122310439> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'server02' has triggered at Mar 1, 2013 3:18:30 PM CST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = Mar 1, 2013 3:18:30 PM CST SERVER = server02 MESSAGE = [ServletContext@710669610[app:Project1 module:XXX path:/XXX spec-version:2.5]] Servlet failed with Exception
    java.lang.NullPointerException
    at org.apache.myfaces.trinidad.model.BaseMenuModel.setRowKey(BaseMenuModel.java:120)
    at org.apache.myfaces.trinidad.component.UIXTree.createCollectionModel(UIXTree.java:274)
    at org.apache.myfaces.trinidad.component.UIXCollection.getCollectionModel(UIXCollection.java:1513)
    at org.apache.myfaces.trinidad.component.UIXCollection.getCollectionModel(UIXCollection.java:1115)
    at org.apache.myfaces.trinidad.component.UIXTree$RowKeyFacesBeanWrapper.getProperty(UIXTree.java:423)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.getProperty(UIXComponentBase.java:1485)
    at org.apache.myfaces.trinidad.component.UIXTree.getDisclosedRowKeys(UIXTree.java:626)
    at org.apache.myfaces.trinidad.component.UIXTree.__init(UIXTree.java:325)
    at org.apache.myfaces.trinidad.component.UIXCollection._init(UIXCollection.java:1778)
    at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:589)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeFacet(DecorativeBoxRenderer.java:440)
    at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeCenterPane(DecorativeBoxRenderer.java:704)
    at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeAll(DecorativeBoxRenderer.java:380)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1593)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:263)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1593)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:263)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1593)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:279)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
    at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
    at oracle.adfinternal.view.faces.renderkit.rich.PageTemplateRenderer.encodeAll(PageTemplateRenderer.java:68)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
    at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
    at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
    at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
    at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:431)
    at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:233)
    at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = XXX.XXX.com TXID = CONTEXTID = TIMESTAMP = 1362122310438
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000 Jdeveloper 11.1.2.1.0
    webloigc 10.3
    Please help me , thank you
    Edited by: Rocky.c.Xu on 2013-3-1 上午2:52

    Solved it on my own.
    The sso from Java->ABAP was OK
    I reconfigured the sso from ABAP->JAVA by creating new ABAP certificate and import it to the J2EE.
    Omri

  • Weblogic.utils.NestedRuntimeException when using javax.servlet.Filter

    IDE: JDev 10gR3.4 & JDev 11gR2.3
    ViewController technology: JSF/ADF Faces
    Example code flow:
    Run page2.jsf
    MyFilter intercepts request, checks for parameter on session.
    If parameter not null, goto page2.jsf
    Else redirect to page1.jsf
    page1.jsf has a button that sets the value on the session scope after clicking.
    In jdev 11gR2.3, I get an weblogic.utils.NestedRuntimeException after clicking the button on page1.jsf. This error does not occur in jdev 10gR3.5. Although the application continues to execute and proper info is displayed, I’m wondering why this occurs and also if I should be concerned. Has anyone experienced a similar issue when using javax.servlet.Filter in 11g?
    MyFilter code snipet:
        public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) {
            try {
                HttpServletRequest httpRequest = (HttpServletRequest)servletRequest;
                HttpServletResponse httpResponse = (HttpServletResponse)servletResponse;
                String redirect = httpRequest.getContextPath() + "/faces/page1.jsf"; //only difference here is 11g uses jsf, 10g uses jsp.
                String uri = httpRequest.getRequestURI().toString();
                Boolean mySessionAttribute = (Boolean)httpRequest.getSession().getAttribute("MYSESSIONATTRIBUTE");
                if (uri.endsWith(redirect) || mySessionAttribute != null) {
                    filterChain.doFilter(servletRequest, servletResponse);
                } else {
                    httpResponse.sendRedirect(redirect);
                    return;
            } catch (IOException e) {
                e.printStackTrace();
            } catch (ServletException e) {
                e.printStackTrace();
    page1.jsf/jsp
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
        <h:form id="f1">
            <h:commandButton value="Submit" id="cb1" action="#{Page1Bean.clicked}" type="submit"/>
        </h:form>
    </f:view>page2.jsf/jsp
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <af:document title="main.jsf" id="d1">
            <af:form id="f1">
                <af:outputText value="This is the main content" id="ot1"/>
            </af:form>
        </af:document>
    </f:view>Page1Bean.java
    public class Page1Bean {
        public void clicked() {       
            FacesContext context = FacesContext.getCurrentInstance();
            ExternalContext externalContext = context.getExternalContext();
            externalContext.getSessionMap().put("MYSESSIONATTRIBUTE", Boolean.TRUE);
            try {
                externalContext.redirect("/11gFilterExample-ViewController-context-root/faces/page2.jsf");
            } catch (IOException e) {
                    e.printStackTrace();
    }Full exception
    weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/11gFilterExample-ViewController-context-root/faces/page1.jsf'
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2144)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:2024)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1918)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getParameter(ServletRequestImpl.java:1995)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.access$800(ServletRequestImpl.java:1817)
         at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:804)
         at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:169)
         at org.apache.myfaces.trinidadinternal.context.external.ServletRequestParameterMap.getAttribute(ServletRequestParameterMap.java:43)
         at org.apache.myfaces.trinidadinternal.context.external.ServletRequestParameterMap.getAttribute(ServletRequestParameterMap.java:31)
         at org.apache.myfaces.trinidadinternal.context.external.AbstractAttributeMap.get(AbstractAttributeMap.java:73)
         at oracle.adfinternal.controller.state.ControllerState.getRootViewPortFromRequest(ControllerState.java:788)
         at oracle.adfinternal.controller.state.AdfcContext.initialize(AdfcContext.java:185)
         at oracle.adfinternal.controller.state.AdfcContext.initialize(AdfcContext.java:79)
         at oracle.adfinternal.controller.application.AdfcConfigurator.beginRequest(AdfcConfigurator.java:53)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:562)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:212)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:174)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(SocketInputStream.java:168)
         at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:177)
         at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:228)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2118)
         ... 39 more
    <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled

    I dont believe that solution pertains to my case. clicked() is invoked from standard jsf page and the adf controller is not acquired yet. i put a couple of print statements in the filter and it seems that the doFilter is called twice! This is not the case when running in 10g.
                if (uri.endsWith(redirect) || mySessionAttribute != null) {
                    System.out.println("URI dofilter: "+uri);
                    filterChain.doFilter(servletRequest, servletResponse);
                } else {
                    System.out.println("URI sendRedirect: "+uri);
                    httpResponse.sendRedirect(redirect);              
                }11g weblogic console log:
    URI sendRedirect: /11gFilterExample-ViewController-context-root/faces/page2
    URI dofilter: /11gFilterExample-ViewController-context-root/faces/page1.jsf
    URI dofilter: /11gFilterExample-ViewController-context-root/faces/page1.jsf
    10g oc4j console log:
    13/01/07 15:48:13 URI sendRedirect: /10gFilterExample-ViewController-context-root/faces/page2.jsp
    13/01/07 15:48:13 URI dofilter: /10gFilterExample-ViewController-context-root/faces/page1.jsp
    I believe whatever thats causing this occur could be why the exception is thrown...

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • How can I print a html Using javax.print

    Hi friends,
    I am in big trouble . I use following code to print a html file using javax.print api.
    import java.io.*;
    import javax.print.*;
    import javax.print.attribute.*;
    import javax.print.attribute.standard.*;
    import javax.print.event.*;
    public class PrintPS
         public static void main(String args[]) {
              PrintPS html = new PrintPS();
         public PrintPS() {
         DocFlavor flavor = DocFlavor.INPUT_STREAM.TEXT_HTML_HOST;
         PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
         aset.add(MediaSizeName.ISO_A4);
         aset.add(new Copies(1));
         aset.add(MediaTray.MAIN);
         PrintService pservices = PrintServiceLookup.lookupDefaultPrintService();
         if(pservices==null)
              System.out.println(" printer not found");
         if (pservices!= null) {
         System.out.println("selected printer " + pservices.getName());
         DocPrintJob pj = pservices.createPrintJob();
         try {
         InputStream fis = new FileInputStream("abc.html");
         Doc doc = new SimpleDoc(fis, flavor, null);
    System.out.println("printing started ");
         pj.print(doc, aset);
    System.out.println("printing completed");
         } catch (IOException ie) {
         System.err.println(ie);
         } catch (PrintException e) {
         System.err.println(e);
    This code gives me "sun.print.PrintJobFlavorException: invalid flavor"
    So i use all four TEXT_HTML flavor but i do not find the solution.
    I am able to print pdf, jpg, gif files but i can not able to print txt and html file.
    My printer supports txt and html printing becaue i do printing directolly by browser's or notpad's print command .

    Hi friends,
    I am in big trouble . I use following code to print a
    html file using javax.print api.Use Code Tags
    http://forum.java.sun.com/help.jspa?sec=formatting
    My printer supports txt and html printing becaue i do
    printing directolly by browser's or notpad's print
    command .Notepad & your browser prob. convert to the HTML/text(1) into the printers native format.
    1) I am suprised that it does not print text.

  • Oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters

    Dear Guru's,
    I am not able to solve the above issue for last couple of days.
    I am newbie to the webservice
    My Issue...
    I am using Jdeveloper 11.1.2.4.0 Release 2
    1. Using Jdev I built one small Web Service with two methods.
            While testing the Webservice...
                   I passed User Id as Parameter and it successfully return the values (user id, user name and description) from fnd_user table
    2. I created another application to consume the web service i created.
                   1. I added the webservice SOAP and added the method.
                   2. Created a jsf page and drag and drop the parameter and return values to the jsf page.
    3. While executing the created jsf page I received the error message as below
    "oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters are {0=Attribute, 1=UserName, 2=UserName}"
    Even I know that this issue is repeated one in our forum, I was not able to solve this issue.
    Can anybody help to solve this issue.
    Thanks and Regards,
    Durai S E

    Dear Guru's,
    I am not able to solve the above issue for last couple of days.
    I am newbie to the webservice
    My Issue...
    I am using Jdeveloper 11.1.2.4.0 Release 2
    1. Using Jdev I built one small Web Service with two methods.
            While testing the Webservice...
                   I passed User Id as Parameter and it successfully return the values (user id, user name and description) from fnd_user table
    2. I created another application to consume the web service i created.
                   1. I added the webservice SOAP and added the method.
                   2. Created a jsf page and drag and drop the parameter and return values to the jsf page.
    3. While executing the created jsf page I received the error message as below
    "oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters are {0=Attribute, 1=UserName, 2=UserName}"
    Even I know that this issue is repeated one in our forum, I was not able to solve this issue.
    Can anybody help to solve this issue.
    Thanks and Regards,
    Durai S E

  • Problem when using javax.crypto.KeyGenerator in netbeans

    This is my IDE information:
    Product Version: NetBeans IDE 6.0.1 (Build 200801291616)
    Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
    System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
    I am trying to develop a Test jar file. I created some simple jar files and could upload it in mobile.
    Now I want to implement some encryption. For that I started writing codes. But when trying to import javax.crypto.KeyGenerator class, netbeans is showing "cannot find symbol" error. I can use javax.crypto.Cipher/BadPaddingException/IllegalBlockSizeException/NoSuchPaddingException/spec/ShortBuffrException only. If i try to use any other class of javax.crypto, i get an error.
    I am new to mobility.I downloaded netbean mobility package and Installed it.
    Please provide some help.. thank you....

    This is my IDE information:
    Product Version: NetBeans IDE 6.0.1 (Build 200801291616)
    Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
    System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
    I am trying to develop a Test jar file. I created some simple jar files and could upload it in mobile.
    Now I want to implement some encryption. For that I started writing codes. But when trying to import javax.crypto.KeyGenerator class, netbeans is showing "cannot find symbol" error. I can use javax.crypto.Cipher/BadPaddingException/IllegalBlockSizeException/NoSuchPaddingException/spec/ShortBuffrException only. If i try to use any other class of javax.crypto, i get an error.
    I am new to mobility.I downloaded netbean mobility package and Installed it.
    Please provide some help.. thank you....

Maybe you are looking for