编译安装apache遇到问题 5C

Making all in support
make[1]: Entering directory /root/httpd-2.4.29/support'
make[2]: Entering directory
/root/httpd-2.4.29/support'
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/root/httpd-2.4.29/os/unix -I/root/httpd-2.4.29/include -I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1 -I/root/httpd-2.4.29/modules/aaa -I/root/httpd-2.4.29/modules/cache -I/root/httpd-2.4.29/modules/core -I/root/httpd-2.4.29/modules/database -I/root/httpd-2.4.29/modules/filters -I/root/httpd-2.4.29/modules/ldap -I/root/httpd-2.4.29/modules/loggers -I/root/httpd-2.4.29/modules/lua -I/root/httpd-2.4.29/modules/proxy -I/root/httpd-2.4.29/modules/session -I/root/httpd-2.4.29/modules/ssl -I/root/httpd-2.4.29/modules/test -I/root/httpd-2.4.29/server -I/root/httpd-2.4.29/modules/arch/unix -I/root/httpd-2.4.29/modules/dav/main -I/root/httpd-2.4.29/modules/generators -I/root/httpd-2.4.29/modules/mappers -prefer-non-pic -static -c htpasswd.c && touch htpasswd.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/root/httpd-2.4.29/os/unix -I/root/httpd-2.4.29/include -I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1 -I/root/httpd-2.4.29/modules/aaa -I/root/httpd-2.4.29/modules/cache -I/root/httpd-2.4.29/modules/core -I/root/httpd-2.4.29/modules/database -I/root/httpd-2.4.29/modules/filters -I/root/httpd-2.4.29/modules/ldap -I/root/httpd-2.4.29/modules/loggers -I/root/httpd-2.4.29/modules/lua -I/root/httpd-2.4.29/modules/proxy -I/root/httpd-2.4.29/modules/session -I/root/httpd-2.4.29/modules/ssl -I/root/httpd-2.4.29/modules/test -I/root/httpd-2.4.29/server -I/root/httpd-2.4.29/modules/arch/unix -I/root/httpd-2.4.29/modules/dav/main -I/root/httpd-2.4.29/modules/generators -I/root/httpd-2.4.29/modules/mappers -prefer-non-pic -static -c passwd_common.c && touch passwd_common.lo
/usr/local/apr/build-1/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /usr/local/apr-util/lib/libaprutil-1.la /usr/local/apr/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl -lcrypt
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to XML_GetErrorCode'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to
XML_SetEntityDeclHandler'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to XML_ParserCreate'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to
XML_SetCharacterDataHandler'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to XML_ParserFree'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to
XML_SetUserData'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to XML_StopParser'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to
XML_Parse'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to XML_ErrorString'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to
XML_SetElementHandler'
collect2: error: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory /root/httpd-2.4.29/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
/root/httpd-2.4.29/support'
make: *** [all-recursive] Error 1
[root@bogon httpd-2.4.29]# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-so --enable-rewrite --libdir=/usr/lib64^C
[root@bogon httpd-2.4.29]# ll /usr/lib/libm
libm-2.17.so libmemusage.so libm.so.6

[root@bogon httpd-2.4.29]# ll /usr/lib/libelf
libelf-0.168.so libelf.so.1

[root@bogon httpd-2.4.29]# ll /usr/lib/libelf
libelf-0.168.so libelf.so.1

----------------以上为make后的信息-------------
安装根据http://blog.csdn.net/bizu005/article/details/78339380?locationNum=4&fps=1教程进行操作
环境如下:Centos7.4 编译安装的apache版本为2.4.29

已执行过的操作:
1.安装依赖包yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel

2.添加配置 --libdir=/usr/lib64

3.根据http://www.ti6.net/wangzhanjishu/1587.html所示,但是并未在mv /usr/lib/路径下 找到 libm.a,libm.so,libexpat.so只有一下文件libm-2.17.so libmemusage.so libm.so.6

图片说明

3个回答

缺少相应的库吧。。。

使用该方法 解决 http://blog.51cto.com/mofansheng/1711092
编译参数为:

./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre --enable-mods-shared=most --enable-so

解决办法:

在configure后加上 “--with-included-apr”。再重新编译, make, make install. 即可。

问题又来了,加上--with-included-apr之后,编译,报错如下:

configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.

错误为:apr,apr-util缺失,需要下载并解压到./srclib/目录下

