Cannot Create Datasource through Java Application

Hi All,
I tried to create a datasource through my Java application
JDBCDescriptor jdbcDescriptor = new JDBCDescriptor();
          jdbcDescriptor.setDataSourceName("ds_venky");
          jdbcDescriptor.setDriverClassName("org.gjt.mm.mysql.Driver");
          jdbcDescriptor.setDriverName("mysql");
          jdbcDescriptor.setInitConnections(2);
          jdbcDescriptor.setMaxConnections(10);
          jdbcDescriptor.setPassword("xxxx");
          jdbcDescriptor.setURL("jdbc:mysql://172.22.76.8:3306/wise");
          jdbcDescriptor.setUsername("xxxx");
Properties ctxProp = new Properties();
               ctxProp.put(
                    Context.INITIAL_CONTEXT_FACTORY,
                    "com.sap.engine.services.jndi.InitialContextFactoryImpl");
               ctxProp.put(Context.PROVIDER_URL, "myServerName:50004");
               ctxProp.put(Context.SECURITY_PRINCIPAL, "xxxx");
               ctxProp.put(Context.SECURITY_CREDENTIALS, "xxxx");
               InitialContext context = new InitialContext(ctxProp);
               DataSourceManager dsm =
                    (DataSourceManager) context.lookup("dbpool");
               dsm.createDataSource("ds_venky", jdbcDescriptor);
But i get the following exception
1.5#000F20FEA14B0053000000000000107800041D9052026725#1158405595218#System.err#sap.com/DataSourceSAPEAR#System.err#Guest#2#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###0#
#1.5#000F20FEA14B0053000000010000107800041D905202B73E#1158405595234#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###1#
#1.5#000F20FEA14B0053000000020000107800041D905202D985#1158405595249#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###2#
#1.5#000F20FEA14B0053000000040000107800041D905205BA71#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###java.io.FileNotFoundException: .
temp
deploy
1158405595421 (The system cannot find the file specified)#
#1.5#000F20FEA14B0053000000050000107800041D905205BD49#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at java.io.FileInputStream.open(Native Method)#
#1.5#000F20FEA14B0053000000060000107800041D905205BDD6#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at java.io.FileInputStream.<init>(FileInputStream.java:106)#
#1.5#000F20FEA14B0053000000070000107800041D905205BE3C#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.uploadSAPPropertiesFile(DeployUtilTransaction.java:493)#
#1.5#000F20FEA14B0053000000080000107800041D905205BEA4#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.uploadSpecialEARFiles(DeployUtilTransaction.java:480)#
#1.5#000F20FEA14B0053000000090000107800041D905205BF0B#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:320)#
#1.5#000F20FEA14B00530000000A0000107800041D905205BF74#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:296)#
#1.5#000F20FEA14B00530000000B0000107800041D905205BFD8#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:304)#
#1.5#000F20FEA14B00530000000C0000107800041D905205C03E#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:335)#
#1.5#000F20FEA14B00530000000D0000107800041D905205C0A5#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3008)#
#1.5#000F20FEA14B00530000000E0000107800041D905205C109#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:520)#
#1.5#000F20FEA14B00530000000F0000107800041D905205C16C#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.deploy(DataSourceManagerImpl.java:253)#
#1.5#000F20FEA14B0053000000100000107800041D905205C1E2#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.createDataSource(DataSourceManagerImpl.java:317)#
#1.5#000F20FEA14B0053000000110000107800041D905205C248#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.dbpool.deploy.DataSourceManager_Stub.createDataSource(DataSourceManager_Stub.java:504)#
#1.5#000F20FEA14B0053000000120000107800041D905205C2AC#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.CreateDataSource.<init>(CreateDataSource.java:50)#
#1.5#000F20FEA14B0053000000130000107800041D905205C30D#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at jsp_Create1158405589640._jspService(jsp_Create1158405589640.java:11)#
#1.5#000F20FEA14B0053000000140000107800041D905205C36F#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:467)#
#1.5#000F20FEA14B0053000000150000107800041D905205C3D3#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:181)#
#1.5#000F20FEA14B0053000000160000107800041D905205C436#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)#
#1.5#000F20FEA14B0053000000170000107800041D905205C498#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)#
#1.5#000F20FEA14B0053000000180000107800041D905205C4F9#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)#
#1.5#000F20FEA14B0053000000190000107800041D905205C55A#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:337)#
#1.5#000F20FEA14B00530000001A0000107800041D905205C5BB#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:315)#
#1.5#000F20FEA14B00530000001B0000107800041D905205C61E#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:815)#
#1.5#000F20FEA14B00530000001C0000107800041D905205C67F#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:238)#
#1.5#000F20FEA14B00530000001D0000107800041D905205C6E1#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)#
#1.5#000F20FEA14B00530000001E0000107800041D905205C751#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)#
#1.5#000F20FEA14B00530000001F0000107800041D905205C7B8#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)#
#1.5#000F20FEA14B0053000000200000107800041D905205C81C#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)#
#1.5#000F20FEA14B0053000000210000107800041D905205C87F#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)#
#1.5#000F20FEA14B0053000000220000107800041D905205C8DE#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at java.security.AccessController.doPrivileged(Native Method)#
#1.5#000F20FEA14B0053000000230000107800041D905205C940#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)#
#1.5#000F20FEA14B0053000000240000107800041D905205C9A1#1158405595437#System.err#sap.com/DataSourceSAPEAR#System.err#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:151)#
#1.5#000F20FEA14B0053000000280000107800041D90520A54F1#1158405595734#com.sap.engine.services.dbpool.deploy.ContainerImpl#sap.com/DataSourceSAPEAR#com.sap.engine.services.dbpool.deploy.ContainerImpl#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###ContainerImpl.startDataSources(): Cannot create DataSource: ds_venky. Reason: java.lang.ArrayIndexOutOfBoundsException: -1#
#1.5#000F20FEA14B00530000002A0000107800041D90520A9B54#1158405595749#com.sap.engine.services.deploy#sap.com/DataSourceSAPEAR#com.sap.engine.services.deploy#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error#1#/System/Server#Java#deploy_5029##Exception in operation startApp with application sap.com/ds_venky.#2#startApp#sap.com/ds_venky#
#1.5#000F20FEA14B00530000002B0000107800041D90520A9FA9#1158405595749#com.sap.engine.services.deploy#sap.com/DataSourceSAPEAR#com.sap.engine.services.deploy#Administrator#191#####SAPEngine_Application_Thread[impl:3]_8##0#0#Error#1#/System/Audit#Java###Exception #1#com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception in operation startApp with application sap.com/ds_venky.
Any kind of help will be appreciated

