Spring is ignoring commons-logging.jar - web-services

I am trying to publish my webservice using CXF 2.6.0. While starting tomcat server I am getting following exception:
org.springframework.beans.BeanInstantiationException : Could not instantiate bean class [org.springframework.web.context.support.XmlWebApplicationContext]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
No need to say that I already have common-logging-1.1.1.jar in my classpath. What else am I missing?

Pls check if the LogFactory is loaded multiple times during publish. This might occur if there are jar conflicts loading the same class.

Related

Can't run wso2 esb after doing wso2 mb tutorial

I'm trying to catch up with the new realease of the wso2ei 7 and 'm following the new tutorial but I keep getting an error when I start the esb again with the following error
Store [PaymentRequestMessageStore]. Could not initialize JMS Message Store. Error:Failed to create InitialContext using factory specified in hash table.. Initial Context Factory:[org.wso2.andes.jndi.PropertiesFileInitialContextFactory]; Provider URL:[null]; Connection Factory:[null]. javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table. [Root exception is java.lang.ClassNotFoundException: class org.wso2.andes.jndi.PropertiesFileInitialContextFactory not found]
at org.wso2.micro.core.context.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:301)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.InitialContext.(InitialContext.java:216)
...
Can anyone help me with that?
[EDIT]
I started the esb from the cmd and i got a diferent error, I don't know if helps or not...
ERROR {org.apache.axis2.transport.jms.JMSConnectionFactoryManager} - Error setting up connection factory : myQueueSender org.apache.axis2.transport.jms.AxisJMSException: Cannot acquire JNDI context, JMS Connection factory : QueueConnectionFactory or default destination : null for JMS CF : myQueueSender using : {transport.jms.CacheLevel=producer, broker_name=wso2mb, transport.jms.ConnectionFactoryType=queue, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory, java.naming.provider.url=conf/jndi.properties}
at org.apache.axis2.transport.jms.JMSConnectionFactory.initJMSConnectionFactory(JMSConnectionFactory.java:188)
at org.apache.axis2.transport.jms.JMSConnectionFactory.(JMSConnectionFactory.java:152)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.loadConnectionFactoryDefinitions(JMSConnectionFactoryManager.java:89)
...
While working through the EI Asynchronous Messaging tutorial, you will get this ClassNotFound exception if you don't do the following first:
Download WSO2 Message Broker. The path to this folder is referred to as MB_HOME throughout this tutorial.
Add the following JAR files from the MB_HOME/wso2/broker/client-lib/ directory to the MI_TOOLING_HOME/Contents/Eclipse/runtime/microesb/lib/ (in MacOS) or MI_TOOLING_HOME/runtime/microesb/lib (in Windows) directory.
andes-client-*.jar
geronimo-jms_1.1_spec-*.jar
org.wso2.securevault-*.jar
For me on OSX, the MI_TOOLING_HOME is /Applications/IntegrationStudio.app.

Microsoft Sync Framework 2 fails in service - Class not registered error

I'm building a file synchronization services using Microsoft Sync Framework 2.
When I run the console Sample application it works fine.
When I put the code in a windows service.
I get the error :
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Synchronization.Files.dll
Additional information: Retrieving the COM class factory for component with CLSID {C201C012-C929-4D72-B9C5-341D48630630} failed due to the following e
rror: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I can create FileSyncOptions and FileSyncScopeFilter objects even in the service but when I reach
provider = new FileSyncProvider(replicaRootPath, filter, options);
I get the error.
I don't think it's a registration problem with the dll since I can recreate some objects from the same dll.
I even registered the Microsoft.Synchronization dll in the GAC.
What do I need to do to run Microsoft Sync Framework in a windows service ?
Thanks
Thanks
make sure your Sync Framework platform (x86, x64) matches your projects target platform

Unable to implement Rational Team Concert (RTC) plain jars to create work items via REST API calls from a WebSphere Server Application

When trying to integrate RTC plain jars into a customized WebSphere server application, exception occurred at below code line.
this.teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(this.repositoryURI);
Exception:
[12/2/15 16:04:19:883 SGT] 000000a4 BusinessExcep E CNTR0020E: EJB
threw an unexpected (non-declared) exception during invocation of
method "createTestAutoDefect" on bean
"BeanId(RTCWebClientEAR#RTCWebClient.war#RTCWorkItemHandler, null)".
Exception data: java.lang.NoClassDefFoundError:
com.ibm.team.repository.client.internal.ContributorManager
(initialization failure) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:177) at
com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:427)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:113)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:132)
...
Caused by: java.lang.IllegalArgumentException: The type name
Contributor and the namespace URI com.ibm.team.repository do not
resolve to an IItemType. at
com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:192)
at
com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:93)
at
com.ibm.team.repository.client.internal.ContributorManager.createAllContributorsQuery(ContributorManager.java:72)
at
com.ibm.team.repository.client.internal.ContributorManager.<clinit>(ContributorManager.java:60)
at java.lang.J9VMInternals.initializeImpl(Native Method) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:237) at
com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:427)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:113)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:132)
It seems classes in the RTC plain jars are not properly loaded.
Those jars were put into the library folder of the EAR that hosts the web project that implements RTC functions.
Resolved the issue by tweaking WebSphere's class loading behavior as below:
In the RAD (eclipase core) IDE, right Click on the EAR that contains the web project for RTC client
-> Java EE
-> Open WebSphere Application Server Deployment, go to Application section and make Classloader mode: PARENT_LAST and WAR classloader policy: APPLICATION
Found this solution via: https://jazz.net/forum/questions/75680/cant-connect-to-jazz-server-in-was-70?page=1&focusedAnswerId=75682#75682
The cause could most likely be because of missing plugin configurations in eclipse classes, resulting from class loading behavior.
WebSphere is implemented through OSGI technology like eclipse, hence the eclipse platform classes by default are loaded from WebSphere, not the RTC client libraries (plain RTC jar files) included in the EAR application.
Hence a possible solution would be to reverse the class loading policy.
Looking at this thread and this one, it seems to be:
an issue when using a non-executable jar file
or, as in here, a symptom of not having all required jar files on the classpath