解决办法:

cd /usr/local/src/

cp -r apr-1.5.2 /usr/local/src/httpd-2.4.7/srclib/apr

cp -r apr-util-1.5.4 /usr/local/src/httpd-2.4.7/srclib/apr-util

再次执行./configure就不会报错,make,make install也不会报错;

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

linux 下安装apache不能运行?

版本Linux AS5 ,我把系统自带的httpd强制卸载了,用--nodeps参数。我手动编译的方法,安装了一个apache, 进到/usr/local/apache/bin(/usr/local/apache安装目录),执行apachectl start, 出现错误提示: -bash: /usr/sbin/apachectl: No such file or directory 请问有高手遇到过吗? 该怎么解决?

虚拟机Centos7下使用yum安装的Apache2.4.6无法启动prefork的问题

我先说我遇到的问题的过程 安装过程没有任何报错.使用httpd -l查看结果为 core.c mod_so.c http_core.c 使用httpd -M查看发现mpm_prefork_module (shared)处于动态加载状态 编译配置文件httpd.conf加入LoadModule mpm_prefork_module modules/mod_mpm_prefork.so重启Apache后使用httpd -l查看仍然没有,httpd.conf配置文件中也没有任何有关MPM的代码. mod_so.c这个加载列里有一个00-mpm.conf我打开看了里面是LoadModule mpm_prefork_module modules/mod_mpm_prefork.so,是不是只要在这个队列里的就会只简化显示mod.so.c啊??? 注:httpd.conf与00-mpm.conf两个文件共同存在LoadModule mpm_prefork_module modules/mod_mpm_prefork.so或单个存在均不报错,httpd -l也仍然没有prefork.c 我现在想问的是,是不是这个版本的Apache已经把MPM集成到内核里了所以不显示啊,不然那又是什么原因导致的在httpd -l中无法看到,网上能找到的能试的方法都试过了,所以复制粘贴的回答就不用了,非常困扰我,希望知情人士解惑,万分感谢! ![命令行返回及配置文件](https://img-ask.csdn.net/upload/201705/05/1493961932_366387.png)

编译drill时候遇到的问题

![图片说明](https://img-ask.csdn.net/upload/201606/13/1465785037_302287.png) [ERROR] Plugin org.apache.maven.plugins:maven-shade-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-shade-plugin:jar:2.4.1: 4 problems were encountered while building the effective model for :maven-shade-plugin:2.4.1 [ERROR] [ERROR] Invalid packaging for parent POM [unknown-group-id]:[unknown-artifact-id]:[unknown-version], must be "pom" but is "jar" @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version] [ERROR] [ERROR] 'groupId' is missing. @ org.apache.maven.plugins:maven-shade-plugin:2.4.1 [ERROR] [ERROR] 'dependencies.dependency.version' for org.apache.maven.plugin-tools:maven-plugin-annotations:jar is missing. @ org.apache.maven.plugins:maven-shade-plugin:2.4.1 [ERROR] [ERROR] 'dependencies.dependency.version' for org.codehaus.plexus:plexus-component-annotations:jar is missing. @ org.apache.maven.plugins:maven-shade-plugin:2.4.1 [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException 请各位大神,帮小弟看看 这是什么问题

升级apache2.4.9遇到apr问题

apache2.4.9编译成功后,启动时出错: httpd: Syntax error on line 116 of /app/apacheNew/conf/httpd.conf: Cannot load modules/mod_proxy.so into server: /app/apacheNew/modules/mod_proxy.so: undefined symbol: apr_global_mutex_lockfile httpd -V发现APR版本不一致,怎么回事啊? Server loaded: APR 1.2.7, APR-UTIL 1.5.3 Compiled using: APR 1.5.1, APR-UTIL 1.5.3

ant编译Nutch时编译报错

使用ant1.10.7编译nutch2.3.1时遇到以下报错: ``` resolve-default: [ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ :: [ivy:resolve] :: loading settings :: file = /usr/local/nutch/ivy/ivysettings.xml [ivy:resolve] [ivy:resolve] :: problems summary :: [ivy:resolve] :::: WARNINGS [ivy:resolve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:resolve] :: UNRESOLVED DEPENDENCIES :: [ivy:resolve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:resolve] :: org.springframework#spring-core;4.0.4.RELEASE: configuration not found in org.springframework#spring-core;4.0.4.RELEASE: 'master'. It was required from org.apache.nutch#nutch;working@lxp-virtual-machine master [ivy:resolve] :: org.springframework#spring-context;4.0.4.RELEASE: configuration not found in org.springframework#spring-context;4.0.4.RELEASE: 'master'. It was required from org.apache.nutch#nutch;working@lxp-virtual-machine master [ivy:resolve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:resolve] [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS BUILD FAILED /usr/local/nutch/build.xml:468: impossible to resolve dependencies: resolve failed - see output for details Total time: 18 seconds ``` 网上没有找到相关的内容,有没有大神遇到过这个问题,该如何解决呢?谢谢!

exlipse上的项目在启动Tomcat时报错,有没有遇到过这种问题的,求帮助。

严重: Error deploying deployment descriptor [F:\apache-tomcat-9.0.14-windows-x64\apache-tomcat-9.0.14\conf\Catalina\localhost\ssm.xml] java.lang.IllegalStateException: Error starting child at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:716) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1832) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:934) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1382) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1372) at java.util.concurrent.FutureTask.run(Unknown Source) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:907) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:933) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:637) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@60285225] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4778) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4913) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713) ... 37 more Caused by: java.lang.IllegalArgumentException: 指定的主资源集 [F:\apache-tomcat-9.0.14-windows-x64\apache-tomcat-9.0.14\webapps\ssm] 无效 at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:749) at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 41 more

