Rmid and Java Service Wrapper
I attempted to run RMID by specifying the 'main' class to Java Service Wrapper but ran into trouble with permissions. Even a security policy granting all permissions wasn't sufficient.
Has anyone succeeding in running RMID this way? Or any other way of running it properly as a Windows service (SRVANY doesn't count as it doesn't shutdown RMID cleanly).
When asked to shutdown the service, SRVANY abruptly terminates RMID. This means that any 'child' JVM's remain rather than being shutdown. In addition, on Vista, it often results in an IPv6 port 1098 persisting and blocking a subsequent attempt to restart the service.
mthornton wrote:
The problem was Java permissions not operating system permissions. I tested it under my own account.
Have you succeeded in getting rmid running under Java Service Wrapper?I have many apps in production using the Java Service Wrapper but none with rmid, sorry.
You said that you have adjusted the Java permissions.
Did you follow the advice in the FAQ ?
http://wrapper.tanukisoftware.org/doc/english/faq.html#5
Similar Messages
-
Anyone familiar with the Java Service Wrapper?
I'm getting errors when trying to use the Java Service Wrapper. My wrapper.conf file looks like this:
# Wrapper License Properties (Ignored by Community Edition)
# Include file problems can be debugged by removing the first '#'
# from the following line:
##include.debug
#include ../conf/wrapper-license.conf
#include ../conf/wrapper-license-%WRAPPER_HOST_NAME%.conf
# Wrapper Java Properties
# Java Application
wrapper.java.command=%JAVA_HOME%\bin\java.exe
# Tell the Wrapper to log the full generated Java command line.
wrapper.java.command.loglevel=INFO
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=C:\dbbackup\lib\wrapper.jar
wrapper.java.classpath.2=%JAVA_HOME%\lib\tools.jar
wrapper.java.classpath.3=C:\dbbackup\apps\JavaApplication110.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=C:\dbbackup\lib
# Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
wrapper.java.additional.auto_bits=TRUE
# Java Additional Parameters
#wrapper.java.additional.1=
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=JavaApplication110.Main
# Wrapper Logging Properties
# Enables Debug output from the Wrapper.
# wrapper.debug=TRUE
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=../logs/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
# Wrapper General Properties
# Allow for the use of non-contiguous numbered properties
wrapper.ignore_sequence_gaps=TRUE
# Title to use when running as a console
wrapper.console.title=Test Wrapper Sample Application
# Wrapper Windows NT/2000/XP Service Properties
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.name=dbbackup
# Display name of the service
wrapper.displayname=dbbackup
# Description of the service
wrapper.description=Test Wrapper Sample Application Description
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START, DELAY_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
STATUS | wrapper | 2010/04/05 19:56:22 |
STATUS | wrapper | 2010/04/05 19:56:22 | Launching a JVM...
INFO | wrapper | 2010/04/05 19:56:22 | command: "C:\Program Files\Java\jdk1.5.0_11\bin\java.exe" -Djava.library.path="C:\dbbackup\lib" -classpath "C:\dbbackup\lib\wrapper.jar;C:\Program Files\Java\jdk1.5.0_11\lib\tools.jar;C:\dbbackup\apps\JavaApplication110.jar" -Dwrapper.key="uDobXEdkbmmNM22u" -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=584 -Dwrapper.version="3.4.0" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp
INFO | jvm 1 | 2010/04/05 19:56:23 | WrapperManager: Initializing...
INFO | jvm 1 | 2010/04/05 19:56:23 |
INFO | jvm 1 | 2010/04/05 19:56:23 | WrapperSimpleApp Usage:
INFO | jvm 1 | 2010/04/05 19:56:23 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
INFO | jvm 1 | 2010/04/05 19:56:23 |
INFO | jvm 1 | 2010/04/05 19:56:23 | Where:
INFO | jvm 1 | 2010/04/05 19:56:23 | app_class: The fully qualified class name of the application to run.
INFO | jvm 1 | 2010/04/05 19:56:23 | app_arguments: The arguments that would normally be passed to the
INFO | jvm 1 | 2010/04/05 19:56:23 | application.
ERROR | wrapper | 2010/04/05 19:56:24 | JVM exited while loading the application.
STATUS | wrapper | 2010/04/05 19:56:28 | CTRL-C trapped. Shutting down.
STATUS | wrapper | 2010/04/05 19:56:28 | <-- Wrapper StoppedI got it to work. Still not sure what I was doing wrong. I just copied a wrapper config I had for launching JBoss and implemented it into my application.
wrapper.java.command=%JAVA_HOME%/bin/java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=C:/dbbackup/lib/wrapper.jar
wrapper.java.classpath.2=%JAVA_HOME%/lib/tools.jar
wrapper.java.classpath.3=C:/dbbackup/bin/JavaApplication110.jar
wrapper.java.library.path.1=C:/dbbackup/lib
# these are the JAVA_OPTS
wrapper.java.additional.1=-Dprogram.name=%PROGNAME%
wrapper.java.additional.2=-server
wrapper.java.additional.3=-Xms128m
wrapper.java.additional.4=-Xmx512m
wrapper.java.additional.5=-Dsun.rmi.dgc.client.gcInterval=3600000
wrapper.java.additional.6=-Dsun.rmi.dgc.server.gcInterval=3600000
wrapper.app.parameter.1=javaapplication110.Main
wrapper.logfile=C:/dbbackup/logs/wrapper.log
wrapper.ntservice.name=DBbackup
wrapper.ntservice.displayname=DBbackup
wrapper.ntservice.description=Starts and stops
wrapper.ntservice.starttype=AUTO_START -
Dear all,
How could I turn the following java application into a service running under Linux and make it started automatically when the system is restarted using Java Service Wrapper?
The instructions on the Java Service Wrapper website is too complex for me to follow. The application below just write the current time to a file every 5 seconds.
If possible, please give me some step by step instruction about how to configure, install and verify the results.
Thanks
Yu
package timertest;
import java.util.Timer;
public class Main {
Timer timer;
public Main(int seconds) {
timer = new Timer();
//timer.schedule(new ReminderTask(),seconds * 1000, seconds * 1000);
ReminderTask task = new ReminderTask();
timer.scheduleAtFixedRate(task,seconds * 1000, seconds * 1000);
public static void main(String[] args) {
System.out.println("About to schedule task.");
new Main(5);
System.out.println("Task scheduled.");
package timertest;
import java.util.TimerTask;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.lang.Thread;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.io.*;
public class ReminderTask extends TimerTask {
public synchronized void run() {
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
try {
// Create file
FileWriter fstream = new FileWriter("out.txt");
BufferedWriter out = new BufferedWriter(fstream);
out.write(dateFormat.format(new Date()));
//Close the output stream
out.close();
} catch (Exception e) {//Catch exception if any
System.err.println("Error: " + e.getMessage());
}I suggest you read how to create a startup script in Linux. It doesn't matter that you program is written in java.
[http://www.google.co.uk/search?q=linux+startup+scripts] -
JNI -- Windows Service (Java Service Wrapper) -- Winamp
Hi!
I'm developing an application to control Winamp player and this application is supposed to run as a Windows Service (via Java Service Wrapper). Winamp is
handled via JNI (c library dll).
The thing is:
When I start the application as a service, my application tries to control Winamp (eg play, pause) but it doesn't work. I can see (prints) that my application is working but all the calls of the dll that interacts with Winamp don't answer. Instead, when I stop the service, I can see finaly all the prints (I introduced in the dll play, pause functions).
Can anybody give a hand? It seems that the JNI is not working properly (in my humble opinion).
Thanks for your attention.
Best Regards
NunoIn my java application:
System.out.println("Before play!");
play( ); //Native method...
System.out.println("After play!");
sleep(10*1000);
System.out.println("Before pause!");
pause ( ); //Native method...
System.out.println("After pause!");
In c file (dll lib):
JNIEXPORT void JNICALL Java_WinampController_play
(JNIEnv *env, jobject obj) {
printf("-> cpp - Play \n");
initWinampHandle();
if (hwnd_winamp != NULL) {
SendMessageA(hwnd_winamp, WM_COMMAND, WA_PLAY,
WA_NOTHING);
printf("<- cpp - Play \n");
JNIEXPORT void JNICALL Java_WinampController_pause
(JNIEnv *env, jobject obj) {
printf("-> cpp - Pause \n");
initWinampHandle();
if (hwnd_winamp != NULL) {
SendMessageA(hwnd_winamp, WM_COMMAND, WA_PAUSE,
WA_NOTHING);
printf("<- cpp - Pause \n");
Result... (log file)
Before play!
After play!
Before pause!
After pause!
And only after I stop the service, the cpp printf appear... :(
-> cpp - Play
<- cpp - Play
-> cpp - Pause
<- cpp - Pause
Thanks -
Java Service Wrapper service is not being listed in the list of services
I wrote a sample program which uses Java Service Wrapper. But it's not being listed as a Service in the list of Windows' Services. Any ideas why?
Thanks.Hi Amar,
need your help. i am facing the same issue.
how did you resolved it . please let us know.
Thanks,
Santosh -
Why does java service wrapper restarts only 5 times?
Hi, i have a problem in restarting my wrapper on demand.
I have a server and there this wrapper is running. The wrapper provides a service. This service is should be restarted after each call, because of avoiding problems with a memory or resource leak.
In my application i use WrapperManager.restart() of wrapper.jar from http://wrapper.tanukisoftware.org/.
I know that i can set the property wrapper.max_failed_invocations more than 5. But i want to restart the service every time after calling it. What can i do?
The log output is
STATUS | wrapper | JVM requested a restart.
FATAL | wrapper | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | There may be a configuration problem: please check the logs.
STATUS | wrapper | <-- Wrapper StoppedHmm, 159 Watt diff, that's interesting, can't picture Hard Drives using that much, can you disconnect one devie at a time to test it's not them?
-
I'm running RMID (jre 1.6_u03) on Vista and if I stop it by terminating the command window (or stopping the service if using SRVANY), then frequently the IPv6 socket remains, the normal IPv4 socket on 1098 does disappear. This bogus socket then prevents rmid from being restarted until I reboot the machine.
If I stop rmid by remotely invoking the shutdown method, then all sockets are released cleanly. However this doesn't work properly with SRVANY which doesn't notice that its child has terminated, so the 'service' is still shown as live.
Has anyone else encountered this problem?mthornton wrote:
The problem was Java permissions not operating system permissions. I tested it under my own account.
Have you succeeded in getting rmid running under Java Service Wrapper?I have many apps in production using the Java Service Wrapper but none with rmid, sorry.
You said that you have adjusted the Java permissions.
Did you follow the advice in the FAQ ?
http://wrapper.tanukisoftware.org/doc/english/faq.html#5 -
Problems with ShutdownHook and Windows Service
Hi friends,
I am facing a problem with the ShutdownHook when a Java program is run as a Windows Service. In the program I am having a Daemon Thread which will be run in an infinite while loop accoridng to a boolean variable. I have a shutdown hook also which sets the boolean variable so that the Daemon Thread will be stopped gracefully. When i am using Ctrl-C the shutdown Hook is started and the Thread is stopped gracefully.
Later i have made my program as a Windows Service using a utility Java Service Wrapper. But when i stop the service though the Services Window the ShutdownHook is not getting called. I was not able to fnd out why it is happening like that.
Any help will be highly appreciated. Thanks in advance.Hi Drmetz
If you are waiting on a reply it could be some time, as this is the *Mac OS X v10.3 & earlier* forum and few here know about Windows, parallels MacBooks or the Tiger OS.
Mac's cover a wide field.
You could try reposting in this forum which would be your best best I think.
Windows Compatibility forum
http://discussions.apple.com/forum.jspa?forumID=687
also
MacBook forum
http://discussions.apple.com/category.jspa?categoryID=218
or even the Tiger Forum
http://discussions.apple.com/category.jspa?categoryID=160
Good luck,
regards roam -
(261680070) Q SYNCH-11 How do my web service methods accees EJBs and java classes?
A<SYNCH-11> How do my web service methods accees EJBs and java classes?
A<SYNCH-11> It is simple to use java classes, just do it as you would ordinarily.
The .jws file really contains a simple class so you can program with it in the same
way that you would use a regular Java class.
To use an EJB you can go and access it directly as you would with any EJB remote
client (lookup home stub, create, etc) or if the EJB is deployed to WLS you can use
a control to provide a very simple wrapper to the EJB. We will see this in detail
on Thursday in the ADVC module.Futher information about the possibility of callback:
It may be possible for a synchronous only web service (i.e. MS .net) to even paticipant
in the callback functionality of asynchronous web services. If the client implements
the appropriate methods for the callback but listens for them on a different port
or binding than the SOAP request, then web service may be able to build a response
if the client's "callback URL" is submitted as the beginning part of a conversation.
Watch the BEA developer forum (http://dev2dev.bea.com) for more information about
this approach and other tips and techniques for building web services.
"Adam FitzGerald" <[email protected]> wrote:
>
Q<SYNCH-03> I heard that MS .net only implements synchrnonus method? If
this is true.
Does it means my async methods will only work with J2EE clients?
A<SYNCH-03> I do not know the limitations of .net but let me point out that
is very
difficult to provide asynchronous web service method invocation (this is
different
from an asynchronous web service). HTTP as a general communication protocol
is based
on a request and response paradigm so your client libraries will mostly
likely be
expecting a response even if it is empty (check the asynchronous example
from today
to see that the start method still returns an empty response). You must
distinguish
this from the notion of an asynchronous web service which is a business
operation
that occurs on the server whose return value/result is not directly associated
with
building response to the client. An asynchronous web service can (and generally
will)
be started and stopped with web service operations that are invoked synchronously.
Thus MS .net clients can still be client to WLS hosted web services. -
Explicity mapping between ActionScript and Java objects for the BlazeDS Messaging Service
The BlazeDS documentation shows how to explicitly map between ActionScript and Java objects. For example, this works fine for RPC services, e.g.
import flash.utils.IExternalizable;
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
[Bindable]
[RemoteClass(alias="javaclass.User")]
public class User implements IExternalizable {
public var id : String;
public var secret : String;
public function User() {
public function readExternal(input : IDataInput) : void {
id = input.readObject() as String;
public function writeExternal(output : IDataOutput) : void {
output.writeObject(id);
and
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
public class User implements Externalizable {
protected String id;
protected String secret;
public String getId() {
return id;
public void setId(String id) {
this.id = id;
public String getSecret() {
return secret;
public void setSecret(String secret) {
this.secret = secret;
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
id = (String) in.readObject();
public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(id);
If I called an RPC service that returns a User, the secret is not sent over the wire. Is it also possible to do this for the messaging service? That is, if I create a custom messaging adapter and use the function below, can I also prevent secret from being sent?
MessageBroker messageBroker = MessageBroker.getMessageBroker(null);
AsyncMessage message = new AsyncMessage();
message.setDestination("MyMessagingService");
message.setClientId(UUIDUtils.createUUID());
message.setMessageId(UUIDUtils.createUUID());
User user = new User();
user.setId("id");
user.setSecret("secret");
message.setBody(user);
messageBroker.routeMessageToService(message, null);Hi Martin. The way that AMF serialization/deserialization works for BlazeDS is the same regardless of which service is being used, so yes that code will work for messaging as well. On the server, the serialization/deserialization of messages happens at the endpoint. For an incoming message for example, the endpoint deserializes the message and then hands it off to the MessageBroker which decides which service/destination to deliver the message to.
That was a good question. Thanks for asking it. Lots of people are used to doing custom serialization/deserialization with the RPC services (RemoteObject/RemotingService) but I'm not sure everyone realizes they can do this for messaging as well.
-Alex -
Intermittent problem in Coldfusion 9, BlazeDS with Java Service class and CFCProxy
If that title doesn't scare you, you might be able to help.
I believe there is a bug in Coldfusion 9's version of CFCProxy.
Tech Stack:
Flex Application
BlazeDS (stock with CF9)
Java Service class (java-amf BlazeDS endpoint)
Coldfusion business tier, invoked by the Java Service class using CFCProxy
Tomcat 6 on Java 1.6
Linux or Windows servers, both exhibit same behavior
SQL Server database
Problem:
When Flex calls a Java service method through BlazeDS that invokes a Coldfusion CFC through CFCProxy, and the method called in the Coldfusion CFC includes a large query (10 fields, 1000+ records returned), we intermittently (1 out of ~5 times) receive the following exception:
java.lang.NullPointerException
at coldfusion.runtime.NeoPageContext.popBody(NeoPageContext.java:1925)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:57)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:437)
at coldfusion.cfc.CFCProxyFilter.invoke(CFCProxyFilter.java:56)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.cfc.CFCProxy.doInvoke(CFCProxy.java:281)
at coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:193)
at com.lampo.mapping.service.MapToolWebService.makeCfcProxyCall(MapToolWebService.java:1326)
at com.lampo.mapping.service.MapToolWebService.getTerritoryList(MapToolWebService.java:609)
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 flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:418)
at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1400)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005)
at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)
at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166)
at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:353)
at coldfusion.flex.ColdfusionMessageBrokerServlet.service(ColdfusionMessageBrokerServlet.jav a:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at coldfusion.filter.FlashRequestControlFilter.doFilter(FlashRequestControlFilter.java:71)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
Attempts to diagnose:
These things remove the problem:
CF8 works perfectly with the identical code, never fails.
Calling the same Coldfusion CFC method with the large query (10 fields, 1000+ records returned) from another CFC 100+ times never fails.
Using a Coldfusion service class (a "my-cfamf" BlazeDS endpoint) never fails. However, we need to use a Java service class because we are using ~40 Java value objects (VOs) that correspond to ~40 auto-generated Actionscript VOs. BlazeDS won't correctly deserialize the Actionscript VOs into the Java VOs with a Coldfusion service class.
If I replace the large query with a Sleep(5000) instead, it never fails.
These things don't remove the problem:
Using the latest Microsoft JDBC driver doesn't help.
Even if the Coldfusion method returns an empty resultset (i.e., just calls the query and doesn't do any other work or return anything), the call still fails intermittently.
If the Coldfusion CFC with the method in question is instantiated and stored in SERVER scope as a singleton across multiple requests with CFCProxy, doesn't help.
Different large (1000+ record queries) all fail in the same way.
Caching the query doesn't help
Changes in the datasource configuration doesn't help
Using the older version of BlazeDS doesn't help
With all of these tests, I believe it comes down to a problem in the combination between CFCProxy and large queries. There may be more to it, but that is what we've narrowed it down to.
Any insight would be very welcome.Hi Frank
The page is ADF bound, I've added the page source and the adfc-config source below :
Page
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:commandButton text="commandButton 1" id="cb1"
actionListener="#{test.testws}"/>
</af:form>
</af:document>
</f:view>
</jsp:root>adfc-config
<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
<view id="view1">
<page>/view1.jspx</page>
</view>
<managed-bean id="__4">
<managed-bean-name id="__3">test</managed-bean-name>
<managed-bean-class id="__2">ch.mit.test.test</managed-bean-class>
<managed-bean-scope id="__1">request</managed-bean-scope>
</managed-bean>
</adfc-config>It seems to be the same sort of problem as in Re: Error in ADF Web Service Connection
Regards
Paul -
Workflow step (Approve Action) calling custom Java Service and "passing params"
Good Afternoon, Fellow Coders!
Normally I research and do proof of concepts until I find a solution but given super tight deadlines, I just don't have time - so I need your help.
I am trying to have an Workflow Approve Action (Workflow Exit Event idocScript call) call a Custom Component (Java Service) AND "pass" some kind of parameters (bare minimum dDocName)
In a perfect world it would be as simple as: processContentInfo(String dDocName, String xMyCode1, String xMyCode2);
But since I am calling the Java Service from idocScript (via executeService) I cannot directly pass params via the API.
Is there a simple way to do this??
It seems like if you can't directly pass params you could at least set them in the managed container (m_binder) and just know to pick them up on the Java side via some DataBinder like m_binder.getLocal(
Am I missing a simple idocScript function that will let you do this?
Note: I am NOT executing the Service from a URL so the normal ?param1¶m2 -> m_binder.getLocal solution is no good.
Also, Bex's book warns about Service Classes "not easily being able to call other UCM Services".... My Custom Service needs to do exactly that (as well as JDBC and other stuff). Is this really an issue??
Seems like as long as I have dDocName I could use RIDC to hit whatever I want as long as I know how to use a binder, etc - is there some mystic nuance that prevents this? Or was he just saying it's hard UNLESS you know RIDC well??
Any and all quality advice is appreciated! And please, try to give me a detailed answer as opposed to something vague like "try a Service Handler", I need something I can quickly digest.
Thanks in advance!You can set parameters for the service call by setting Idoc Script variables before you call executeService.
<$dDocName="TEST12345"$>
<$param1="09876"$>
<$param2="ABCDEFG"$>
These variables are then available via the service DataBinder.
Here is information about how to execute a service from a custom component. There should not be any issues doing this.
http://www.redstonecontentsolutions.com/5/post/2012/05/executing-a-service-from-aservicehandler.html
http://jonathanhult.com/blog/2012/06/execute-a-service-from-a-java-filter/
Jonathan
http://jonathanhult.com -
JAVA beans and JAVA related services require Oracle client to be installed?
Can you please advice whether an application server that make use of JAVA beans and JAVA related services require Oracle client to be installed? For an example if the solution build based on Java and JBOSS to be used as application server, do we still require oracle client to be installed and configure the tnsnames in order to communicate to database server?
SHANOJ wrote:
Can you please advice whether an application server that make use of JAVA beans and JAVA related services require Oracle client to be installed? For an example if the solution build based on Java and JBOSS to be used as application server, do we still require oracle client to be installed and configure the tnsnames in order to communicate to database server?Oracle client is not required when JDBC is used to connect to the remote DB -
Exception when connecting to Reporting and Analysis services from Java API
Hello,
I'm trying to connect to Hyperion Reporting and Analysis services from Java API using [Developer's guide|http://www.bidw.in/docs/hs_developer.pdf] .
I get this error:
com.sqribe.rm.ReportMartException: com/hyperion/css/CSSException
at com.sqribe.rm.SessionImpl.convertError(Unknown Source)
at com.sqribe.rm.AASessionImpl.open(Unknown Source)
at com.sqribe.rm.AASessionImpl.internalInit(Unknown Source)
at com.sqribe.rm.AASessionImpl.<init>(Unknown Source)
at com.sqribe.rm.SessionFactory.getInstance(Unknown Source)
...My code:
String user = "user";
String pwd = "password";
String host = "my.hyperion.server";
int port = 6800;
try {
Session theSession = SessionFactory.getInstance(user, pwd, host, port);
Repository theRepository = theSession.getRepository();
} catch (UserValidationException e) {
e.printStackTrace();
} catch (UnknownReportMartException e) {
e.printStackTrace();
} catch (ReportMartException e) {
e.printStackTrace();
}I have tried to look at my services running, and it all looks OK. I've checked user/passowrd/port for GSM. What can be wrong?
I also tried to run samples from \BIPlus\SDK\samples\java, e.g. Login.java:
#> java Login user password my.hyperion.server 6800with this effect
com.sqribe.rm.ReportMartException: SystemExceptionError
at com.sqribe.rm.SessionImpl.convertError(Unknown Source)
at com.sqribe.rm.AASessionImpl.open(Unknown Source)
at com.sqribe.rm.AASessionImpl.internalInit(Unknown Source)
at com.sqribe.rm.AASessionImpl.<init>(Unknown Source)
at com.sqribe.rm.SessionFactory.getInstance(Unknown Source)
at Login.<init>(Login.java:36)
at Login.main(Login.java:69)I'm sure that I'm connecting to the server because when put wrong passowrd or user as input to Login class I get this:
com.sqribe.rm.ReportMartException: AUTHEN_CSSLoginFailed
at com.sqribe.rm.SessionImpl.convertError(Unknown Source)
at com.sqribe.rm.AASessionImpl.open(Unknown Source)
at com.sqribe.rm.AASessionImpl.internalInit(Unknown Source)
at com.sqribe.rm.AASessionImpl.<init>(Unknown Source)
at com.sqribe.rm.SessionFactory.getInstance(Unknown Source)
at Login.<init>(Login.java:36)
at Login.main(Login.java:69)so it is there but something is wrong later. Any idea what?
Please help.
regards,
Pawel
Edited by: Paoro on 2010-09-27 02:02HI,
I am getting the same error while running the Login file, Did any one resolve this issue?
Please share the solution.
Thanks. -
Need Java API's to create OSB proxy and Business Services
Hi All,
I need to create OSB proxy and business services using Java API's. Does any one have reference to the OSB APIs??AFAIK it is proprietary.
What I do in a similar situation is to form XML for the services, package them into JAR the same way as an import JAR is packaged (creating ExportInfo resource, ...) and deploy with standard WSLT script. Works for simplest services only (direct proxies mostly) but I can also form security, alerts, throttling etc etc etc -- all in one shot.
Out of sheer interest, may I ask you a question? Why do you need to create OSB services from Java?
Vlad
http://vladimirdyuzhev.com
Maybe you are looking for
-
Download and Install Oracle 8.1.6
Hi, I have a GREAT problem. I have to install Oracle 8.1.6 on Solaris Platform, but I didn't find it. Oracle considers this version obsolete and so we can't find it on http://otn.oracle.it. Where I can find this Oracle version?? Do you know a link wh
-
I have been sampling new imported drum loops. And if I adjust region to song or time strecth it updates the audio file in the library. How to stop this? I lost the original setting to one loop. automatically doing it ??
-
Discoverer EUL5 Status Workbooks
Hi, We have tried to load the EUL5 Status Workbooks in to our EUL. Two of the 5 workbooks have loaded successfully but "Query Statistics", "Data Definition" and "Workbook Management" have not been imported. This appears to be an Access Privs issue, b
-
Safari 5.03 crashes every time
Hi people, I've googled the problems with Safari 5.03 and have seen people getting similar problems when launching Safari. I also have them. I tried a number of options like deleting the cache of Safari, but the problem still persists. I'm thinking o
-
I have a new Kakkoi WOW speaker. I can pair it with my iphone 5, but when I try to pair it with my computer I get this error message: "The pairing attempt was unsucessful. Make sure your headset is in range of this computer, turned on, and discoverab