Classpath Problem (Using JSAPI)
Hi,
I using IBM Via Voice as a the implementation of the JSAPI on my system. I've downloaded the speech for java pack from IBM Alphaworks and put it in the directory of
c:\ibmjs
This gives you access to the speech packages for utilisation in your programs so I should be able to import javax.speech in my programs. However the system doesn't see these classes.
Heres my Autoexec...
path=%path%;c:\jdk1.3.1_01\bin;c:\ibmjs\lib;
CLASSPATH=%CLASSPATH%;c:\ibmjs\lib\ibmjs.jar;
I presume the whole thing is just a classpath problem, does anybody have any idea from the above paths where I am going wrong?
i guess you have to put some of ibm's dll files coming with speech for java in the path (not classpath). it's not sufficient to have the directories in the path.
anyway, there come's an installation manual with speech for java which explaines all that.
Similar Messages
-
Problem using integrated WLS in jDeveloper 11.1.2.1.0
Hey there,
I got a problem using the integrated WLS from the jDeveloper 11.1.2.1.0.
After trying to deploy an ADF Web Application on the integrated WLS, I get the following log message:
LOG
+[Waiting for the domain to finish building...]+
+[11:26:04 AM] Creating Integrated Weblogic domain...+
+[11:28:13 AM] Extending Integrated Weblogic domain...+
+[11:30:06 AM] Integrated Weblogic domain processing completed successfully.+
*** Using HTTP port 7101 ***
*** Using SSL port 7102 ***
+/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/bin/startWebLogic.sh+
+[waiting for the server to complete its initialization...]+
+.+
+.+
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
+.+
WLS Start Mode=Development
+.+
CLASSPATH=/home/robin/bin/wls/oracle_common/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar:/home/robin/bin/wls/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/robin/bin/wls/patch_oepe100/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/robin/bin/wls/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/robin/bin/wls/jdk160_29/lib/tools.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/weblogic_sp.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/weblogic.jar:/home/robin/bin/wls/modules/features/weblogic.server.modules_12.1.1.0.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/webservices.jar:/home/robin/bin/wls/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/robin/bin/wls/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/home/robin/bin/wls/oracle_common/modules/oracle.jrf_11.1.1/jrf.jar:/home/robin/bin/wls/wlserver_12.1/common/derby/lib/derbyclient.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/xqrl.jar
+.+
PATH=/home/robin/bin/wls/wlserver_12.1/server/bin:/home/robin/bin/wls/modules/org.apache.ant_1.7.1/bin:/home/robin/bin/wls/jdk160_29/jre/bin:/home/robin/bin/wls/jdk160_29/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.3:/usr/games/bin
+.+
+* To start WebLogic Server, use a username and *+
+* password assigned to an admin-level user. For *+
+* server administration, use the WebLogic Server *+
+* console at http://hostname:port/console *+
starting weblogic with Java version:
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode)
Starting WLS with line:
+/home/robin/bin/wls/jdk160_29/bin/java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=/home/robin/bin/wls/wlserver_12.1/server/lib/weblogic.policy -Djavax.net.ssl.trustStore=/tmp/trustStore7618453572230021232.jks -Dhttp.proxyHost=emea-proxy.uk.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|localhost.localdomain|127.0.0.1|::1|MUELLER-BADY-GENTOO|MUELLER-BADY-GENTOO -Dhttps.proxyHost=emea-proxy.uk.oracle.com -Dhttps.proxyPort=80 -Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -Djava.endorsed.dirs=/home/robin/bin/wls/jdk160_29/jre/lib/endorsed:/home/robin/bin/wls/wlserver_12.1/endorsed -da -Dplatform.home=/home/robin/bin/wls/wlserver_12.1 -Dwls.home=/home/robin/bin/wls/wlserver_12.1/server -Dweblogic.home=/home/robin/bin/wls/wlserver_12.1/server -Djps.app.credential.overwrite.allowed=true -Dcommon.components.home=/home/robin/bin/wls/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain -Djrockit.optfile=/home/robin/bin/wls/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.server.config.dir=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/servers/DefaultServer -Doracle.domain.config.dir=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig -Digf.arisidbeans.carmlloc=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/carml -Digf.arisidstack.home=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/servers/DefaultServer/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/home/robin/bin/wls/oracle_common/modules/oracle.ossoiap_11.1.1,/home/robin/bin/wls/oracle_common/modules/oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/oracle/store/gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/home/robin/bin/wls/patch_wls1211/profiles/default/sysext_manifest_classpath:/home/robin/bin/wls/patch_oepe100/profiles/default/sysext_manifest_classpath:/home/robin/bin/wls/patch_ocp371/profiles/default/sysext_manifest_classpath weblogic.Server+
+<Feb 10, 2012 11:30:09 AM CET> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>+
+<Feb 10, 2012 11:30:10 AM CET> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>+
+<Feb 10, 2012 11:30:11 AM CET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 20.4-b02 from Sun Microsystems Inc..>+
+<Feb 10, 2012 11:30:12 AM CET> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491 >+
+<Feb 10, 2012 11:30:15 AM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>+
+<Feb 10, 2012 11:30:15 AM CET> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>+
+<Feb 10, 2012 11:30:15 AM CET> <Notice> <Log Management> <BEA-170019> <The server log file /home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log is opened. All server side log events will be written to this file.>+
Feb 10, 2012 11:30:24 AM oracle.security.jps.internal.keystore.file.FileKeyStoreManager saveKeyStore
WARNING: Failed to save farm keystore. Reason {0}
Feb 10, 2012 11:30:24 AM oracle.security.jps.internal.keystore.file.FileKeyStoreManager createKeyStore
WARNING: Failed to save farm keystore. Reason {0}
oracle.security.jps.service.keystore.KeyStoreServiceException: JPS-06513: Failed to save farm keystore. Reason
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.createKeyStore(FileKeyStoreManager.java:309)+
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.doInit(FileKeyStoreServiceImpl.java:95)+
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:73)+
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:63)+
+ at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:157)+
+ at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:64)+
+ at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.findServiceInstance(ContextFactoryImpl.java:139)+
+ at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:170)+
+ at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:191)+
+ at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:132)+
+ at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:127)+
+ at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:850)+
+ at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:844)+
+ at java.security.AccessController.doPrivileged(Native Method)+
+ at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:844)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
+ at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
+ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
+ at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)+
+ at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)+
+ at java.lang.reflect.Constructor.newInstance(Constructor.java:513)+
+ at java.lang.Class.newInstance0(Class.java:355)+
+ at java.lang.Class.newInstance(Class.java:308)+
+ at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1343)+
+ at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1022)+
+ at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)+
+ at weblogic.security.SecurityService.start(SecurityService.java:148)+
+ at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)+
+ at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)+
+ at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)+
+<Feb 10, 2012 11:30:24 AM CET> <Error> <Security> <BEA-090892> <The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider>+
+<Feb 10, 2012 11:30:24 AM CET> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
+weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
+ at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1402)+
+ at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1022)+
+ at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)+
+ at weblogic.security.SecurityService.start(SecurityService.java:148)+
+ at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)+
+ Truncated. see log file for complete stacktrace+
+Caused By: oracle.security.jps.JpsRuntimeException: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:293)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
+ at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
+ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
+ at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)+
+ Truncated. see log file for complete stacktrace+
+Caused By: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
+ at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:899)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
+ at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
+ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
+ Truncated. see log file for complete stacktrace+
+Caused By: java.security.PrivilegedActionException: oracle.security.jps.JpsException: [PolicyUtil] Unable to obtain default JPS Context!+
+ at java.security.AccessController.doPrivileged(Native Method)+
+ at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:844)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
+ at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
+ Truncated. see log file for complete stacktrace+
+Caused By: oracle.security.jps.JpsException: [PolicyUtil] Unable to obtain default JPS Context!+
+ at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:860)+
+ at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:844)+
+ at java.security.AccessController.doPrivileged(Native Method)+
+ at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:844)+
+ at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
+ Truncated. see log file for complete stacktrace+
Caused By: oracle.security.jps.service.keystore.KeyStoreServiceException: JPS-06513: Failed to save farm keystore. Reason
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.createKeyStore(FileKeyStoreManager.java:309)+
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.doInit(FileKeyStoreServiceImpl.java:95)+
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:73)+
+ at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:63)+
+ at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:157)+
+ Truncated. see log file for complete stacktrace+
+>+
+<Feb 10, 2012 11:30:24 AM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED.>+
+<Feb 10, 2012 11:30:24 AM CET> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down.>+
+<Feb 10, 2012 11:30:24 AM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.>+
Process exited.
*/LOG*
After that, I tried setting permissions for the cwallet.sso file to ugo+rwx, but this leads to the same problems as mentioned above.
My second try was to setup an external WLS 12c, but it seems to be not yet possible to connect to a WLS 12c from within jDeveloper.
Do you have any ideas ?
Thank you in advance for your help.
Regards,
RobinAfter debugging the WLS Initialisation with jdb, I recognized that there was some trouble with dependent libraries.
In the end, I solved my problem by using another OS (Ubuntu 11.10) for development. There, the WLS works out of the box, even with 64-Bit libraries.
Thank you for your help.
Regards,
Robin -
Problem using Toplink with JUnit
Hi,
I have a problem using Toplink with JUnit. Method under test is very simple: it use a static EntityManager object to open a transaction and persists data to db. When I invoke the method from a test method, it gives me the exception:
java.lang.AssertionError
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.computePURootURL(PersistenceUnitProcessor.java:248)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:232)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:216)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:239)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:278)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:81)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:119)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at it.valerio.electromanager.model.EntityFacade.<clinit>(EntityFacade.java:12)
at it.valerio.electromanager.business.ClienteBiz.insertIntoDatabase(ClienteBiz.java:36)
at it.valerio.electromanager.test.model.ClienteTest.insertDBTest(ClienteTest.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Where is the problem???
Regards,
ValerioEntityFacade class is very simple and it uses a static EntityManager object. Here the code:
public class EntityFacade {
private static EntityManager em = Persistence.createEntityManagerFactory("ElectroManager").createEntityManager();
private static Logger logger=Logger.getLogger(EntityFacade.class);
public static void insertCliente(Cliente c)
logger.debug("Inserisco cliente nel db: " + c);
em.getTransaction().begin();
c.setId(getNextIdForTable("Cliente"));
em.persist(c);
em.getTransaction().commit();
If I call the method from inside a main it works well, so I think the problem is not the classpath neither the URL in the persistence.xml. However the URL is:
<property name="toplink.jdbc.url" value="jdbc:derby:c:/programmi/ElectroManager/db/electroManager"/>
I use the latest build version of TopLink.
Thanks. -
i am here stuck..
my dir structure is
c:\my\xxx\yyy\zzz
i have a code ...
package xxx.yyy.zzz;
class A
// some code
}i have compiled sucessfully and put the clsss file into c:\my\xxx\yyy\zzz folder.
now i want to import it in another class
like...
package xxx.yyy; // note this
import xxx.yyy.zzz.*; // note this
class B
// some code
// creating instance of class A here
}question is how do i compile and run it ?
i am at c:\my---> what should be the command to compile and run the above code?
plz give me the explicit command so that i can test and verify . i have given the dir structure.
i have tried several ways but got class not found exception and errors . i know its a classpath problem but i could not figure out what should i type at the c:\my prompt.
can u give exact command to run and compile the above code in steps ?
thanxquestion is how do i compile and run it ?You don't with that code. You've defined class A to have "package visibility," meaning it can't be used from outside its package. You should declare it with public visibility instead, like "public class A {...".
Once you change that, use these commands to compile and run:c:\my\>javac xxx/yyy/zzz/A.java
c:\my\>javac xxx/yyy/B.java
c:\my\>java xxx.yyy.B -
Fragment Bundle Classpath problems
Does anyone have any tips for solving classpath problems in fragment bundles? I'm getting a no-class-def that I can't explain.
I've used maven to create a fragment, hosted by com.day.crx.sling.server, to create a custom login. It needs to call a web service, so I've included httpclient-4.2.3.jar. I can see this jar listed on the deployed fragment's Bundle-ClassPath, via the osgi>bundle console. When I inspect the bundle that maven created, I can find this jar contained in the bundle jar, in the directory specified in the Bundle-ClassPath. I even oppened the httpclient jar to ensure that the offending class (org/apache/http/client/HttpClient) is there.
This is the first fragment that I've tried to build. Is there something I don't know about how they load classes?
Does anyone have any tips or tricks on solving osgi classpath problems? I read that felix has some tools, but I haven't found any documentation about them.I'm still not sure why the classes didn't load, but I have a solution to my problem - don't try to include the jars in the fragment bundle. I tracked down osgi-ready versions of the libraries that I needed and and installed them.
-
Another simple classpath problem question
Hi All
Yes I know, there are a lots of questions about this matter, but I couldn't found a solution to my problem.
I have a simple program:
public class prueba {
public static void main(String[] args) {
System.out.println("Ahi va...");
}placed in /tmp/javier/prueba.java
After compiled, I've tried to run it from / and then problems started:
cd /
java /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
I said, ok...it could be a classpath problem...then:
java -cp /tmp/javier/ /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba
Damn, another try...
java -cp .:/tmp/javier/ /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
Jesus Christ....may be the last slash....
java -cp .:/tmp/javier /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
Oh...no.... may be classpath to java classes..
java -cp .:/usr/java/j2sdk1.4.2_01/lib/jre/:/tmp/javier/ /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
Well, I don't know why this error happens....
Please, could somebody help me !!!
Thanks in advance...
<jl>It's not too early to start following the Sun coding
conventions for Java:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.
tmlHi
thanks for your reply.
Yes, I agree. I use conventions with my programs. But my real problem was with a real application and then I did quickly this simple code to help others to understand the problem and give a fast reply...
Let me know if that works. (It was fine on my
machine.) - MODYes it works fine, thanks.... and Damn...Murphys law again, the only option I didn't tried is the solution to my problem... :)
Thanks again... -
Hi there,
I have a problem using clientgen to generate the client jar stuff for a web services
client. In ant I put webservices.jar and weblogic.jar in my classpath (in the
taskdef for clientgen) but the task can't find jax-rpc classes like javax.xml.rpc.ServiceException
(which is in webservices.jar) and weblogic.webservice.context.ContextNotFoundException
(which is in webservices.jar).
This seems to suggest something strange about the clientgen task ????????
Any help greatly appreciated - Tom.
taskdef:
<taskdef
name="clientgen"
classname="weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask"
classpathref="clientgen.class.path"/>
classpath:
<path id="clientgen.class.path">
<fileset dir="${weblogic.lib.home}">
<include name="webservices.jar"/>
<include name="weblogic.jar"/>
</fileset>
</path>
clientgen task
<target name="webservices-client-components">
<clientgen
wsdl="http://localhost:7001/olps/wstesterService?WSDL"
packageName="au.com.wanews.olps.webserviceclients.wstester"
clientJar="${build.webservices-clients.home}/wsTesterClient"/>
</target>
ant trace:
webservices-client-components:
[clientgen] Generating client jar for http://localhost:7001/olps/wstesterService
?WSDL ...
[clientgen] D:\development\wanews\build\web-services-clients\wsTesterClient\au\c
om\wanews\olps\webserviceclients\wstester\WstesterServiceName.java:9: package
ja
vax.xml.rpc does not exist
[clientgen] public interface WstesterServiceName extends javax.xml.rpc.Service{
[clientgen] ^
[clientgen] D:\development\wanews\build\web-services-clients\wsTesterClient\au\c
om\wanews\olps\webserviceclients\wstester\WstesterServiceName.java:11: package
w
eblogic.webservice.context does not exist
[clientgen] weblogic.webservice.context.WebServiceContext context();This is basically the same problem that I encounted and posted a couple of weeks
ago in the question "servicegen classloader issues" (see item http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=4418&utag=
The only answer seems to be that you need to have the weblogic jars on the classpath
before running the build. Setting and referencing the classpath inside the build
file just isn't enough ;( It seems like clientgen (and the other tasks) do something
wacky with the classpath ...
"thomas Haenel" <[email protected]> wrote:
>
Hi there,
I have a problem using clientgen to generate the client jar stuff for
a web services
client. In ant I put webservices.jar and weblogic.jar in my classpath
(in the
taskdef for clientgen) but the task can't find jax-rpc classes like javax.xml.rpc.ServiceException
(which is in webservices.jar) and weblogic.webservice.context.ContextNotFoundException
(which is in webservices.jar).
This seems to suggest something strange about the clientgen task ????????
Any help greatly appreciated - Tom.
taskdef:
<taskdef
name="clientgen"
classname="weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask"
classpathref="clientgen.class.path"/>
classpath:
<path id="clientgen.class.path">
<fileset dir="${weblogic.lib.home}">
<include name="webservices.jar"/>
<include name="weblogic.jar"/>
</fileset>
</path>
clientgen task
<target name="webservices-client-components">
<clientgen
wsdl="http://localhost:7001/olps/wstesterService?WSDL"
packageName="au.com.wanews.olps.webserviceclients.wstester"
clientJar="${build.webservices-clients.home}/wsTesterClient"/>
</target>
ant trace:
webservices-client-components:
[clientgen] Generating client jar for http://localhost:7001/olps/wstesterService
?WSDL ...
[clientgen] D:\development\wanews\build\web-services-clients\wsTesterClient\au\c
om\wanews\olps\webserviceclients\wstester\WstesterServiceName.java:9:
package
ja
vax.xml.rpc does not exist
[clientgen] public interface WstesterServiceName extends javax.xml.rpc.Service{
[clientgen]
^
[clientgen] D:\development\wanews\build\web-services-clients\wsTesterClient\au\c
om\wanews\olps\webserviceclients\wstester\WstesterServiceName.java:11:
package
w
eblogic.webservice.context does not exist
[clientgen] weblogic.webservice.context.WebServiceContext context(); -
Classpath problems in EAR packaging?
I try to access an EJB from a JSP. The JSP resides in web.war and the bean is in ejb.jar, and both of these are packaged together in an ear.
I get a compile error when I try opening a JSP. I've had this problem in all my attempts to use my bean classes from JSP.
My browser reports that the compiler cannot find the beans package. I have servlets within the war-file that are able to find the beans package, but the JSPs aren't.
My ear-file contains 3 files
ejb.jar
web.war
META-INF\MANIFEST.MF
The manifest classpath points to ejb.jar and web.war
My guess is that this has something to do with the way this is deployed by GlassFish.
The application is deployed in the
domains\mydomain\applications\j2ee-apps\myear\
This directory contains the expanded files:
ejb_jar\
web_war\
META-INF
So the Java classes under web_war\ are able to see the Java classes under ejb_jar\ (i.e. my servlets)
However; when GlassFish creates Java files from the JSPs and then tries to compile them, these files are placed under
domains\mydomain\generated\jsp\j2ee-apps\myear\web_war\org\apache\jsp\jsp
This might be correct for all I know, but apparently the compiler is unable to find the Java classes located under the mydomain\applications\.. directory when compiling classes located under the mydomain\generated\.. directory. There are no other files from my ear anywhere in the "generated" directory.
So to me this seems to be some kind of classpath problem, as the compiler cannot find the needed files.
Does this make any sense to anyone?
PS
In my ear, the JSPs are placed in the web.war. The war file looks like this:
jsp\
myjsp.jsp
META-INF
MANIFEST.MF
WEB-INF
web.xml
lib\
mylib.jarThanks
\\MariusMarius,
If you want communicate the bean you have to do following things.
. Create a factory for the correct protocol
. Obtain a Home
. Use the Home to create stubs to the remote object
So you want to call the Home and Remote interfaces to access the bean. When you run the client program, it will create the remote object that time it has to search the Home and Remote interfaces. So you have included those files for references in following location
WEB-INF/classes
-- <Home Interface File Name>.class
-- <Remote Interface File Name>.class
Or
WEB-INF/lib
-- <Bean Jar file name>.jar
I think you will understand.
-Mani -
JDBC and Classpath problems on OpenVMS
Hello,
I'm working on an OpenVMS server and I got a simpler Java application that needs to establish a connection to an Oracle database, the application works perfectly well on Windows but when I moved to OpenVMS I got some problems with the oracle driver.
I believe I�m using the correct driver, I already checked on the oracle site according to my java version (1.4.2) and my database version (oracle 9i 9.2.0.7.0)
This is the error:
$java -jar miss.jar "DnBProcess"
About to start loading parameters for the MISS Proxy.
Successfully load parameters for the MISS Proxy.
About to load interface settings for DnBProcess
Settings for DnBProcess succesffully loaded.
About to load interface DnBProcess
About to start loading parameters for DnB Interface.
Successfully load parameters for DnB Interface.
Interface DnBProcess succesffully loaded.
About to execute interface DnBProcess
Connecting to the database...
java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
at miss.DnBProcess.ExecuteQueryToFile(DnBProcess.java:85)
at miss.DnBProcess.Execute(DnBProcess.java:178)
at miss.Proxy.ExecuteInterface(Proxy.java:160)
at miss.Proxy.main(Proxy.java:207)
I know is a classpath problem, and my classpath on VMS looks like this:
define JAVA$CLASSPATH .,SYS$COMMON:[JAVA$142.LIB]TOOLS.JAR,SYS$COMMON:[JAVA$142.LIB]DT.JAR,SYS$COMMON:[JAVA$142.JRE.LIB]RT.JAR, USER1:[MONTEALEGRE.TEST.LIBS]OJDBC14.JAR,USER1:[MONTEALEGRE.TEST.MISS.LIBS]OJDBC14.JAR,[]
As you can see I added the �ojdbc14.jar� in different folders but my application seems not to find it.
Does anyone know how to set the classpath properly on VMS? Or maybe give me some tips that could lead me to find a solution to this problem.
Thanks.
Ileana.I would try googling for OpenVMS classpath. Unfortunatley the first result is this thread but there are a bunch of resources from IBM and HP listed and maybe they can help you.
-
Hey guys
Using CS3, when trying to reference a class A from within a class Root, which is in a folder specified in the classpath, the Root class does not compile properly.
I have attached the simplest form of this problem, using only a couple of lines of code. Any help is appreciated, but it truly seems to be a bug from Adobe. If anyone can test it using a more recent CS it would be great.
Here is the summary of what's in the ZIP archive:
- a Problem.FLA file, with the directory "code" specified in the classpath, and a document class specified as: Root
- a directory named "code"
- a file named Root.as, inside directory "code". This class traces a message in the constructor, and the just references a class called AClass
- a file named AClass.as, inside directory "code". This is an empty class
The Problem.FLA file only compiles to about 50 bytes worth of SWF, and does not trace the message in the constructor, nor does it throw any error. All this does not happen if the Root class stops referencing the AClass class.
NOTE: at first, as well as from time to time, Problem.FLA may report that it does not find the class Root; this is another bug from Adobe, to make the FLA see the Root class, use "Save As" for the Problem.FLA file, and resave it under the same name, then it will find the Root class.
Thanks,
Liviuyou have several problems. check your attached fixed files.
-
I am having a problem using ImageIcon. I can see the images in
the AppletViewer, but not in an actual Applet. I get a NullPointer
Exception. It seems to be a problem with the Class or ClassPath finding the image.
Here is a break down of my files and the packages they are in:
mygui/gui/project -> contains the java project file
mygui/gui -> contains the gui.jar (created)
mygui/gui/guiFramework -> contains MyApplet.java (extends JApplet) and
MyWindow.java (extends JFrame)
mygui/gui/images -> contains image mypicture.gif
MyWindow references the images found in mygui/gui/images
Here is the code from MyWindow:
package guiFramework;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class MyWindow extends JFrame {
private static Container content;
private ImageIcon myIcon = new
ImageIcon(ClassLoader.getSystemResource("images/mypicture.gif"));
private Image myImage = myIcon.getImage();
public MyWindow()
super("My Sample");
super.setIconImage(myImage);
super.setDefaultCloseOperation(/*DISPOSE_ON_CLOSE*/3);
JButton iconButton = new JButton();
ImageIcon buttonIcon = new
ImageIcon(ClassLoader.getSystemResource("images/mypicture.gif"));
//Set the container as "this"
content = getContentPane();
iconButton.setIcon(buttonIcon);
content.add(iconButton, BorderLayout.CENTER);
setSize(1024, 768);
setVisible(true);
Here is the code from MyApplet:
package guiFramework;
import javax.swing.*;
import java.awt.*;
public class MyApplet extends JApplet
public MyApplet()
try
UIManager.setLookAndFeel(new com.sun.java.swing.plaf.windows.
WindowsLookAndFeel());
catch (Exception e)
MyWindow myWindow = new MyWindow();
public void init()
getRootPane().putClientProperty("defeatSystemEventQueueCheck",
Boolean.TRUE);
Any help would be greatly appreciated. The code above is from a
sample I have put together to try to figure out what the problem is.
It is not my actual program (which is very big). It does reproduce the
problem though.
- MMyWindow.getClass().getResource(..); is not a function of JFrame.
If I try MyWindow.class.getResource("images/mypicture.gif"); I can no longer see the image even in the AppletViewer.
java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:134)
at guiFramework.MyWindow.<init>(MyWindow.java:10)
at guiFramework.MyApplet.<init>(MyApplet.java:19)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:579)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:515)
at sun.applet.AppletPanel.run(AppletPanel.java:293)
at java.lang.Thread.run(Thread.java:484)
I am using a JAR file to hold all the information, but my images are in a subdirectory. I think I am still not looking in the correct place for the images? -
I'm trying to find out the status of the servicegen classloading problem
(specifying a classpath in a servicegen task causes class cast exceptions).
We are currently using the workaround described in this group which is
putting the weblogic jars in the system classpath. This workaround is very
unwieldy in our build environment. Is there any estimate on when the
problem will be fixed?And was it? I am using 7.0sp4 and am getting classpath problems in servicegen.
The problem I am having is that the type generation fails to find any of the weblogic
utility classes, sug as weblogic.xml.schema.binding.util.runtime.PropertyInfo
(and many many others)
"Neal Yin" <[email protected]> wrote:
This will be fixed in 7.0sp3 and 8.1sp1.
Thanks,
-Neal
"John Horner" <[email protected]> wrote in message
news:[email protected]..
I'm trying to find out the status of the servicegen classloading problem
(specifying a classpath in a servicegen task causes class castexceptions).
We are currently using the workaround described in this group whichis
putting the weblogic jars in the system classpath. This workaroundis
very
unwieldy in our build environment. Is there any estimate on when the
problem will be fixed? -
Problem using File sharing in a small office network
I have a problem using File sharing on an Imac and Macbook Pro.
My office has a small network running Windows Small office file server 2003. I have one Windows 2000 PC connected to it and 3 Macs, an 2.4 gHz Intel iMac running Leopard 10.5.6 , a MBP running the same and a Mac Mini running 10.5.
From the Finder Shared window of the Mac Mini, I can see all the computers on the network. It also used to be the case for the iMac, but the MBP could never see the Windows PC’s, not the server or the Win2000. This wasn’t a big problem as I was communicating between the Macs and using the shared printer on the iMac.
On Monday Jan 19 the iMac was suddenly unavailable to the other 2 Macs. It was working normally on the Friday. The iMac can access the Mac Mini and copy files to it. The Mac Mini can see the iMac but cannot access it. Even trying to connect as, ends in a failed connection. I have tried rebooting, turning File sharing off and then on again to no avail.
The iMac now also cannot see the Windows PC’s which it previously could.
To get files from the MBP for printing, I now copy it to the Mac Mini and acces the folder from the iMac, a very tedious procedure. I don’t know why this happened and am scared that the Mac Mini is going to do the same thing.
All three computers are also running VMware 2.0 with Windows XP pro, and from VMware the server is visible on all the computers.
Any help will be much appreciated, I live in a small town in South Africa and the local computer suppliers have no knowledge of the Macs.
I think that the problem with the iMac may have started after a software upgrade to 10.5.6 but I am not entirely sure.
Thank you
ajdkWell, you're current method sounds pretty good. But if you want to user a file server, hey go ahead.
What you want to do when you centralize project files is to keep track of which one is the newest and becareful not to overwrite files with the same name. So you either have to set up individual spaces on the server (separate AFP/FTP folders maybe), or you'll need to run a file checkout service.
The individual space is cheaper, but it's not much of a difference from backing up to the network drive. Since you have Gigabit connections, you might even opt to save ALL the user files on the server instead of just the project files.
If you want to run a file checkout service, there's two approaches. You can run a service that can host any kind of file, or you can run a version control system for each kind of application (Photoshop, Word, etc.). Please notice, that as you read further and further along, the methods become more and more expensive and complicated. Once you get to this point, it will be necessary to purchase or build software in addition to the Mac OS X Server package. -
Huge problem using apple mail while sending email to a group...
Hey - I am quite confused... apple mail has huge problems using groups with about 150 addresses when writing and sending an email... the writing of emails is nearly impossible. Once the group name is inserted in the addressline (address book in iCloud!), apple mail uses nearly 100% CPU and further writing is nearly impossible. When sending such an email, all addresses are suddenly visible - though the box is NOT checked and the addresses should be hidden... what can I do? I use this feature (sending mails to groups) on a daily basis and cannot accept visible addresses...
Greetings and sorry for inconvenient english...
ChristofHow about next time you send to the group, cc yourself, or include yourself in the group. Then receive the email on the iphone, you can "reply all" in order to send to the group. If you use an imap account, you can make a new folder, call it something like "groups", and save different group emails there for the next time you need to "reply all".
-
Hi. I am just about to move from the UK to Kuwait. Will I have any problems using my iPhone 4 and able to join a local carrier using this device please?
If your phone is locked to a particular carrier, you must contact them to request they unlock it. Once they've taken care of that and you've followed the instructions to complete the unlock process, you will be able to use the phone elsewhere.
~Lyssa
Maybe you are looking for
-
How do I stop i-tunes from changing the genres for my songs without my consent?
Lately, itunes has been taking the genres I've set for my songs and changing them without my consent or say so. I change them back to what I want, i-tunes changes it back to what it wants, etc.. For example, I might list something as "Rock", but i-
-
I have been having trouble syncing my iphone after updating version 10. Satus keeps showing backing up step 1 of 4 forever on my pc. I have tried re plugging and restarting my pc but none work so far. I have not been able to sync my iphone since. Hel
-
Decimal in Unit of Measure conversion
Hi Gurus, I want to enter decimals in Unit of Measure conversion. System is giving the error that "Decimal not permitted". Actually the scenario is we have a material with KG as a base unit of measure. The ordering unit is "L" litre and the conversio
-
Migration assistant without firewire
Can anyone suggest a way of using the Migration Assistant without firewire? The firewire port on my iBook is fried and that's where my life is stored. I just got my new iMac and wanted to use Migration Assistant to move everything over to it. Without
-
Creative Labs - Model Number VF0260 - Assistance please.
I no longer possess the CD's to install the Webcamera, however I -have- downloaded the driver, it then requests for me to plug in the Webcam even when it is plugged in, I dont know if this is a fault with the camera itself or the Software, I've tried