Command line reported error during generating new database

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/miantian180/article/details/90899235

遇到一个问题,当我更换数据库,或者更换了odoo的data静态文件时,会出现页面错乱;如下图:

这个时候,有两种选择,第一种更换我们的data文件去适配该数据库。

另外一种可以使用 DELETE FROM ir_attachment WHERE url LIKE '/web/content/%' 后

重启服务,重新加载即可。

展开阅读全文

An internal error occurred during: "Generating Artifacts"

08-19

尝试利用MyEclipse的反向工程生成Oracle数据库表的Hibernate的映射文件,报下面的异常:rnAn internal error occurred during: "Generating Artifacts".rnMethodInvocationException while processing template Pojo. Invocation of method 'get' in class com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template pojo/PojoPropertyAccessors.vm. Invocation of method 'get' in class com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template pojo/Ejb3PropertyGetAnnotation.vm. Invocation of method 'generateAnnIdGenerator' in class com.genuitec.eclipse.hibernate.wizards.MEEntityPOJOClass threw exception class java.lang.NullPointerException : null。rn我知道的一种方法是:http://www.cnblogs.com/zhaozhi-1983/archive/2011/03/17/1986425.htmlrn有木有其他的方法解决:rn工程下的.log文件如下:rnrn!MESSAGE An internal error occurred during: "Generating Artifacts".rn!STACK 0rnorg.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template Pojo. Invocation of method 'get' in class rnrncom.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while rnrnprocessing template pojo/PojoPropertyAccessors.vm. Invocation of method 'get' in class com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw rnrnexception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template pojo/Ejb3PropertyGetAnnotation.vm. Invocation of rnrnmethod 'generateAnnIdGenerator' in class com.genuitec.eclipse.hibernate.wizards.MEEntityPOJOClass threw exception class java.lang.NullPointerException : nullrn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:153)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VelocityProducer.firstPass(VelocityProducer.java:82)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VelocityProducer.produce(VelocityProducer.java:31)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VelocityProducer.produce(VelocityProducer.java:120)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VGenericExporter.exportPOJO(VGenericExporter.java:84)rn at com.genuitec.eclipse.hibernate.wizards.MEPOJOExporter.exportPOJO(MEPOJOExporter.java:107)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VGenericExporter.exportPersistentClass(VGenericExporter.java:73)rn at com.genuitec.eclipse.hibernate.wizards.MEPOJOExporter.exportClasses(MEPOJOExporter.java:166)rn at com.genuitec.eclipse.hibernate.wizards.MEPOJOExporter.doStart(MEPOJOExporter.java:140)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VAbstractExporter.start(VAbstractExporter.java:97)rn at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:483)rn at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)rn at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)rn at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:418)rn at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)rnCaused by: org.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template pojo/PojoPropertyAccessors.vm. Invocation of method 'get' in rnrn class com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException rnrnwhile processing template pojo/Ejb3PropertyGetAnnotation.vm. Invocation of method 'generateAnnIdGenerator' in class rnrncom.genuitec.eclipse.hibernate.wizards.MEEntityPOJOClass threw exception class java.lang.NullPointerException : nullrn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:153)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates.get(VTemplateHelper.java:111)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.velocity.runtime.parser.node.GetExecutor.execute(GetExecutor.java:65)rn at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:302)rn at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:157)rn at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)rn at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)rn at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)rn at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70)rn at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)rn at org.apache.velocity.Template.merge(Template.java:256)rn at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:450)rn at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:419)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:141)rn ... 14 morernCaused by: org.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template pojo/Ejb3PropertyGetAnnotation.vm. Invocation of method rnrn'generateAnnIdGenerator' in class com.genuitec.eclipse.hibernate.wizards.MEEntityPOJOClass threw exception class java.lang.NullPointerException : nullrn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:153)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates.get(VTemplateHelper.java:111)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.velocity.runtime.parser.node.GetExecutor.execute(GetExecutor.java:65)rn at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:302)rn at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:157)rn at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)rn at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)rn at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)rn at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70)rn at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)rn at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166)rn at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)rn at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)rn at org.apache.velocity.Template.merge(Template.java:256)rn at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:450)rn at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:419)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:141)rn ... 31 morernCaused by: java.lang.NullPointerExceptionrn at org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateAnnIdGenerator(EntityPOJOClass.java:252)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:267)rn at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:197)rn at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)rn at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)rn at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)rn at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70)rn at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)rn at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70)rn at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)rn at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70)rn at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)rn at org.apache.velocity.Template.merge(Template.java:256)rn at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:450)rn at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:419)rn at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:141)rn ... 51 morern 论坛