Error while testing BPEL project

Running Netbeans 6.5.1 with OpenESB (Glassfish-full-installer-windows2.1).
I'm using this tutorial (http://www.youtube.com/watch?v=a76RxkzB4Bg) as reference to orchestrate web services by calling a local WSDL that invokes an external WSDL (http://www.webservicex.net/CreditCard.asmx?WSDL). I have my BPEL ready
and my Composite Application created, it automatically binds a SOAP call from my local WSDL to the BPEL (Consumer to Producer), I had to drag and drop another SOAP object and configure it with the same interface as my local WSDL to receive the output from the invoke action (is that correct?).
When I run my test case selecting the operation from my local WSDL, I get the following SoapResponse:
<SOAP-ENV:Fault>
<faultcode xmlns="">SOAP-ENV:Server</faultcode>
<faultstring xmlns="">BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &a....Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
<faultactor xmlns="">sun-bpel-engine</faultactor>
<detail xmlns="">
<detailText>BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &a... Sending errors for the pending requests in the process scope before terminating the process instance
Caused by: BPCOR-6131: An Error status was received while doing an invoke (partnerLink=externalBPELImplementation, portType={http://www.webservicex.net}CCCheckerSoap, operation=ValidateCardNumber)
BPCOR-6129: Line Number is 37
BPCOR-6130: Activity Name is Invoke1
Caused by: HTTP Status-Code 404: Not Found - Not Found</detailText>
</detail>
I've created a separated project to test the external WSDL and it is validating credit card numbers as expected, there's something wrong with my BPEL or my Composite Application.
If I create another test case and select the local port that is created when I drag and drop the Soap object into the Comp. App. Design interface, I get a different error:
Dec 24, 2012 12:54:11 AM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection call
SEVERE: SAAJ0006: Bad URL (endPoint instance of String)
java.net.MalformedURLException: no protocol:
any ideas?
Your process seams to be correct (at the first look).
It looks like your process can't find the service you ask:
BPCOR-6130: Activity Name is Invoke1 - Caused by: HTTP Status-Code 404: Not Found - Not Found
Is your "soap adress" in the wsdl you imported correct ?
Have you try to overload the url in the bpel mapping ? (Properties -> SOAP HTTP BC -> Outbound -> UR)
There is also something strnage in your CASA: If you are trying to consume "localCreditCard_WSDLPort" and expose in OpenESB "casaPort1", the SOAP Binding are inversed. The arrow should start from casaPort1 and finish at localCreditCard_WSDLPort.
I hope this could help you,
Simon
According to #brasseld from www.open-esb.net
In fact, you've made two mistake :
The first one, for your unit test, you have to use the good WSDL which come from the BPEL because you've created a concrete SOAP WSDL
(CreditCard_WSDL.wsdl).
Then, when you create a new port in your composite application for your plnk externalServiceCard_WSDL, you have to set the soap address
location by right-click > properties. By default, this one is set to
localhost:${HttpDefaultPort}/compositeapp/casaportX?wsdl that's why
you encounter your errors (404 or bad url error).
Based on his suggestions, I've decided to document the development process step-by-step, here's the result:
http://www.youtube.com/watch?v=-1W1xR3-iJQ

Apache Axis NoClassDefFoundError when trying to list services

I'm getting an exception being thrown when I try and list my Axis-powered web services, when I try and access the WSDL for any service and when I try and use the service in question:
Servlet.service() for servlet AxisServlet threw exception
java.lang.NoClassDefFoundError: com.example.MyAwesomeServiceSoapBindingImpl
Now, I know that class is available in a jar in the Axis web service's WEB-INF/lib directory, and I have reloaded Axis since I put it there.
Any ideas, anyone?
[tomcat 5.5.x, Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)]
The object that MyAwesomeServiceSoapBindingImpl wraps isn't instantiating property.
I'm guessing that underlying problem is masked by this (apparently totally unrelated at first glance) type of problem because of the way Axis initialises its services...
Once I fixed the underlying problem everything kicked back into life.