Could not find class (CalculatorImpl_Stub) at codebase ()
hi
im trying to use rmi on my linux machine...
a have jared CalculatorServer and CalculatorClient
$ jar tf CalculatorServer.jar
META-INF/
META-INF/MANIFEST.MF
Calculator.class
CalculatorImpl.class
CalculatorImpl_Stub.class
CalculatorServer.class
$ jar tf CalculatorClient.jar
META-INF/
META-INF/MANIFEST.MF
Calculator.class
CalculatorImpl_Stub.class
CalculatorClient.class
$ ps -ef | grep rmi
boris 5347 5221 0 15:08 pts/3 00:00:00 rmiregistrymy rmiregistry is running....
$ java -jar CalculatorServer.jar -a localhost
rmi://localhost:1099/CalculatorService
Trouble: java.rmi.UnexpectedException: undeclared checked exception; nested exception is:
java.lang.ClassNotFoundException: Could not find class (CalculatorImpl_Stub) at codebase ()when i try to run my rmi server (on localhost) it outputs this...
if i unjar files and then run server like java CalculatorServer -a localhost it works fine...
i dont know why.... my stub file is in jar.... and i'm idealess...
now when i try to launch this jar file like this
$ java -Djava.rmi.server.codebase=/home/boris/java/rmiCalculator/CalculatorServer.jar -jar CalculatorServer.jar -a localhost &
[3] 4943
boris@bm:~/java/rmiCalculator$ rmi://localhost:1099/CalculatorService
Trouble: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.net.MalformedURLException: no protocol: /home/boris/java/rmiCalculator/CalculatorServer.jarand if try like this ... same problem
$ java -Djava.rmi.server.codebase=/home/boris/java/rmiCalculator/ -jar CalculatorServer.jar -a localhost &
[2] 4930
boris@bm:~/java/rmiCalculator$ rmi://localhost:1099/CalculatorService
Trouble: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.net.MalformedURLException: no protocol: /home/boris/java/rmiCalculator/
$ pwd
/home/boris/java/rmiCalculator
Similar Messages
-
Ejb error((MARSHAL) Could not find class) when using OneToMany relationship
I am using Netbeans 5.5 with J2EE App Server 9. I have two entity beans with a OneToMany Uni-directional relationship. I have a Remote Stateless session bean which has persistence operations for creating and searching etc.. I am accessing the remote bean via jndi from a j2ee java client. The access works fine. The session bean persist operation creates data in both the entities (cascade persist).
But, after the data is created, when I access the entity manager find() method from the session bean via the client errors out. This error only happens for the entities with OneToMany relationship, not for OneToOne relationships.
I am using TOPLINK persistence provider accessing a derby data source. I have the latest persistence library jar files in the library classpath.
client code:
Phone p1 = new Phone();
p1.setPnumber("999 999 9999");
Customer c1 = new Customer();
c1.setLname("Smith");
c1.getPhone().add(p1);
int pk = agent.createCustomer(c1); // creates the entities
Customer c2 = agent.findCustomer(pk); // this causes the ERROR
session bean code:
@PersistenceContext private EntityManager em;
public int createCustomer(Customer c) {
em.persist(c);
return c.getId();
public Customer findCustomer(int i) { // this causes the ERROR
return em.find(Customer.class, i);
exception:
Mar 30, 2007 3:25:00 PM com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
WARNING: "IOP00810257: (MARSHAL) Could not find class"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:8309)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:984)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1987)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2211)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1219)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
***exception in Client_1 ***
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:333)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:162)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
at com.titan.ejb.__Tester1Remote_Remote_DynamicStub.findCustomer(__Tester1Remote_Remote_DynamicStub.java)
at com.titan.ejb._Tester1Remote_Wrapper.findCustomer(com.titan.ejb._Tester1Remote_Wrapper.java)
at com.titan.clients.Client_1.main(Client_1.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
at com.sun.enterprise.appclient.Main.main(Main.java:180)
Caused by: java.lang.ClassNotFoundException
... 25 more
javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:224)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:172)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
at com.titan.ejb.__Tester1Remote_Remote_DynamicStub.findCustomer(__Tester1Remote_Remote_DynamicStub.java)
at com.titan.ejb._Tester1Remote_Wrapper.findCustomer(com.titan.ejb._Tester1Remote_Wrapper.java)
at com.titan.clients.Client_1.main(Client_1.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
at com.sun.enterprise.appclient.Main.main(Main.java:180)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:8309)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:984)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1987)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2211)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1219)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:333)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:162)
... 12 more
Caused by: java.lang.ClassNotFoundException
... 25 more
javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.titan.ejb._Tester1Remote_Wrapper.findCustomer(com.titan.ejb._Tester1Remote_Wrapper.java)
at com.titan.clients.Client_1.main(Client_1.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
at com.sun.enterprise.appclient.Main.main(Main.java:180)It appears to be a bug in Netbeans.
I have a similar error message with the following settings:
A session bean remote interface
be.macharis.toon.pacita.common.OriginFacadeRemoteA session bean implementing the remote interface
be.macharis.toon.pacita.common.OriginFacadeAt deploying the ejb module, the session bean is loaded in the JNDI registry under the name be.macharis.toon.pacita.common.OriginFacadeRemote (the server log says so).
I have the following code in a servlet:
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
try {
Context ic = new InitialContext();
OriginFacadeRemote originFacade = (OriginFacadeRemote)ic.lookup(OriginFacadeRemote.class.getName());
originFacade.setOrigin(componentRegistry, OriginFacadeRemote.ELEMENT_CONTAINER); // <- exception here
} catch (NamingException e) {
e.printStackTrace();
}Yet I get a java.lang.ClassNotFoundException during the EJB method call. The exception does not take place during execution of the method, but before, while the EJB container is still resolving the method. It thus must be a(nother) bug in the implementation of the EJB container.
And bugs that are outside your control are so much harder to deal with... There was another bug in the EJB container for serialising complex object that I could work around by explicitly serialising the Objects myself to byte arrays. It took me 5 days to do so. I don't know if I will manage to work around this bug. If I do, I will post my solution. For completeness, below my "clarifying" error dump:
javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: ----------BEGIN server-side stack trace----------
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:8309)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:984)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:850)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:844)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:275)
at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:361)
at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:524)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
at java.util.HashMap.readObject(HashMap.java:1029)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1692)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1210)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1987)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2211)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1219)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1987)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2211)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1219)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:333)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readArguments(DynamicMethodMarshallerImpl.java:393)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:119)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
at com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:154)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:194)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:159)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
at be.macharis.toon.pacita.common.__OriginFacadeRemote_Remote_DynamicStub.setOrigin(__OriginFacadeRemote_Remote_DynamicStub.java)
at be.macharis.toon.pacita.common._OriginFacadeRemote_Wrapper.setOrigin(be.macharis.toon.pacita.common._OriginFacadeRemote_Wrapper.java)
at pacita.servlets.ContainerRegistry.processRequest(ContainerRegistry.java:64)
at pacita.servlets.ContainerRegistry.doGet(ContainerRegistry.java:95)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Caused by: java.lang.ClassNotFoundException
... 77 more
----------END server-side stack trace---------- vmcid: SUN minor code: 257 completed: Maybe -
ok friends,
have a normaly running project in eclipse and want to create a jar file...i tried ewerythin in ->export but nothing function
i wanted to create a runnable jar file but that error ecures:
JAR export finished with warnings. See details for additional information.
Exported with compile warnings: ICQJJ/src/ICQJJ.java
Jar export finished with problems. See details for additional infos.
Fat Jar Export: Could not find class-path entry for 'C:Java/jdk/mysql-connector-java-5.1.8-bin.jar'
what's the problem?
ok, i am using a mysql db und using the driver mysql-connector-java-5.1.8-bin.jar....
i improted this jar file like this run -> run configuration -> classpath -> add external jar....
pls help meThat looks like it might be a binary-distribution JAR that you should unjar. The actual JAR for the classpath is probably inside it.
-
Javah error: could not find class file for 'com.ntv.ndkjni'
Hi,
My project directory : C:\ndkJNI
My java file directory : C:\ndkJNI\src\com\ntv\ndkjni
My package name : com.ntv.ndkjni
1 ) I entry command prompt at C:\ndkJNI\src\com\ntv\ndkjni
2 ) Javac test.java and create test.class succesfully. test.class is in C:\ndkJNI\src\com\ntv\ndkjni folder.
3 ) Later I used Javah, try below javah variously
a) javah -classpath C:\ndkJNI\src\com\ntv\ndkjni test
b) javah -classpath C:\ndkJNI\src\com\ntv\ndkjni.test
x) javah -classpath C:\ndkJNI\src\com\ntv\ndkjni com.ntv.ndkjni.test
y) javah -classpath C:\ndkJNI\src\com\ntv\ndkjni com.ntv.ndkjni test
c) javah -classpath C:\ndkJNI\src\com\ntv\ndkjni com.ntv.ndkjni.test
d) javah com.ntv.ndkjni.test
e) javah com.ntv.ndkjni test
f) javah com.ntv.ndkjni test.class-> (error: exception in a thread illegal argument exception)
I am searching for 5 day. I couldnt find solution. I try different computer. I tried ubuntu and win8, the error still with me.
Thats interesting when I delete the package com.ntv.ndkjni; from java file, then create class file again with javac then javah can create header file succesfully.
Please help me.
*****************************test.java**************************
package com.ntv.ndkjni;
public class test {
static
System.loadLibrary("hello");
public static native int toplama(int sayi1,int sayi2);javah takes a fully qualified class name so in your case that would be
com.ntv.ndkjni.test
As with all things related to java the class path is used to resolve the class based on the fully qualified name. The name resolves STARTING at the path and then attempts to find the class BELOW the classpath by resolving the name.
Because of that your class path should be the following
C:\ndkJNI\src -
Zend could not find class "..." problem with deployment to server - ANSWER
This error only occures when your webroot = and amf.directories = are configured correctly. The problem comes in typically when you have created your own services.php file which was use to connect to the data instead of letting flex create it for you. For some reason Zend looks for Services.php not services.php so the problem can be fixed by renaming the .php file on the server to capitalize the first letter.
I noticed several different posts about this problem, perhaps in future versions this won't matter.
Best Wishes,
Joel HartMike,
I don't have anything definitive here but I am wondering if there is a discrepency between the database names. In SQL Enterprise Manager, you can go to the Publisher and see what the current database name is. It will be the one being replicated and will take the form of CCM0300 or CCM0301 or CCM0302. You should see more than one. Anyway, take note of the name.
Then on the Publisher launch regedit and go to HKLM\Software\Cisco Systems, Inc.\DBL\
Look at the values for DBConnection0 and DBConnection1.
It will be something like DSN=CiscoCallManager;Server=;DATABASE=;Trusted_Connection=yes
Does the in the DSN match what you expect?
Also, going to back to SQL Enterprise Manager, check out the permissions on the database (Right Click->Properties, go to Permissions tab).
Another thing to check if you think it is permissions related is the AdminUtility.exe (c:\program files\cisco\bin\). This can be used to resync system account passwords.
TBH, I am just shooting in the dark here but these are things I would check.
Regards,
Bill -
RMI server stub could not find in remote machine
i have a code set
http://www.devpub.net/java.rar
when i run it in local machine it works fine.
but i run the client part, it return
ClassNotFoundException : Could not find Class (server stub) at codebaseThe client part needs to include the stub, the remote interface itself, and any of your classes named in the remote interface, and so on to closure.
-
Why IE5 could not find applet class but Netscape can ?
Hi,
I have an applet which is running fine on Netscripts6,
But not on IE5.
<APPLET codebase="http://10.1.1.1/demo/" code="ClientApplet.class" HEIGHT=300 WIDTH=300>
<PARAM NAME="relay" VALUE="1">
I have all class files under demo directory(the same directory as html file).
IE5.0 still could not find applet class but Netscript can.are you sure its failing to load your classes or is it failing to load a class you are using?
Remember IE only uses things from 1.1 so simple things like component.getHeight() does not work you have to use size().height
Its woth enabling the java console and viewing the exact problem. -
Hi,
Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
I have created a dynamic web project and added javax RS jars:
When im trying to run this, i'm getting the below mentioned error:
FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType. Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
Please help as im stuck with this from long.
Thanks in advance.
Below is the code for my service class:
package com.rest.assignment;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/restService")
public class RestService extends Application {
@GET
@Path("/getEmpDetails")
@Produces(MediaType.APPLICATION_JSON)
public Response getStringResponse()
EmpBean empBean = new EmpBean();
String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
Properties properties = new Properties();
try {
properties.load(new FileInputStream(filePath));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
Enumeration e = properties.propertyNames();
String result="";
String[] empDetailsArr;
while (e.hasMoreElements()) {
String key = (String) e.nextElement();
String empDetails = properties.getProperty(key);
empDetailsArr=empDetails.split(",");
empBean.setFirstName(empDetailsArr[0]);
empBean.setLastName(empDetailsArr[1]);
empBean.setEmpId(empDetailsArr[2]);
empBean.setDesignation(empDetailsArr[3]);
empBean.setSkillSet(empDetailsArr[4]);
result = empDetailsArr[1];
//return empBean;
return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(RestService.class);
classes.add(EmpBean.class);
return classes;
and my empBean goes like this:
package com.rest.assignment;
public class EmpBean {
private String firstName;
private String lastName;
private String empId;
private String designation;
private String skillSet;
public String getFirstName() {
return firstName;
public void setFirstName(String firstName) {
this.firstName = firstName;
public String getLastName() {
return lastName;
public void setLastName(String lastName) {
this.lastName = lastName;
public String getEmpId() {
return empId;
public void setEmpId(String empId) {
this.empId = empId;
public String getDesignation() {
return designation;
public void setDesignation(String designation) {
this.designation = designation;
public String getSkillSet() {
return skillSet;
public void setSkillSet(String skillSet) {
this.skillSet = skillSet;
Web.xml goes like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>restWS</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>REST</servlet-name>
<servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.rest.assignment.RestService</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>REST</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.Hi,
Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
I have created a dynamic web project and added javax RS jars:
When im trying to run this, i'm getting the below mentioned error:
FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType. Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
Please help as im stuck with this from long.
Thanks in advance.
Below is the code for my service class:
package com.rest.assignment;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/restService")
public class RestService extends Application {
@GET
@Path("/getEmpDetails")
@Produces(MediaType.APPLICATION_JSON)
public Response getStringResponse()
EmpBean empBean = new EmpBean();
String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
Properties properties = new Properties();
try {
properties.load(new FileInputStream(filePath));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
Enumeration e = properties.propertyNames();
String result="";
String[] empDetailsArr;
while (e.hasMoreElements()) {
String key = (String) e.nextElement();
String empDetails = properties.getProperty(key);
empDetailsArr=empDetails.split(",");
empBean.setFirstName(empDetailsArr[0]);
empBean.setLastName(empDetailsArr[1]);
empBean.setEmpId(empDetailsArr[2]);
empBean.setDesignation(empDetailsArr[3]);
empBean.setSkillSet(empDetailsArr[4]);
result = empDetailsArr[1];
//return empBean;
return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(RestService.class);
classes.add(EmpBean.class);
return classes;
and my empBean goes like this:
package com.rest.assignment;
public class EmpBean {
private String firstName;
private String lastName;
private String empId;
private String designation;
private String skillSet;
public String getFirstName() {
return firstName;
public void setFirstName(String firstName) {
this.firstName = firstName;
public String getLastName() {
return lastName;
public void setLastName(String lastName) {
this.lastName = lastName;
public String getEmpId() {
return empId;
public void setEmpId(String empId) {
this.empId = empId;
public String getDesignation() {
return designation;
public void setDesignation(String designation) {
this.designation = designation;
public String getSkillSet() {
return skillSet;
public void setSkillSet(String skillSet) {
this.skillSet = skillSet;
Web.xml goes like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>restWS</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>REST</servlet-name>
<servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.rest.assignment.RestService</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>REST</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response. -
Java.lang.RuntimeException: Could not find the OffLine WLST class
Installation of OIM On weblogic.
oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
/oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Tried to run this command ./wlst.sh
shows
CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
PATH=/oracle/weblogic/server/server/bin:/home/oracle/bea/modules/org.apache.ant_1.6.5/bin:/oracle/jdk/jre/bin:/oracle/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/oracle/jdk/bin
Your environment has been set.
CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/oracle/weblogic/server/common/eval/pointbase/lib/pbembedded57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbtools57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbclient57.jar
Initializing WebLogic Scripting Tool (WLST) ...
Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST classtry Problem invoking WLST - Could not find the OffLine WLST class the last post on this thread, he claims to solve the problem...
-
Installation of OIM On weblogic.
oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
/oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Tried to run this command ./wlst.sh
shows
CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
PATH=/oracle/weblogic/server/server/bin:/home/oracle/bea/modules/org.apache.ant_1.6.5/bin:/oracle/jdk/jre/bin:/oracle/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/oracle/jdk/bin
Your environment has been set.
CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/oracle/weblogic/server/common/eval/pointbase/lib/pbembedded57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbtools57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbclient57.jar
Initializing WebLogic Scripting Tool (WLST) ...
Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class
Edited by: user10213645 on Mar 9, 2010 3:37 PMThere is an existing Bug 8431390 - WLST NOT WORKING IF WE USE NON-DEFAULT INSTALLATION (WL_HOME OUTSIDE BEA_HOME)
As per this bug, the issue can be reproduced as follows:
Steps to reproduce:
1. Install WLS 10.3GA (essex) kit in a non-default fashion (WL_HOME outside BEA_HOME)
2. Go to ur $WL_HOME/common/bin directory and execute wlst.cmd
3. It exits with the following exception:
java.lang.RuntimeException:could not find the OffLine WLST class
Hope this helps.
For more details, refer: http://idm-oracle.blogspot.com/2010/03/javalangruntimeexception-could-not-find.html -
Hi,
I have installed Oracle11g_win64_11gR1, Database and Client.
The issue is unable to invoke "sqldeveloper", getting the following error message. Could you please help ?
FYI. I have already downloaded and installed installed JRE and JDK.
ie. C:\Program Files (x86)\Java\jre6\ and C:\Program Files\Java\jdk1.6.0_24, still did not work.
C:\Users\oracle>java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
Let me know, if you need more information. Here is the error message.
Error Message
=========
(1) if I invoke sqldeveloper, directly from the location " C:\app\oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper\bin " using explorer, I do get error message
"Unable to find a java Virtual Machine.
To point to a location of java Virtual machine please refer to the Oracle9i JDeveloper Install Guide ( jdev/install.html)"
(2) if I invoke sqldeveloper, directly from the locationC:\app\oracle\product\11.1.0\client_1\sqldeveloper, it prompts me to enter "full path for java.exe".
When I enter full path and continue, still it continue to prompt and ask the same input.
(3) if I invoke sqldeveloper from from command prompt using the batch file "sqldeveloper.bat"
C:\Users\oracle>C:\app\oracle\product\11.1.0\client_1\sqldeveloper\sqldeveloper\
bin\sqldeveloper.bat
C:\Users\oracle>java -Xmx512M -Xverify:none -XX:JavaPriority10_To_OSPriority=10
-XX:JavaPriority9_To_OSPriority=9 -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_F
LAG=true -Dsun.java2d.ddoffscreen=false -Dwindows.shell.font.languages= -Dide.co
nf="sqldeveloper.conf" -Dide.home.dir.name=.sqldeveloper -classpath ..\..\ide\l
ib\ide-boot.jar;..\..\jdev\lib\xmleditor.jar;..\..\ide\lib\oicons.jar;..\..\..\j
dbc\lib\ojdbc5.jar;..\..\jlib\jewt4.jar;..\..\jlib\share.jar;..\..\sqldeveloper\
lib\jle2.jar oracle.ide.boot.Launcher
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/ide/boot/Launc
her
Caused by: java.lang.ClassNotFoundException: oracle.ide.boot.Launcher
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: oracle.ide.boot.Launcher. Program will exit.
OS
==============
MS Windows 7 Home Premium
sqldeveloper.conf
===================
SetSkipJ2SDKCheck true
IncludeConfFile ../../jdev/bin/ide.conf
AddVMOption -Dapple.laf.useScreenMenuBar=true
AddVMOption -Dcom.apple.mrj.application.apple.menu.about.name="SQL_Developer"
AddVMOption -Dcom.apple.mrj.application.growbox.intrudes=false
AddVMOption -Dcom.apple.macos.smallTabs=true
AddVMOption -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true
AddJavaLibFile ../../jdev/lib/xmleditor.jar
AddJavaLibFile ../../ide/lib/oicons.jar
AddJavaLibFile ../../jlib/jewt4.jar
AddJavaLibFile ../../jlib/share.jar
AddJavaLibFile ../ide/jlib/xmlef.jar
AddJavaLibFile ../../sqldeveloper/lib/jle2.jar
AddJavaLibFile ../../sqldeveloper/lib/oracle.dbtools.logging.jar
AddVMOption -Dsun.java2d.ddoffscreen=false
AddVMOption -Dwindows.shell.font.languages=
IncludeConfFile sqldeveloper-nondebug.conf
SetJavaHome C:\Program Files\Java\jdk1.6.0_24
Edited by: sivapara on Feb 16, 2011 1:08 PMI was able to resolve this issue by performing following.
1. Go to the location where sqldeveloperW.exe is being executed from.
2. You will find a file sqldeveloper.conf in that location. Edit this file and change the value of IncludeConfFile to point to actual place. For me following were old and new values.
OLD (Wrong) : IncludeConfFile ../../jdev/bin/ide.conf
NEW (Correct) : IncludeConfFile ../../ide/bin/ide.conf
After making above change in the sqldeveloper.conf file. Save and close it. Restart SQLDeveloper. You will not get the error anymore.
Thanks
Ravi -
Could not find or load main class weblogic.WLST
Hi,
I am trying to run a python script to create JMS components for use with iHub and i got the following error message when i try to run the script:
C:\ihub\bin>java weblogic.WLST omipmihubwlscript.py weblogicjms Welcome1 http://<servername>:7111 OMIPMIHUBServer
Error: Could not find or load main class weblogic.WLST
I have run the setWLSEnv.cmd file and got the following output
C:\oracle\Middleware2\wlserver_10.3\server\bin>setWLSEnv.cmd
CLASSPATH="C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_p
atch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~2\mod
ules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MIDDLE~2\modu
les\NETSFA~1.0_1/lib/ant-contrib.jar;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_man
ifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.
jar;C:\oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.j
ar;C:\oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp37
1\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSER
V~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\module
s\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;"
PATH="C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDD
LE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\oracle\MIDDLE~2\patch_wls1036\profiles\defa
ult\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\module
s\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\
default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bi
n;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\app\paul.currie\product\11.2.0\client_2\bin;C:\app\paul.currie\product\11.2.0\dbhome_3\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Wind
ows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_13\jre\bin;;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x
64\oci920_8;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64\oci920_8;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64\oci920_8"
Your environment has been set.
I am totally stuck at this point so any help would be much appreciated.
Cheers
PaulI have just tested both on a Windows and a Linux server and it works fine.
D:\oracle\product\Middleware\wlserver_10.3\server\bin>setWLSEnv.cmd
CLASSPATH=D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\
product\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\product\JAVA_C~1\li
b\tools.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\serve
r\lib\weblogic.jar;D:\oracle\product\MIDDLE~1\modules\features\weblogic.server.modules_10.3.5.0.jar;D:\oracle\product\MI
DDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\oracle\pro
duct\MIDDLE~1\modules\NETSFA~2.0_1/lib/ant-contrib.jar;D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\sys_man
ifest_classpath\weblogic_patch.jar;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\web
logic_patch.jar;D:\oracle\product\JAVA_C~1\lib\tools.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.ja
r;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\oracle\product\MIDDLE~1\modules\features\weblogic.ser
ver.modules_10.3.5.0.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\oracle\product\MIDDLE~1\mod
ules\ORGAPA~1.1/lib/ant-all.jar;D:\oracle\product\MIDDLE~1\modules\NETSFA~2.0_1/lib/ant-contrib.jar;
PATH=D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\native;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles
\default\native;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server
\bin;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\oracle\product\JAVA_C~1\jre\bin;D:\oracle\product\JAVA_C~1\bin
;D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\native;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles\def
ault\native;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\bin
;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\oracle\product\JAVA_C~1\jre\bin;D:\oracle\product\JAVA_C~1\bin;C:\
Program Files\Legato\nsr\bin;C:\PROGRA~2\CA\SHARED~1\ETPKI\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C
:\Windows\System32\WindowsPowerShell\v1.0\;D:\oracle\Java\current\jre\bin;C:\PROGRA~2\CA\IDENTI~1\PROVIS~1\BIN;C:\Progra
m Files (x86)\CA\SharedComponents\CAM\bin;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8;D:\oracle
\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8
Your environment has been set.
D:\oracle\product\Middleware\wlserver_10.3\server\bin>java weblogic.WLST
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> -
At first I thought it was just my own programs that I created with netbeans that had this problem; however, even the demo programs under the sdk folder give me this problem when i try to run them. Virtual Machine Loader will just come up with pop up saying "Could not find the main class. Program will not exit"
I am a fairly competent programmer, not new to java. But I am new to guis in java, and using netbeans to create them. The program I am creating gives me this error with javaw and with java it will tell me NoClassDef for grouplayout. I checked the manifest file it looks alright:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 10.0-b19 (Sun Microsystems Inc.)
Main-Class: desktopapplication2.DesktopApplication2
Class-Path: lib/appframework-1.0.3.jar lib/swing-worker-1.1.jar lib/swing-layout-1.0.1.jar lib/ant-swing.jar lib/SwingSet2.jar lib/swing-layout-1.0.3.jar
X-COMMENT: Main-Class will be added automatically by build
}(brackets not included)
I am sort of lost.... Do I need to install ant separately?
I feel like there may be some classpath issues?
I have java 1.6 update 4 and netbeans 6.0
I am completely lost I have been working on fixing this for the past 2 or 3 days now, and reading up all the information.
Note: This is just a standard desktop application.
Also I just thought of something. If I have install the development kit do I also need to install the framework or whatever for 6.0 separately? Meaning installing the latest version of jvm. Sorry if this isn't clear i forgot what it is called.
Sorry if this sounds like a beginner question or something, but I am going crazy. If i am having this much trouble running my own program i really hope distributing files won't be this much of a nightmare....Please become familar with resources at the NetBeans site. There are tutorials and FAQs that cover usage of NB, and how to do things like you're asking.
See my reply in this thread for more information
http://forum.java.sun.com/thread.jspa?threadID=5270931&tstart=0 -
Execute jar file: "could not find the main class" program will terminate
Hey,
I am new to Java. I have started to make a small java program which supposed to help me at my studies to lean the Dominic Memory System. I have used the latest version of Netbeans 5.5.1 to build my program in. I have two problems which I cannot figure out how to solve, please help me.
The first problem is that the java script I have made works when I compile it in Netbeans, but when I create a Jar file it does not work. I receive a pop up message in windows ?could not find the main class program will terminate? when I execute the jar file.
The second problem I have is that I need to compare the strings generated by the "numbers" and "TIP" and if the numbers is not identical the numbers in the ?Center? JPanel should be highlighted as red.
If anyone would like to clean up the code I would be pleased. I have copied quite a lot from anyone because of my one lack of knowledge.
* GoListener.java
* Created on 12. september 2007, 21:48
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package grandmaster;
import java.awt.event.*;
import javax.swing.*;
import java.util.Vector;
import java.util.StringTokenizer;
import java.awt.Color;
* @author Computer
public class GoListener implements ActionListener {
private JTextField viewer;
private JTextField TIP;
private JTextField freq;
private JTextField max_num;
private Vector numbers;
public GoListener(JTextField j,JTextField k, JTextField m, JTextField f, Vector n) {
freq = f;
max_num = m;
viewer = j;
numbers = n;
TIP = k;
public void actionPerformed(ActionEvent e){
int time = Integer.valueOf(max_num.getText());
int f = Integer.valueOf(freq.getText());
if (e.getActionCommand() == "GO") {
for (int i = 0; i< time;++i) {
int number=0;
number = (int)Math.floor(100*Math.random());
while(number>51){
number = (int)Math.floor(100*Math.random());
if(number<=9){
viewer.setText(" "+"0" + String.valueOf(number) + " ");
} else{
viewer.setText(" " + String.valueOf(number) + " ");
viewer.paintImmediately(viewer.getBounds());
numbers.add(number);
try {
Thread.sleep(f*1000);
} catch (Exception exp) {
viewer.setText(" XX ");
viewer.paintImmediately(viewer.getBounds());
if (e.getActionCommand() == "VIEW") {
try {
//int numb = Integer.valueOf( TIP.getText() ).intValue();
StringTokenizer tokenizer = new StringTokenizer(TIP.getText(), " ");
String[] split = null;
int tokenCount = tokenizer.countTokens();
if (tokenCount > 0) {
split = new String[tokenCount];
for (int current = 0; current < tokenCount; current++) {
split[current] = tokenizer.nextToken();
viewer.setText(" " + String.valueOf(numbers) + " ");
// k=numbers(1);
/*while(c<i){
String.valueOf(k).equals(split[1]);
c++;
TIP.setText(" " + split[2] + " ");
} catch (Exception exp) {
try {
//string testit = numb.toString();
//String str = "" + numb;
//viewer.setText(str);
//viewer.setText(numbers.toString());
numbers.clear();
} catch (Exception exp) {
* Main.java
* Created on 12. september 2007, 21:07
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package grandmaster;
import java.util.Vector;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.JButton;
import java.awt.*;
import grandmaster.GoListener;
* @author Computer
public class Main extends JFrame {
private JTextField viewer;
public JTextField TIP;
// private TextInputPanel TIP;
private Vector numbers;
/** Creates a new instance of Main */
public Main() {
numbers = new Vector();
JPanel p = new JPanel(new GridLayout(0,4));
JButton go = new JButton();
JButton view_num = new JButton();
go.setText("Go!");
go.setVisible(true);
go.setActionCommand("GO");
view_num.setText("VIEW");
view_num.setVisible(true);
view_num.setActionCommand("VIEW");
JTextField max_num = new JTextField();
max_num.setText("5");
JTextField freq = new JTextField();
freq.setText("1");
viewer = new JTextField();
viewer.setText("XX");
TIP = new JTextField("");
p.add(go);
p.add(max_num);
p.add(freq);
p.add(view_num);
getContentPane().add(p,BorderLayout.NORTH);
getContentPane().add(viewer,BorderLayout.CENTER);
getContentPane().add(TIP,BorderLayout.SOUTH);
setSize(200,200);
GoListener g = new GoListener(viewer,TIP,max_num, freq, numbers);
go.addActionListener(g);
view_num.addActionListener(g);
* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
Main window = new Main();
window.setVisible(true);
}NetBeans questions should be posted to the NB site. It has mailing lists and associated forums.
This tutorial from the NB site addresses running programs outside of NB
http://www.netbeans.org/kb/articles/javase-deploy.html
When you compare objects, use ".equals()" and reserve == for comparing values. -
Executable JAR file: Could not find the main class.
Hello,
I have a problem with making an executable JAR file.
I have written a JAVA program that consists of five different classes of which User.java is the main class and I have saved a text document with Main-Class: User and a blank line after that.
If I try:
jar cmf MainClass.txt User.jar User.class Beheerder.class Operator.class Manager.class MaakVisueelSchema.class
it makes a executable jar file which actually works! :)
But when the Operator class trys to open the MaakVisueelSchema class the screen stays blank.
I can run MaakVisueelSchema with java MaakVisueelSchema.
So I tried to make an executable JAR that consists only of MaakVisueelSchema, the same way as I did for User:
Main-Class: MaakVisueelSchema
jar cmf MainClass.txt MaakVisueelSchema.jar MaakVisueelSchema.class
Then I get the error message:
Could not find the main class. Program will exit.
from the Java Virtual Machine Launcher.
The big difference between MaakVisueelSchema and the other classes is that MaakVisueelSchema contains a PaintComponent method and an ComponentListener. Is it possible that one of those creates the error?
Can anyone help me with this problem?
Thanks in advance!
Bye!Yes,
I tried:
jar xvf MaakVisueelSchema.jar
and it returns:
META-INF/
META-INF/MANIFEST.MF
MaakVisueelSchema.classN/G. You need to manually create a manifest file in a text editor, have it point to your main class, and enter it in your jar command as an argument.
Maybe you are looking for
-
Change order of songs on itunes
How do I change the order of the songs in itunes? I have albums out of chronological order and want to move them so that when I play all the songs from a band on my IPOD it plays them from the first to last. Thanks for any help.
-
DisplayLin​k Fails After System Restore
I recently posted that my WIFI failed and after much frustration did a system recovery via the hidden partion. WIFI is all good now, yeah! But, my Kensington Displaylink (K33926US) fails to function, although it did previously. Kensington support h
-
Hi, does anyone knows how to make a listbox with text + a checkbox (boolean), so that it is possible to check a specific item in the listbox? Best regards, Thijs Boeree
-
Error 1920 or 1921 when installing iTunes 5 for Windows
Hello, Can anyone help me in finding the complete article on how to solve the following error message: Error 1920 or 1921 when installing iTunes 5 for Windows. It was posted September 9, 2005. I need the complete instructions on how to correct the fo
-
Update statistics & DB check fail
Dear all, During the update statistics and DB check, we are facing below problem 10.11.2008 07:00:56 TARGETSYSTEM = C1Pci-pub 10.11.2008 07:01:22 'CONNECT /' 10.11.2008 07:01:22 ORA-01033: ORACLE initialization or shutdown in