An internal error occurred during: "Generating Artifacts". 是什么错误? 在线等!!!

03-08

org.hibernate.HibernateException: Proxool Provider unable to load JAXP configurator file: proxool.xmlrn at org.hibernate.connection.ProxoolConnectionProvider.configure(ProxoolConnectionProvider.java:125)rn at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)rn at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)rn at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:366)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1877)rn at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:71)rn at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$6.execute(GenerateArtifactsJob.java:514)rn at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)rn at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:70)rn at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:509)rn at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:293)rn at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)rnCaused by: org.logicalcobwebs.proxool.ProxoolException: Parsing failed.rn at org.logicalcobwebs.proxool.configuration.JAXPConfigurator.configure(JAXPConfigurator.java:91)rn at org.logicalcobwebs.proxool.configuration.JAXPConfigurator.configure(JAXPConfigurator.java:107)rn at org.hibernate.connection.ProxoolConnectionProvider.configure(ProxoolConnectionProvider.java:120)rn ... 12 morernCaused by: org.logicalcobwebs.proxool.ProxoolException: Couldn't load class com.mysql.jdbc.Driverrn at org.logicalcobwebs.proxool.configuration.XMLConfigurator.endElement(XMLConfigurator.java:198)rn at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)rn at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)rn at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)rn at org.logicalcobwebs.proxool.configuration.JAXPConfigurator.configure(JAXPConfigurator.java:87)rn ... 14 morernrnrnrn这是我在Hibernate的mapping 的时候eclipse 报错;对话框:An internal error occurred during: "Generating Artifacts". 论坛

A mysterious error reported by gcc

11-18

各位达人,我用gcc的编译器编译以下程序,但老是在宏定义那里报错,但在VC6上却毫无问题。麻烦各位看看,谢谢!rnrn[code=c]/*rn** This program reads input lines from standard input and printsrn** each input line, followed by just some portions of the line, torn** the standard output.rn**rn** The first input is a lint of column numbers, which ends with arn** negative number. The column numbers are paired and specifyrn** ranges of columns from the input line that are to be printed.rn** For example, 0 3 10 12 -1 indicates that only columns 0 through 3rn** and columns 10 through 12 will be printed.rn**/rnrn#include rn#include rn#include rn#define MAX_COLS 20 /* max # of columns to process */rn#define MAX_INPUT 1000 /* max len of input & output lines */rn/× 上面的这个宏定义被报错:expected identifier before numeric constant */rnint read_column_numbers(int columns[], int max);rnvoid rearrange(char * output, char const * input, int n_columns, int const columns[]);rnrnint main(void)rnrn int n_columns; /* # of columns to process */rn int columns[MAX_COLS]; /* the columns to process */rn char input[MAX_INPUT]; /* array for input line */rn char output[MAX_INPUT]; /* array for output line */rnrn /*rn ** Read the list of columns numbersrn */rn n_columns = read_column_numbers(columns, MAX_COLS);rnrn /*rn ** Read, process and print the remaining lines of inputrn */rn puts("Input lines (empty line to quit):");rn while(gets(input) != NULL)rn printf("Original input: %s\n", input);rn rearrange(output, input, n_columns, columns);rn printf("Rearranged line: %s\n", output);rn puts("Input lines (empty line to quit):");rn rn return EXIT_SUCCESS;rnrnrn/*rn ** Read the list of columns numbers, ignoring any beyond the specified maxim.rn */rnrnint read_column_numbers(int columns[], int max)rnrn int num = 0;rn int ch;rnrn /*rn ** Get the numbers, stopping at eof or when a number is < 0.rn */rn puts("Input the column numbers:");rn while (num < max && scanf("%d", &columns[num]) == 1 && columns[num] >= 0)rn num += 1;rnrn /*rn ** Make sure we have an even number of inputs, as they are supposed to be paired.rn */rn if(num % 2 != 0)rn puts("Last column number is not paired.");rn exit(EXIT_FAILURE);rn rn /*rn ** Discard the rest of the line that contained the final number.rn */rn while ((ch = getchar()) != EOF && ch != '\n')rn ;rn return num;rnrnrn/*rn** Process as line of input by concatenating the characters from the indicated columns.rn** The output line is the NUL terminated.rn*/rnrnvoid rearrange(char * output, char const * input, int n_columns, int const columns[])rnrn int col; /* subscript for columns array */rn int output_col; /* output column counter */rn int len; /* length of input line */rnrn len = strlen(input);rn output_col = 0;rnrn /*rn ** Process each pair of column numbers.rn */rn for(col = 0; col < n_columns; col += 2)rn int nchars = columns[col+1] - columns[col] + 1;rnrn /*rn ** If the input line isn't this long or the output array is full, we're done.rn */rn if(columns[col] >= len || output_col == MAX_INPUT - 1)rn break;rnrn /*rn ** If there isn't room in the output array, only copy what will fit.rn */rn if(output_col + nchars > MAX_INPUT - 1)rn nchars = MAX_INPUT - output_col - 1;rn /*rn ** Copy the relevant data.rn */rn strncpy(output + output_col, input + columns[col], nchars);rn output_col += nchars;rn rn output[output_col] = '\0';rnrn[/code] 论坛