Eclipse中java类不编译

Eclipse中java类不编译有时候编译,有时候不编译。报错如图所示 中午的时候也报这个错了,我把项目重新开发了一遍。下午的时候还好好的,晚上这会又报这个错了,有谁遇到过这个问题吗?没分了不好意思 org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [F:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\springmvc_mybatis\WEB-INF\classes\cn\itcast\ssm\mapper\ItemsMapper.class]; nested exception is java.lang.IllegalArgumentException at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:281) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242) at org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:155) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.scan(ClassPathBeanDefinitionScanner.java:220) at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:315) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4813) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5272) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80) at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:257) ... 18 more

JAVA6动态编译的问题

在使用JAVA6动态编译时遇到的一个问题,动态编译方法已经写就。通过main方法调用的动态编译时,编译通过,并可以使用编译生成的类。但是,在Tomcat下调用同样的方法进行动态编译时,编译无法通过。其原因是找不到对应的包。因为动态生成的类中import了其他的一些类。我猜是tomcat的某些加载机制影响了动态编译过程,导致动态编译找不引用的类。请问各位,是否有方法解决? [b]问题补充:[/b] 补充代码: 参数 files是一个JavaFile类型的数组,其中包含了Java类的源文件 [code="java"] public static Class[] complie(JavaFile[] files) throws Exception { JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); //ClassLoader clsLoader=ToolProvider.getSystemToolClassLoader(); DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>(); MemoryFileManager filemanage = new MemoryFileManager(compiler .getStandardFileManager(diagnostics, null, null)); //MemoryFileManager filemanage = new MemoryFileManager(compiler //.getStandardFileManager(diagnostics, null, null)); //Log.info("Location\t"+filemanage.) ArrayList<JavaFileObject> clsFiles=new ArrayList<JavaFileObject>(); for(JavaFile file:files) { JavaFileObject clsfile = MemoryFileManager.makeSource(file .getFileName(), file.toString()); clsFiles.add(clsfile); Log.info("compile:"+file.getFileName()+"\t"+clsfile.getName()+"\t"+clsfile.getKind()+"\t"+clsfile.toUri()); } Iterable<? extends JavaFileObject> compilationUnits=clsFiles; JavaCompiler.CompilationTask task = compiler.getTask(null, filemanage, diagnostics, null, options.getClassNames(), compilationUnits); boolean success=false; try { success = task.call(); } catch (Exception e) { e.printStackTrace(); } Class[] clazz=new Class[files.length]; if(success) { for(int i=0;i<clazz.length;i++) { clazz[i] = filemanage.getClassLoader(null).loadClass(files[i].getFileName()); } } else { for (Diagnostic diagnostic : diagnostics.getDiagnostics()) System.out.printf( "Code: %s%n" + "Kind: %s%n" + "Position: %s%n" + "Start Position: %s%n" + "End Position: %s%n" + "Source: %s%n" + "Message: %s%n", diagnostic.getCode(), diagnostic.getKind(), diagnostic.getPosition(), diagnostic.getStartPosition(), diagnostic.getEndPosition(), diagnostic.getSource(), diagnostic.getMessage(null)); } filemanage.close(); return clazz; } [/code] [b]问题补充:[/b] TOMCAT下的编译诊断信息: [code="java"] Code: compiler.err.doesnt.exist Kind: ERROR Position: 0 Start Position: 0 End Position: 0 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:1: 软件包 com.youngor.dboperator 不存在 Code: compiler.err.doesnt.exist Kind: ERROR Position: 104 Start Position: 78 End Position: 112 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:4: 软件包 com.youngor.webcore.entity 不存在 Code: compiler.err.doesnt.exist Kind: ERROR Position: 146 Start Position: 124 End Position: 156 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:6: 软件包 com.youngor.dboperator 不存在 Code: compiler.err.doesnt.exist Kind: ERROR Position: 202 Start Position: 180 End Position: 212 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:9: 软件包 com.youngor.dboperator 不存在 Code: compiler.err.doesnt.exist Kind: ERROR Position: 239 Start Position: 213 End Position: 251 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:9: 软件包 com.youngor.webcore.entity 不存在 Code: compiler.err.doesnt.exist Kind: ERROR Position: 0 Start Position: 0 End Position: 0 Source: mfm:///RuntimeEntitySysPosition.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysPosition.java:1: 软件包 com.youngor.dboperator 不存在 Code: compiler.err.doesnt.exist Kind: ERROR Position: 108 Start Position: 82 End Position: 120 Source: mfm:///RuntimeEntitySysPosition.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysPosition.java:4: 软件包 com.youngor.webcore.entity 不存在 Code: compiler.err.cant.resolve.location Kind: ERROR Position: 328 Start Position: 328 End Position: 337 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:14: 找不到符号 符号: 类 EntitySet 位置: 类 RuntimeEntitySysUser Code: compiler.err.cant.resolve.location Kind: ERROR Position: 383 Start Position: 383 End Position: 392 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:14: 找不到符号 符号: 变量 DefaultDB 位置: 类 RuntimeEntitySysUser Code: compiler.err.doesnt.exist Kind: ERROR Position: 436 Start Position: 410 End Position: 448 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:14: 软件包 com.youngor.webcore.entity 不存在 Code: compiler.err.cant.resolve.location Kind: ERROR Position: 619 Start Position: 619 End Position: -1 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:16: 找不到符号 符号: 变量 super 位置: 类 RuntimeEntitySysUser Code: compiler.err.cant.resolve.location Kind: ERROR Position: 667 Start Position: 667 End Position: -1 Source: mfm:///RuntimeEntitySysUser.java from JavaSourceFromString Message: mfm:///RuntimeEntitySysUser.java:18: 找不到符号 符号: 变量 super 位置: 类 RuntimeEntitySysUser [/code] Tomcat输出的异常信息: [code="java"] java.lang.NullPointerException at com.youngor.dboperator.EntityUtil.getInstance(EntityUtil.java:36) at com.youngor.dboperator.Entity.getInstance(Entity.java:103) at com.youngor.dboperator.SQLServer2000Adaptor.getEntitySetBySQL(SQLServer2000Adaptor.java:283) at com.youngor.dboperator.SQLServer2000Adaptor.getEntitySet(SQLServer2000Adaptor.java:220) at com.youngor.dboperator.InnerDBOperator.getEntitySet(InnerDBOperator.java:451) at com.youngor.dboperator.DBOperator.getEntitySet(DBOperator.java:350) at com.youngor.dboperator.DefaultDB.getEntitySet(DefaultDB.java:147) at com.youngor.dboperator.DefaultDB.getEntitySet(DefaultDB.java:213) at com.youngor.webcore.entity.SysUser.getEntitySet(SysUser.java:501) at com.youngor.webcore.entity.SysUser.doTest(SysUser.java:610) at org.apache.jsp.login_jsp._jspService(login_jsp.java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 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:286) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509) at java.lang.Thread.run(Thread.java:619) java.lang.NullPointerException at com.youngor.dboperator.SQLServer2000Adaptor.getEntitySetBySQL(SQLServer2000Adaptor.java:284) at com.youngor.dboperator.SQLServer2000Adaptor.getEntitySet(SQLServer2000Adaptor.java:220) at com.youngor.dboperator.InnerDBOperator.getEntitySet(InnerDBOperator.java:451) at com.youngor.dboperator.DBOperator.getEntitySet(DBOperator.java:350) at com.youngor.dboperator.DefaultDB.getEntitySet(DefaultDB.java:147) at com.youngor.dboperator.DefaultDB.getEntitySet(DefaultDB.java:213) at com.youngor.webcore.entity.SysUser.getEntitySet(SysUser.java:501) at com.youngor.webcore.entity.SysUser.doTest(SysUser.java:610) at org.apache.jsp.login_jsp._jspService(login_jsp.java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 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:286) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509) at java.lang.Thread.run(Thread.java:619) [/code] [b]问题补充:[/b] public static Class[] complie(JavaFile[] files) throws Exception 这个方法是用main(String[] args)方法测试成功。放到JSP页面中调用输错。错误信息已经在上面给出。 [b]问题补充:[/b] 把com.youngor.*之类的类文件,放到tomcat下的common或shared下对应的classes或lib下,应该就不会报这个异常 或许可以解决问题。但是这不太符合Web应用部署的常规做法,不知“lovewhzlq”是否还有其他可行方法,不吝赐教。 [b]问题补充:[/b] 问题基本解决,需要为编译过程指定编译的类路径; [code="java"] C:\myproject>javac -help 用法:javac <选项> <源文件> 其中,可能的选项包括: -g 生成所有调试信息 -g:none 不生成任何调试信息 -g:{lines,vars,source} 只生成某些调试信息 -nowarn 不生成任何警告 -verbose 输出有关编译器正在执行的操作的消息 -deprecation 输出使用已过时的 API 的源位置 -classpath <路径> 指定查找用户类文件的位置 -cp <路径> 指定查找用户类文件的位置 -sourcepath <路径> 指定查找输入源文件的位置 -bootclasspath <路径> 覆盖引导类文件的位置 -extdirs <目录> 覆盖安装的扩展目录的位置 -endorseddirs <目录> 覆盖签名的标准路径的位置 -d <目录> 指定存放生成的类文件的位置 -encoding <编码> 指定源文件使用的字符编码 -source <版本> 提供与指定版本的源兼容性 -target <版本> 生成特定 VM 版本的类文件 -version 版本信息 -help 输出标准选项的提要 -X 输出非标准选项的提要 -J<标志> 直接将 <标志> 传递给运行时系统 [/code] 修改部分代码如下: [code="java"] String cp=PathTool.get(AdvancedCompilerAPIDemo.class); Log.info(cp); int i=cp.indexOf("/WEB-INF/classes/"); cp=cp.substring(0, i+17); Log.info(cp); Iterable<String> options = Arrays.asList("-d", cp,"-cp",cp); // 编译选项,将编译产生的类文件放在当前目录下 CompilationTask task = compiler.getTask(null, fileManager, diagnostics, options, null, sourcefiles); [/code] 这里找到了WEb应用的classes目录并设置为编译输出目录和类路径。编译通过并可以使用了。

