public static Context getInitialContext () throws JMSException,NamingException,RemoteException
Properties prop = new Properties();
Context context = new InitialContext(prop);
Then i converted to DLL file to send message from C# to jboss,
everything are goo,so i can send message from c# windows application to jboss server
but if i use the same DLL file inside web application i got the following error:
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
That is the problem, the JVM cannot find the class org.jnp.interfaces.NamingContextFactory. Presumably it means that your Java libraries are not loaded or are not in the correct place. Check your environment variables to see that the jave library is included in PATH.
the code running very well in visual studio2012 windows Application but not working never in WCF or asp.net web
I seriously doubt that you have Java code running with WCF and ASP. Although the latter is just possible it isn't something that someone is going to succeed at without knowing what a class path exception is.
Much less running in VS.
Member 1118494 wrote:
i checked all libraries i found that every thing is correct
What you POSTED tells you EXACTLY what the problem is. You are missing a class.
So there is absolutely no doubt at all that you are MISSING something in your class path.
From that the following possibilities exist
- Your code is wrong. It is using something it shouldn't be.
- The libraries you are using in your class path are incomplete. You need another library.
- The libraries your class path are wrong, you are using the wrong versions or it is otherwise corrupt or even the path is ill-formed.
- You are not looking at the correct class path.
How can it be? You have already discovered that it does not run in these environments, so it cannot possibly be correct. Go back and investigate why it cannot find the missing class; that is the base problem and until you resolve that you will not make progress.
Thanks Mr.Richard for your reply,,
FYI, i wrote correct code in Eclipse and i test it to send Messages to Local jboss 4.2.3 server,
then i used (fat jar) application to create ONE JAR file to my project then I used IKVM to convert JAR to DLL file, Finally i create visual C# windows application then i add a reference to my DLL and i used in C# application, while testing my C# application it is working 100%
but only if i add a reference to my DLL in asp.net or WCF i got an error.
and also i would like to inform u that i used the same code as WEB SERVICE in eclipse and i test the application to send the message to local jbosse 4.2.3 (127.0.0.1) i found that every thing it is working well and if i changed the IP address to send the Messages to Remote jboss (192.168.115.20)
i got an error (Destination Queue not bound)
so my goal to do the last tow cases are to send messages to REMOTE Server ether By Web Service OR DLL
my problem how to configure jboss & JNDI code to send the message to REMOTE Jboss server
or how can i solve the last tow cases?
Your answers are appropriated.
Sorry, i know how can i use IKVM and i used already
My question is how to configure Jboss 4.2.3 and JNDI configuration to connect to Remote server.
thx Note: IKVM used to convert JAR to DLL like the follwoing command:
c:\ikvm>ikvmc -target:library c:\myjar.jar
Personally I think you should not do it this way. I will rather suggest that you create a Web service in Java for sending the message and invoke it from the C#. It's very clean. The webservice need not be a SOAP web service. You can create this web service very easily in java either via
By the way if you use WebSphere MQ then it comes with the necessary messaging libraries for .NET platform. Non Java Client support will be available in 2.x release JBOSS Messaging[^].
Prasad P. Khandekar
Knowledge exists, man only discovers it.
I need to make a java program which accepts input from user in form of item Code, quantity and rate and then display the total amount as well as discount .
the condition for getting discount is like
if the amount is greater than 5000 than discount is 10% of amount. i want to display amount and discount amount calculated ...my code works nice till it calculates amount but when moving to next step for calculating discount it shows error.
plzzz hep me out ...is there any error in my code??
am new to Core java
public static void main(String args)
Double discount= 0.0 ;
InputStreamReader istream = new InputStreamReader(System.in) ;
BufferedReader br= new BufferedReader(istream);
System.out.println("Welcome to My Java Program");
System.out.println("enter the item code:");
System.out.println("enter your quantity:");
System.out.println("enter the rate:");
int amnt= qty*Rate;
thanx a lot @ emadrefai ..now my code works perfect....
can you please explain me what exactly was happening before.... one thing i know if am not wrong is that the error message that i was getting was due to the Exception block code in Try and Catch
look, I don't known why you can't save your java resource files in C:\\, but I can explain you what I did with the rights the last time I reinstall my Laptop, I'm running my PC with Windows 8 Pro 64 bit, look, let me explain you what I did:
1 - Right Click on the System Drive (C)
2 - Properties
3 - Security
4 - Advanced
5 - Auditing and Continue
6 - Add your user name to the list and give them all the rights
7 - Ready
i have a problem where, i need to import a file and check the whole coding byte by byte ,then comparing ,but how to do that with dynamic array. as i want to just list all the used file used in an array of list item dynamically.
i want to store the name of the file from code which are being used by my project so , how to dynamically store those file name in a array so that i can get the value of all of the list in a single column .
any idea !
I want install bundle on apache felix framework in OSGI so first start felix and then show g! message on cmd
now when I want install bundle write this command : Install file : C:\Users\Farshad\Desktop\myJar.jar
but throws exception !! that Exception message is :
java.net.MalformedURLException: no protocol: file
java.net.MalformedURLException: no protocol: :
java.net.MalformedURLException: Unknown protocol: c
How I can do this? I use Windows 7 (64 bit) os.
thanks a lot.
I want to create a presentation controller using openoffice impress.
I create the application that opens openoffice impress and I'm having a problem
that I want to open this .odp file in a panel in my form.
But it always opens in a new window.
How can I set parent to this impress file and can open this in my panel?
Well I have studied all these and finally succeeded to open impress document.
But the problem is quite different.
There is no control in the form or GUI.
Impress document opens in a new window or its own container.