Informix 9.3 , jdbc 2.21, WLS 6.1(sp2) dramas..

 

A hard learnt lesson for an Informix newbie... When I created the
database a few weeks ago I failed to select a "logging" mode. Little
did I realise the implications until now. I have now created a new
database with "logging" set to buffered_log, this of course enables
transactions and WLS stops complaining instantly.
Such a simple error with such a lousy error message !!
Regards,
Ingmar
[email protected] (Ingmar Meins) wrote in message news:<[email protected]>...
Hi people,
I am running Informix Dynamic Server 9.3 on an XP Pro box, Weblogic
Server 6.1 (sp2) on another and have the two talking via the ifxjdbc
driver version 2.21.
(Dev environment only)
Session beans deploy fine and run okay talking to Ifx via the jdbc.
Everything suggests the whole lot is working... until I try to deploy
an entity bean (CMP) to WLS. The error message I get is -
Unable to deploy EJB: Users1 from icmfejb.jar:
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Table:
users
Full Table Check failed, but table all columns were found! ] at
weblogic.ejb20.utils.TableVerifier.verifyTableAndColumnsExist(TableVerifier.
java:274) at
weblogic.ejb20.utils.TableVerifier.verifyTableExistsAndCreateMaybe(TableVeri
fier.java:294)
It does not matter how simple the table or the EB I get this message
everytime. I rang BEA Australia and the guys had not heard of the
error message before.
When I throw Informix away and go back to mySQL using exactly the same
table names etc etc and EB all works without a problem.. Problem is
they won't let me run mySQL on the Sun E10k !! :-)
Any suggestions would be VERY gratefully received, this is driving me
mad.
Thanks,
Ingmar
NSW Police