Android Studio 3.5.2 / 3.5.3 cocos2d-x 3.17.2 android编译问题

先上环境 Java:Java1.8.60 SDK:API -> android-28 Tools -> 26.1.1 NDK:android-ndk-r16b cocos官方说是以android-ndk-r16b测试的,所以我用了这个 ANT:1.10.7 Python:2.7.9 Android studio :3.5.3 cocos2d-x:cocos2d-x 3.17.2 好吧,就这些了,首先我用cocos new创建项目 用Android studio 3.5.3 打开项目,OK,测试成功!如图 <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576218933_195606.png) <br><br> 能编译成功中途也遇到了各种坑,先不说这个,再说一说后续开发的问题 比如:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219089_983324.png) <br><br> 上图就是我自己重新创建了一个MainScene的场景,在HelloWorldScene.cpp中引用这个类,并实例化,如图:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219341_669768.png) <br><br> 在HelloWorldScene::init()中创建一个sc的MainScene指针 <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219348_260859.png) <br><br> 以上代码在VS2015 编译通过,或者创建一个按钮点击事件中创建MainScene场景,并replaceScene函数替换当前场景,VS编译没有问题,但android studio提示MsinScene::createScene()未定义!!! <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219705_649754.png) <br><br> 说到这里,肯定有人会说,你应该是Android.mk没有包含cpp文件吧?<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219788_453715.png) <br><br> 到底是哪里出了错误,为什么要这样对我啊 我在MainScene文件中定义其他的类或者继承类却能通过,如下:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220195_583121.png)![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220201_747295.png)![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220208_452735.png) <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220308_238647.png) <br><br> 为什么会这样? 定义其他类都没有问题,Scene就搞不了事情了,救命~~啊 <br><br><br> 我自己搞定了,编译发现gradle.properties 中的编译模式是Cmake,并不是NDK-Build模式,如下:<br> PROP_BUILD_TYPE=cmake<br> 所以Android.mk文件包含ccp是没有用的,只能在项目根目录的CMakeLists.txt文件里包含cpp文件就可以了,如下图:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576229813_129581.png) <br><br>纠结好久的问题终于解决了,希望能帮到别人<br> 我用的工具是:<br> android studio 3.5.3<br> cocos2d-x 3.17.2<br> NDK r16b<br> SDK API 28 <br> SDK build tools 26.1.1<br> apache ant 1.10.7 <br> python 2.7.9<br> java jdk1.8.0_91<br> Visual studio 2015 社区版<br>

