I write my own type of exception (extends from java Exception).
And I got exception on GWT's generated class xxx_FieldSerializer .
the error message look like this:
Object reference not set to an instance of an object.
com.xxx.shared.csharpsystem.exception.MyException_FieldSerializer Method name : instantiate LINE_NUMER : 16
com.xxx.shared.csharpsystem.exception.MyException_FieldSerializer Method name : create LINE_NUMER : 25
com.google.gwt.user.client.rpc.impl.SerializerBase Method name : instantiate LINE_NUMER : 115
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader Method name : deserialize LINE_NUMER : 111
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader Method name : readObject LINE_NUMER : 119
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter Method name : onResponseReceived LINE_NUMER : 216
com.google.gwt.http.client.Request Method name : fireOnResponseReceived LINE_NUMER : 287
com.google.gwt.http.client.RequestBuilder$1 Method name : onReadyStateChange LINE_NUMER : 395
sun.reflect.NativeMethodAccessorImpl Method name : invoke0 LINE_NUMER : -2
sun.reflect.NativeMethodAccessorImpl Method name : invoke LINE_NUMER : 57
sun.reflect.DelegatingMethodAccessorImpl Method name : invoke LINE_NUMER : 43
java.lang.reflect.Method Method name : invoke LINE_NUMER : 601
com.google.gwt.dev.shell.MethodAdaptor Method name : invoke LINE_NUMER : 103
com.google.gwt.dev.shell.MethodDispatch Method name : invoke LINE_NUMER : 71
com.google.gwt.dev.shell.OophmSessionHandler Method name : invoke LINE_NUMER : 172
com.google.gwt.dev.shell.BrowserChannelServer Method name : reactToMessagesWhileWaitingForReturn LINE_NUMER : 337
com.google.gwt.dev.shell.BrowserChannelServer Method name : invokeJavascript LINE_NUMER : 218
com.google.gwt.dev.shell.ModuleSpaceOOPHM Method name : doInvoke LINE_NUMER : 136
com.google.gwt.dev.shell.ModuleSpace Method name : invokeNative LINE_NUMER : 561
com.google.gwt.dev.shell.ModuleSpace Method name : invokeNativeObject LINE_NUMER : 269
com.google.gwt.dev.shell.JavaScriptHost Method name : invokeNativeObject LINE_NUMER : 91
com.google.gwt.core.client.impl.Impl Method name : apply LINE_NUMER : -1
com.google.gwt.core.client.impl.Impl Method name : entry0 LINE_NUMER : 213
sun.reflect.NativeMethodAccessorImpl Method name : invoke0 LINE_NUMER : -2
sun.reflect.NativeMethodAccessorImpl Method name : invoke LINE_NUMER : 57
sun.reflect.DelegatingMethodAccessorImpl Method name : invoke LINE_NUMER : 43
java.lang.reflect.Method Method name : invoke LINE_NUMER : 601
com.google.gwt.dev.shell.MethodAdaptor Method name : invoke LINE_NUMER : 103
com.google.gwt.dev.shell.MethodDispatch Method name : invoke LINE_NUMER : 71
com.google.gwt.dev.shell.OophmSessionHandler Method name : invoke LINE_NUMER : 172
com.google.gwt.dev.shell.BrowserChannelServer Method name : reactToMessages LINE_NUMER : 292
com.google.gwt.dev.shell.BrowserChannelServer Method name : processConnection LINE_NUMER : 546
com.google.gwt.dev.shell.BrowserChannelServer Method name : run LINE_NUMER : 363
java.lang.Thread Method name : run LINE_NUMER : 722
and the code of file MyException.java is :
public class MyException extends Exception implements java.io.Serializable
{
public MyException ()
{
super();
}
public MyException (String Exception, String StackTrace)
{
super(Exception);
if (!StackTrace.equals(""))
{
StackTraceElement[] xStackTraceElementColl = new StackTraceElement[1];
String strDeclaringClass = "";
String strMethodName = StackTrace;
String strFileName = "";
int iLineNo = 0;
xStackTraceElementColl[0] = new StackTraceElement(strDeclaringClass, strMethodName, strFileName, iLineNo);
this.setStackTrace(xStackTraceElementColl);
}
}
}
I don't know why this happen.
thank you for your help.
Related
I am trying to install Tungsten Replicator 4.0 version for Mysql 5.7. I have used binary installation(tar.gz file installation) for Mysql 5.7 and exported path in bash_profile.
./tools/tmp install command got executed successfully but services both master and slave are offline. We are getting below error for service status command.
[tungsten#beta-388 tungsten-replicator-4.0.0-18]$ /opt/continuent//tungsten/tungsten-replicator/bin/trepctl services
Processing services command...
NAME VALUE
---- -----
appliedLastSeqno: -1
appliedLatency : -1.0
role : master
serviceName : beta182_183
serviceType : unknown
started : true
state : OFFLINE:ERROR
NAME VALUE
---- -----
**appliedLastSeqno**:**** **Unknown**
**appliedLatency **:**** **Unknown**
**role** **:** **Unknown**
serviceName : beta183_182
serviceType : Unknown
started : false
state : Unknown
Finished services command...
[tungsten#beta-388 tungsten-replicator-4.0.0-18]$ /opt/continuent//tungsten/tungsten-replicator/bin/trepctl -service beta182_183 status
Processing status command...
NAME VALUE
---- -----
appliedLastEventId : NONE
appliedLastSeqno : -1
appliedLatency : -1.0
autoRecoveryEnabled : true
autoRecoveryTotal : 0
channels : -1
clusterName : beta182_183
currentEventId : NONE
currentTimeMillis : 1579684465335
dataServerHost : beta-388.panterranetworks.net
extensions :
host : beta-388.panterranetworks.net
latestEpochNumber : -1
masterConnectUri : thls://localhost:/
masterListenUri : thls://beta-388.panterranetworks.net:12120/
maximumStoredSeqNo : -1
minimumStoredSeqNo : -1
offlineRequests : NONE
pendingError : Replicator unable to go online due to error
pendingErrorCode : NONE
pendingErrorEventId : NONE
pendingErrorSeqno : -1
pendingExceptionMessage: **Unable to prepare plugin: class name=com.continuent.tungsten.replicator.thl.THL message=[Error while attempting to acquire file lock: /opt/continuent/thl/beta182_183/disklog.lck]**
pipelineSource : UNKNOWN
relativeLatency : -1.0
resourcePrecedence : 99
rmiPort : 10110
role : master
seqnoType : java.lang.Long
serviceName : beta182_183
serviceType : unknown
simpleServiceName : beta182_183
siteName : default
sourceId : beta-388.panterranetworks.net
state : OFFLINE:ERROR
timeInStateSeconds : 15.744
timezone : GMT
transitioningTo :
uptimeSeconds : 15.931
useSSLConnection : true
version : Tungsten Replicator 4.0.0 build 18
Finished status command...
Can anyone please share how to resolve the error? I have tried multiple times with giving all permissions to the file and also uninstalled and reinstalled the tungsten.
Mysql version 5.7 is not support tungsten version 4.0,
https://docs.continuent.com/tungsten-replicator-4.0/introduction.html
Shared your config replicator!
I've two domain class:
class A {
String foo
static hasMany = [children: B]
}
class B {
String bar
static belongsTo = [a: A]
}
I want to save A from JSON like:
{
foo: "Hello world!",
children: [
{bar: "First child!", _ref: "../.."},
{bar: "Second child!", _ref: "../.."}
]
}
(Note: If I don't put _ref, B objects are saved but without reference to A, ie, null values.)
And I have a Restfull Controller like:
class AController extends RestfullController {
static responseFormats = ['json', 'xml']
AController() {
super(A)
}
}
But, when I try to save my object, I got:
ERROR errors.GrailsExceptionResolver - TransientObjectException occurred when processing request: [POST] /example/a/save.json
object references an unsaved transient instance - save the transient instance before flushing: mx.gob.morelos.ppi.Proyecto. Stacktrace follows:
Message: object references an unsaved transient instance - save the transient instance before flushing: A
Line | Method
->> 99 | $tt__save in grails.rest.RestfulController
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
What I need to do to save my JSON with their relations?
Regards.
I'm new to jmeter (as in just started reading about it last week.) I've been given some tests written by someone that's left the company but I cannot get the tests to open in jmeter. According to the .jmx file,
it was written in jmeter 2.9 so I installed 2.9. I got the standard plugins, but it just isn't loading, please see the error message below and let me know if you have any ideas.
Thanks!
2015/03/02 13:35:23 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
---- Debugging information ----
message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree[2]/hashTree[3]/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
line number : 113
------------------------------- : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
---- Debugging information ----
message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree[2]/hashTree[3]/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
line number : 113
-------------------------------
message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
---- Debugging information ----
message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree[2]/hashTree[3]/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
line number : 113
-------------------------------
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:65)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan
/hashTree/hashTree/hashTree/hashTree[2]/hashTree[3]/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
line number : 113
version : 2.9 r1437961
Last Jmeter.plugins require Jmeter 2.11 to work.
I think you have to upgrade Jmeter OR to uninstall Jmeter.plugins.
I would try to upgrade Jmeter to 2.12, usually it makes no harms.
Using Grails with the following versions:
APPLICATION STATUS
App version: 0.1
Grails version: 2.3.5
Groovy version: 2.1.9
JVM version: 1.7.0_51
Reloading active: true
Controllers: 15
Domains: 18
Services: 2
Tag Libraries: 13
I have a domain model that I am trying to follow. I built the tables in MySQL prior to programming.
In the model, I have Insertion_orders that are bound to people (Persons) in a Many-to-Many relationship. This relationship is defined by Insertion_orders_persons, with the person_id & location_id defining an entry in Insertion_orders_persons. In addition there is a type value that is ENUMed either Trafficker, Advertiser, Agency, (or) Salesperson. One (or more) trafficker will always appear, but the rest may, may not or have many of these associations. I am trying to bind them according to type to the Insertion_orders model:
package cms
class Insertion_orders {
String insertion_order_name
String po_number
String notes
String toString() {
"${insertion_order_name} - ${id}"
}
static hasMany = [trafficker: Insertion_orders_traffickers, salesperson: Insertion_orders_salespersons]
static constraints = {
insertion_order_name(blank:false)
po_number()
notes(widget: 'textarea', nullable:true)
}
static mapping ={
version false
id column: 'insertion_order_id'
notes sqlType: 'text'
}
}
I am trying to use inheritance and a discrimiator value to accomplish this.
package cms
class Insertion_orders_persons {
Persons person
Insertion_orders insertion_order
Type type
String toString() {
"${person}: ${type}"
}
enum Type {
Trafficker, Salesperson, Advertiser, Agency
}
static constraints = {
}
static mapping = {
version false
id column: 'insertion_order_person_id'
discriminator column: "type"
}
}
class Insertion_orders_traffickers extends Insertion_orders_persons {
static mapping ={
discriminator value: "Traffickers"
}
}
class Insertion_orders_salespersons extends Insertion_orders_persons {
static mapping ={
discriminator value: "Salesperson"
}
}
The problem is that when I try to join to the extended classes (as in the hasMany in the Insertion_orders class), the Grails fails to start and generates the following:
|Loading Grails 2.3.5
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
..........................................
|Running Grails application
Error |
2014-04-16 11:33:58,693 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: cms.Insertion_orders_salespersons
Message: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: cms.Insertion_orders_salespersons
Line | Method
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: cms.Insertion_orders_salespersons
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: cms.Insertion_orders_salespersons
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
Caused by MappingException: Association references unmapped class: cms.Insertion_orders_salespersons
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
Error |
Forked Grails VM exited with error
As additional information, regardless of how I try to access the subclasses, or the subclass composition, I get the same error.
This seems like a very fundamental functionality. Can someone please tell me what I am missing or doing incorrectly?
If you remove discriminator column: “type” from Insertion_orders_persons and define Insertion_orders_persons, Insertion_orders_traffickers and Insertion_orders_salespersons each in their own source files, I think you code will work.
this is what i mean
i want this
200.22.30.17 : 186 : 186
200.22.30.17 : 1860 : 1860
200.22.30.17 : 1984 : 1984
81.22.148.39 : 1612 : 1612
81.22.148.39 : 1736 : 1736
81.22.148.39 : 1798 : 1798
81.22.148.39 : 186 : 186
81.22.148.39 : 1860 : 1860
81.22.148.39 : 1984 : 1984
20.47.240.254 : 2542 : 2542
20.47.240.254 : 2604 : 2604
to be like this
200.22.30.17 : 186 : 186
81.22.148.39 : 1612 : 1612
20.47.240.254 : 2542 : 2542
any help please !!
I'm not familiar with Notepad++, but if it supports back-references then this ought to work:
Replace ^(\d+\.\d+\.\d+\.\d+ )(.+)\n(\1.+\n)* with \1\2\n
Note: Depending on how the line breaks are stored in your source file, you might have to change each occurrence of \n to \r or \r\n