Similar Messages

  • JDBC Connections in WLS 7.0.SP2

    Hello All,
    We are using both entity beans and JDBC calls inside our Stateless Session Beans.
    Our tests show that
    1. we need more database connections (in pool) than number of concurrent users
    (say twice)
    2. getting and releasing connections become a bottleneck as we need to do this
    for every method invocation for making JDBC calls
    3. Methods using only entity beans run faster
    Can somebody explain this behaviour. Thanks in advance for the time and help.
    Best Regards
    MS

    Hi Manoj,
    "MS" <[email protected]> wrote in message news:3eeac5af$[email protected]..
    Hello All,
    We are using both entity beans and JDBC calls inside our Stateless SessionBeans.
    Our tests show that
    1. we need more database connections (in pool) than number of concurrentusers
    (say twice)It all depends how transaction processing is arragend in your application.
    In the worst case you both get connections from the pool using the pool
    driver
    and use TxDatasource for entity beans. Than you will have number of needed
    pool connections doubled. The same story is when you actively use
    RequiresNew transaction attribute for SLSB.
    Normally when you use the Required transaction attibute for
    EJBs and TxDatasource to get connections, the max number of
    consumed connections will be around a number of the execution
    threads.
    2. getting and releasing connections become a bottleneck as we need to dothis
    for every method invocation for making JDBC callsCan you provide more information on the approach used to
    indentify fact of bottleneck? Also, could you please post the connection
    pool and datasource definitions? That will help to identify if the pool
    is possible misconfigured.
    3. Methods using only entity beans run fasterIt's hard to tell why it happens to you withouth knowing more about the
    application. But here are a couple of suggestions: first, weblogic makes
    extensive use of caching when database is accessed via EJBs. second,
    those direct JDBC calls are not written well ot use inappropriate
    transaction
    model.
    Can somebody explain this behaviour. Thanks in advance for the time andhelp.
    Let me know if you have more questions.
    Regards,
    Slava Imeshev

  • Microsoft SQL Server JDBC driver and WLS JMS problem?

              Greetings,
              I'm using the Microsoft SQL Server JDBC driver with WLS with JMS
              persisted to SQL Server, during WLS startup the JMS attempts to
              read the JMSStore and JMSState tables in the db, if they are
              already present (say, from a previous run) the driver kicks out:
              java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can
              not re-read row data for column 1.
              If the tables are not present, then WLS creates them and
              everything proceeds fine. Now, its not a good thing to attempt
              to reread row data for a ResultSet, especially for portability. Why is WLS JMS
              doing this? is there some config I can use to adjust JMS startup behavior for
              persisted JMS stores?
              Jay Houghton
              Centiv
              [email protected]
              long exception trace follows:
              <Oct 1, 2002 8:29:11 AM EDT> <Info> <JMS> <User connection factory "BroadcastTopicFactory"
              is started.>
              <Oct 1, 2002 8:29:18 AM EDT> <Info> <JMS> <JMSServer "EnergizerJMSServer", Opening
              JDBC store tables "JMSStore
              " and "JMSState" using connection pool "JMSConnectionPool".>
              <Oct 1, 2002 8:29:20 AM EDT> <Alert> <JMS> <JMSServer "EnergizerJMSServer", store
              failed to open, java.io.IOEx
              ception: JMS JDBC store, connection pool = <JMSConnectionPool>, prefix = <null>:
              recover
              java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can
              not re-read row data for colum
              n 1.
              at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              at weblogic.jdbc.pool.ResultSet.getLong(ResultSet.java:304)
              at weblogic.jms.store.JDBCIOStream.doRecover(JDBCIOStream.java:618)
              at weblogic.jms.store.JDBCIOStream.recover(JDBCIOStream.java:728)
              at weblogic.jms.store.JMSStore.recover(JMSStore.java:112)
              at weblogic.jms.backend.BEStore.open(BEStore.java:179)
              at weblogic.jms.backend.BackEnd.initialize(BackEnd.java:330)
              at weblogic.jms.JMSService.createBackEnd(JMSService.java:923)
              at weblogic.jms.JMSService.addJMSServer(JMSService.java:1277)
              at weblogic.jms.JMSService.addDeployment(JMSService.java:1174)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
              at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:23
              3)
              at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              at $Proxy40.updateDeployments(Unknown Source)
              at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub
              .java:2734)
              at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:362
              at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:154)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              at $Proxy57.start(Unknown Source)
              at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean
              _CachingStub.java:480)
              at weblogic.management.Admin.startApplicationManager(Admin.java:1151)
              at weblogic.management.Admin.finish(Admin.java:571)
              at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:508)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
              at weblogic.Server.main(Server.java:35)
              

              Tom,
              thanks for the info, I'll bring this to support.
              I did try the weblogic jDriver for SQL Server and it works fine, so i think it
              must be the way JMS is interacting with the MS driver.
              here are my components:
              WLS 6.1sp1
              Microsoft® SQL Server™ 2000 Driver for JDBC™ is a (Type 4 JDBC) which provides
              partial JDBC 2 support (no blobs, clobs, etc)
              MS SQL Server 2000 (sp2?)
              thanks!
              Jay Houghton
              [email protected]
              Tom Barnes <[email protected]> wrote:
              >Hi Jay,
              >
              >This is not a known issue at BEA as far as I know, perhaps it is the
              >result
              >of a new driver/database combination. Try using a different driver,
              >or a different
              >version of the current driver. Meanwhile, use a file store (just as
              >reliable but faster) and log a case with customer support, including
              >information on your version, service-pack, and what driver you are using.
              >
              >Tom, BEA
              >
              >Jay Houghton wrote:
              >
              >> Greetings,
              >>
              >> I'm using the Microsoft SQL Server JDBC driver with WLS with JMS
              >> persisted to SQL Server, during WLS startup the JMS attempts to
              >> read the JMSStore and JMSState tables in the db, if they are
              >> already present (say, from a previous run) the driver kicks out:
              >>
              >> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet
              >can
              >> not re-read row data for column 1.
              >>
              >> If the tables are not present, then WLS creates them and
              >> everything proceeds fine. Now, its not a good thing to attempt
              >> to reread row data for a ResultSet, especially for portability. Why
              >is WLS JMS
              >> doing this? is there some config I can use to adjust JMS startup behavior
              >for
              >> persisted JMS stores?
              >>
              >> Jay Houghton
              >> Centiv
              >> [email protected]
              >>
              >> long exception trace follows:
              >>
              >> <Oct 1, 2002 8:29:11 AM EDT> <Info> <JMS> <User connection factory
              >"BroadcastTopicFactory"
              >> is started.>
              >> <Oct 1, 2002 8:29:18 AM EDT> <Info> <JMS> <JMSServer "EnergizerJMSServer",
              >Opening
              >> JDBC store tables "JMSStore
              >> " and "JMSState" using connection pool "JMSConnectionPool".>
              >> <Oct 1, 2002 8:29:20 AM EDT> <Alert> <JMS> <JMSServer "EnergizerJMSServer",
              >store
              >> failed to open, java.io.IOEx
              >> ception: JMS JDBC store, connection pool = <JMSConnectionPool>, prefix
              >= <null>:
              >> recover
              >> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet
              >can
              >> not re-read row data for colum
              >> n 1.
              >> at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              >> at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              >> at weblogic.jdbc.pool.ResultSet.getLong(ResultSet.java:304)
              >> at weblogic.jms.store.JDBCIOStream.doRecover(JDBCIOStream.java:618)
              >> at weblogic.jms.store.JDBCIOStream.recover(JDBCIOStream.java:728)
              >> at weblogic.jms.store.JMSStore.recover(JMSStore.java:112)
              >> at weblogic.jms.backend.BEStore.open(BEStore.java:179)
              >> at weblogic.jms.backend.BackEnd.initialize(BackEnd.java:330)
              >> at weblogic.jms.JMSService.createBackEnd(JMSService.java:923)
              >> at weblogic.jms.JMSService.addJMSServer(JMSService.java:1277)
              >> at weblogic.jms.JMSService.addDeployment(JMSService.java:1174)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:23
              >> 3)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
              >> at java.lang.reflect.Method.invoke(Native Method)
              >> at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              >> at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              >> at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              >> at $Proxy40.updateDeployments(Unknown Source)
              >> at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub
              >> java:2734)
              >> at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:362
              >> )
              >> at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:154)
              >> at java.lang.reflect.Method.invoke(Native Method)
              >> at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              >> at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              >> at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              >> at $Proxy57.start(Unknown Source)
              >> at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean
              >> _CachingStub.java:480)
              >> at weblogic.management.Admin.startApplicationManager(Admin.java:1151)
              >> at weblogic.management.Admin.finish(Admin.java:571)
              >> at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:508)
              >> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
              >> at weblogic.Server.main(Server.java:35)
              >
              

  • Workaround for using Oracle JDBC extension with WLS pooling

    Reading the newsgroup I saw that many of us encountered the problems
    with ClassCastException when tried to use Oracle JDBC extension
    with WLS pooling. I also had.
    In this case BEA recommends to use dangerous
    method getVendorConnection() which exposes
    the physical connection object to your code.
    Yes it's really dangerous because of unsafe usage may breaks
    WLS pooled connection(s).
    Moreover, this practice will make your JDBC code
    unportable (your JDBC code in addition to Oracle dependence
    became Weblogic dependent):
    void doSmth() {
    Connection con = ...;
    Connection vCon = ((WLConnection)con).getVendorConnection();
    // + mess of usage con in one places and vCon in others
    // (where Oracle extensions are needed)
    // !Don't forget to don't close vCon!
    Sux.
    I found the workaround.
    Introduction
    ============
    Yes the real cause of ClassCastException is that
    in depth of Oracle driver the casting
    to class oracle.jdbc.driver.OracleConnection
    (not to interface oracle.jdbc.OracleConnection)
    is performed.
    Someone can say that this is bug or pure desing.
    Weblogic pooled connection provide dynamic
    implementation for all public interfaces
    which real physical (wrapped) connection object implements.
    Great feature!
    But I guess that all interface methods implemented
    by simple call-delegation to physical (wrapped) connection object.
    In case of oracle.jdbc.OracleConnection interface
    this approach doesn't work for at least one its method:
    public OracleConnection unwrap()
    WLS pooled connection shoudn't implement this method by
    delegation to physical connection object BUT should
    return physical connection object itself!
    // Wrong implementation of unwrap()
    // delegation is used
    public OracleConnection unwrap() {
    return physicalConnection.unwrap();
    // Right implementation of unwrap()
    // physical connection returned
    public OracleConnection unwrap() {
    return physicalConnection;
    Workaround
    ==========
    1. Develop your own OracleConnection wrapper class:
    import oracle.jdbc.OracleConnection;
    import weblogic.jdbc.extensions.WLConnection;
    public class MyOracleConnectionImpl implements OracleConnection {
    private OracleConnection con;
    public MyOracleConnectionImpl(OracleConnection connection)
    throws SQLException
    this.con = connection;
    public OracleConnection unwrap() {
    return (OracleConnection)
    ((WLConnection)con).getVendorConnection();
    /* Implement all other methods by delegation to con object */
    2. Don't get Connections directly from DataSource --
    develop your own simple (may be static) utility
    class which retrives Connections from dataSource
    and returns them wrapped into your MyOracleConnectionImpl
    to your code from some method:
    puclic abstract class MyConnectionSource {
    public static Connection getConnection() {
    Connection con = // get it from DataSource
    return new MyOracleConnectionImpl((OracleConnection)con);
    3. Add attribute RemoveInfectedConnectionsEnabled="false"
    to definition of your JDBCConnectionPool within config.xml
    You may do it because of you `safely` use vendorConnection --
    you don't expose it to application code.
    4. Enjoy the Oracle JDBC extensions in your code!
    Example:
    Connection con = MyConnectionSource.getConnection;
    ArrayDescriptor add =
    ArrayDescriptor.createDescriptor("your_type", con);
    Hope it helps to someone.
    Best regards,
    Eugene Voytitsky

    Hello Eugene Voytitsky,
    Thanks Eugene Voytitsky for your idea
    I have tried the solution suggested by You, but it did not work.
    It still throws ClassCastException.
    I am sorry for posting the whole code of two classes below.
    I did this to give you more clarity.
    I am also indicating the place where the exception was thrown..
    Please let me know if I am doing something wrong.
    OracleConnection Wrapper class
    package ejbTesting;
    // sql imports
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.sql.SQLWarning;
    import java.sql.Statement;
    // util imports
    import java.util.Map;
    import java.util.Properties;
    // imports from Oracle Driver Classes
    import oracle.jdbc.OracleConnection;
    import oracle.jdbc.OracleOCIFailover;
    import oracle.jdbc.OracleSavepoint;
    // import from Weblogic extensions
    import weblogic.jdbc.extensions.WLConnection;
    public class WeblogicConnectionWrapper implements OracleConnection
         // oracle connection object
         private OracleConnection connection;
         public WeblogicConnectionWrapper (OracleConnection orclConnection)
              try
                   this.connection = orclConnection;
              catch(Exception unexpected )
                   unexpected.printStackTrace();
         public OracleConnection unwrap()
              try
              // The datasource returns a weblogic.jdbc.pool.Connection
              // This needs to be type casted to weblogic.jdbc.extensions.WLConnection
              // Only this weblogic.jdbc.extensions.WLConnection CAN BE type casted
              // to OracleConnection
         return (OracleConnection) ((WLConnection) connection).getVendorConnection();
         catch(Exception sqlException )
              sqlException.printStackTrace ();
              return null;
         /* Implement all other methods by delegation to connection object */      
    public Connection _getPC()
    return connection._getPC();
    public void archive(int i, int j, String s)
    throws SQLException
    connection.archive(i, j, s);
    public void assertComplete()
    throws SQLException
    connection.assertComplete();
    public void clearWarnings()
    throws SQLException
    connection.clearWarnings();
    public void close()
    throws SQLException
    connection.close();
    public void commit()
    throws SQLException
    connection.commit();
    public Statement createStatement()
    throws SQLException
    return connection.createStatement();
    public Statement createStatement(int i, int j)
    throws SQLException
    return connection.createStatement(i, j);
    public boolean getAutoClose()
    throws SQLException
    return connection.getAutoClose();
    public boolean getAutoCommit()
    throws SQLException
    return connection.getAutoCommit();
    public CallableStatement getCallWithKey(String s)
    throws SQLException
    return connection.getCallWithKey(s);
    public String getCatalog()
    throws SQLException
    return connection.getCatalog();
    public boolean getCreateStatementAsRefCursor()
    return connection.getCreateStatementAsRefCursor();
    public int getDefaultExecuteBatch()
    return connection.getDefaultExecuteBatch();
    public int getDefaultRowPrefetch()
    return connection.getDefaultRowPrefetch();
    public Object getDescriptor(String s)
    return connection.getDescriptor(s);
    public boolean getExplicitCachingEnabled()
    throws SQLException
    return connection.getExplicitCachingEnabled();
    public boolean getImplicitCachingEnabled()
    throws SQLException
    return connection.getImplicitCachingEnabled();
    public boolean getIncludeSynonyms()
    return connection.getIncludeSynonyms();
    public Object getJavaObject(String s)
    throws SQLException
    return connection.getJavaObject(s);
    public DatabaseMetaData getMetaData()
    throws SQLException
    return connection.getMetaData();
    public Properties getProperties()
    return connection.getProperties();
    public boolean getRemarksReporting()
    return connection.getRemarksReporting();
    public boolean getRestrictGetTables()
    return connection.getRestrictGetTables();
    public String getSQLType(Object obj)
    throws SQLException
    return connection.getSQLType(obj);
    public String getSessionTimeZone()
    return connection.getSessionTimeZone();
    public int getStatementCacheSize()
    throws SQLException
    return connection.getStatementCacheSize();
    public PreparedStatement getStatementWithKey(String s)
    throws SQLException
    return connection.getStatementWithKey(s);
    public int getStmtCacheSize()
    return connection.getStmtCacheSize();
    public short getStructAttrCsId()
    throws SQLException
    return connection.getStructAttrCsId();
    public boolean getSynchronousMode()
    return connection.getSynchronousMode();
    public int getTransactionIsolation()
    throws SQLException
    return connection.getTransactionIsolation();
    public Map getTypeMap()
    throws SQLException
    return connection.getTypeMap();
    public String getUserName()
    throws SQLException
    return connection.getUserName();
    public boolean getUsingXAFlag()
    return connection.getUsingXAFlag();
    public SQLWarning getWarnings()
    throws SQLException
    return connection.getWarnings();
    public boolean getXAErrorFlag()
    return connection.getXAErrorFlag();
    public boolean isClosed()
    throws SQLException
    return connection.isClosed();
    public boolean isLogicalConnection()
    return connection.isLogicalConnection();
    public boolean isReadOnly()
    throws SQLException
    return connection.isReadOnly();
    public String nativeSQL(String s)
    throws SQLException
    return connection.nativeSQL(s);
    public Object openJoltConnection(String s, short word0, short word1)
    return connection.openJoltConnection(s, word0, word1);
    public void oracleReleaseSavepoint(OracleSavepoint oraclesavepoint)
    throws SQLException
    connection.oracleReleaseSavepoint(oraclesavepoint);
    public void oracleRollback(OracleSavepoint oraclesavepoint)
    throws SQLException
    connection.oracleRollback(oraclesavepoint);
    public OracleSavepoint oracleSetSavepoint()
    throws SQLException
    return connection.oracleSetSavepoint();
    public OracleSavepoint oracleSetSavepoint(String s)
    throws SQLException
    return connection.oracleSetSavepoint(s);
    public int pingDatabase(int i)
    throws SQLException
    return connection.pingDatabase(i);
    public CallableStatement prepareCall(String s)
    throws SQLException
    return connection.prepareCall(s);
    public CallableStatement prepareCall(String s, int i, int j)
    throws SQLException
    return connection.prepareCall(s, i, j);
    public CallableStatement prepareCallWithKey(String s)
    throws SQLException
    return connection.prepareCallWithKey(s);
    public PreparedStatement prepareStatement(String s)
    throws SQLException
    return connection.prepareStatement(s);
    public PreparedStatement prepareStatement(String s, int i, int j)
    throws SQLException
    return connection.prepareStatement(s, i, j);
    public PreparedStatement prepareStatementWithKey(String s)
    throws SQLException
    return connection.prepareStatementWithKey(s);
    public void purgeExplicitCache()
    throws SQLException
    connection.purgeExplicitCache();
    public void purgeImplicitCache()
    throws SQLException
    connection.purgeImplicitCache();
    public void putDescriptor(String s, Object obj)
    throws SQLException
    connection.putDescriptor(s, obj);
    public void registerApiDescription(String s, short word0, short word1, String
    s1)
    connection.registerApiDescription(s, word0, word1, s1);
    public void registerSQLType(String s, Class class1)
    throws SQLException
    connection.registerSQLType(s, class1);
    public void registerSQLType(String s, String s1)
    throws SQLException
    connection.registerSQLType(s, s1);
    public void registerTAFCallback(OracleOCIFailover oracleocifailover, Object
    obj)
    throws SQLException
    connection.registerTAFCallback(oracleocifailover, obj);
    public void rollback()
    throws SQLException
    connection.rollback();
    public void setAutoClose(boolean flag)
    throws SQLException
    connection.setAutoClose(flag);
    public void setAutoCommit(boolean flag)
    throws SQLException
    connection.setAutoCommit(flag);
    public void setCatalog(String s)
    throws SQLException
    connection.setCatalog(s);
    public void setCreateStatementAsRefCursor(boolean flag)
    connection.setCreateStatementAsRefCursor(flag);
    public void setDefaultExecuteBatch(int i)
    throws SQLException
    connection.setDefaultExecuteBatch(i);
    public void setDefaultRowPrefetch(int i)
    throws SQLException
    connection.setDefaultRowPrefetch(i);
    public void setExplicitCachingEnabled(boolean flag)
    throws SQLException
    connection.setExplicitCachingEnabled(flag);
    public void setImplicitCachingEnabled(boolean flag)
    throws SQLException
    connection.setImplicitCachingEnabled(flag);
    public void setIncludeSynonyms(boolean flag)
    connection.setIncludeSynonyms(flag);
    public void setReadOnly(boolean flag)
    throws SQLException
    connection.setReadOnly(flag);
    public void setRemarksReporting(boolean flag)
    connection.setRemarksReporting(flag);
    public void setRestrictGetTables(boolean flag)
    connection.setRestrictGetTables(flag);
    public void setSessionTimeZone(String s)
    throws SQLException
    connection.setSessionTimeZone(s);
    public void setStatementCacheSize(int i)
    throws SQLException
    connection.setStatementCacheSize(i);
    public void setStmtCacheSize(int i)
    throws SQLException
    connection.setStmtCacheSize(i);
    public void setStmtCacheSize(int i, boolean flag)
    throws SQLException
    connection.setStmtCacheSize(i, flag);
    public void setSynchronousMode(boolean flag)
    connection.setSynchronousMode(flag);
    public void setTransactionIsolation(int i)
    throws SQLException
    connection.setTransactionIsolation(i);
    public void setTypeMap(Map map)
    throws SQLException
    connection.setTypeMap(map);
    public void setUsingXAFlag(boolean flag)
    connection.setUsingXAFlag(flag);
    public void setWrapper(OracleConnection oracleconnection)
    connection.setWrapper(oracleconnection);
    public void setXAErrorFlag(boolean flag)
    connection.setXAErrorFlag(flag);
    public void shutdown(int i)
    throws SQLException
    connection.shutdown(i);
    public void startup(String s, int i)
    throws SQLException
    connection.startup(s, i);
    Util class to get Wrapped Connections from
    datasource
    package ejbTesting;
    // j2ee imports
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    // sql imports
    import java.sql.Connection;
    // imports from Oracle Driver Classes
    import oracle.jdbc.OracleConnection;
    * Wrapper class for the DataSource Connection from Weblogic pool
    public class DataSourceConnectionWrapper
         // datasource variable
         private static transient DataSource datasource = null;
         private static String dbName = "jdbc/workbench";
    * Method that returns the database connection
         public static Connection getConnection()
              try
                   // initialsing the datasource object
                   initialiseDataSource ();
                   // Getting a connection from the datasource
                   Connection con = datasource.getConnection( );
                   // wrapping it custom wrapper class and
                   // returning the connection object
                   return new WeblogicConnectionWrapper((OracleConnection)con);
              catch(Exception exception )
                   exception.printStackTrace();
                   return null;
         private static void initialiseDataSource( ) throws Exception
    if ( datasource == null )
    try
    InitialContext ic = new InitialContext( );
    datasource = (DataSource) ic.lookup( dbName );
    catch (Exception ne )
    throw new Exception( "NamingException while looking up DataSource with
    JNDI name" +
    dbName + ": \n" + ne.getMessage( ) );
    Exception Stack Trace
    The line 46 in DataSourceConnectionWrapper
    corresponds to
    return new WeblogicConnectionWrapper((OracleConnection)con);
    Which I feel is logical as the connection which we get from Weblogic
    datasource cannot be type casted to OracleConnection
    java.lang.ClassCastException: weblogic.jdbc.pool.Connection
    at ejbTesting.DataSourceConnectionWrapper.getConnection(DataSourceConnectionWrapper.java:46)

  • Problem starting wls 6.1 sp2

    Hi
    I have developed an appliaction using wls 6.1 sp2 on w2k, which I want to migrate
    to Solaris 8.
    I have modified my windows statup scripts to Solaris, but I get a strange error
    when starting weblogic. I am starting the server as root and my weblogic.policy
    file is modified according to my installation.
    Has anybody encountered anything similar?
    <Feb 20, 2002 12:08:09 PM CET> <Critical> <Management> <Unable to deploy an internal
    management web application - <all-internal-apps>. Managed servers may be unable
    to start.
    java.io.FileNotFoundException: ./config/Certifikat/.wlstaging/wl_management_internal2.war
    (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
    at weblogic.management.mbeans.custom.ApplicationManager.stageGlobalWarFile(ApplicationManager.java:398)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:334)
    at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy35.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    >
    My startup script is as follows
    bash-2.03$ more startWeblogic.sh
    #!/usr/bin/bash
    # Set user-defined variables.
    export PROJECT=postdanmark
    export ENVIRONMENT=test
    export RELEASE_DIR=/opt/projects/$PROJECT/$ENVIRONMENT/lib
    export JAVA_HOME=/opt/jdk/j2sdk1_3_1_02
    export WEBLOGIC_HOME=/opt/bea/weblogic/6.1
    export PATH=$WEBLOGIC_HOME/bin:$JAVA_HOME/jre/bin:$JAVA_HOME/bin:.:$PATH
    export CLASSPATH=$RELEASE_DIR/internal/util/1.0/Util.jar
    export CLASSPATH=$CLASSPATH:$WEBLOGIC_HOME/lib/weblogic.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/sun/jaxb/1.0ea/lib/jaxb-rt-1.0-ea.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/postdanmark/1.0/PostDanmarkPC.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/EntrustCAEjb/1.0/EntrustCAEjb.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/websupport/1.0/WebSupport.jar
    export CLASSPATH=$CLASSPATH:/opt/projects/$PROJECT/$ENVIRONMENT/batch/properties
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/corba/interfaces/entrustca/1.2/EntrustCA.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/mysql/jdbc/2.0.4/mm.mysql-2.0.4-bin.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entbase.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entuser.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entp7.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entmisc.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entcertlist.jar
    echo off
    echo *********************************************
    echo * Starting weblogic application server *
    echo *********************************************
    # Set WLS_PW equal to your system password for no password prompt server startup.
    export WLS_PW=certifikat
    # Set Production Mode. When set to true, the server starts up in production mode.
    When set to false, the server starts up i
    n development mode. The default is false.
    export STARTMODE=false
    export WEBLOGIC_OPTIONS='-Dweblogic.Domain=Certifikat'
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.Name=PostDanmarkServer"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.management.discover=false"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dbea.home=/opt/bea/weblogic/6.1"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Duser.home=/opt/projects/$PROJECTS/$ENVIRONMENT/weblogic"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Duser.dir=/opt/projects/$PROJECTS/$ENVIRONMENT/weblogic"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.management.password=$WLS_PW"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.ProductionModeEnabled=$STARTMODE"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Djava.security.policy=$WEBLOGIC_HOME/lib/weblogic.policy"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.RootDirectory=/opt/projects/$PROJECT/$ENVIRONMENT/weblogic"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Djava.util.logging.config.file=/opt/projects/$PROJECT/$ENVIRONMENT/batch/proper
    ties/logging.properties"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Djava.library.path=$WEBLOGIC_HOME/lib/solaris:$WEBLOGIC_HOME/lib/solaris/oci816
    _8"
    export JAVA_OPTIONS='-hotspot -ms64m -mx64m -classpath '
    export JAVA_OPTIONS=${JAVA_OPTIONS}$CLASSPATH
    echo on
    echo "using JAVA OPTIONS : "$JAVA_OPTIONS"
    echo "using WEBLOGIC OPTIONS : "$WEBLOGIC_OPTIONS"
    "$JAVA_HOME/bin/java" $JAVA_OPTIONS $WEBLOGIC_OPTIONS weblogic.Server

    Hi.
    Try placing the wl_management_internal2.war file from the mydomain/.wlstaging directory into the directory your server is expecting.
    Regards,
    Michael
    Peter Buus wrote:
    Hi
    I have developed an appliaction using wls 6.1 sp2 on w2k, which I want to migrate
    to Solaris 8.
    I have modified my windows statup scripts to Solaris, but I get a strange error
    when starting weblogic. I am starting the server as root and my weblogic.policy
    file is modified according to my installation.
    Has anybody encountered anything similar?
    <Feb 20, 2002 12:08:09 PM CET> <Critical> <Management> <Unable to deploy an internal
    management web application - <all-internal-apps>. Managed servers may be unable
    to start.
    java.io.FileNotFoundException: ./config/Certifikat/.wlstaging/wl_management_internal2.war
    (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
    at weblogic.management.mbeans.custom.ApplicationManager.stageGlobalWarFile(ApplicationManager.java:398)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:334)
    at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy35.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    >
    My startup script is as follows
    bash-2.03$ more startWeblogic.sh
    #!/usr/bin/bash
    # Set user-defined variables.
    export PROJECT=postdanmark
    export ENVIRONMENT=test
    export RELEASE_DIR=/opt/projects/$PROJECT/$ENVIRONMENT/lib
    export JAVA_HOME=/opt/jdk/j2sdk1_3_1_02
    export WEBLOGIC_HOME=/opt/bea/weblogic/6.1
    export PATH=$WEBLOGIC_HOME/bin:$JAVA_HOME/jre/bin:$JAVA_HOME/bin:.:$PATH
    export CLASSPATH=$RELEASE_DIR/internal/util/1.0/Util.jar
    export CLASSPATH=$CLASSPATH:$WEBLOGIC_HOME/lib/weblogic.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/sun/jaxb/1.0ea/lib/jaxb-rt-1.0-ea.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/postdanmark/1.0/PostDanmarkPC.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/EntrustCAEjb/1.0/EntrustCAEjb.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/websupport/1.0/WebSupport.jar
    export CLASSPATH=$CLASSPATH:/opt/projects/$PROJECT/$ENVIRONMENT/batch/properties
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/internal/corba/interfaces/entrustca/1.2/EntrustCA.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/mysql/jdbc/2.0.4/mm.mysql-2.0.4-bin.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entbase.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entuser.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entp7.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entmisc.jar
    export CLASSPATH=$CLASSPATH:$RELEASE_DIR/external/entrust/java_toolkit/6.0/lib/application/entcertlist.jar
    echo off
    echo *********************************************
    echo * Starting weblogic application server *
    echo *********************************************
    # Set WLS_PW equal to your system password for no password prompt server startup.
    export WLS_PW=certifikat
    # Set Production Mode. When set to true, the server starts up in production mode.
    When set to false, the server starts up i
    n development mode. The default is false.
    export STARTMODE=false
    export WEBLOGIC_OPTIONS='-Dweblogic.Domain=Certifikat'
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.Name=PostDanmarkServer"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.management.discover=false"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dbea.home=/opt/bea/weblogic/6.1"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Duser.home=/opt/projects/$PROJECTS/$ENVIRONMENT/weblogic"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Duser.dir=/opt/projects/$PROJECTS/$ENVIRONMENT/weblogic"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.management.password=$WLS_PW"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.ProductionModeEnabled=$STARTMODE"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Djava.security.policy=$WEBLOGIC_HOME/lib/weblogic.policy"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Dweblogic.RootDirectory=/opt/projects/$PROJECT/$ENVIRONMENT/weblogic"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Djava.util.logging.config.file=/opt/projects/$PROJECT/$ENVIRONMENT/batch/proper
    ties/logging.properties"
    export WEBLOGIC_OPTIONS=${WEBLOGIC_OPTIONS}" -Djava.library.path=$WEBLOGIC_HOME/lib/solaris:$WEBLOGIC_HOME/lib/solaris/oci816
    _8"
    export JAVA_OPTIONS='-hotspot -ms64m -mx64m -classpath '
    export JAVA_OPTIONS=${JAVA_OPTIONS}$CLASSPATH
    echo on
    echo "using JAVA OPTIONS : "$JAVA_OPTIONS"
    echo "using WEBLOGIC OPTIONS : "$WEBLOGIC_OPTIONS"
    "$JAVA_HOME/bin/java" $JAVA_OPTIONS $WEBLOGIC_OPTIONS weblogic.Server--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Sybase jdbc throws Resource PermissionsException wls8.1 sp2

    HI,
    I just upgraded from wls 6.1 to wls 8.1 sp2. My Connection pools are not working
    anymore.
    I am using sybase server 11.5.1 with the jconnect 5. I am making database calls
    (that
    used to work). Here's the strange thing, I have a startup class that runs an
    sql query when weblogic server comes up (in the main thread i am assuming) and
    it works. But calling the same exact sql query fails when i click on my webapp
    that leads to the same query (it is called from a different thread).
    Any ideas? I am assuming it's a security issue where the main thread uses the
    correct username and password and the other threads don't. Heres my config file
    and my exception trace:
    <JDBCTxDataSource JNDIName="FOO" Name="MyJDBC Data Source"
    PoolName="MyJDBC Connection Pool-1" Targets="portal"/>
    <JDBCConnectionPool DriverName="com.sybase.jdbc2.jdbc.SybDriver"
    Name="MyJDBC Connection Pool-1" Password="xxx"
    Properties="user=vwap;url=jdbc:sybase:Tds:myhost:9501/vwap;networkProtocol=Tds;portNumber=9501;userName=vwap;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:sybase:Tds:myhost:9501/vwap"/>
    I also tried it with weblogic sybase driver and same results:
    <JDBCConnectionPool DriverName="weblogic.jdbc.sybase.SybaseDriver"
    Name="MyJDBC Connection Pool" Password="xxx"
    Properties="user=vwap;url=jdbc:bea:sybase://myhost:9501;portNumber=9501;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:bea:sybase://myhost:9501"/>
    error.weblogic.common.resourcepool.ResourcePermissionsException: User "<anonymous>"
    does not have permission to perform operation "reserve" on resource "MyJDBC Connection
    Pool-1" of application "null" of type "ConnectionPool"
    weblogic.jdbc.extensions.PoolPermissionsSQLException: weblogic.common.resourcepool.ResourcePermissionsException:
    User "<anonymous>" does not have permission to perform operation "reserve" on
    resource "MyJDBC Connection Pool-1" of application "null" of type "ConnectionPool"
         at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:157)
         at weblogic.jdbc.pool.Driver.connect(Driver.java:156)
         at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
         at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at com.itginc.strategyServers.common.database.Database.initializeUserCache(Database.java:729)
         at com.itginc.strategyServers.common.database.Database.connect(Database.java:104)
         at com.itginc.strategyServers.common.database.Database.getClients(Database.java:157)
         at com.itginc.strategyServers.common.servlets.ClientsServlet.doPost(ClientsServlet.java:41)
         at com.itginc.strategyServers.common.servlets.BaseServlet.doGet(BaseServlet.java:110)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at com.itginc.strategyServers.common.servlets.BaseServlet.service(BaseServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doPost(LoginServlet.java:230)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doGet(LoginServlet.java:242)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    farnaz wrote:
    I changed the following line in my fileRealm.properties and fixed the problem.
    Is this the correct thing to do?
    acl.reserve.weblogic.jdbc.connectionPool=system
    changed to
    acl.reserve.weblogic.jdbc.connectionPool=everyoneyes.
    Joe
    >
    >
    >
    >
    "farnaz" <[email protected]> wrote:
    A few issues, i've been stuck on this problem for 2 days now, please
    HELP!
    1. My acl settings (i looked at them via the console) seems to have "everyone"
    permission for all jdbc operations: reserve, shrink, etc.
    2. If acl is not the way to set security policies why is it shown in
    the console?
    3. I cannot find anywhere in the wls8.1 documentation on how to set security
    policies
    for jdbc.
    Can i see an example?
    4. I was not using any java securtiy when i got that error, so then I
    added the
    -Djava.security.manager to my startup cmd line for starting weblogic
    using the
    default weblogic policy in $WLSHOME/server/lib/weblogic policy (unmodified)
    and
    got the following exception on startup, help!
    The Horizon Portal could not be started, because the Application Manager
    failed
    to initialize. access denied (java.lang.RuntimePermission weblogic.kernelPermission)
    java.security.AccessControlException: access denied (java.lang.RuntimePermission
    weblogic.kernelPermission)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at weblogic.security.service.SubjectManagerImpl.checkKernelPermission(SubjectManagerImpl.java:202)
         at weblogic.security.service.SubjectManagerImpl.getKernelIdentity(SubjectManagerImpl.java:181)
         at weblogic.security.subject.SubjectManager.isKernelIdentity(SubjectManager.java:102)
         at weblogic.security.service.SubjectManagerImpl.checkKernelIdentity(SubjectManagerImpl.java:214)
         at weblogic.security.subject.DelegatingSubjectStack.getCurrentSubject(DelegatingSubjectStack.java:31)
         at weblogic.security.service.SubjectManagerImpl.getCurrentSubject(SubjectManagerImpl.java:61)
         at weblogic.security.service.SecurityManager.getCurrentSubject(SecurityManager.java:43)
         at weblogic.jndi.internal.ServerNamingNode.checkPermission(ServerNamingNode.java:330)
         at weblogic.jndi.internal.ServerNamingNode.checkModify(ServerNamingNode.java:306)
         at weblogic.jndi.internal.ServerNamingNode.rebindHere(ServerNamingNode.java:166)
         at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:382)
         at weblogic.jndi.internal.WLEventContextImpl.rebind(WLEventContextImpl.java:118)
         at javax.naming.InitialContext.rebind(InitialContext.java:363)
         at com.itginc.strategyServers.common.database.DatabaseLookup.bind(DatabaseLookup.java:45)
         at com.itginc.strategyServers.horizon.services.AppManager.Initialize(AppManager.java:66)
         at com.itginc.strategyServers.horizon.services.AppManager.<init>(AppManager.java:44)
         at com.itginc.strategyServers.horizon.services.AppManager.makeClass(AppManager.java:22)
         at com.itginc.strategyServers.horizon.services.Startup.startup(Startup.java:27)
         at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:177)
         at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:158)
         at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
         at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:121)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:116)
         at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentStartupService.java:22)
         at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
         at weblogic.Server.main(Server.java:32)
    Joe Weinstein <[email protected]> wrote:
    Hi. Two things:
    Your test table SQL is wasteful. sysobjects is a big table. No needto
    count everything
    in it every time to check the connections. Try "SQL select 1" for abetter
    one.
    The problem isn't in the pool definition. It's a security issue. You
    should edit your
    weblogic.policy file to allow jdbc access to everyone.
    Joe
    farnaz wrote:
    HI,
    I just upgraded from wls 6.1 to wls 8.1 sp2. My Connection pools
    are
    not working
    anymore.
    I am using sybase server 11.5.1 with the jconnect 5. I am making
    database
    calls
    (that
    used to work). Here's the strange thing, I have a startup class thatruns an
    sql query when weblogic server comes up (in the main thread i am assuming)and
    it works. But calling the same exact sql query fails when i clickon my webapp
    that leads to the same query (it is called from a different thread).
    Any ideas? I am assuming it's a security issue where the main threaduses the
    correct username and password and the other threads don't. Heres
    my
    config file
    and my exception trace:
    <JDBCTxDataSource JNDIName="FOO" Name="MyJDBC Data Source"
    PoolName="MyJDBC Connection Pool-1" Targets="portal"/>
    <JDBCConnectionPool DriverName="com.sybase.jdbc2.jdbc.SybDriver"
    Name="MyJDBC Connection Pool-1" Password="xxx"
    Properties="user=vwap;url=jdbc:sybase:Tds:myhost:9501/vwap;networkProtocol=Tds;portNumber=9501;userName=vwap;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:sybase:Tds:myhost:9501/vwap"/>
    I also tried it with weblogic sybase driver and same results:
    <JDBCConnectionPool DriverName="weblogic.jdbc.sybase.SybaseDriver"
    Name="MyJDBC Connection Pool" Password="xxx"
    Properties="user=vwap;url=jdbc:bea:sybase://myhost:9501;portNumber=9501;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:bea:sybase://myhost:9501"/>
    error.weblogic.common.resourcepool.ResourcePermissionsException: User"<anonymous>"
    does not have permission to perform operation "reserve" on resource"MyJDBC Connection
    Pool-1" of application "null" of type "ConnectionPool"
    weblogic.jdbc.extensions.PoolPermissionsSQLException: weblogic.common.resourcepool.ResourcePermissionsException:
    User "<anonymous>" does not have permission to perform operation "reserve"on
    resource "MyJDBC Connection Pool-1" of application "null" of type
    "ConnectionPool"
         at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:157)
         at weblogic.jdbc.pool.Driver.connect(Driver.java:156)
         at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
         at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at com.itginc.strategyServers.common.database.Database.initializeUserCache(Database.java:729)
         at com.itginc.strategyServers.common.database.Database.connect(Database.java:104)
         at com.itginc.strategyServers.common.database.Database.getClients(Database.java:157)
         at com.itginc.strategyServers.common.servlets.ClientsServlet.doPost(ClientsServlet.java:41)
         at com.itginc.strategyServers.common.servlets.BaseServlet.doGet(BaseServlet.java:110)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at com.itginc.strategyServers.common.servlets.BaseServlet.service(BaseServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doPost(LoginServlet.java:230)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doGet(LoginServlet.java:242)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

  • DB2 type 2 driver blocking WLS 8.1 SP2  on startup

    Hi,
    I use DB2 type 2 driver with WLS 8.1 SP2 and did configure a jdbc connection pool as described in edocs. But when I start the server and the server tries to deploy the jdbc connection pool, the server hangs. I took some thread dumps and the thread to load the driver seems to be stuck, as it always shows the same stack trace.
    Did anybody manage to use this driver? Any suggestions?
    Thanks,
    Nicole
    "Thread-1" id: 0x0x00000380 prio: 5 ACTIVE, NONDAEMON, GCABLE     thread: 0x0xaf028500 lastj: 0x0xbfff8e74     at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method)@0xa026894e     at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)@0xa0268456     at java.lang.Class.newInstanceCached(Unknown Source)@0xa6e3e533     at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:46)@0xa0e5e9d2     at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFactory.java:79)@0xa0e5e819     at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactory(ConnectionPool.java:514)@0xa0e5e298     at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:165)@0xa0e5d2d3     at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:880)@0xa0e59bf2     at weblogic.jdbc.common.internal.ConnectionPool.start(ConnectionPool.java:133)@0xa0e59994     at weblogic.jdbc.common.internal.ConnectionPoolManager.createAndStartPool(ConnectionPoolManager.java:291)@0xa0e58aa2     at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:178)@0xa0e58709     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:330)@0xa0e572a1     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:590)@0xa0e56e36     at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:568)@0xa0e56649     at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:240)@0xa0e56424     at COM.jrockit.reflect.NativeMethodInvoker.invoke0(Native Method)@0xa6de9752     at COM.jrockit.reflect.NativeMethodInvoker.invoke(Unknown Source)@0xa6de987c     at COM.jrockit.reflect.VirtualNativeMethodInvoker.invoke(Unknown Source)@0xa5d989f4     at java.lang.reflect.Method.invoke(Unknown Source)@0xa6de938d     at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:711)@0xa4911d6c     at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:690)@0xa491196d     at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:476)@0xa4910de7     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)@0xa49109d7     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)@0xa49103f4     at weblogic.management.internal.RemoteMBeanServerImpl.private_invoke(RemoteMBeanServerImpl.java:947)@0xa4910399     at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:908)@0xa4910276     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:946)@0xa3623f4f     at weblogic.management.internal.MBeanProxy.invokeForCachingStub(MBeanProxy.java:481)@0xa4d5d048     at weblogic.management.configuration.ServerMBean_Stub.updateDeployments(ServerMBean_Stub.java:7271)@0xa0e56285     at weblogic.management.deploy.slave.SlaveDeployer.updateServerDeployments(SlaveDeployer.java:1210)@0xa0e5608e     at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:362)@0xa0e55cca     at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)@0xa0e55baa     at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)@0xa177839b     at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)@0xa1777f3e     at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)@0xa6520534     at weblogic.Server.main(Server.java:32)@0xa65200a3     --- End of stack trace

    Sorry, it is running now. There was a misspelling in the environment variable DB2INSTANCE and therefore the requested instance was not reachable. Still interesting, that this can even prevent the server from booting. Now that I corrected the variable in the environment, everything is fine.
    Thanks,
    Nicole

  • Ignoring Http basic authentication header in wls 7.0.sp2 web service servlet (weblogic.webservice.server.servlet.WebServiceServlet)

    Hi!
    We need to implement authentication using our own methods, and the authentication
    information is provided to the web service implementation in a basic authentication
    header. The problem is, that the servlet
    weblogic.webservice.server.servlet.WebServiceServlet, which handles web services
    in
    wls 7.0.sp2, always attempts to perform authentication, if the header is present.
    Is there any way to circumvent this, because we want to implement authentication
    on our own?
    I already know two workarounds:
    The best would of course be to implement a custom security realm for our own
    authentication system. This is not an option, implementing an own security
    realm is overkill for this specific web service.
    The other way would be to route the requests by way of a custom servlet, which
    would
    remove the basic authentication header, and put the authentication info in custom
    headers, such as x-auth: <user:password>, or smthng similar, and after successful
    authentication, make a call to bea's servlet weblogic.webservice.server.servlet.WebServiceServlet.
    But still, I'd like to know if there is any way to tell bea's servlet to ignore
    the basic
    authentication header?
    Oh yeah, by the way, this is URGENT, as always. (really!! ;)
    Toni Nykanen

    Currently there is no option to turn off security check.
    I think you can use a servlet filter mapped to the URL
    of your service, instead of a proxy servlet?
    Regards,
    -manoj
    http://manojc.com
    "Toni Nykanen" <[email protected]> wrote in message
    news:3ef1577b$[email protected]..
    >
    Hi!
    We need to implement authentication using our own methods, and theauthentication
    information is provided to the web service implementation in a basicauthentication
    header. The problem is, that the servlet
    weblogic.webservice.server.servlet.WebServiceServlet, which handles webservices
    in
    wls 7.0.sp2, always attempts to perform authentication, if the header ispresent.
    Is there any way to circumvent this, because we want to implementauthentication
    on our own?
    I already know two workarounds:
    The best would of course be to implement a custom security realm for ourown
    authentication system. This is not an option, implementing an own security
    realm is overkill for this specific web service.
    The other way would be to route the requests by way of a custom servlet,which
    would
    remove the basic authentication header, and put the authentication info incustom
    headers, such as x-auth: <user:password>, or smthng similar, and aftersuccessful
    authentication, make a call to bea's servletweblogic.webservice.server.servlet.WebServiceServlet.
    >
    But still, I'd like to know if there is any way to tell bea's servlet toignore
    the basic
    authentication header?
    Oh yeah, by the way, this is URGENT, as always. (really!! ;)
    Toni Nykanen

  • Wls 8.1 sp2: weblogic.jspc complains about struts-html tags

              Hi,
              I am trying to compile jsps with weblogic.jspc, which use struts' html tags. However,
              the compilation fails with the following message:
              [java] Translation of /views/viewPageBody.jsp failed: (line 3): Error in using
              tag library uri='/tags/struts-html' prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag'
              has no setter method corresponding to TLD declared attribute 'server', (JSP 1.1
              spec, 5.4.1)
              I opened the BaseTag class from the struts jar and found the setter exists for
              the attribute 'server' of html tld. So does the property 'server'. The property
              'server' is a string and the parameter in the setter is a string. I read about
              the jspc errors in wls 8.1 about the setter parameter being of different type
              than the property. However, that is not the case here. I tried using both Sun's
              and BEA's jdk. None of them help. Btw, there is another attribute mentioned in
              the html tld, which is 'target'. The compiler doesn't complain yet about this.:(
              Also, I happened to compile other apps which have struts logic tags.
              My environment:
              OS: Win2k sp3
              WLS: 8.1 sp2
              JDK: Sun's 1.4.2 sp4 / Bea's 1.4.1 sp5 (tried both)
              Ant: 1.5.3 (I had an issue earlier with ant until I found that Bea officially
              without any mention supports only ant 1.5.3.)
              I would appreciate any help in this regard.
              Thanks,
              Abbas
              

              What version of Struts are you trying to use?
              Are you certain you're not encountering a different instance of that class in
              an unexpected location in your classpath?
              "Abbas" <[email protected]> wrote:
              >
              >Hi,
              >I am trying to compile jsps with weblogic.jspc, which use struts' html
              >tags. However,
              >the compilation fails with the following message:
              >
              >[java] Translation of /views/viewPageBody.jsp failed: (line 3): Error
              >in using
              >tag library uri='/tags/struts-html' prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag'
              >has no setter method corresponding to TLD declared attribute 'server',
              >(JSP 1.1
              >spec, 5.4.1)
              >
              >I opened the BaseTag class from the struts jar and found the setter exists
              >for
              >the attribute 'server' of html tld. So does the property 'server'. The
              >property
              >'server' is a string and the parameter in the setter is a string. I read
              >about
              >the jspc errors in wls 8.1 about the setter parameter being of different
              >type
              >than the property. However, that is not the case here. I tried using
              >both Sun's
              >and BEA's jdk. None of them help. Btw, there is another attribute mentioned
              >in
              >the html tld, which is 'target'. The compiler doesn't complain yet about
              >this.:(
              >Also, I happened to compile other apps which have struts logic tags.
              >
              >
              >My environment:
              >OS: Win2k sp3
              >WLS: 8.1 sp2
              >JDK: Sun's 1.4.2 sp4 / Bea's 1.4.1 sp5 (tried both)
              >Ant: 1.5.3 (I had an issue earlier with ant until I found that Bea officially
              >without any mention supports only ant 1.5.3.)
              >
              >I would appreciate any help in this regard.
              >
              >Thanks,
              >
              >Abbas
              

  • Troubleshooting tuneables, WLS 6.1/SP2 on Solaris 8/SPARC.

    Hi,
    Is there a way to monitor dynamic or otherwise the memory, filedescriptor and
    CPU allocation per application and/or thread?
    If this is not available in 6.1 is it available in later releases/patchlevels
    such as 7.x or 8.x?
    rgds
    /PL

    Yes i tried that, but it says, incorrect option, JVM could not be created.
    any was i cd identify is the install binary was correct?
    like any indication in jdk131/jre/bin folder?
    Kumar Allamraju <[email protected]> wrote:
    i think it does.
    Have you tried to start with java -server weblogic.Server?
    Are you getting any errors?
    Kumar
    vinay wrote:
    Greetings
    I installed, wls 6.1 sp2 on Solaris 7.
    But it seems the built in jdk131 that installed doesnt support
    -server option.
    i checked the jdk131/jre/bin folder, but i dont see any client, serverfolders...how
    is this possible?
    how to correct this?

  • WLS 7.0 sp2 - Servlet Problems with SOAP messages

              I'm using Weblogic 7.0 SP2 and trying to create a Servlet to receive SOAP wrapped
              XML messages. I'm getting the following error. Is this a problem with WLS7.0sp2's
              support of JAXM? The System.out.println's indicate I have successfully received
              the incoming SOAP request and then successfully formatted the SOAP response, but
              upon returning saving the response it appears to blow up. Does anyone have any
              suggestions?
              I need to do the following in a servlet:
              - receive an incoming SOAP request with an embedded XML message
              - perform some processing
              - return a SOAP response with an embedded XML message
              Should I be using JAXM? Or can I do this same task easily with JAX-RPC?
              <Feb 24, 2004 4:10:42 PM AST> <Error> <HTTP> <101017> <[ServletContext(id=260434
              7,name=isd.war,context-path=)] Root cause of ServletException
              java.lang.Error: NYI
              at weblogic.webservice.core.soap.SOAPMessageImpl.saveRequired(SOAPMessag
              eImpl.java:360)
              at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
              (ServletStubImpl.java:1058)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:401)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:306)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
              n.run(WebAppServletContext.java:5445)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
              eManager.java:780)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              rvletContext.java:3105)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              pl.java:2588)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
              >
              I've stripped the code down so that all it does is verifies the incoming SOAP/XML
              request and creates a hard-coded response... be gentle... I'm a novice at this
              import javax.xml.soap.*;
              import javax.servlet.*;
              import javax.servlet.http.*;
              // import javax.xml.transform.*;
              import java.util.*;
              import java.io.*;
              public class RegisterServlet extends HttpServlet
              static MessageFactory fac = null;
              static
              try
              fac = MessageFactory.newInstance();
              catch (Exception ex)
              ex.printStackTrace();
              public void init(ServletConfig servletConfig) throws ServletException
              super.init(servletConfig);
              public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
              IOException
              try
              System.out.println("** Note: doPost() Entering req = " + req);
              // Get all the headers from the HTTP request
              MimeHeaders headers = getHeaders(req);
              // Get the body of the HTTP request
              InputStream is = req.getInputStream();
              // Now internalize the contents of a HTTP request
              // and create a SOAPMessage
              SOAPMessage msg = fac.createMessage(headers, is);
              System.out.println("** Note: doPost() Step A");
              SOAPMessage reply = null;
              reply = onMessage(msg);
              System.out.println("** Note: doPost() Step B reply = " + reply);
              if (reply != null)
              * Need to call saveChanges because we're
              * going to use the MimeHeaders to set HTTP
              * response information. These MimeHeaders
              * are generated as part of the save.
              if (reply.saveRequired())
              System.out.println("** Note: doPost() Step C reply.saveRequired()");
              reply.saveChanges();
              resp.setStatus(HttpServletResponse.SC_OK);
              putHeaders(reply.getMimeHeaders(), resp);
              // Write out the message on the response stream
              OutputStream os = resp.getOutputStream();
              System.out.println("** Note: doPost() Step D os = " + os);
              reply.writeTo(os);
              os.flush();
              else
              resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
              catch (Exception ex)
              throw new ServletException("** Error: SAAJ POST failed: " + ex.getMessage());
              static MimeHeaders getHeaders(HttpServletRequest req)
              Enumeration enum = req.getHeaderNames();
              MimeHeaders headers = new MimeHeaders();
              while (enum.hasMoreElements())
              String headerName = (String)enum.nextElement();
              String headerValue = req.getHeader(headerName);
              StringTokenizer values =
              new StringTokenizer(headerValue, ",");
              while (values.hasMoreTokens())
              headers.addHeader(headerName,
              values.nextToken().trim());
              return headers;
              static void putHeaders(MimeHeaders headers, HttpServletResponse res)
              Iterator it = headers.getAllHeaders();
              while (it.hasNext())
              MimeHeader header = (MimeHeader)it.next();
              String[] values = headers.getHeader(header.getName());
              if (values.length == 1)
              res.setHeader(header.getName(),
              header.getValue());
              else
              StringBuffer concat = new StringBuffer();
              int i = 0;
              while (i < values.length)
              if (i != 0)
              concat.append(',');
              concat.append(values[i++]);
              res.setHeader(header.getName(), concat.toString());
              // This is the application code for handling the message.
              public SOAPMessage onMessage(SOAPMessage message)
              SOAPMessage replymsg = null;
              try
              System.out.println("** Note: OnMessage() Entering msg = " + message);
              //Extract the ComputerPart element from request message and add to reply SOAP
              message.
              SOAPEnvelope reqse = message.getSOAPPart().getEnvelope();
              SOAPBody reqsb = reqse.getBody();
              //System.out.println("** Note: OnMessage() Step B");
              System.out.println("** Note: OnMessage () Step A Soap Request Message Body = "
              + reqsb);
              //Create a reply mesage from the msgFactory of JAXMServlet
              System.out.println("** Note: OnMessage () Step B");
              replymsg = fac.createMessage();
              SOAPPart sp = replymsg.getSOAPPart();
              SOAPEnvelope se = sp.getEnvelope();
              SOAPBody sb = se.getBody();
              System.out.println("** Note: OnMessage () Step C Soap Reply Before Message Body
              = " + sb);
              se.getBody().addBodyElement(se.createName("RegisterResponse")).addChildElement(se.createName("ErrorCode")).addTextNode("000");
              System.out.println("** Note: OnMessage () Step D Soap Reply After Message Body
              = " + sb);
              replymsg.saveChanges();
              System.out.println("** Note: OnMessage() Exiting replymsg = " + (replymsg));
              catch (Exception ex)
              ex.printStackTrace();
              return replymsg;
              

    Michael,
    I got the same error on WLS8.1/Win2K professional and apache FOP (old version).
    After digging into the WLS code and FOP(old version). i found the conflict happens
    on
    the "org.xml.sax.parser" system property. In WLS code, they hard coded like the
    following when startup weblogic server:
    System.setProperty("org.xml.sax.parser", "weblogic.xml.jaxp.RegistryParser");
    But the FOP code try to use the "org.xml.sax.parser" system property to find the
    sax parser then conlict happens.
    Here is the response from BEA support :
    "I consulted with our developers regarding the question of whether we can change
    the hard-coded value for the java system property: org.xml.sax.parser by using
    a configuration parameter and I found that unfortunately there is no specific
    setting to change the value. As you had mentioned in your note the org.xml.sax.parser
    system property can be changed programmatically in your application code."
    I solve my problem by using newer apache FOP (it never use the system property:org.xml.sax.parser
    any more) and XML Registy for WLS8.1.
    Good luck.
    David Liu
    Point2 Technologies Inc.
    "p_michael" <[email protected]> wrote:
    >
    Help.
    When we migrated from WLS 6.1 to WLS 7.0 SP2 when encountered a problem
    with XML
    parsing that did not previously exist.
    We get the error "weblogic.xml.jaxp.RegistryParser is not a SAX driver".
    What does this mean? And, what should we do about it.
    p_michael

  • Iplanet 6.x, NSAP & WLS 6.1 SP2

    This is very strange. I can get NSAPI with iplanet 4.x to come up fine (everything proxies, etc. as it should). When we try to get iPlane 6.x working with NSAPI and WLS 6.1 SP2...nothing..doesn't work. We're running everything on Solaris.
    Does anyone have or know of some good documentation that might describe how to get NSAPI working between WLS 6.1 and iPlanet 6...all the examples I've been seeing are mostly Windows paths, .dlls', etc. I'd love to see some working magnus.conf & obj.conf, etc. using WLS6.1 SP2 and iPlanet 6...we're not clustered and we're not using SSL (yet) so it's pretty vanilla.
    What's blowing my mind is why iplanet 4.x works and 6.x doesn;t?? I wonder if the differences between the two are really that great. I checked BEA's doc...and like I said...it seemed a bit cryptic...someone told me ther was a typo or two regarding what was to go in magnus or was it obj.conf...I don't recall..it's just frustrating trying to get NSAPI up and running with WLS 6.1 SP2 and iPlanet 6. Any ideas? Thanks!!

    Thanks Kumar. Does the syntax change (such as WebLogicCluster=xxxxxxxxxxxxxxx) if
    we are running a single instance of WebLogic (a non-clustered environment)?
    Thanks,
    Doug
    Kumar Allamraju <[email protected]> wrote:
    In iplanet 6.x
    magnus.conf should have
    Init fn="load-modules" funcs="wl_proxy,wl_init" shlib=/usr/local/netscape/plugins/libproxy.so
    Init fn="wl_init"
    and obj.conf should have
    <Object name="weblogic" ppath="*/weblogic/*">
    Service fn=wl_proxy \
    WebLogicCluster="myweblogic.com:7001,yourweblogic.com:7001,\
    theirweblogic.com:7001" PathTrim="/weblogic"
    </Object>
    Pls post the exact errors that you are seeing, so that we can help
    Kumar
    "Doug E." wrote:
    This is very strange. I can get NSAPI with iplanet 4.x to come up fine(everything proxies, etc. as it should). When we try to get iPlane 6.x
    working with NSAPI and WLS 6.1 SP2...nothing..doesn't work. We're running
    everything on Solaris.
    Does anyone have or know of some good documentation that might describehow to get NSAPI working between WLS 6.1 and iPlanet 6...all the examples
    I've been seeing are mostly Windows paths, .dlls', etc. I'd love to see
    some working magnus.conf & obj.conf, etc. using WLS6.1 SP2 and iPlanet
    6...we're not clustered and we're not using SSL (yet) so it's pretty vanilla.
    What's blowing my mind is why iplanet 4.x works and 6.x doesn;t?? I wonderif the differences between the two are really that great. I checked BEA's
    doc...and like I said...it seemed a bit cryptic...someone told me ther
    was a typo or two regarding what was to go in magnus or was it obj.conf...I
    don't recall..it's just frustrating trying to get NSAPI up and running
    with WLS 6.1 SP2 and iPlanet 6. Any ideas? Thanks!!

  • IIS Plug for WLS 6.1 SP2: The specified procedure could not be found.

    I get an the following error message "The specified procedure could not be
    found." in my browser when trying to use the IIS-proxy plugin on WLS 6.1 sp2
    Windows 2000
    Has anyone else encountered this message? Any solutions?
    Regards,
    Jonas Klemming

    Thank you for posting your answer, and then solution! :> I was fighting
    with my IIS/WLS installation last night when I was about to give up, I came
    across your posting. Although I'm playing with 7, I thought I would try
    reading your posting anyways, and thankfully I did. What I saw, reminded me
    to look at the steps one more time and I found I wasn't forwarding the
    .wlforward piece on! So thank you veyr much! :>>>>
    "Jonas Klemming" <[email protected]> wrote in message
    news:[email protected]..
    Fixed it.
    I had mapped .wlforward to iisforward.dll instead of iisproxy.dll
    /Jonas
    "Jonas Klemming" <[email protected]> wrote in message
    news:[email protected]..
    I get an the following error message "The specified procedure could not
    be
    found." in my browser when trying to use the IIS-proxy plugin on WLS 6.1sp2
    Windows 2000
    Has anyone else encountered this message? Any solutions?
    Regards,
    Jonas Klemming

  • Jdk131 of wls 6.1 sp2 on Solaris 7 doesnt support -server option?

    Greetings
    I installed, wls 6.1 sp2 on Solaris 7.
    But it seems the built in jdk131 that installed doesnt support
    -server option.
    i checked the jdk131/jre/bin folder, but i dont see any client, server folders...how
    is this possible?
    how to correct this?

    Yes i tried that, but it says, incorrect option, JVM could not be created.
    any was i cd identify is the install binary was correct?
    like any indication in jdk131/jre/bin folder?
    Kumar Allamraju <[email protected]> wrote:
    i think it does.
    Have you tried to start with java -server weblogic.Server?
    Are you getting any errors?
    Kumar
    vinay wrote:
    Greetings
    I installed, wls 6.1 sp2 on Solaris 7.
    But it seems the built in jdk131 that installed doesnt support
    -server option.
    i checked the jdk131/jre/bin folder, but i dont see any client, serverfolders...how
    is this possible?
    how to correct this?

  • Difference between WLS 6.1 SP2   and SP3

    I have recently tested my application in WLS 6.1 SP3 (who work normally in WLS
    6.1 SP2) , I have problem with my jsp page for merging a jsp in another
    What need I do to correct it ?

    Steven,
    The CGIServlet for WebLogic will not run a CGI that doesn't have an extension.
    Just add and extension to your executable and it should run fine.
    jeff
    "Steven" <[email protected]> wrote:
    Hi all,
    I am currently facing a problem with CGI binaries via CGIServlet on WLS
    6.1
    sp4. The web.xml file has been configured correctly as follows:
    -------- start of web.xml -----------
    <servlet>
    <servlet-name>CGIServlet</servlet-name>
    <servlet-class>weblogic.servlet.CGIServlet</servlet-class>
    <init-param>
    <param-name>cgiDir</param-name>
    <param-value>/web/bea6.1sp2/wlserver6.1/config/ngwapp/applications/NGWWebApp
    /cgi-bin</param-value>
    </init-param>
    <init-param>
    <param-name>*.pl</param-name>
    <param-value>/web/perl5/bin/perl5.00405</param-value>
    </init-param>
    <init-param>
    <param-name>*.cgi</param-name>
    <param-value>/web/perl5/bin/perl5.00405</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>CGIServlet</servlet-name>
    <url-pattern>/cgi-bin/*</url-pattern>
    </servlet-mapping>-------- end of web.xml ---------
    When a call is made to http://.../cgi-bin/dialogserver , this results
    in a
    404-File Not Found error.
    The contents of the cgi-bin directory have not been altered and I did
    not
    face this problem earlier when I was using sp2.
    It only happened after I upgraded to sp4. Can anyone help?
    best rgds,
    steven.

Maybe you are looking for

  • 2n+1 redundancy with 2x5500's + 1x4402

    Is it possible to have AP's on a 5500 controller failover to a 4402 if they're running the same software version?  Will the AP's try to update their code upon failover? (this isn't my design, but I might be forced to implement it if it's possible). T

  • How to remove  options like  add , toogle, delete  in the BI Portal

    When you logon to the portal and select any planning function and after giving the input for mandatory cells and after execution of that click the filter option on the right side of screen. In the next window  How can we restrict the options like add

  • Re-apply the Mac OS X 10.4.9 combo updater from an alternate startup volume

    Most instructions that I have read say: " Re-apply the Mac OS X 10.4.9 combo updater from an alternate startup volume. " ( Yep, I got the security update blues: which makes me always wonder if Apple programers can program an updater they should also

  • Can't find pictures in Picture folders

    I have a new 8900 Curve with some photos in the Blackberry/Pictures folder (some taken with the camera and placed there automatically, others moved onto the device using Blackberry Desktop Manager/Roxio software). The problem is that none of these ph

  • Settings for books

    I shoot Canon high end DSLRs and wanted to try an Aperture book. My usual workflow sends a 300dpi tiff to print with an embedded AdobeRGB profile. If I understand it, we can only use JPEGs here. If that is right, what is the best dpi setting to send?