JSP编译问题

编译JSP文件时遇到如下错误: The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files 一直无法解决,求指点!!

学习struts2中遇到JSP无法编译的问题

运行<浪曦_Struts2应用开发系列第二讲>报错 login2.jsp代码: [code="java"] <%@ page language="java" c pageEncoding="utf-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTDHTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" c> <title>Insert title here</title> </head> <body> <s:form action="login.do"> <s:textfield name="username" label="username"></s:textfield> <s:password name="password" label="password"></password> <s:submit label="submit"></s:submit> </s:form> </body> </HTML>[/code] 运行时tomcat报错: [code="java"]15/08/2008 12:00:49 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/BodyTagSupport at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method)[/code]

想用java操作hbase,遇到了些问题

新手 在网上看教程,用java在hbase中创建表,输入代码之后问题很多 package hbase; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.MasterNotRunningException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.ZooKeeperConnectionException; import org.apache.hadoop.hbase.client.HBaseAdmin; public class hbasetest1 { private static final String TABLE_NAME = "test1"; private static final String FAMILY_NAME = "cf1"; public static void main(String[] args) throws Exception { // TODO Auto-generated method stub Configuration conf = HBaseConfiguration.create(); conf.set("hbase.rootdir","hdfs://master:9000/hbase"); conf.set("hbase.zookeeper.quorum","master:2181"); HBaseAdmin hBaseAdmin = new HBaseAdmin(conf); HTableDescriptor htableDescriptor = new HTableDescriptor(TABLE_NAME); htableDescriptor.addFamily(new HColumnDescriptor(FAMILY_NAME)); hBaseAdmin.createTable(htableDescriptor); } } 直接编译运行的话: log4j:WARN No appenders could be found for logger (org.apache.hadoop.security.Groups). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.apache.hadoop.hbase.TableExistsException: test1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106) at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:95) at org.apache.hadoop.hbase.util.ForeignExceptionUtil.toIOException(ForeignExceptionUtil.java:45) at org.apache.hadoop.hbase.client.HBaseAdmin$ProcedureFuture.convertResult(HBaseAdmin.java:4617) at org.apache.hadoop.hbase.client.HBaseAdmin$ProcedureFuture.waitProcedureResult(HBaseAdmin.java:4575) at org.apache.hadoop.hbase.client.HBaseAdmin$ProcedureFuture.get(HBaseAdmin.java:4508) at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:674) at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:604) at hbase.hbasetest1.main(hbasetest1.java:29) Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.TableExistsException): test1 at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.prepareCreate(CreateTableProcedure.java:287) at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.executeFromState(CreateTableProcedure.java:108) at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.executeFromState(CreateTableProcedure.java:58) at org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:119) at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:465) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1061) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:856) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:809) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$400(ProcedureExecutor.java:75) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor$2.run(ProcedureExecutor.java:495) ant运行: Buildfile: /home/celine/workspace/test-hbase/build.xml clean: [delete] Deleting directory /home/celine/workspace/test-hbase/dist [delete] Deleting directory /home/celine/workspace/test-hbase/classes [echo] 清理完毕 init: [mkdir] Created dir: /home/celine/workspace/test-hbase/classes [mkdir] Created dir: /home/celine/workspace/test-hbase/dist compile: [javac] Compiling 1 source file to /home/celine/workspace/test-hbase/classes [javac] Note: /home/celine/workspace/test-hbase/src/hbase/hbasetest1.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. jar: [jar] Building jar: /home/celine/workspace/test-hbase/dist/jar.jar ssh: [scp] Connecting to 192.168.124.128:22 [scp] done. sshexec: [sshexec] Connecting to 192.168.124.128:22 [sshexec] cmd : source /etc/profile; hadoop jar ~/jar.jar hbase.hbasetest1 [sshexec] Exception in thread "main" [sshexec] java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration [sshexec] at hbase.hbasetest1.main(Unknown Source) [sshexec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [sshexec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [sshexec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [sshexec] at java.lang.reflect.Method.invoke(Method.java:606) [sshexec] at org.apache.hadoop.util.RunJar.run(RunJar.java:221) [sshexec] at org.apache.hadoop.util.RunJar.main(RunJar.java:136) [sshexec] Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration [sshexec] at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [sshexec] at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [sshexec] at java.security.AccessController.doPrivileged(Native Method) [sshexec] at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [sshexec] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [sshexec] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [sshexec] ... 7 more BUILD FAILED /home/celine/workspace/test-hbase/build.xml:72: Remote command failed with exit status 1 每次都说远程有问题,但是我在build.xml里面配好了相关信息,不知道为什么sshexec会失败 TAT刚刚开始学,好难,好多问题……

java 查看jar文件的运行路径和编译路径

遇到一个这样问题: 分析可能是jar文件的运行路径和编译路径不一致导致的,该怎么查看编译和运行路径呢? ``` java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.text.StringEscapeUtils cc.openhome.web.EscapeWrapper.getParameter(EscapeWrapper.java:15) ``` 大佬帮帮忙

运行java 遇到NoClassDefFoundError

在编程java中遇到![CSDN移动问答][1] 的问题 javac编译通过 classpath已经检查,是存在.;这一部分的 同时我在同一java文件夹的其他文件夹下测试了helloworld程序,能够正常显示 不知道是什么问题,希望各位不吝赐教 唯一与helloworld特殊一点的是这个主程序调用了几个自建package,这几个文件夹下都编译生成了class文件 目录如下 ![CSDN移动问答][2] [1]: http://drp.io/files/534e905d04ffc.png [2]: http://drp.io/files/534e90fe42958.png 刚学java不久,问题较多,谢谢!

tomcat启动成功访问网页报编译版本低于1.7。使用的是jdk1.7

org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 27 in the jsp file: /WEB-INF/include/prelude.jsp Resource specification not allowed here for source level below 1.7 24: SessionManager sessionManager = resourceProvider.getResource(SessionManager.class); 25: Session dimengSession = sessionManager.getSession(request, response,true); 26: SystemDefine systemDefine = resourceProvider.getSystemDefine(); 27: try (ServiceSession serviceSession = resourceProvider.getResource( 28: ServiceProvider.class).createServiceSession(dimengSession)) { 29: FileStore fileStore = resourceProvider.getResource(FileStore.class); 30: Rewriter rewriter = resourceProvider.getSystemDefine().getRewriter(); Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:488) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:466) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:337) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:427) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) 编译的版本已经是1.7,tomcat的版本是7.0.52,这个问题不知道出在哪里了。有没有遇到过类似情况的。

