Sunday, March 6, 2016

WebLogic Web Service: A jws BLA should have a package declaration


Caused by: weblogic.wsee.ws.WsException: A jws [class PVWSImpl01] should have a package declaration.
        at weblogic.wsee.deploy.DeployInfo.validate(DeployInfo.java:356)
        at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:87)
        at javax.servlet.GenericServlet.init(GenericServlet.java:244)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:343)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:294)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
        at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:196)
        at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
        at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
        at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:99)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:87)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:71)
        at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:57)
        at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:31)
        at weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:673)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:612)
        at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2053)
        at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:2030)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1919)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3063)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1830)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:875)
        at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
        at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
        at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)




as the error message says, it's compulsory to assign a package (package com.bla.ws;) to your interface and implementation for your WebService and SEI.


package com.pierre.ws;

import javax.jws.*;

@WebService(portName = "PVWLSWS01Port", serviceName = "PVWLSWS01Service", targetNamespace = "http://com.pierre.ws/", endpointInterface = "com.pierre.ws.PVWLSWS01")
public class PVWLSWS01Impl implements PVWLSWS01 {

 public String hello(String name) {
  System.out.println("Hello " + name);
  return "Hello " + name;
  
 }
}


package com.pierre.ws;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(name = "PVWLSWS01", targetNamespace = "http://com.pierre.ws/")
public interface PVWLSWS01 {

 @WebMethod(operationName = "hello")
 public String hello(String name);
}




Friday, March 4, 2016

test-connections-on-reserve

If you get:

java.sql.SQLException: Protocol violation: [ 0, ] at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:536)
java.sql.SQLRecoverableException: Closed Connection at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:4220) at oracle.jdbc.driver.T4CXAResource.doStart(T4CXAResource.java:187)

then make sure that /jdbc-data-source/jdbc-connection-pool-params/test-connections-on-reserve is set to true


Wednesday, March 2, 2016

The JVM was unable to load the native wlfileio library , on Linux

We are getting this message:

<Warning> <Store> <BEA-280109> <The JVM was unable to load the native wlfileio library for the store "bla". File and paging stores will continue to function correctly. Specifically, file stores that are configured with a transactionally safe synchronous write policy will continue to operate safely and transactionally but may open with a different write-policy. Other store types may not be able to open.> 


http://docs.oracle.com/cd/E21764_01/apirefs.1111/e13952/pagehelp/Corecoreserverserverconfigservicestitle.html#attributes under Synchronous Write Policy it explains a lot
Your default-file-store or file-store should be using in the LD_LIBRARY_PATH env variable one of the following folders / files (LD_LIBRARY_PATH should point to a FOLDER only, not to a specific FILE):
WL_HOME/wlserver/server/native/linux/x86_64/libwlfileio3.so WL_HOME/wlserver/server/native/linux/i686/libwlfileio3.so WL_HOME/wlserver/server/native/win/32/wlfileio3.dll WL_HOME/wlserver/server/native/win/x64/wlfileio3.dll WL_HOME/wlserver/server/native/solaris/sparc64/libwlfileio3.so
Check the java.library.path which should also be initialized to the same value.
Otherwise, run weblogic with strace to find out what is going wrong
See also http://mcgmiddleware.blogspot.ch/2012/03/weblogic-on-linux-x86-64-libmuxer.html and see http://blog.whitehorses.nl/2012/05/30/native-io-in-weblogic-on-solaris-11-x64/
Check also that you are using the 64 bit JVM and not the 32 bit