Creating ClassPath
Hi
I designed a space invader game that can be played with the keyboard.
Now I want to be able to play the same game using the D-pad of wiimote. I understand I need to import some classes of the wiiflash to achieve my aim.
I have downloaded the wiiflash API and saved it on the same folder as my .as classes and .fla class. (but I copied just thee org.wiiflash.* folders). I have written the codes to connect the wiimote. I tried to run it but as3 could not assess the classes
org.wiiflash.Wiimote;
org.wiiflash.events.*;
even though I've imported them.
I have also created a class path (edit-Preferences actionscript- actionscript 3.0- selected the folder where all the classes reside - save)
I dont know what to do. Here is the code I have :
package
import flash.events.*;
import org.wiiflash.Wiimote;
import org.wiiflash.events.*;
public class spacegame extends MovieClip
public var wiimote:Wiimote;
private function initializeGame()
createWiimoteConnection();
public function createWiimoteConnection()
wiimote = new Wiimote();
wiimote.addEventListener(Event.CONNECT, onWiimoteConnect);
wiimote.Connect();
and here is the error messegae I got
N:\chigbo\SPACEGAME\SPG2PlayerDPAD_1.4\spacegame.as, Line 241 1061: Call to a possibly undefined method Connect through a reference with static type org.wiiflash:Wiimote.
It's telling you it's possibly a static type, not that it can't find it.
Change the "C" in connect to a lowercase.
wiimote.connect();
From this page:
http://code.google.com/p/wiiflash/
You can see it's a lowercase (case sensitivity matters).
Similar Messages
-
Setting classpath and creating packages
Hi
I am new to Java and my questions are basic.
1)I am using the kawa IDE and i dont know how to create and use packages.
2)Creating classpath to compile and run java programs from the Dos prompt.
I would appreciate any help on these questionsI'm not sure how to use KAWA.
When it comes to classpaths, though, I would recommend not setting it as an environment variable - this tends to cause confusion if you work on more than one project at a time on your machine. Either set it locally or specify it directly on the command line.
Often it's a good idea to write a batch file for compiling and executing your code:
setlocal
set PATH=c:\j2sdk-1.3
set CLASSPATH=c:\jars\Servlet.jar
javac MyClass.java
endlocalHope this helps. -
Issue in creating OPSS Schema with rcu.
Hi,
There is an issue in creating the OPSS schema in oracle DB 11.2.0.3.0 even though the rcu (Oracle Fusion Middleware Repository Creation Utility 11g (11.1.2.1.0)
completed it without any error with status of success opss schema at the end of it's creation operation.
But the validation of opss schema is getting Failed as shown by this query ! I 've refferenced this Doc's Configuring the OPSS Security Store
SQL> desc jps_dn;
ERROR:
ORA-04043: object jps_dn does not exist
There is no error in rcu log And in opss.log as well. Also There is NO issue in createing the Other schema's like OIM,OAM,OAAM
Wonder what am missing here that causing the shema not reflecting or Validation of it getting Failed in the database.
Also i 've tried by changing this sec_case_sensitive_logon value to False from true in the DB but to no effect.
in both cases the OPSS schema validation is getting failed.
Greately appreciate any suggestion.
Please see the following summary of rcu operation
Repository Creation Utility: Create - Completion Summary
Database details:
Host Name : ebs.oracle.com
Port : 1521
Service Name : IAM.ORACLE.COM
Connected As : sys
Prefix for (prefixable) Schema Owners : DEV
RCU Logfile : /data/Rootdownloads/rcuHome/rcu/log/logdir.2013-09-25_04-57/rcu.log
Component schemas created:
Component Status Logfile /data/Rootdownloads/rcuHome/rcu/log/logdir.2013-09-25_04-57/opss.log
Oracle Platform Security Services Success
Please suggest.
Thanks
PriyaHi,
Thanks for the response Hussein and Helios,
I am able to solve the issue as it was due to incorrect rcu version.
But I am really struggling to Configure Policy store for the last 10 days with the following Error. I would be highly obliged if you could guide me on this issue.
I am getting stuck at this Error while running configureSecurityStore.py. for the error I 've refferenced these Metalink Note ID's
But to No Avail.
configureSecurityStore.py Fails With ORA-00001: unique constraint (DEV_OPSS.IDX_JPS_RDN_PDN) violated. (Doc ID 1547423.1) (1549203.1)
Summarining
The steps that I 've followed
1. Created the Schema's Using rcu 11g (11.1.2.0.0) on 11.2.0.3.0 Oracle DB. (OS :RHEL 64 bit)
2. Insatlled Weblogic 10.3.6
3. Installed Oracle Identity and Access Management 11g (11.1.2.0.0) And SOA 11.1.1.7.0
4. Run config.sh to create OIM,OAM and OAAM domains
5. Run setDomainEnv.sh from user_projects/domains//bin
After that I tried to Configure the DB Policy store before starting the Admin Server. But getting the same error. every time it get failed
I 've dropped schemas and Reinstall the WLS,IAM,SOA software again But got the same Error.
at least 20 times in the last 10 days I 've Dropped schema even created New DB and Reinstalled All the IAM Software But to No Avail
Please see the following Exact Error. And I would be highly Obliged if you could drop few lines as what I am missing here in the entire process.
[oracle@ebs Middleware]$ /oracle/Middleware/oracle_common/common/bin/wlst.sh /oracle/Middleware/Oracle_IAM/common/tools/configureSecurityStore.py -d /oracle/Middleware/user_projects/domains/IAMDomain/ -c IAM -p welcome1 -m create
CLASSPATH=/oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk1.6.0_30/lib/tools.jar:/oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk1.6.0_30/lib/tools.jar:/oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk1.6.0_30/lib/tools.jar:/oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/oracle/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrf-wlstman.jar:/oracle/Middleware/oracle_common/common/wlst/lib/adfscripting.jar:/oracle/Middleware/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/oracle/Middleware/oracle_common/common/wlst/lib/mdswlst.jar:/oracle/Middleware/oracle_common/common/wlst/resources/auditwlst.jar:/oracle/Middleware/oracle_common/common/wlst/resources/igfwlsthelp.jar:/oracle/Middleware/oracle_common/common/wlst/resources/jps-wlst.jar:/oracle/Middleware/oracle_common/common/wlst/resources/jps-wls-trustprovider.jar:/oracle/Middleware/oracle_common/common/wlst/resources/jrf-wlst.jar:/oracle/Middleware/oracle_common/common/wlst/resources/oamap_help.jar:/oracle/Middleware/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/oracle/Middleware/oracle_common/common/wlst/resources/ossoiap_help.jar:/oracle/Middleware/oracle_common/common/wlst/resources/ossoiap.jar:/oracle/Middleware/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/oracle/Middleware/oracle_common/common/wlst/resources/sslconfigwlst.jar:/oracle/Middleware/oracle_common/common/wlst/resources/wsm-wlst.jar:/oracle/Middleware/utils/config/10.3/config-launch.jar::/oracle/Middleware/wlserver_10.3/common/derby/lib/derbynet.jar:/oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/oracle/Middleware/wlserver_10.3/common/derby/lib/derbytools.jar::
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Info: Data source is: opss-DBDS
Info: DB JDBC driver: oracle.jdbc.OracleDriver
Info: DB JDBC URL: jdbc:oracle:thin:@ebs.oracle.com:1521/iam.oracle.com
INFO: Found persistence provider "org.eclipse.persistence.jpa.PersistenceProvider". OpenJPA will not be used.
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] checkServiceSetup - done
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] checkServiceSchema - Store schema has been seeded completely
Sep 26, 2013 1:35:36 AM oracle.security.jps.internal.config.ldap.LdapCredStoreServiceConfigurator schemaCompatibleHandler
INFO: Credential store schema upgrade not required. Store Schema version 11.1.1.6.0 is compatible to the seed schema version 11.1.1.4.0
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] updateServiceConfiguration - done
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] seedSchemaAndCreateDIT - done
Sep 26, 2013 1:35:40 AM oracle.security.jps.internal.tools.utility.JpsUtilMigrationCredImpl migrateCredentialData
INFO: Migration of Credential Store data in progress.....
Sep 26, 2013 1:35:40 AM oracle.security.jps.internal.tools.utility.JpsUtilMigrationCredImpl migrateCredentialData
INFO: Migration of Credential Store data completed, Time taken for migration is 00:00:00
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] migrateData - done
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] testJpsService - done
[oracle.security.jps.internal.config.db.DbKeyStoreServiceConfigurator] checkServiceSetup - done
[oracle.security.jps.internal.config.db.DbKeyStoreServiceConfigurator] checkServiceSchema - Store schema has been seeded completely
Sep 26, 2013 1:35:41 AM oracle.security.jps.internal.config.ldap.LdapKeyStoreServiceConfigurator schemaCompatibleHandler
INFO: Keystore schema upgrade not required. Store Schema version 11.1.1.6.0 is compatible to the seed schema version 11.1.1.4.0
[oracle.security.jps.internal.config.db.DbKeyStoreServiceConfigurator] updateServiceConfiguration - done
[oracle.security.jps.internal.config.db.DbKeyStoreServiceConfigurator] seedSchemaAndCreateDIT - done
[oracle.security.jps.internal.config.db.DbKeyStoreServiceConfigurator] migrateData - done
[oracle.security.jps.internal.config.db.DbKeyStoreServiceConfigurator] testJpsService - done
[oracle.security.jps.internal.config.db.DbPolicyStoreServiceConfigurator] checkServiceSetup - done
Sep 26, 2013 1:35:45 AM oracle.security.jps.internal.config.ldap.LdapPolicyStoreServiceConfigurator schemaCompatibleHandler
INFO: Policy schema upgrade not required. Store Schema version 11.1.1.6.0 is compatible to the seed schema version 11.1.1.4.0
[oracle.security.jps.internal.config.db.DbPolicyStoreServiceConfigurator] checkServiceSchema - Store schema has been seeded completely
[oracle.security.jps.internal.config.db.DbPolicyStoreServiceConfigurator] updateServiceConfiguration - done
[oracle.security.jps.internal.config.db.DbPolicyStoreServiceConfigurator] seedSchemaAndCreateDIT - done
WLS ManagedService is not up running. Fall back to use system properties for configuration.
Sep 26, 2013 1:36:00 AM oracle.security.jps.internal.tools.utility.destination.apibased.JpsDstPolicy migrateDataInternal
INFO: Migration of Admin Role Members started
Sep 26, 2013 1:36:00 AM oracle.security.jps.internal.tools.utility.destination.apibased.JpsDstPolicy migrateDataInternal
INFO: Migration of Admin Role Members completed in 00:00:00
[oracle.security.jps.internal.config.db.DbPolicyStoreServiceConfigurator] migrateData - done
[oracle.security.jps.internal.config.db.DbPolicyStoreServiceConfigurator] testJpsService - done
[oracle.security.jps.internal.config.db.DbAuditStoreServiceConfigurator] checkServiceSetup - done
[oracle.security.jps.internal.config.db.DbAuditStoreServiceConfigurator] checkServiceSchema - Store schema has been seeded completely
Sep 26, 2013 1:36:00 AM oracle.security.jps.internal.config.ldap.LdapAuditServiceConfigurator schemaCompatibleHandler
INFO: Audit store schema upgrade not required. Store Schema version 11.1.1.6.0 is compatible to the seed schema version 11.1.1.4.0
[oracle.security.jps.internal.config.db.DbAuditStoreServiceConfigurator] updateServiceConfiguration - done
[oracle.security.jps.internal.config.db.DbAuditStoreServiceConfigurator] seedSchemaAndCreateDIT - done
Sep 26, 2013 1:36:00 AM oracle.security.jps.internal.audit.AuditServiceImpl registerInternal
WARNING: Cannot register to audit service for component "JPS".
Sep 26, 2013 1:36:00 AM oracle.security.jps.internal.tools.utility.JpsUtilMigrationAuditStoreImpl migrateAuditStoreData
INFO: Migration of Audit Store data in progress.....
Sep 26, 2013 1:36:51 AM oracle.security.jps.internal.tools.utility.JpsUtilMigrationAuditStoreImpl migrateAuditStoreData
INFO: Migration of Audit Store data completed, Time taken for migration is 00:00:50
[oracle.security.jps.internal.config.db.DbAuditStoreServiceConfigurator] migrateData - done
[oracle.security.jps.internal.config.db.DbAuditStoreServiceConfigurator] testJpsService - done
persist to output: /oracle/Middleware/user_projects/domains/IAMDomain/config/fmwconfig - done
INFO: Found persistence provider "org.eclipse.persistence.jpa.PersistenceProvider". OpenJPA will not be used.
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] checkServiceSetup - done
Sep 26, 2013 1:36:55 AM oracle.security.jps.internal.config.ldap.LdapCredStoreServiceConfigurator schemaCompatibleHandler
INFO: Credential store schema upgrade not required. Store Schema version 11.1.1.6.0 is compatible to the seed schema version 11.1.1.4.0
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] checkServiceSchema - Store schema has been seeded completely
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] updateServiceConfiguration - done
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator] seedSchemaAndCreateDIT - failed JPS-10000: There was an internal error in the policy store.
Exception in thread "main" java.lang.RuntimeException: JPS-10000: There was an internal error in the policy store.
oracle.security.jps.internal.api.common.JpsCredentialStoreLdapNodeCreationException: JPS-10000: There was an internal error in the policy store.
at oracle.security.jps.internal.common.rdbms.util.JpsDbBootstrapImpl.createJpsCredentailStoreInLdap(JpsDbBootstrapImpl.java:303)
at oracle.security.jps.internal.config.ldap.LdapCredStoreServiceConfigurator.addServiceStoreBase(LdapCredStoreServiceConfigurator.java:113)
at oracle.security.jps.internal.config.ldap.LdapCredStoreServiceConfigurator.seedSchemaAndCreateDIT(LdapCredStoreServiceConfigurator.java:142)
at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.runConfiguration(LdapServiceEnabler.java:484)
at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.configureCredentialStoreService(LdapServiceEnabler.java:232)
at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.configureSecurityServices(LdapServiceEnabler.java:170)
at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.main(LdapServiceEnabler.java:129)
Caused by: oracle.security.jps.service.policystore.PolicyStoreConnectivityException: JPS-10000: There was an internal error in the policy store.
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.handleRollbackException(JpsDBDataManager.java:1345)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.internalCommitTxn(JpsDBDataManager.java:1508)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.commitTransactionInDoAs(JpsDBDataManager.java:1475)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.commitTransaction(JpsDBDataManager.java:1466)
at oracle.security.jps.internal.common.rdbms.util.JpsDbBootstrapImpl.createJpsCredentailStoreInLdap(JpsDbBootstrapImpl.java:296)
... 6 more
Caused by: javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DEV1_OPSS.IDX_JPS_RDN_PDN) violated
Error Code: 1
Call: INSERT INTO JPS_DN (ENTRYID, PARENTDN, RDN) VALUES (?, ?, ?)
bind => [3 parameters bound]
Query: InsertObjectQuery(EntryId=11437:rdn=cn=credentialstore:pdn=cn=jpsroot,cn=jpscontext,cn=iam,: JpsStore Entry={[EntryId = 11437:Attribute RowId = 45348
dn = cn=CredentialStore,cn=IAM,cn=JPSContext,cn=jpsroot, EntryId = 11437:Attribute RowId = 45349
objectclass = top, EntryId = 11437:Attribute RowId = 45350
objectclass = orclContainer, EntryId = 11437:Attribute RowId = 45351
cn = CredentialStore]})
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager$8.run(JpsDBDataManager.java:1487)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.internalCommitTxn(JpsDBDataManager.java:1492)
... 9 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DEV1_OPSS.IDX_JPS_RDN_PDN) violated
Error Code: 1
Call: INSERT INTO JPS_DN (ENTRYID, PARENTDN, RDN) VALUES (?, ?, ?)
bind => [3 parameters bound]
Query: InsertObjectQuery(EntryId=11437:rdn=cn=credentialstore:pdn=cn=jpsroot,cn=jpscontext,cn=iam,: JpsStore Entry={[EntryId = 11437:Attribute RowId = 45348
dn = cn=CredentialStore,cn=IAM,cn=JPSContext,cn=jpsroot, EntryId = 11437:Attribute RowId = 45349
objectclass = top, EntryId = 11437:Attribute RowId = 45350
objectclass = orclContainer, EntryId = 11437:Attribute RowId = 45351
cn = CredentialStore]})
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:840)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:906)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:592)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:253)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:342)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:162)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:177)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:472)
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:287)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:743)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1449)
at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:224)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:191)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:136)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3799)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1415)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:636)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1505)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:267)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1143)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
... 12 more
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DEV1_OPSS.IDX_JPS_RDN_PDN) violated
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1044)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3593)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3674)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1354)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:831)
... 45 more
at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.throwExceptionWithStackTrace(LdapServiceEnabler.java:145)
at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.main(LdapServiceEnabler.java:137)
Error: Failed to initialize security store.
Error: Create operation has failed.
[oracle@ebs Middleware]$
Also OPSS schema is FIne as it's get validated by this query.
SQL> select * from JPS_DN where rdn like '%cn=credentialstore%';
ENTRYID
RDN
PARENTDN
3004
cn=credentialstore
cn=oracleschemaversion,cn=opss,
5004
cn=credentialstore
cn=jpsroot,cn=jpscontext,cn=iam,
ENTRYID
RDN
PARENTDN
Please suggest.
Thanks
Priya -
Dynamic Classpath Using ClassLoader
Once you use the ClassLoader to change the Thread.currentThread().getContextClassLoader() classpath, is there a way to reset it back be the ClassLoader.getSystemClassLoader() classpath?
I have a set of classes within an app that each need a separate classpath. Only the first one works correctly, the second to n classes in the set end up with an aggregate classpath that contains their specific information and the information of all classes before it.
Example:
Class foo is called first and gets the classpath: java default + foo paths
Class bar is called second and gets the classpath: java default + foo paths + bar paths
What I want to happen is for Class bar to get the classpath: java default + bar paths
Thanks in advance,
BrianI am using separate classloaders. The problem is that the second classloader somehow inherits the newly created classpath of the first classloader. i thought maybe there was a common trick to doing this or to removing stuff from the classpath that someone was willing to share.
-
what is 'classpath' in manifest file used for?
I tried to create classpath, but doesnt have any significant different....
thanks
YAnThis is what the tutorial says about class-path in a manifest file:
Download extensions are JAR files that are referenced by the manifest files of other JAR files. See the trail on the extension mechanism for information about extensions.
In a typical situation, an applet will be bundled in a JAR file whose manifest references a JAR file (or several JAR files) that will serve as an extension for the purposes of that applet. Extensions
may reference each other in the same way.
Download extensions are specified in the Class-Path header field in the manifest file of an applet, application, or another extension. A Class-Path header might look like this, for example:
Class-Path: servlet.jar infobus.jar acme/beans.jar
With this header, the classes in the files servlet.jar, infobus.jar, and acme/beans.jar will serve as extensions for purposes of the applet or application. The URLs in the Class-Path
header are given relative to the URL of the JAR file of the applet or application. For more details, see the link shown below:
http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html
V.V. -
Use of OracleDataSource in Jdeveloper ok, but fails in HotSpot Java VM
I'm using JDeveloper Studio Edition Version 11.1.2.0.0 to make an application that uses OracleDataSource for hooking up to an Oracle DB (11gR2).
JDeveloper uses the bundled WebLogic server when running apps in the developement environment. When configuring my project to use JDBC for the database connection I simply included the "Oracle JDBC" package. In my setup, being a default install, this creates classpath entries that refers to ojdbc6.jar that sits deep in the WebLogic file structure;
C:\Oracle\Middleware\jdeveloper\ide\macros\..\..\..\wlserver_10.3\server\lib\ojdbc6.jar
C:\Oracle\Middleware\jdeveloper\ide\macros\..\..\..\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n.jar
C:\Oracle\Middleware\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar
C:\Oracle\Middleware\oracle_common\modules\oracle.dms_11.1.1\dms.jar
When running my code in the JDeveloper environment it works flawlessly.
The application will only be run intermittently in the free and it was hoped that we could avoid the need for a dedicated app-server for it to run in, thus I'm trying to get the app to work with a default Java HotSpot client installation on a Windows 7 workstation. This seems to be rather problematic as it refuses to locate the OracleDataSource class even though I'm throwing all sorts of classpath variations into the mix. I've even tried running it with different versions of Java without any luck.
My code looks like this:
try {
OracleDataSource ads = new OracleDataSource();
// Create a connection to the database
String serverName = properties.getProperty("oradb.servername");
String portNumber = properties.getProperty("oradb.portnumer");
String sid = properties.getProperty("oradb.sid");
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
ads.setURL(url);
String username = properties.getProperty("oradb.uid");
String password = properties.getProperty("oradb.pwd");
dbConn = ads.getConnection(username, password);
} catch (SQLException e) {
e.printStackTrace();
// Could not connect to the database
When attempting to execute with the HotSpot VM my application consistently fails in the "OracleDataSource ads = new OracleDataSource();" line
with the error message: "Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource".
I'm using the JDeveloper's deploy functionality to generate a Client JAR or a simple JAR.
All indications are that the desired JDBC-functionaly is found in the ojdbc6.jar library, but it seems that it simply isn't enough to include a proper path to this library in the classpath when executing the application outside of the JDeveloper environment.
Anyone have a clue as to what I'm missing here??LA$$E wrote:
When specifiying a Deployment Profile in JDev one have to specify which appserver that will be used, but the default choice is <None> which translates into a deployment bundle (Jar-file) for use with your computers standard JRE.
I don't use the IDE but I can only hope that when you do that it means that it no longer has anything to do with an JEE server, including weblogic. Thus that is not relevant to your solution nor the problem.
I've tried to find a way to make JDeveloper bundle the drivers similarly. When configuring a Deployment Profile in JDev there are check-boxes that would indicate that the libs would be included in the resulting JAR-file, but it doesn't work that way in practice. Unfortunately!Seems rather unlikely that an IDE that expects to do JEE wouldn't allow the correct solution in some way. But maybe it expects the driver to be installed into the JEE server rather than bundled. There might be a way to explicitly specify a manifest file. Of course you would need to manually create it first. -
I cant import com.sapportals.htmlb.*
Hi!
I just installed netweaver and started out by making a new portal application project. After that I made a new portal application object but when I compile my java-file I get errors regarding the following imports.
import com.sapportals.htmlb.*;
import com.sapportals.htmlb.enum.*;
import com.sapportals.htmlb.event.*;
import com.sapportals.htmlb.page.*;
import com.sapportals.portal.htmlb.page.*;
import com.sapportals.portal.prt.component.*;
Error: The import com.sapportals.htmlb cannot be resolved.
I know that the error might be about me missing af reference to some jar-file which contains the packages. Am I wrong?
Regards AndersHi Anders,
Have you downloaded the PDK plugin for EP6? If so, assign yourself the Java Developer role, and download the required jar files. Login to the portal Java Development>Development>Downloads. Download and unpack the Portal Archive Wizards into your eclipse\plugins directory. Then create classpath references to the required jar files in your par file .classpath file. For example, htmlb.jar
<classpathentry kind="lib" path="C:/portal/eclipse/plugins/com.sap.developmentTools.libs_1.2.0/htmlb.jar"/>
Hope this helps,
Marty
PS.
If you dont have the pdk plugin, here is a workaround (assuming you have a portal installed). You can copy the jar files to your local directory in order to successfully compile a par project. For example the following three jar files to your eclipse\plugins directory on your local machine. Then in your classpath, create entries for the ones you require (in your case, htmlb.jar). So something like:
<classpathentry kind="lib" path="C:/portal/eclipse/plugins/com.sap.developmentTools.libs_1.2.0/htmlb.jar"/>
Under your portal, C:\usr\sap\<instance>\j2ee\j2ee_00\cluster\server\services\servlet_jsp\work\jspTemp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.htmlb\lib contains an htmlb.jar and an htmlbbridge.jar
C:\usr\sap\<instance>\j2ee\j2ee_00\cluster\server\services\servlet_jsp\work\jspTemp\irj\root\WEB-INF\portal\system\lib contains a prtcore.jar file -
ODI error when trying ro reverse engineer-- Please help
Hi all,
I am receiving the error below "ImportError: no module named java" when I am attempting reverse engineer from Essbase into the models tab in the ODI Designer.
I am using ODI version 10.1.3.5
I have all jar files related to Essbase in drivers folder. And all KMs related to Essbase in impexp folder. I have created CLASSPATH system variable with "D:\OraHome_ODI\oracledi\drivers". Should i need to add this path in PATH system variable?
What should i do to get this problem solved. Please help.
Thank you in advance for the help!!
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 1, in ?
ImportError: no module named java
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:619)
Regards,
SrinivasMOS Note 424232.1 says
Such messages are probably due to either a stale Jython cache (.../scripting/cachedir folder) and / or insufficient access privileges attributed to the Unix user account which has launched either the ODI Agent or Designer GUI and is executing a Jython script and writing to the Jython cache (default value being .../lib/scripting/cachedir/packages folder).
Alternative workarounds:
1. Stop all ODI processes and remove the cachedir folder, the restart ODI and retest the process.
2. Use a different "python.cachedir" information, on which the User has write privileges. This Java property may be set into the Jython Registry and specifies the directory used internally by Jython for cached information about Java packages in ".jar" files. If the directory is relative, it is interpreted relative to the Jython root. For complete information, refer to Jython documentation, at:
http://www.jython.org/Project/userguide.html#the-jython-registry
3. Try running Jython once as "root" in order to create the Jython cache directories or take appropriate administrative actions (for example, chmod 777....) to allow the user account to access these files.
4. Please bear in mind that Unix is case sensitive... As such, do not forget to verify lower/upper case attributes of folder names.
If the ODI process is run by an Agent and the message is displayed:
1. Please check the ODI Agent in Topology Manager to determine on which host it is running then proceed to its installation folder and ...:
2. Verify that Jython is included with the Agent installation folders:
* In oracledi\bin - jython.sh
* In oracledi\lib\scripting - jython.jar, cachedir, and lib
* In oracle\lib\scripting\lib - numerous jython .py files
3. Also give Unix user account full permissions to every file and folder in the Agent installation and the java installation.
4. Restart the Agent.
5. Test the Agent in Topology Manager (ensure that the hostname is correct). If the test is successful, retest the Package/Scenario.
Thanks,
Sutirtha -
I have installed jdk1.6 recently.it compile the .java file successfully but fail to interpret.whenever i m trying to interpret its giving below error.i had created classpath of it too.
Exception in thread "main" java.lang.UnsupportedClassVersionError: role (Unsupported major.minor version 50.0)
plz reply soonRajkamal wrote:
if u compile a java class with 1.5 version and try to run it using 1.6 this error occurs. Make sure that the path variable is set to jre 1.6(bin) when compilingNo, it's the other way around: the OP is compiling with JDK 1.6 and trying to run the class with an older version. This is probably because he had a JRE installed already, and it's that older JRE's version of java.exe that's being executed. @OP, you need to put the bin directory of the JDK at the beginning of the PATH variable to make sure it's the one that gets used. -
HELP JSTL problem when mixed with appserv-rt.jar
Hi,
I've started using JSTL tags in my JSP. All was good until i needed to call a remote EJB from a servlet, store the object to a session, and redirect to a JSP page to display the content of the remote object. We'll just to clear things, i am able to do this properly using JSP expressions <%=myVar%>. And i am able to use <c:out value="${myVar}" /> on a project which does not have appserv-rt.jar inside it's lib directory. I'm getting a java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory; when i add appserv-rt.jar in my lib. I'm using tomcat6 as my web server and glassfish as my app server. Below is the complete stack trace from tomcat:
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
at org.apache.jasper.compiler.JspUtil.getExpressionFactory(JspUtil.java:1166)
at org.apache.jasper.compiler.JspUtil.validateExpressions(JspUtil.java:628)
at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1341)
at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1117)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:834)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2313)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:481)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
at org.apache.jasper.compiler.Validator.validate(Validator.java:1837)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:195)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:409)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at gogogo.MyServlet.doPost(MyServlet.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
This has been driving me nuts for days... any help would be deeply appreciated.
thanksSo the solution is not to have appserv-rt.jar in the lib directory?
Which lib directory are you referring to?
Your WEB-INF/lib or Tomcat's lib?
I presume you are including appserv-rt.jar for the remote EJB stuff?
After a quick google I found [this page|http://www.java2s.com/Code/Jar/glassfish/Downloadappservrtjar.htm] listing all the classes included in this jar.
There are a bunch of Tomcat classes in there - including org.apache.jasper.compiler.
That would be plenty enough to create classpath clashes between your app and Tomcat's classes.
After some googling I found this link
[http://nicl.net/2008/06/tomcat-glassfish-and-ejb-what-a-mess/]
Maybe it will help you sort out your problem? But definitely this appserv-rt.jar seems overkill for the job of just providing EJB support. -
helo every body
i have installed tomcat 6.0 on windows 2003
i have oracle9i at backend on sun soalris
created classpath,catalina_home env variables on win 2003
copied class111.jar,classnsl.jar,class12.jar to catalina_home\lib
unable to connect to database yet
please help
bhupendra jBhupendra.Jangpangi wrote:
helo every body
i have installed tomcat 6.0 on windows 2003
i have oracle9i at backend on sun soalris
created classpath,wrong.
catalina_home env variables on win 2003fine.
copied class111.jar,classnsl.jar,class12.jar to catalina_home\libNope, wrong. You should be using the newer JDBC driver from Oracle, and you only need one. Why put 111 and 12 versions there? That's the right place to put them, though.
unable to connect to database yet No code. Can't tell.
please helpRead the Tomcat JNDI docs.
% -
Redhat v7.3
Installed J2SKD1.4.0_01 from RPM's
I can compile the 'basic' programs that do not use the 'import' variables.
Upon attempting to compile anything (Swing/AWT) etc. from anything other than from my local dir I get an error.
src.java:lin_no:error:Cannot find class "ClassName" [JLS 8]
This occurred for any of the SWING components and the String class (Attempting JTabbedPane)
$PATH includes
/usr/java/j2sdk1.4.0_01/bin and the jre, added the lib's to the /j2sdk*/lib to the path just as a check.
Created CLASSPATH
to point to all the *.jar directiories under j2sdk1.4.0_01
Don't know what else to do.
Help would be most appreciated!src.java:lin_no:error:Cannot find class "ClassName" [JLS 8]
>
This definitely looks like Classpath problem.
Created CLASSPATH
to point to all the *.jar directiories under
j2sdk1.4.0_01
How did you add the Classpath variable? Did you edit the /etc/profile file?
You need to add just the basic jar file, which would be tools.jar for Swing and other classes. And you require to add each Jar seperately.
My Classpath section of the /etc/profile looks like this:
CLASSPATH='/usr/java/j2sdk1.4.0/lib/tools.jar':'/usr/java/j2sdkee1.3.1/lib/j2ee.
jar':'/usr/java/j2sdkee1.3.1/lib/j2eetools.jar':'/usr/java/j2sdkee1.3.1/lib/ejb1
0deployment.jar':'/usr/java/j2sdkee1.3.1/lib/system/mm.mysql-2.0.4-bin.jar'
AND DONOT forget to EXPORT the CLASSPATH variable!
You can check the value of the $CLASSPATH environment variable by typing
echo $CLASSPATH.
If you still can't get the projects to compile, please list the output of the echo command above. -
Create another JVM into JWS and using classpath
Hello,
I use Java Web Start to deploy my application, it works. Then into JWS I need to create another JVM using ProcessBuilder with the command java -cp jarNeeded.jar. But I can't use the current jar (in the cache) to set the classpath. How to retrieve this reference to the jar for the classpath of the other JVM?Start by ripping your CDs to iTunes in your desired lossless format.
Download "Convert and Export" from Doug's Applescripts: http://dougscripts.com/itunes/scripts/ss.php?sp=convertandexport
Create a new folder on your desktop for your converted files.
Select the files you want converted and run "Convert and Export".
Create an alternate iTunes library: http://support.apple.com/kb/HT1589
Be sure to give it a unique name.
Use the iTunes File menu -> Add to Library and select the folder of converted files.
After the import is complete, you can delete the folder of converted files from your desktop.
You can switch between your libraries by holding the option key when starting iTunes. -
How to create and write in a file
Hello Gurus,
I am creating a file based on the date and time and writing into that. But, I am still getting exception error and all. Kindly, please let me know.
thanks for all the help...j
Error:-
C:\Usage\JavaFiles>java filename "abc"
Exception in thread "main" java.io.FileNotFoundException:Detail09-2003-
03:28:04.doc (The system cannot find the file specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at TowerDetail.main(TowerDetail.java:30)
Code sample:-
import java.io.*;
import java.util.*;
import java.lang.*;
import java.sql.*;
import java.text.*;
public class TowerDetail{
public static void main (String[] args) throws IOException{
String userName = "user";
String passwd = "pwd";
String con_db = "jdbc:odbc:datasource";
String ssn = args[0];
Vector results = new Vector();
Connection con = null;
CallableStatement cstmt = null;
java.util.TimeZone tz = java.util.TimeZone.getTimeZone("EST");
java.util.Date now = new java.util.Date();
DateFormat df = new SimpleDateFormat("MM-dd-yyyy-hh:mm:ss");
df.setTimeZone(tz);
String result = df.format(now);
String fileName = "Detail"+result+".doc";
File inputFile = new File(fileName);
FileOutputStream fos = new FileOutputStream(inputFile);
PrintWriter pw = new PrintWriter(fos);
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch (Exception e) {
System.out.println("JDBC Error: "+e.getMessage());
return;
try{
con = DriverManager.getConnection(con_db, userName, passwd);
cstmt = con.prepareCall("{call dbo.sp_usage_detail(?)}");
cstmt.setString(1, ssn.trim());
ResultSet rs = cstmt.executeQuery();
pw.println("Report "+result);
pw.println("------------------------------------------------------------------------------------
while(rs.next()){
.... write in the file...
pw.println("------------------------------------------------------------------------------------
pw.close();
System.out.println("Your file Detail"+result+".doc is ready!!!");
cstmt.close();
con.close();
}catch(SQLException ex){
System.out.println("SQLException: ");
System.out.println(ex.getMessage());
}catch(NullPointerException e){
System.out.println("Null Pointer Exception: ");
System.out.println(e.getMessage());Now, I got out of the command prompt and reentered. I didn't set any classpath or anything. I have created a subdir \archive in the C:\ and writing an output file [DetailTower.....doc")into that.
The DetailTower.class is in C:\Detail\ProjectClass dirctory.
Now at,
C:\Detail\ProjectClass\java -classpath . DetailTower "abc"
I am getting this error:-
C:\Detail\ProjectClass>java -classpath . DetailTower "999999"
Exception in thread "main" java.io.FileNotFoundException: c:\archive\DetailTower09-10-2003-06:23:40.doc (The system cannot find the file specified)at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at Detail.main(DetailTower.java:32)
-
AS3: How to create one base class for classes loaded in multiple swfs?
Our application have 3 different modules and all use
fscommand and ExternalInterface alot. Now the problem is we are
combining all those modules, but they all will reside in different
swfs. Is there any way that they extend to same base class and its
static members have only one instance accessible by all
three?Hi,
You can achieve this via Workshop 9.2 by using the exported Ant script for your project as follows:
-Ensure that all Jars needed to resolve com.bea.p13n.property.EntityPropertyManager (this particular class is found in weblogic92/common/p13n/lib/p13n_ejb.jar) and all referenced classes are added to the Java build path for your WebLogic EJB project (Properties->Java Build Path->Libraries)
-Export the "Workshop Ant Script" for your WebLogic EJB project (File->Export->Workshop Ant Script); this will generate a "build.xml" Ant script under your project root directory.
-Edit this default build script as follows: in the call to the "ejbgen" task within the "build" target, add the attribute: propertyFile="ejbgen.properties"
-Create a file "ejbgen.properties" under the root of your WebLogic EJB project and add the following entry:
YourSessionBeanClassName.remote.baseClass=com.bea.p13n.property.EntityPropertyManager
-Add a "<path refid="java.classpath"/>" within the "<classpath>" for the "java" task element that calls "weblogic.ejbc" (this will ensure that the p13n classes are resolved by EJBC)
Follow the instructions for executing the Ant build script found here: http://edocs.bea.com/workshop/docs92/ws_platform/ideuserguide/conUseCustomAntBuild.html
For more information on the EJBGen property file support, see: http://e-docs.bea.com/wls/docs92/ejb/EJBGen_reference.html
Maybe you are looking for
-
Can't open project after saving.
I'm using CS4 on Mac. When I try to open a saved project, I get this message: The project contained a sequence that could not be opened. No sequence preview preset file or codec could be associated with this sequence type. When I created the projec
-
I have no idea what to do. Macs should be easy. I have never had any problems using iPods or iPhones on a pc without a super setup. I am using my dads old MacBook pro 2.33 ghz and I would like to use this for my new iPhone 5. I used a Sony vaio lapto
-
Urgent Help: Does anybody know when exactly the new IOS 7 will be released!
-
4.1 on Windows 7 RC 64bit
Premiere Pro 4.0.1 has been working perfectly on my test Windows 7 RC 64bit system on a Dell 690 workstation. I installed the 4.1 via the help update (410MBs). Guess what? The AVCHD and HDV along with the Sony XDCAM options were not available - th
-
Federation and contact details
Hi, When I federate between jabber for windows/cups and gmail or another jabber/cups organization no contact details are passed through. Is there an option to pass at least the full name and phone numbers? Regards, Erik Sent from Cisco Technical Supp