用eclipse编译时总是出现这个错误 谁知道怎么回事么

C:\yagarto-tools-20121018\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

求助java学习过程中使用mybatis时遇到异常报错PersistenceException

异常错误信息是 ``` Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NullPointerException ### The error may exist in com/briup/estore/dao/CustomerMapper.xml ### The error may involve com.briup.estore.dao.ICustomerDao.findByName ### The error occurred while executing a query ### Cause: java.lang.NullPointerException at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:122) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:73) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:69) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53) at com.sun.proxy.$Proxy0.findByName(Unknown Source) at com.briup.estore.service.impl.Test.main(Test.java:21) Caused by: java.lang.NullPointerException at java.lang.String.<init>(Unknown Source) at oracle.sql.CharacterSet.AL32UTF8ToString(CharacterSet.java:1518) at oracle.jdbc.driver.DBConversion.CharBytesToString(DBConversion.java:610) at oracle.jdbc.driver.DBConversion.CharBytesToString(DBConversion.java:555) at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:822) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:362) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:201) at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:196) at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:93) at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:385) at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:89) at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:140) at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:62) at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:315) at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:75) at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:61) at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303) at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:154) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:102) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:82) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120) ... 6 more ``` 我使用的mybatis-config.xml和mapper.xml中的代码都没有问题,我把原代码打包都放入他人电脑中运行都能成功,而我的不行,会报上述异常,数据库用的是Oracle 10g ,编译代码的是eclipse 4.7,Oracle使用cmd命令可以使用,但是就是用mybatis的不行,有没有大佬知道这种情况的,求帮助