Hi,
I have found the solution for this thread and have posted a blog on how to create data sources. Please find the link below
/people/venkatesh.ramachandran/blog/2006/10/19/how-to-create-and-remove-data-source-on-sap-was-j2ee-engine-dynamically-through-java
Regards,
Venkatesh

Similar Messages

  • [Help] Cannot create datasource in Mapviewer

    Hello. When I deploy MapViewer in OC4J standalone and log as oc4jadmin, i cannot create datasource for it. I edited mapViewerConfig.xml like this:
    <map_data_source name="kuba"
    jdbc_host="localhost"
    jdbc_sid="orcl"
    jdbc_port="1521"
    jdbc_user="kuba"
    jdbc_password="!BazaOracle1"
    jdbc_mode="thin"
    number_of_mappers="3"
    allow_jdbc_theme_based_foi="true"
    />
    After saving and restarting MapViewer, in datasource table there's no items. Any idea, what's wrong? Here's the log:
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig destroy
    FINER: destroying MapperConfig: connection manager, mapper pool and janitor t
    ad.
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperPool destroyAll
    WARNING: destroying ALL mapmaker instances.
    2010-12-02 12:05:19 oracle.lbs.mapserver.oms destroyMV
    WARNING: Oracle MapViewer shut down.
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig readVersion
    INFO: MapViewer server version: Ver11_B091229
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadConfigFile
    INFO: using default config file: D:\app\Kubix\product\11.2.0\dbhome_1\j2ee\ho
    applications\Map Viewer\web\WEB-INF\conf\mapViewerConfig.xml
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig checkSecuritySetti
    WARNING: dcsf:true
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.Dimmer startElement
    FINEST: found a datasource: kuba
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig scrambleConfigFile
    INFO: Passwords in the config file has been encrypted.
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadConfigFile
    FINER: Loading configuration file: D:\app\Kubix\product\11.2.0\dbhome_1\j2ee\
    e\applications\Map Viewer\web\WEB-INF\conf\mapViewerConfig.xml
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperPool destroyAll
    WARNING: destroying ALL mapmaker instances.
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig checkSecuritySetti
    WARNING: dcsf:true
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig setLoggingOptions
    INFO: Setting logging options for MapViewer
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig setLoggingOptions
    INFO: setting logging level to finest
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadMapViewerConfi
    FINEST:
    Allowed IPs:
    Excluded IPs:
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig registerNSDataProv
    rs
    FINEST: Non-Spatial Data Provider registered: defaultNSDP
    2010-12-02 12:05:19 oracle.sdovis.SDataProviderMgr registerProvider
    WARNING: Spatial Provider shapefileSDP is already registered.
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig registerSDataProvi
    s
    FINEST: Spatial Data Provider registered: shapefileSDP
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadMapViewerConfi
    FINEST: Data source kuba will get web user name from: J2EE_USER
    2010-12-02 12:05:19 oracle.sdovis.ds.NativeOracleDataSource <init>
    SEVERE: Connection Cache with this Cache Name already exists
    java.sql.SQLException: Connection Cache with this Cache Name already exists
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.j
    :138)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.j
    :175)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.j
    :240)
    at oracle.jdbc.pool.OracleConnectionCacheManager.createCache(OracleCo
    ctionCacheManager.java:188)
    at oracle.jdbc.pool.OracleDataSource.cacheInitialize(OracleDataSource
    va:301)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.j
    :284)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.j
    :179)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.j
    :159)
    at oracle.sdovis.ds.NativeOracleDataSource.<init>(NativeOracleDataSou
    .java:233)
    at oracle.sdovis.ds.DSManager.registerOracleJdbcDS(DSManager.java:122
    at oracle.lbs.mapserver.core.MapperConfig.createMappers(MapperConfig.
    a:797)
    at oracle.lbs.mapserver.core.MapperConfig.loadMapViewerConfig(MapperC
    ig.java:1572)
    at oracle.lbs.mapserver.core.MapperConfig.loadConfigFile(MapperConfig
    va:609)
    at oracle.lbs.mapserver.core.MapperConfig.<init>(MapperConfig.java:36
    at oracle.lbs.mapserver.MapServerImpl.<init>(MapServerImpl.java:131)
    at oracle.lbs.mapserver.MapServerImpl.<init>(MapServerImpl.java:115)
    at oracle.lbs.mapserver.oms$ColdStart.run(oms.java:300)
    at java.lang.Thread.run(Thread.java:662)
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig createMappers
    SEVERE: Error creating NativeOracleDataSource.
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadMapViewerConfi
    WARNING: MAPVIEWER-00011: Error creating a map data source.(kuba)
    2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadConfigFile
    INFO: Map Recycling thread started.
    2010-12-02 12:05:19 oracle.lbs.mapserver.oms$ColdStart run
    INFO: *** Oracle MapViewer started. ***
    2010-12-02 12:05:20 oracle.lbs.mapcache.MapCacheServer restart
    INFO: Map cache server is restarted!
    2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
    FINE: FOI image recycle thread interrupted.
    2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
    FINE: FOI image recyle thread terminated.
    2010-12-02 12:05:20 oracle.lbs.foi.FOIServer init
    INFO: *** Oracle Feature of Interest (FOI) Server started. ***
    2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
    FINE: FOI image recycle thread interrupted.
    2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
    FINE: FOI image recyle thread terminated.
    10/12/02 12:05:20 Message:MAPVIEWER-00019: Specified data source does not exist.
    Thu Dec 02 12:05:20 CET 2010
    Severity: 0
    Description:
    10/12/02 12:05:20 Message:MAPVIEWER-00019: Specified data source does not exist.
    Thu Dec 02 12:05:20 CET 2010
    Severity: 0
    Description:
    10/12/02 12:05:21 Message:MAPVIEWER-00019: Specified data source does not exist.
    Thu Dec 02 12:05:21 CET 2010
    Severity: 0
    Description:

    Does restarting oc4j make any difference?

  • Cannot create DataSource, Exception in Tomcat 4.1

    I am running into a major problem with Tomcat4.1 trying to access a Datasource.
    I referenced about 7 articles one of which has the subject "Cannot create JDBC driver of class '' for connect URL 'null', cause..."
    but he is using Tomcat 5. I even tried to simulate his solution to mine but still no use.
    I tried to connect to the database the old fashion way and it worked... I get connected (JDBC connection w/o Datasource).
    I changed the XML many times but with no luck. I must be doing something stupid that I can't see.
    Any help is greatly appreciated.... I ran out of solutions...
    I initially loaded my app through Tomcat manager and created the DataSource through Tomcat admin screen.
    my CLASSPATH =
    C:\J4Log\logging-log4j-1.2.9\dist\lib\log4j-1.2.9.jar;
    C:\JBoss4-0\jboss-4.0.1sp1;C:\CONNX32\CONNXJDBC\JAVA\JAR\connxjdbc.jar;
    C:\JBuilderX\lib\mysql-connector-java-3.0.15-ga-bin.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-dbcp-1.2.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-collections-3.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\mysql-connector-java-3.1.8-bin.jar
    my web.xml =
    <resource-ref>
        <description>DB connection</description>
        <res-ref-name>jdbc/MyDBASE</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>-------------------
    The sample snipet to connect to the database (which works)
    ConnectionHelper contains the following (simplified)...
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         return DriverManager.getConnection("jdbc:mysql://10.0.3.52/MyDBASE?user=Myadmin&password=AdminPWD");
      ConnectionHelper connectionHelper = new ConnectionHelper();
      Statement st = null;
      try {
        Connection conn = connectionHelper.getConnection();
        st = conn.createStatement();
        System.out.println("\n=========== ssuucceessffullllllll=======\n");
      catch (SQLException ex1) {
         System.out.println("error connecting=================");
         ex1.printStackTrace();
    whenever i execute my JSP (which calls my java class .. code follows....
      Context envCtx = (Context) init.lookup("java:comp/env");
           DataSource ds = (DataSource)envCtx.lookup("jdbc/MyDBASE");it breaks on the DataSource giving..
    org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
    ' for connect URL 'null', cause:
    java.sql.SQLException: No suitable driver
            at java.sql.DriverManager.getDriver(DriverManager.java:243)
            at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:743)
            at org.apache.commons.dbcp.BasicD.........--
    Another error (which is from within the IDE) is
    java.lang.NoClassDefFoundError: tyrex/jdbc/xa/EnabledDataSource     at rg.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(TyrexDataSourceFactory.java:166)
         at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:164)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
         at simpleservlet.TestJSPBean.init(TestJSPBean.java:41)
         at org.apache.jsp.testJSP$jsp._jspService(testJSP$jsp.java:115)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)--------------------------
    and finally, Server.XML...
    <?xml version='1.0' encoding='utf-8'?>
    <Server className="org.apache.catalina.core.StandardServer" debug="0" port="8005" shutdown="SHUTDOWN">
      <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"/>
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
      <GlobalNamingResources>
        <Environment name="simpleValue" override="true" type="java.lang.Integer" value="30"/>
        <Resource name="jdbc/MyDBASE" scope="Shareable" type="javax.sql.DataSource"/>
        <ResourceParams name="jdbc/MyDBASE">
          <parameter>
            <name>validationQuery</name>
            <value>select now()</value>
          </parameter>
          <parameter>
            <name>url</name>
            <value>jdbc:mysql://10.0.3.52/MyDBASE?autoReconnect=true</value>
          </parameter>
          <parameter>
            <name>password</name>
            <value>AdminPWD</value>
          </parameter>
          <parameter>
            <name>maxActive</name>
            <value>4</value>
          </parameter>
          <parameter>
            <name>maxWait</name>
            <value>5000</value>
          </parameter>
          <parameter>
            <name>driverClassName</name>
             <value>org.gjt.mm.mysql.Driver</value>
          </parameter>
          <parameter>
            <name>username</name>
            <value>Myadmin</value>
          </parameter>
          <parameter>
            <name>maxIdle</name>
            <value>2</value>
          </parameter>
        </ResourceParams>
      </GlobalNamingResources>
      <Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
        <Engine className="org.apache.catalina.core.StandardEngine"
                   debug="0" defaultHost="localhost"
                   mapperClass="org.apache.catalina.core.StandardEngineMapper"
                   name="Standalone">
          <Host className="org........
            <Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
                      charsetMapperClass="org.apache.catalina.util.CharsetMapper"
                      cookies="true" crossContext="false" debug="0"
                      displayName="simpleservlet"
                      docBase="/WebModule1" mapperClass="org.apache.catalina.core.StandardContextMapper"
                      path="/WebModule1" privileged="false" reloadable="false" swallowOutput="false"
                      useNaming="true"
                      workDir="work\Standalone\localhost\WebModule1"
                      wrapperClass="org.apache.catalina.core.StandardWrapper">
                 <Resource auth="Container"
                            description="DB connection"
                            name="jdbc/MyDBASE" scope="Shareable"
                            type="javax.sql.DataSource"/>
           </Context>
        </Engine>
      </Service>
    </Server>Thanks in advance for ANY help.

    I am running into a major problem with Tomcat4.1 trying to access a Datasource.
    I referenced about 7 articles one of which has the subject "Cannot create JDBC driver of class '' for connect URL 'null', cause..."
    but he is using Tomcat 5. I even tried to simulate his solution to mine but still no use.
    I tried to connect to the database the old fashion way and it worked... I get connected (JDBC connection w/o Datasource).
    I changed the XML many times but with no luck. I must be doing something stupid that I can't see.
    Any help is greatly appreciated.... I ran out of solutions...
    I initially loaded my app through Tomcat manager and created the DataSource through Tomcat admin screen.
    my CLASSPATH =
    C:\J4Log\logging-log4j-1.2.9\dist\lib\log4j-1.2.9.jar;
    C:\JBoss4-0\jboss-4.0.1sp1;C:\CONNX32\CONNXJDBC\JAVA\JAR\connxjdbc.jar;
    C:\JBuilderX\lib\mysql-connector-java-3.0.15-ga-bin.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-dbcp-1.2.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-collections-3.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\mysql-connector-java-3.1.8-bin.jar
    my web.xml =
    <resource-ref>
        <description>DB connection</description>
        <res-ref-name>jdbc/MyDBASE</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>-------------------
    The sample snipet to connect to the database (which works)
    ConnectionHelper contains the following (simplified)...
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         return DriverManager.getConnection("jdbc:mysql://10.0.3.52/MyDBASE?user=Myadmin&password=AdminPWD");
      ConnectionHelper connectionHelper = new ConnectionHelper();
      Statement st = null;
      try {
        Connection conn = connectionHelper.getConnection();
        st = conn.createStatement();
        System.out.println("\n=========== ssuucceessffullllllll=======\n");
      catch (SQLException ex1) {
         System.out.println("error connecting=================");
         ex1.printStackTrace();
    whenever i execute my JSP (which calls my java class .. code follows....
      Context envCtx = (Context) init.lookup("java:comp/env");
           DataSource ds = (DataSource)envCtx.lookup("jdbc/MyDBASE");it breaks on the DataSource giving..
    org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
    ' for connect URL 'null', cause:
    java.sql.SQLException: No suitable driver
            at java.sql.DriverManager.getDriver(DriverManager.java:243)
            at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:743)
            at org.apache.commons.dbcp.BasicD.........--
    Another error (which is from within the IDE) is
    java.lang.NoClassDefFoundError: tyrex/jdbc/xa/EnabledDataSource     at rg.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(TyrexDataSourceFactory.java:166)
         at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:164)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
         at simpleservlet.TestJSPBean.init(TestJSPBean.java:41)
         at org.apache.jsp.testJSP$jsp._jspService(testJSP$jsp.java:115)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)--------------------------
    and finally, Server.XML...
    <?xml version='1.0' encoding='utf-8'?>
    <Server className="org.apache.catalina.core.StandardServer" debug="0" port="8005" shutdown="SHUTDOWN">
      <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"/>
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
      <GlobalNamingResources>
        <Environment name="simpleValue" override="true" type="java.lang.Integer" value="30"/>
        <Resource name="jdbc/MyDBASE" scope="Shareable" type="javax.sql.DataSource"/>
        <ResourceParams name="jdbc/MyDBASE">
          <parameter>
            <name>validationQuery</name>
            <value>select now()</value>
          </parameter>
          <parameter>
            <name>url</name>
            <value>jdbc:mysql://10.0.3.52/MyDBASE?autoReconnect=true</value>
          </parameter>
          <parameter>
            <name>password</name>
            <value>AdminPWD</value>
          </parameter>
          <parameter>
            <name>maxActive</name>
            <value>4</value>
          </parameter>
          <parameter>
            <name>maxWait</name>
            <value>5000</value>
          </parameter>
          <parameter>
            <name>driverClassName</name>
             <value>org.gjt.mm.mysql.Driver</value>
          </parameter>
          <parameter>
            <name>username</name>
            <value>Myadmin</value>
          </parameter>
          <parameter>
            <name>maxIdle</name>
            <value>2</value>
          </parameter>
        </ResourceParams>
      </GlobalNamingResources>
      <Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
        <Engine className="org.apache.catalina.core.StandardEngine"
                   debug="0" defaultHost="localhost"
                   mapperClass="org.apache.catalina.core.StandardEngineMapper"
                   name="Standalone">
          <Host className="org........
            <Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
                      charsetMapperClass="org.apache.catalina.util.CharsetMapper"
                      cookies="true" crossContext="false" debug="0"
                      displayName="simpleservlet"
                      docBase="/WebModule1" mapperClass="org.apache.catalina.core.StandardContextMapper"
                      path="/WebModule1" privileged="false" reloadable="false" swallowOutput="false"
                      useNaming="true"
                      workDir="work\Standalone\localhost\WebModule1"
                      wrapperClass="org.apache.catalina.core.StandardWrapper">
                 <Resource auth="Container"
                            description="DB connection"
                            name="jdbc/MyDBASE" scope="Shareable"
                            type="javax.sql.DataSource"/>
           </Context>
        </Engine>
      </Service>
    </Server>Thanks in advance for ANY help.

  • How to get Formatted Mail Content through Java Application

    I am using a mail sending function in my applet code which is listed below:
    Main content is fetched from a format tool bar in JSP Page and it is passed as parameter to applet and it is used inside the mail content.
    Same content when passed and executed in a JSP page, the formatted content is not lost and it is included in mail content as what it is fetched from Format Tool Bar.
    Format is lost when it is used inside the Java Application mail sending function.
    The below code I have used to send mail:
    package com;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.mail.BodyPart;
    import javax.mail.Message;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    class mailsendClass
    public void sendmail(String from,String host,boolean debug,String msgText)
         try
              Set tomailsid = new HashSet();
              Set ccmailsid = new HashSet();
              //to mail ids           
              tomailsid.add("[email protected]" );          
              tomailsid.add("[email protected]" );
              tomailsid.add("[email protected]" );
              //cc mail ids
              ccmailsid.add("[email protected]" );
              ccmailsid.add("[email protected]" );
              String mailarray[]= (String[])tomailsid.toArray(new String[tomailsid.size()]);
              String ccmailID[]= (String[])ccmailsid.toArray(new String[ccmailsid.size()]);
              Properties props = new Properties();
              //props.put("mail.smtp.port","425");
              props.setProperty("mail.smtp.host", host);
              if (debug) props.setProperty("mail.debug", ""+debug);
              Session session = Session.getInstance(props, null);
              session.setDebug(debug);
              String mailsubject = "Mail Subject";
              // create a message
              Message msg = new MimeMessage(session);
              msg.setFrom(new InternetAddress(from));
              javax.mail.internet.InternetAddress[] toAddress=new javax.mail.internet.InternetAddress[mailarray.length];
              for (int i=0;i<mailarray.length ;i++ )
              toAddress=new javax.mail.internet.InternetAddress(mailarray[i]);
              System.out.println ("id inside to address loop " + i + " is "+ mailarray[i]);
              System.out.println ("toAddress " + i + " is "+ toAddress[i]);
              msg.setRecipients(Message.RecipientType.TO, toAddress);
              msg.setSubject(mailsubject);
              try
                   javax.mail.internet.InternetAddress[] CCAddress=new javax.mail.internet.InternetAddress[ccmailID.length];
                   for (int i=0;i<ccmailID.length ;i++ )
                        CCAddress[i]=new javax.mail.internet.InternetAddress(ccmailID[i]);
                        System.out.println("CC Array is ===> " +CCAddress[i] );//          
              msg.setRecipients(Message.RecipientType.CC,CCAddress);
              catch(Exception ss)
                   System.out.println("CC mail Exception is ====>"+ ss);     
                   msg.setSentDate(new java.util.Date());
    //          Multipart multipart = new MimeMultipart("relative");
                   Multipart multipart = new MimeMultipart("alternative");
              BodyPart messageBodyPart = new MimeBodyPart();
              messageBodyPart.setContent(msgText, "text/html");
    //          messageBodyPart.setContent(msgText, "text/plain");
              multipart.addBodyPart(messageBodyPart);          
                   msg.setContent(multipart);
              Transport.send( msg );
         catch (Exception e)
              System.out.println("The Exception is ------>"+e);
    public class SendMail {
    public static void main(String[] args)
         System.out.println("before Mail Send ");
         mailsendClass mail = new mailsendClass();
         String from="[email protected]";
         String host="172.16.2.6";
         String msgText="<p><strong>Index</strong><br />I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:<br />• Engage<br />• Chapters 1–6<br /><a title='ftp:///Index' href='ftp://index/'>ftp:///Index</a><strong><br />XML Coding - Files with errors</strong><br />• Engage<br />• Chapters 1–6<br /><a title='ftp:///XML_Coding_Need%20Fixing' href='ftp://xml_coding_need%20fixing/'>ftp:///XML_Coding_Need%20Fixing</a></p>";
         mail.sendmail(from,host,true,msgText);
         System.out.println("after Mail Send ");
    Content placed in format tool bar is as follows:
    Index
    I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
    • Engage
    • Chapters 1–6
    ftp:///Index
    XML Coding - Files with errors
    • Engage
    • Chapters 1–6
    ftp:///XML_Coding_Need%20Fixing
    Content fetched from format tool bar inside JSP page is as follows:
    <p><strong>Index</strong>
    I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
    &bull; Engage
    &bull; Chapters 1&ndash;6
    <a title="ftp:///Index" href="ftp://index/">ftp:///Index</a><strong>
    XML Coding - Files with errors</strong>
    &bull; Engage
    &bull; Chapters 1&ndash;6
    <a title="ftp:///XML_Coding_Need%20Fixing" href="ftp://xml_coding_need%20fixing/">ftp:///XML_Coding_Need%20Fixing</a></p>
    Fetched Content inside Java Application through parameter and it will use as input for mail content is as follows:
    <p><strong>Index</strong>
    I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
    • Engage
    • Chapters 1–6
    <a title="ftp:///Index" href="ftp://index/">ftp:///Index</a><strong>
    XML Coding - Files with errors</strong>
    • Engage
    • Chapters 1–6
    <a title="ftp:///XML_Coding_Need%20Fixing" href="ftp://xml_coding_need%20fixing/">ftp:///XML_Coding_Need%20Fixing</a></p>
    Actual mail received after Java Application execution is as follows:
    Index
    I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
    ? Engage
    ? Chapters 1?6
    ftp:///Index
    XML Coding - Files with errors
    ? Engage
    ? Chapters 1?6
    ftp:///XML_Coding_Need%20Fixing
    Unicode characters in the mail content are replaced by “?”.
    In the function listed above I have used the MIME Setting as
    Multipart multipart = new MimeMultipart("alternative");
    I have tried by using “relative” MIME format also as
    Multipart multipart = new MimeMultipart("relative");
    But I am not getting the actual format passed as input to the Java Application in the mail content.
    Can anybody let us know how to overcome this problem?
    Thanks in advance.

    You need to really understand how the different multiparts work instead of just guessing.
    But for your application, you don't need a multipart at all. Just use msg.setText(msgText, null, "html");
    Although that doesn't explain your problem, it will simplify your program.
    How are you determining that the mail received doesn't have the formatting? Are you viewing it in a
    mail reader (e.g., Outlook)? Or are you fetching it with JavaMail?
    Are you using an Exchange server? Exchange will often reformat your message to what it thinks you meant.

  • How to call function in included dll file through java application.

    Hi All,
    i am trying to create an java application which call c# functions using JNI. i am completed with the code and it is running fine when i tried to run from netbeans IDE. But when i tried from Calculator.jar file, first time it throws this error:
    F:\JavaProjects\Calculator\dist>Java -jar Calculator.jar
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no CSharpClient in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at calculator.CalculatorApp.<clinit>(CalculatorApp.java:20)
    After that i included that dll file in the cuurent directory. And compiled and tried to run, it throws an unexpected error:
    F:\JavaProjects\Calculator\dist>Java -jar Calculator.jar
    *# An unexpected error has been detected by Java Runtime Environment:*
    *# Internal Error (0xe0434f4d), pid=2640, tid=3700*
    *# Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode, sharing)*
    *# Problematic frame:*
    *# C [kernel32.dll+0x12a5b]*
    *# An error report file with more information is saved as hs_err_pid2640.log*
    *# If you would like to submit a bug report, please visit:*
    *# http://java.sun.com/webapps/bugreport/crash.jsp*
    Anyone have idea how to solve this error.
    Thanks in advance.

    This error is created whenever things go sour on the native side. The first thing you can try, and I assume you are using a Java<->C++<->C# bridge which includes two dlls, one created by C++ and another by C#. Is to make sure that the C# dll is compiled using /t:module switch during compilation.
    If you are using VS2008, or VS2005, you can add a post build syntax like:
    csc /t:module /out:"$(ProjectDir)$(OutDir)YourModule.dll" "$(ProjectDir)YourCSfile.cs"
    Hope this helps! If not, ensure first that the native code works by creating a native test app for it.

  • How can I create a scheduled java application/task?

    Hi,
    Being a complete newbie to the Java language, I hope I am forgiven if the above is blindingly obvious.
    I have a java application which I have developed that when run from the command prompt (java xyz) selects a bunch of records from my database, then creates a text file with the results. Pretty simple stuff.
    My question is, how can I automate this process? I would like it to run every night at midnight. Will I have to create a batch file? If so, how? Help!!
    Any advice would be much appreciated :)
    Thanks, Chris

    Scheduling a task is a very Operating System dependent operation. It does not exist in some OS's without some kind of addin. Things of this sort are usually not done exclusively in Java, unless you want to have your application running all the time and simply perform some operation at a specific time (see Timer). Otherwise look on google.com for 'scheduler' and 'windows 98' for example.

  • Cannot Create ShrePoint Search Service Application for SP2013

    Hi All,
    Thanks in advance for any help you may provide.
    While Creating a new search service application i have received the following error:
    Errors were encountered during the configuration of the Search Service Application.
    System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated. Parameter name: sddlForm at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm) at System.Security.AccessControl.RawSecurityDescriptor..ctor(String
    sddlForm) at Microsoft.SharePoint.Win32.SPNetApi32.CreateShareSecurityDescriptor(String[] readNames, String[] changeNames, String[] fullControlNames, String& sddl) at Microsoft.SharePoint.Win32.SPNetApi32.CreateFileShare(String name, String description,
    String path) at Microsoft.Office.Server.Search.Administration.AnalyticsAdministration.CreateAnalyticsUNCShare(String dirParentLocation, String shareName) at Microsoft.Office.Server.Search.Administration.AnalyticsAdministration.ProvisionAnalyticsShare(SearchServiceApplication
    serviceApplication) at Microsoft.Office.Server.Search.Administration.AnalyticsAdministration.CreateDefaultStoreLocation(SearchServiceApplication serviceApplication) at Microsoft.Office.Server.Search.Administration.AnalyticsAdministration.ProvisionRawEventStore(SearchServiceApplication
    serviceApplication) at 
    The Fix with Sharing the Analitics_GUID Folder doesn't work, because it creates every Time a new one.
    I really appreciate if you could give me a help.
    Regards!
    Martin

    Hi all,
    Thank you very much for your Response.
    I have resolve this Issue yesterday, but didn't have time to answer.
    I have tried everything (Create over Powershell and GUI) and as I say the fix with Analitics_GUID dont work. I have give everyone Full Controll on the hole Office Folder and Sub-folders.
    I have look with the Reflector in the Code that causes the Exception and find that the SDDL string need some format in
    that has an Domain Account and not Local Account. I mean some SID Domain ids.
    So there is no way to create an "Complete" Installation ( not Standalone)  without having a Domain. It is possible but you cannot create Search Service App and some
    other Components didn't work as expected.
    My Software was:
    Windows Server 2012 Datacenter
    SQL Server 2012 Enterprise with SP1
    SharePoint 2013 Enterprise
    So I created a "local" domain an it works. 
    Thank you very much
    Regards
    Martin

  • Problem facing while creating DataSource through visual admin utility

    Hi,
    I have created my database on shw6ur-3\tdemand_1 machine where shw6ur-3 is machine name and tdemand_1 is database instance. Still now we used to create database on the sqlserver machine without databaseinstance . This is first time we have installed separate database instance tdemand_1 on the machine. I am entering parameter through visual admin->serverices-> JDBC connector to create database parameter are server name: shw6ur-3\tdemand_1 and database:ABC.
    But it is not allowing me to create the DataSource.
    I am having the doubt on server name.
    Does anybody know how to create DataSource to connect to particular database on particular database instance.
    regards,
    Chandan

    If you connect as sys you have to specify that you want to connect in the role of sysdba or sysoper.
    In the connection dialog you'll find a drop down box where you select sysdba instead of normal.
    Timo

  • Cannot create a Sun Java Studio Creator project

    After successfully installing Sun Studio Creator on a machine running Fedora Core 7 I find that I am unable to create a JSF Web Application.
    Studio Creator will create an initial project in the home/john/Creator subdirectory and then create a project.xml file there. The application then hangs while showing the mouse cursor in a wait state that never ends.
    Studio Creator was installed using a config file called "creator-2_1-linux-ml.sp" while running in the -silent mode.
    Why you might ask? Because that is the only way it would install.
    The .sp file contains the following:
    installDir=/home/john/StudioCreator
    jdkHome=�/usr/java/jdk1.6.0_02�
    serialNumber=�trial�
    is.debug=1
    The app was installed using the command ./creator-2_1-linux-ml.bin -silent
    It would not install using xhost + localhost/export DISPLAY=localhost:.0.0
    Any ideas?
    Edited by: skunkboy on Dec 3, 2007 9:05 PM
    Edited by: skunkboy on Dec 3, 2007 9:09 PM

    I am having the same issue. I have kubuntu linux ; downloaded the creator install file "*creator-2_1-linux-ml.bin*" and installed the creator. When studio creator runs, it is unable to create initial project and I see only xml file.
    Eventhough Netbeans works good; but creator has integrated database provided; so it is easy to follow tutorials given on sun website.
    Any clues...

  • How to create datasource for standalone application using JPA

    In the persistence.xml configuration file, we have data source got it from web server configuration file, and created by server like Jboss or tomcat.
    I just wonder how to create this same data source via Java stand-alone application?
    I have Java standalone application embedded Jetty server running with JPA module. Question is how to setup or create data source from my Java application just like web server; which called by persistence.xml?
    Thanks,

    Hello,
    Sharepoint deployment is completely different. I don't think you can deploy any solution as wizard in prod so you have to first identify what you want to deploy.
    If you just want to deploy only web application then backup/restore process is available in sharepoint. you can use STSADM or powershell to deploy your web app.
    http://technet.microsoft.com/en-us/library/ee748618%28v=office.14%29.aspx
    If there is any custom code or .NET code then create a WSP package and deploy it on prod. If you have multiple WSP's then create a batch file (as exe package) then run this package on prod.
    http://www.ironspeed.com/Designer/9.1.1/WebHelp/Part_VI/SharePoint_Solution_Package_WSP_Deployment.htm
    Let us know in case any doubt
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to create setup for Java Application?

    Hello,
    I have created one Java Application. Now I want to create setup for that. I want to know if there is any tool is available for Java Application. If yes, then please help me to get that.
    My emal id is "[email protected]"
    Thanks in advance.
    Sam

    Go to www.zerog.com
    Download InstallAnyWhere4now (free)
    it is Awsome youll love it
    M
    bakbjo

  • Automation Server cannot create object_error in Java script

    Hi
    I am using window.open method to save contents of xml file in my local pc.
    I am getting this error (Automation Server cannot create object),for this,i need to change internet settings.
    But i dont want to change the internet settings as other pages are getting affected.
    Please guide me regarding this....

    Javascript is not Java.

  • Reading Spool files from AS400 through JAVA Applications

    Hi,
    i am trying to read spool fiels through my java application with the help of jt400.jar files,which is developed by IBM.When i try to display the content of the spool file the result is look like this and give some ideas to come out from these
    problems.
    thanks in advance
    selvin
    --- 4- 4++++�+-+@z 4++-_��++_� 4+3@+@+@_���������@M_�����?�] 4+
    s+-�+@z 4+@@@@� � 4+__++@+-@z 4+___ 4+++++++ 4+s--�+@z 4+z_a_�a___� � 4+:-
    ?��@z 4+B__a_�a___� 4+s�+++@z 4+|��z_�z_� � 4+:-�?���@z 4+C__� 4+G` 4+I___ �� 4+
    -�?��� 4+-�?��� 4+B���?�@+�M�] 4+T@@���?� 4+j���?�@_?��� � 4+@+��� 4+@+?�� 4
    B��@����� 4+T+�?����� 4+k��@_�?��� � 4+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~ � 4+__� 4+
    ---++ 4+B@@@@_ 4+Q@@@@@@@@@@_ 4+j@@@@@@@@@@@@@@@@@@K__ � � 4+___ 4+
    ---_++++--+ 4+B@@@@_ 4+Q@@@@@_�k___ 4+j@@@@@@@@@@@@_�k_�_K__ � � 4+___ 4+
    ---++++� 4+B@@@@� 4+Q@@@@@�k___ 4+j@@@@@@@@@@@@__k___K__ � � 4+___ 4+
    ----- 4+B@@@@_ 4+Q@@@@@@@@@@_ 4+j@@@@@@@@@@@@@@@@@@K__ � � 4+@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ � 4+'�+--@��-+@z 4+C@@@@_ 4+R@@@@@�_k___ 4+
    k@@@@@@@@@@@@��k��_K__ � 4+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If you were expecting the spool file to be translated to ASCII with carriage returns, line feeds, and form feeds, here is the magical piece of code:
    SpooledFile splf = new SpooledFile(sys, splfName, splfNum, jobName, jobUser, jobNum);
    PrintParameterList pl = new PrintParameterList();
    pl.setParameter(SpooledFile.ATTR_MFGTYPE, "*WSCST");
    pl.setParameter(SpooledFile.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST");
    InputStream in = splf.getTransformedInputStream(pl);
    For reasons not immediately clear to me, the first character in the file appears to be a null byte (hex 0). I also believe that CRs and LFs only appear as needed to return to the beginning of the line (CR) and the feed one line (LF). It is permissible for example to have <data><CR><LF><LF><LF> (i.e. feed three lines). I also assume that <data><CR><data><CR><LF> would result in overprinting (missing line feed). I have even seen <data><CR><CR>, and I assume the second CR should be ignored.
    I have not exhaustively tested these scenarios, but from some of the problems we've had, the above description seems like a reasonable way to think about the data stream

  • Can we Create Setup of java Applications ?

    Like VBasic can we create the setup of java Application containing main function. How to do this ?

    It's possible the OP is asking about installers. The
    last time I seriously used VB (in the 1990s) it came
    with a cheapo installer so you didn't have to pay
    money for InstallShield.Then perhaps the OP might wish to try something like this?
    http://www.google.com/search?q=free+java+installer

  • Creating WSDL for Java Application/ JSP Page

    I am looking for creating a Webservice(WSDL) for a Java application which connects to the R/3 System Backend. I have tried to connect to the Backend using JCO in JSP page and was successful, but I need to generate a WSDL file which when consumed performs the connection and looks up for the data in the Backend. The FrontEnd can be a JSP application or a Java Application in NetWeaver.

    The easiest thing to do is put it in a JAR file with an appropriate manifest. That way it retains cross-platform functionality, which is kind of the point of writing things in Java. The JAR file will be double-clickable.
    If you absolutely must put it in an .exe for some reason, there are applications on the web that will do it.
    Either way, a google search is your next step.
    Drake

Maybe you are looking for

  • Installation Problem on RedHat Linux 7.3

    Hello, I am tring to install JWSDP-1_2 package on my RedHat 7.3 Linux box But I recevied the following error message [root@design JWSDP-1_2]# ./jwsdp-1_2-unix.sh -console bash: ./jwsdp-1_2-unix.sh: /bin/sh: bad interpreter: ?? ??? How do I install it

  • My ipod nano can't stop rebooting !

    So I got my ipod nano a few years ago and I had a different laptop back then and I uploaded my music on that laptop with itunes. I got a new laptop but I never plugged my ipod nano into it. A few weeks ago I did and it was working fine when i plugged

  • Controlling area does not exist in assignment ?

    Hi, I've created & assinged controlling area to the company code , But then When I used PPOME to create org unit and assign the Controlling area , It did not exist in the list ? How can i configure this Thanks in advance

  • Latest SpryHTMLDataSet.js available ...

    Just an FYI for folks making use of the HTMLDataSet. I fixed a column name bug today that was reported in the ICE forums: http://forums.adobe.com/message/1950092#1950092 In a nutshell, if your data set was extracting the column names from the first r

  • How to Prepare for SAP SD Certification

    Hi All, I have applied for SAP SD certification with EhP5 with exam code C_TSCM62_65, I am little nervous regarding preparation. Can any one tell me on how to prepare with proper methods to crack SAP SD certification. I have 3 years of experience in