C# MYSQL mysqlcommand报错Fatal error encountered during command execution.

03-01

[code=csharp]query = new MySqlCommand("DROP PROCEDURE IF EXISTS `u_excel`;DELIMITER ;;CREATE DEFINER=`root`@`%` PROCEDURE `u_excel`(IN `stime` int,IN `etime` int)BEGIN SET @request:=CONCAT('SELECT tmp1.exc_time,tmp1.exc_emp,tmp1.exc_paup,tmp1.exc_paupscore,IFNULL(tmp2.padone,0)AS exc_padone,IFNULL(tmp2.padonescore,0)AS exc_padonescore,tmp1.exc_recv,tmp1.exc_recvscore,tmp1.exc_reco,tmp1.exc_recoscore,tmp1.exc_releft,tmp1.exc_releftscore FROM (SELECT * from u_excel where exc_time between ',stime,' and ',etime,')as tmp1 LEFT JOIN (SELECT version_updtime,version_painter,count(version_id)AS padone,sum(version_score)AS padonescore from u_version WHERE version_donetime > 0 AND version_updtime between ',stime,' and ',etime,' GROUP BY version_painter, version_updtime)as tmp2 ON tmp1.exc_time =tmp2.version_updtime AND tmp1.exc_emp =tmp2.version_painter');PREPARE stml from @request;EXECUTE stml;END;;DELIMITER ;", con);[/code]rn[code=sql]DROP PROCEDURE IF EXISTS `u_excel`;rnDELIMITER ;;rnCREATE DEFINER=`root`@`%` PROCEDURE `u_excel`(IN `stime` int,IN `etime` int)rnBEGINrn #Routine body goes here...rnSET @request=CONCAT('SELECT tmp1.exc_time,tmp1.exc_emp,tmp1.exc_paup,tmp1.exc_paupscore,IFNULL(tmp2.padone,0)AS exc_padone,IFNULL(tmp2.padonescore,0)AS exc_padonescore,tmp1.exc_recv,tmp1.exc_recvscore,tmp1.exc_reco,tmp1.exc_recoscore,tmp1.exc_releft,tmp1.exc_releftscore FROMrn(SELECT * from u_excel where exc_time between ',stime,' and ',etime,')as tmp1rnLEFT JOINrn(SELECT version_updtime,version_painter,count(version_id)AS padone,sum(version_score)AS padonescore from u_version WHERE version_donetime > 0 AND version_updtime between ',stime,' and ',etime,' GROUP BY version_painter, version_updtime)as tmp2rnONrntmp1.exc_time =tmp2.version_updtime AND tmp1.exc_emp =tmp2.version_painterrn');rn PREPARE stml from @request;rn EXECUTE stml;rnENDrn;;rnDELIMITER ;[/code]rnrnrnc#执行第一句话报错Fatal error encountered during command execution.好像是在@那边出错了rn我自己定义一个没有@的存储过程没有问题,在mysql执行那段sql语句也没有问题rn这个该怎么弄呢 论坛

没有更多推荐了,返回首页