为什么这个代码在visual studio 2019中编译无错误无警报,而运行时会出现错误?

为什么这个代码在visual studio 2019中编译无错误无警报,而运行时会出现错误? ``` LNK1120 2 个无法解析的外部命令 Test E:\ProgramData\C Files\Test\Debug\Test.exe 1 LNK2001 无法解析的外部符号 _num1 Test E:\ProgramData\C Files\Test\main.obj 1 LNK2001 无法解析的外部符号 _num2 Test E:\ProgramData\C Files\Test\main.obj 1 ``` <br/> ``` #include <stdio.h> void swap() { extern int num1; extern int num2; int temp; temp = num1; num1 = num2; num2 = temp; } int main(int argc, const char* argv[]) { int num1 = 3; int num2 = 8; swap(); printf("num1 = %d\nnum2 = %d\n", num1, num2); return 0; } ```

eclipse导入项目,修改配置后,运行报错

HTTP状态 500 - 内部服务器错误 类型 异常报告 消息 无法为JSP编译类 描述 服务器遇到一个意外的情况,阻止它完成请求。 例外情况 org.apache.jasper.JasperException: 无法为JSP编译类 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:612) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 根本原因。 javax.el.ELException: Unable to find ExpressionFactory of type [# Licensed to the Apache Software Foundation (ASF) under one or more] javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:152) javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:91) org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:116) org.apache.jasper.compiler.Compiler.compile(Compiler.java:375) org.apache.jasper.compiler.Compiler.compile(Compiler.java:351) org.apache.jasper.compiler.Compiler.compile(Compiler.java:335) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 根本原因。 java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1358) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180) javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:145) javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:91) org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:116) org.apache.jasper.compiler.Compiler.compile(Compiler.java:375) org.apache.jasper.compiler.Compiler.compile(Compiler.java:351) org.apache.jasper.compiler.Compiler.compile(Compiler.java:335) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ):注意 主要问题的全部 stack 信息可以在 server logs 里查看

2019 Python开发者日-培训

2019 Python开发者日-培训

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

设计模式(JAVA语言实现)--20种设计模式附带源码

设计模式(JAVA语言实现)--20种设计模式附带源码

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

java后台+微信小程序 实现完整的点餐系统

java后台+微信小程序 实现完整的点餐系统

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

2019 AI开发者大会

2019 AI开发者大会

玩转Linux:常用命令实例指南

玩转Linux:常用命令实例指南

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

Git 实用技巧

Git 实用技巧

Python数据清洗实战入门

Python数据清洗实战入门

使用TensorFlow+keras快速构建图像分类模型

使用TensorFlow+keras快速构建图像分类模型

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

程序员的算法通关课:知己知彼(第一季)

程序员的算法通关课:知己知彼(第一季)

MySQL数据库从入门到实战应用

MySQL数据库从入门到实战应用

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

手把手实现Java图书管理系统(附源码)

手把手实现Java图书管理系统(附源码)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

.net core快速开发框架

.net core快速开发框架

玩转Python-Python3基础入门

玩转Python-Python3基础入门

Python数据挖掘简易入门

Python数据挖掘简易入门

微信公众平台开发入门

微信公众平台开发入门

程序员的兼职技能课

程序员的兼职技能课

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

HoloLens2开发入门教程

HoloLens2开发入门教程

微信小程序开发实战

微信小程序开发实战

Java8零基础入门视频教程

Java8零基础入门视频教程

相关热词 c#树形选择 c#中类图的使用方法 c# 传参 调用exe c# 怎么定义方法 c# 修改本地时间 c#前台怎么读取资源文件 c# xml转list c#实现框选截图 m*m乘法表c# c# 乘法99表
立即提问