java.lang.NoClassDefFoundError: javax/resource/ResourceException [message #37986] |
Thu, 20 May 2004 00:44  |
Eclipse User |
|
|
|
Originally posted by: shorty7uk.yahoo.co.uk
I am using VE to create a simple WebSphere MQ application.
When I run the program as a Java Application within VE, I am getting this
error:
java.lang.NoClassDefFoundError: javax/resource/ResourceException
It appears to be on this statement within the code.
qm = new MQQueueManager(tabProducer.getQueueMgr());
If I run the application outside of VE from a command prompt - the
application works fine.
I assume this is a simple classpath problem within VE but so far I haven't
been able to resolve this and would appreciate any pointers as to what I
may have missed within VE.
Thanks
|
|
|
|
|
|
Re: java.lang.NoClassDefFoundError: javax/resource/ResourceException [message #38244 is a reply to message #38147] |
Thu, 20 May 2004 11:17  |
Eclipse User |
|
|
|
Originally posted by: shorty7.yahoo.co.uk
Jeff,
I found the problem. I had to include in the Eclipse build path
connector.jar from the MQ java lib. that is where javax/resource resides.
Thanks
Jeff Myers wrote:
> David,
> The problem is the WebSphere MQ classes are referencing code in the
> javax.resources package which isn't included in the base J2SE JRE as far
> as I know. (It shows up in
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/ not
> http://java.sun.com/j2se/1.4.2/docs/api/ ) So even though you're trying
> to write a simple J2SE app, you're referencing code that requires J2EE.
> It's puzzling that it works correctly from the command line if the J2EE
> stuff isn't in the classpath.
> - Jeff
> David wrote:
> > Jeff,
> > I only have the one JRE installed.
> > This is not a J2EE app - so no, I don't have this library (at least not
> > knowingly), it is a simple java app invoking WebSphere MQ using the MQ
> > base classes. I import com.ibm.mq.*
> >
> > David
> >
> >
> >
> > Jeff Myers wrote:
> >
> >
> >>Is your Eclipse Java project set up to use the same JRE as you're
> >>invoking from the command prompt? Do you have the necessary J2EE
> >>libraries included in your Java project, the library that contains the
> >>javax.resource package?
> >
> >
> >>Note: Run As->Java Application is the exact same launcher as used by a
> >>normal JDT Java file. There's nothing specific to VE if you're having
> >>problems with the Java Application launcher.
> >
> >
> >> - Jeff
> >
> >
> >>David wrote:
> >
> >
> >>>I am using VE to create a simple WebSphere MQ application.
> >>>When I run the program as a Java Application within VE, I am getting this
> >>>error:
> >>>java.lang.NoClassDefFoundError: javax/resource/ResourceException
> >>>
> >>>It appears to be on this statement within the code.
> >>>qm = new MQQueueManager(tabProducer.getQueueMgr());
> >>>
> >>>If I run the application outside of VE from a command prompt - the
> >>>application works fine.
> >>>
> >>>I assume this is a simple classpath problem within VE but so far I haven't
> >>>been able to resolve this and would appreciate any pointers as to what I
> >>>may have missed within VE.
> >>>
> >>>Thanks
> >>>
> >
> >
> >
|
|
|
Re: java.lang.NoClassDefFoundError: javax/resource/ResourceException [message #588910 is a reply to message #37986] |
Thu, 20 May 2004 08:46  |
Eclipse User |
|
|
|
Is your Eclipse Java project set up to use the same JRE as you're
invoking from the command prompt? Do you have the necessary J2EE
libraries included in your Java project, the library that contains the
javax.resource package?
Note: Run As->Java Application is the exact same launcher as used by a
normal JDT Java file. There's nothing specific to VE if you're having
problems with the Java Application launcher.
- Jeff
David wrote:
> I am using VE to create a simple WebSphere MQ application.
> When I run the program as a Java Application within VE, I am getting this
> error:
> java.lang.NoClassDefFoundError: javax/resource/ResourceException
>
> It appears to be on this statement within the code.
> qm = new MQQueueManager(tabProducer.getQueueMgr());
>
> If I run the application outside of VE from a command prompt - the
> application works fine.
>
> I assume this is a simple classpath problem within VE but so far I haven't
> been able to resolve this and would appreciate any pointers as to what I
> may have missed within VE.
>
> Thanks
>
|
|
|
Re: java.lang.NoClassDefFoundError: javax/resource/ResourceException [message #588928 is a reply to message #38081] |
Thu, 20 May 2004 09:38  |
Eclipse User |
|
|
|
Jeff,
I only have the one JRE installed.
This is not a J2EE app - so no, I don't have this library (at least not
knowingly), it is a simple java app invoking WebSphere MQ using the MQ
base classes. I import com.ibm.mq.*
David
Jeff Myers wrote:
> Is your Eclipse Java project set up to use the same JRE as you're
> invoking from the command prompt? Do you have the necessary J2EE
> libraries included in your Java project, the library that contains the
> javax.resource package?
> Note: Run As->Java Application is the exact same launcher as used by a
> normal JDT Java file. There's nothing specific to VE if you're having
> problems with the Java Application launcher.
> - Jeff
> David wrote:
> > I am using VE to create a simple WebSphere MQ application.
> > When I run the program as a Java Application within VE, I am getting this
> > error:
> > java.lang.NoClassDefFoundError: javax/resource/ResourceException
> >
> > It appears to be on this statement within the code.
> > qm = new MQQueueManager(tabProducer.getQueueMgr());
> >
> > If I run the application outside of VE from a command prompt - the
> > application works fine.
> >
> > I assume this is a simple classpath problem within VE but so far I haven't
> > been able to resolve this and would appreciate any pointers as to what I
> > may have missed within VE.
> >
> > Thanks
> >
|
|
|
Re: java.lang.NoClassDefFoundError: javax/resource/ResourceException [message #588938 is a reply to message #38114] |
Thu, 20 May 2004 10:01  |
Eclipse User |
|
|
|
David,
The problem is the WebSphere MQ classes are referencing code in the
javax.resources package which isn't included in the base J2SE JRE as far
as I know. (It shows up in
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/ not
http://java.sun.com/j2se/1.4.2/docs/api/ ) So even though you're trying
to write a simple J2SE app, you're referencing code that requires J2EE.
It's puzzling that it works correctly from the command line if the J2EE
stuff isn't in the classpath.
- Jeff
David wrote:
> Jeff,
> I only have the one JRE installed.
> This is not a J2EE app - so no, I don't have this library (at least not
> knowingly), it is a simple java app invoking WebSphere MQ using the MQ
> base classes. I import com.ibm.mq.*
>
> David
>
>
>
> Jeff Myers wrote:
>
>
>>Is your Eclipse Java project set up to use the same JRE as you're
>>invoking from the command prompt? Do you have the necessary J2EE
>>libraries included in your Java project, the library that contains the
>>javax.resource package?
>
>
>>Note: Run As->Java Application is the exact same launcher as used by a
>>normal JDT Java file. There's nothing specific to VE if you're having
>>problems with the Java Application launcher.
>
>
>> - Jeff
>
>
>>David wrote:
>
>
>>>I am using VE to create a simple WebSphere MQ application.
>>>When I run the program as a Java Application within VE, I am getting this
>>>error:
>>>java.lang.NoClassDefFoundError: javax/resource/ResourceException
>>>
>>>It appears to be on this statement within the code.
>>>qm = new MQQueueManager(tabProducer.getQueueMgr());
>>>
>>>If I run the application outside of VE from a command prompt - the
>>>application works fine.
>>>
>>>I assume this is a simple classpath problem within VE but so far I haven't
>>>been able to resolve this and would appreciate any pointers as to what I
>>>may have missed within VE.
>>>
>>>Thanks
>>>
>
>
>
|
|
|
Re: java.lang.NoClassDefFoundError: javax/resource/ResourceException [message #588986 is a reply to message #38147] |
Thu, 20 May 2004 11:17  |
Eclipse User |
|
|
|
Jeff,
I found the problem. I had to include in the Eclipse build path
connector.jar from the MQ java lib. that is where javax/resource resides.
Thanks
Jeff Myers wrote:
> David,
> The problem is the WebSphere MQ classes are referencing code in the
> javax.resources package which isn't included in the base J2SE JRE as far
> as I know. (It shows up in
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/ not
> http://java.sun.com/j2se/1.4.2/docs/api/ ) So even though you're trying
> to write a simple J2SE app, you're referencing code that requires J2EE.
> It's puzzling that it works correctly from the command line if the J2EE
> stuff isn't in the classpath.
> - Jeff
> David wrote:
> > Jeff,
> > I only have the one JRE installed.
> > This is not a J2EE app - so no, I don't have this library (at least not
> > knowingly), it is a simple java app invoking WebSphere MQ using the MQ
> > base classes. I import com.ibm.mq.*
> >
> > David
> >
> >
> >
> > Jeff Myers wrote:
> >
> >
> >>Is your Eclipse Java project set up to use the same JRE as you're
> >>invoking from the command prompt? Do you have the necessary J2EE
> >>libraries included in your Java project, the library that contains the
> >>javax.resource package?
> >
> >
> >>Note: Run As->Java Application is the exact same launcher as used by a
> >>normal JDT Java file. There's nothing specific to VE if you're having
> >>problems with the Java Application launcher.
> >
> >
> >> - Jeff
> >
> >
> >>David wrote:
> >
> >
> >>>I am using VE to create a simple WebSphere MQ application.
> >>>When I run the program as a Java Application within VE, I am getting this
> >>>error:
> >>>java.lang.NoClassDefFoundError: javax/resource/ResourceException
> >>>
> >>>It appears to be on this statement within the code.
> >>>qm = new MQQueueManager(tabProducer.getQueueMgr());
> >>>
> >>>If I run the application outside of VE from a command prompt - the
> >>>application works fine.
> >>>
> >>>I assume this is a simple classpath problem within VE but so far I haven't
> >>>been able to resolve this and would appreciate any pointers as to what I
> >>>may have missed within VE.
> >>>
> >>>Thanks
> >>>
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.07123 seconds